]> git.saurik.com Git - bison.git/blob - ChangeLog
* NEWS: Version 2.1.
[bison.git] / ChangeLog
1 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
2
3 * NEWS: Version 2.1.
4
5 * NEWS: Remove notice of yytname change, since it was never in an
6 official release.
7 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8 diagnostic.
9 * src/output.c (prepare): Likewise.
10 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
11 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
12 is not defined. This is an awful hack, but it's enough for now.
13 All callers changed.
14 * tests/glr-regression-at (make_value): Args are const pointers now,
15 to avoid GCC warning.
16 (Duplicated user destructor for lookahead): New test. Currently
17 skipped. It fails on my host but I'm not sure it'll always fail.
18
19 2005-09-16 Akim Demaille <akim@epita.fr>
20
21 * src/symtab.h (struct symbol): Declare the printer and destructor
22 as const, to avoid accidental calls to free.
23 (symbol_destructor_set, symbol_printer_set): Adjust.
24 * src/symtab.c: Adjust.
25
26 2005-09-16 Akim Demaille <akim@epita.fr>
27
28 * data/c.m4 (b4_token_enums): New.
29 (b4_token_defines): Rename as...
30 (b4_token_enums_defines): this.
31 (b4_token_defines): New, output only the #defines.
32 * data/yacc.c, data/glr.c: Adjust.
33 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
34 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
35 as default values.
36
37 2005-09-16 Akim Demaille <akim@epita.fr>
38
39 * data/lalr1.cc (yylex_): Remove, inline its code.
40 (yyreport_syntax_error_): Remove, replaced by...
41 (yysyntax_error_): this which returns a string and leaves to the
42 caller the call to the users' error function.
43 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
44 Move from members of the parser object...
45 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
46 to local variables of the parse function.
47
48 2005-09-16 Akim Demaille <akim@epita.fr>
49
50 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
51 since it's in Bison's name space.
52
53 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
54
55 * data/glr.c (yyresolveValue): Add default case to pacify
56 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
57
58 * NEWS: Document when yyparse started to return 2.
59 * doc/bison.texinfo (Parser Function): Document when yyparse
60 returns 2.
61
62 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
63 (b4_filename_type): Renamed back from b4_file_name_type. All uses
64 changed.
65 (class position): file_name -> filename (reverting). All uses changed.
66
67 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
68
69 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
70 do anything if $@ exists. This reverts part of the 2005-07-07
71 patch.
72
73 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
74
75 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
76 contains obsolete information and isn't worth distributing as a
77 separate file anyway.
78 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
79 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
80 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
81 (yyparse): Abort if user code uses longjmp to throw an unexpected
82 value.
83
84 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
85
86 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
87 Suggested by twlevo@xs4all.nl.
88
89 * data/glr.c (YYCHK1): Do not assume YYE is in range.
90 This avoids a diagnostic from gcc -Wswitch-enum.
91 Problem reported by twlevo@xs4all.nl.
92
93 * doc/bison.texinfo: Don't use "filename", as per GNU coding
94 standards. Use "file name" or "file" or "name", depending on
95 the context.
96 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
97 not to hack/foo.tab.c.
98 (Calc++ Top Level): 2nd arg of main is not const.
99 * data/glr.c: b4_filename -> b4_file_name.
100 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
101 All uses changed.
102 (class position): filename -> file_name. All uses changed.
103 * data/yacc.c: b4_filename -> b4_file_name.
104 * lib/bitset.h: filename -> file_name in local vars.
105 * lib/bitset_stats.c: Likewise.
106 * src/files.c: Likewise.
107 * src/scan-skel.l ("@output ".*\n): Likewise.
108 * src/files.c (file_name_split): Renamed from filename_split.
109 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
110
111 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
112
113 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
114 to accommodate latest gnulib.
115
116 * tests/glr-regression.at (Duplicate representation of merged trees):
117 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
118
119 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
120 needed.
121
122 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
123
124 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
125 All uses changed. Invoke user destructor after an error during a
126 split parse (trivial change from Joel E. Denny).
127
128 * tests/glr-regression.at
129 (User destructor after an error during a split parse): New test case.
130 Problem reported by Joel E. Denny in:
131 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
132
133 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
134
135 * README-cvs: Give URLs for recommended tools.
136 Mention Gzip version problem, and bootstrapping issues.
137 Remove troubleshooting section, as it's somewhat obsolete.
138
139 * bootstrap (no_cache): New var, to accommodate different wget
140 variants. Use it instead of '-C off'. Problem reported by
141 twlevo@xs4all.nl.
142
143 * data/glr.c (yydestroyStackItem): New function.
144 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
145 debugging information. Problem reported by Joel E. Denny.
146
147 2005-08-25 Akim Demaille <akim@epita.fr>
148
149 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
150
151 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
152
153 * data/glr.c (yyrecoverSyntaxError, yyreturn):
154 Don't invoke destructor on unresolved entries.
155 * tests/glr-regression.at
156 (User destructor for unresolved GLR semantic value): New test case.
157 Problem reported by Joel E. Denny in:
158 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
159
160 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
161
162 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
163 Add strnlen.c.
164 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
165 lib-prefix.m4, po.m4.
166
167 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
168 in yydestruct diagnostic, since it might not be an error.
169 Problem reported by Joel Denny near end of
170 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
171 * data/lalr1.cc (yyerturn): Likewise.
172 * data/yacc.c (yyreturn): Likewise.
173 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
174
175 * src/files.c: Remove obsolete FIXME comment.
176
177 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
178 with the other templates, and to fix bogus run-on messages such
179 as the one reported at the end of
180 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
181 All callers changed to avoid the newline.
182 (yyprocessOneStack): Output two lines rather than one, to accommodate
183 the above change. This changes the debug output format slightly.
184
185 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
186 reported by Joel E. Denny in
187 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
188 (trivial change).
189 * tests/glr-regression.at (Duplicate representation of merged trees):
190 New test, from Joel E. Denny in:
191 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
192 * THANKS: Add Joel E. Denny.
193
194 * configure.ac (AC_INIT): Bump to 2.0c.
195
196 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
197
198 * NEWS: Version 2.0b.
199
200 * Makefile.am (SUBDIRS): Put examples before tests, so that
201 "make check" doesn't finish with "All 1 tests passed".
202
203 * tests/regression.at (Token definitions): Don't rely on
204 AT_PARSER_CHECK for data that contains backslashes. It currently
205 uses 'echo', and 'echo' isn't portable if its argument contains
206 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
207 that the byte '\0xff' is not printable in the C locale; it is,
208 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
209 not printable, so use '\0x81' to test.
210
211 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
212 version of GCC, since the macro is used with non-GCC compilers.
213
214 Fix core dump reported by Pablo De Napoli in
215 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
216 * tests/regression.at (Invalid inputs with {}): New test.
217 * src/parse-gram.y (token_name): Translate type before using
218 it as an index.
219
220 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
221 the user's name space. All uses changed to __attribute__
222 ((__unused__)).
223 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
224 Add __attribute__ ((__noreturn__)).
225
226 * etc/clcommit: Remove. We weren't using it, and it failed
227 "make maintainer-distcheck".
228 * Makefile.maint: Merge from coreutils.
229 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
230 (syntax-check-rules): Change list of rules as described below.
231 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
232 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
233 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
234 (sc_trailing_space): New rules.
235 (sc_xalloc_h_in_src): Remove.
236 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
237 (sc_space_tab, sc_error_exit_success, sc_changelog):
238 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
239 (makefile-check, po-check, author_mark_check):
240 (makefile_path_separator_check, copyright-check):
241 Use grep -n, to make it easier to find violations.
242 Use CVS_LIST and CVS_LIST_EXCEPT.
243 (header_regexp, h_re): Remove.
244 (dd_c): New macro.
245 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
246 (my-distcheck): Use more-modern GCC flags.
247 (signatures, %.asc): Remove.
248 (rel-files, announcement): Remove signatures.
249 Restore old updating code, even though we don't use it, so
250 that we're the same as coreutils.
251 (alpha, beta, major): Depend on news-date-check.
252 Make the upload commands.
253
254 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
255 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
256 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
257 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
258 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
259 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
260 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
261 * tests/sets.at: Likewise.
262
263 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
264 we comment out the Autoconf version number.
265 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
266 it's error-prone and "make maintainer-distcheck" rejects it.
267
268 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
269 Indent calls to "error" to pacify "make maintainer-distcheck",
270 when the calls are not intended to be translated.
271 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
272
273 * src/Makefile.am (DEFS): Use +=, to pacify
274 "make maintainer-distcheck".
275 (bison_SOURCES): Add scan-skel.h.
276 (sc_tight_scope): New rule, from coreutils.
277
278 * src/files.c (src_extension, header_extension):
279 Now static, not extern.
280 * src/getargs.c (short_options): Likewise.
281 * src/muscle_tab.c (muscle_table): Likewise.
282 * src/parse-gram.y (current_class, current_type, current_prec):
283 Likewise.
284 * src/reader.c (grammar_end, previous_rule_end): Likewise.
285 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
286 * src/main.c (main): Cast bindtextdomain and textdomain calls to
287 void, to avoid warning when NLS is disabled.
288 * src/output.c: Include scan-skel.h.
289 (scan_skel): Remove decl, since scan-skel.h does this.
290 (output_skeleton):
291 Indent calls to "error" to pacify "make maintainer-distcheck".
292 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
293 * src/reader.h (gram_end, gram_lineno): New decls to pacify
294 "make maintainer-distcheck".
295 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
296 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
297 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
298 (skel_lex_destroy, scan_skel): Move these decls to...
299 * src/scan-skel.h: New file.
300 * src/uniqstr.c (uniqstr_assert):
301 Indent calls to "error" to pacify "make maintainer-distcheck".
302
303 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
304 not @VAR@.
305
306 * tests/torture.at: Revamp to avoid misuse of atoi that
307 "make maintainer-distcheck" complained about.
308
309 * examples/extexi (message): Don't print a message more than once,
310 and omit line-number decoration that makes Emacs compile think
311 that informative messages are worth worrying about.
312
313 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
314
315 * configure.ac: Update version number.
316
317 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
318 accidentally.
319 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
320 autogenerated by the maintainer.
321 * examples/calc++/.cvsignore: Add *.yy.
322
323 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
324 * lib/bitset_stats.c (bitset_stats_init): Likewise.
325 * lib/bitsetv.c (bitsetv_alloc): Likewise.
326
327 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
328
329 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
330 from maintainer-distcheck about casting the argument of 'free'.
331
332 * NEWS: Mention recent yytname changes.
333 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
334
335 * bootstrap: For translations that have not yet been upgraded to
336 the new runtime-po domain, prime the pump by extracting the
337 relevant strings from the obsolete translations. This code can be
338 removed once the bison-runtime domain has been translated by each
339 team.
340
341 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
342 now that token names are already quoted.
343
344 Fix problem reported by Anthony Heading.
345 * data/glr.c (YYTOKEN_TABLE): New macro.
346 (yytname): Define if YYTOKEN_TABLE.
347 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
348 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
349 (YYERROR_VERBOSE): Define the same way the other skeletons do.
350 * src/output.c (prepare_symbols): Output token_table_flag.
351
352 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
353
354 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
355 again if the first call fails.
356
357 * data/glr.c (yytnamerr): New function.
358 (yyreportSyntaxError): Use it to dequote most string literals.
359 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
360 with other skeletons. All uses changed.
361 (yytnameerr_): New function.
362 (yyreport_syntax_error): Use it to dequote most string literals.
363 * data/yacc.c (yytnamerr): New function.
364 (yyerrlab): Use it to decode most string literals.
365 * doc/bison.texinfo (Decl Summary, Calling Convention):
366 Clarify quoting convention of yytname.
367 * src/output.c (prepare_symbols): Quote all names. This undoes
368 the 2005-04-17 change, which is now accomplished (mostly) via
369 changes in the parsers as described above.
370 * tests/regression.at (Token definitions, Web2c Actions):
371 Undo most 2005-04-17 change here, too.
372
373 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
374
375 Fix more problems reported by twlevo@xs4all.nl.
376 * tests/cxx-type.at: Don't pipe output of ./types through sed to
377 remove trailing spaces. This loses the exit status of ./types,
378 and isn't needed since ./types shouldn't be emitting trailing
379 spaces.
380 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
381 as the stack isn't valid in that case.
382
383 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
384 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
385 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
386 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
387 is used.
388 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
389 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
390 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
391 Likewise.
392
393 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
394 overly-picky compilers that reject 'char *foo = "bar";'.
395
396 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
397 to FILE * parameter, not to stderr. This fixes a typo introduced
398 in the 2005-07-12 change.
399
400 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
401 warnings from GCC 4.
402
403 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
404 (yyglrShiftDefer, yysplitStack):
405 Remove unused parameters b4_pure_formals. All uses changed.
406 (yyglrShift): Remove unused parameters b4_user_formals.
407 All uses changed.
408 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
409
410 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
411
412 Destructor cleanups and regularization among the three skeletons.
413 * NEWS: Document the behavior changes.
414 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
415 stack before failing, as the cleanup code will do it for us now.
416 * data/lalr1.cc (yyerrlab): Likewise.
417 * data/glr.c (yyparse): Pop everything off the stack before
418 freeing it, so that destructors get called properly.
419 * data/lalr1.cc (yyreturn): Likewise.
420 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
421 This is more consistent.
422 * doc/bison.texinfo (Destructor Decl): Mention more reasons
423 why destructors might be called. 1.875 -> 2.1.
424 (Destructor Decl, Decl Summary, Table of Symbols):
425 Some English-language cleanups for %destructor.
426 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
427 Add output line for destructor of start symbol.
428 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
429 because of that same extra output line.
430
431 * NEWS: Document minor wording changes in diagnostics of
432 Bison-generated parsers.
433 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
434 Remove unused formals. All uses changed.
435 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
436 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
437 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
438 Rename yyoverflowab to yyexhaustedlab.
439 When memory exhaustion occurs during syntax-error reporting,
440 report it separately rather than in a single diagnostic; this
441 eases translation.
442 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
443 (Memory Exhausted): Renamed from Parser Stack Overflow.
444 Revamp wording slightly to prefer "memory exhaustion".
445 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
446
447 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
448
449 Add i18n support to the GLR skeleton. Partially fix the C++
450 skeleton; a C++ expert needs to finish this. Remove debugging
451 msgids; there's little point to having them translated, since they
452 can be understood only by someone who can read the
453 (English-language) source code.
454
455 Generate runtime-po/bison-runtime.pot automatically, so that we
456 don't have to worry about garbage getting in that file. We'll
457 make sure after the next official release that old msgids don't
458 get lost. See
459 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
460
461 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
462 Now auto-generated.
463 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
464 Fix typos in explanations of the runtime file.
465 * bootstrap: Change gettext keyword from YYI18N to YY_.
466 Use standard Makefile.in.in in runtime-po, since we'll arrange
467 for backward-compatible bison-runtime.po files in a different way.
468 * data/glr.c (YY_): New macro, from yacc.c.
469 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
470 Translate messages intended for users.
471 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
472 the wording in the other skeletons. We don't know that the memory
473 is virtual.
474 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
475 Use same method that yacc.c uses.
476 Don't translate debugging messages.
477 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
478 it doesn't work (yet), and requires C++ expertise to fix.
479 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
480 Move defn to a more logical place, to be consistent with other
481 skeletons.
482 Don't translate debugging messages.
483 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
484 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
485 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
486 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
487
488 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
489 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
490 void, not int.
491 * tests/glr-regression.at (Badly Collapsed GLR States):
492 Likewise.
493 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
494 yylex should return 0 at EOF rather than aborting.
495
496 Improve tests for stack overflow in GLR parser.
497 Problem reported by twlevo@xs4all.nl.
498 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
499 All uses removed.
500 (yyStackOverflow): Just longjmp, but with value 2 so that caller
501 can handle the problem.
502 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
503 (yyparse): New local variable yyresult to record the result.
504 Use result of setjmp to set it, rather than storing itinto
505 struct.
506 (yyDone): Remove label.
507 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
508 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
509 if YYABORT is used).
510 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
511 yyparse status; put status > 1 into diagnostic.
512 Check that status==2 works.
513 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
514 Use exit status 3 for failure to open (which shouldn't happen).
515
516 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
517
518 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
519 1 on syntax error; just let yyparse do its thing.
520 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
521 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
522 (Exploding the Stack Size with Alloca):
523 (Exploding the Stack Size with Malloc):
524 Expect exit status 2, not 1, since the parser is supposed to blow
525 its stack. Problem reported by twlevo@xs4all.nl.
526
527 * data/glr.c (yyparse): Don't assume that the initial calls
528 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
529 Print a stack-overflow message and fail instead.
530 Initialize the line-number information before creating the stack,
531 so that the stack-overflow message can report line zero safely.
532
533 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
534
535 Fix problems reported by twlevo@xs4all.nl.
536 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
537 (yyuserMerge): Provide a default case if b4_mergers is empty.
538 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
539 * tests/glr-regression.at
540 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
541 Add casts to pacify C++ compilers.
542 * tests/glr-regression.at (Improper merging of GLR delayed action
543 sets): Declare yylex before using it.
544 * tests/Makefile.am (maintainer-check-g++): Fix a stray
545 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
546 test for valgrind; valgrind is independent of g++.
547 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
548 for compatibility with POSIX 1003.1-2001 (if running coreutils).
549 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
550 Use a destructor, so that we can expand the stack. Change
551 YYSTYPE to char * so that we can free it. Cast result of malloc.
552
553 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
554
555 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
556 a valgrind failure. Problem reported by twlevo@xs4all.nl.
557
558 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
559
560 * PACKAGING: New file, suggested by Bruno Haible and taken from
561 similar wording in gettext's PACKAGING file.
562 * NEWS: Mention PACKAGING.
563 * Makefile.am (EXTRA_DIST): Add PACKAGING.
564
565 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
566
567 * NEWS: Document recent i18n improvements.
568 * bootstrap: Get runtime translations into runtime-po.
569 Create runtime-po files automatically, if possible.
570 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
571 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
572 does not infringe on the user's name space.
573 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
574 * doc/bison.texinfo (Internationalization): Revamp the English
575 and Texinfo syntax a bit, to try to make it clearer.
576 (Bison Options, Option Cross Key): Mention --print-localedir.
577 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
578 YYENABLE_NLS. Quote a bit more.
579 * runtime-po/.cvsignore: New file.
580 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
581 * runtime-po/Rules-quot: Remove; now created by bootstrap.
582 * runtime-po/quot.sed: Likewise.
583 * runtime-po/boldquot.sed: Likewise.
584 * runtime-po/en@quot.header: Likewise.
585 * runtime-po/en@boldquot.header: Likewise.
586 * runtime-po/insert-header.sin: Likewise.
587 * runtime-po/remove-potcdate.sin: Likewise.
588 * runtime-po/Makevars: Likewise.
589 * runtime-po/LINGUAS: Likewise.
590 * runtime-po/de.po: Likewise; we will rely on the translation project
591 to maintain this, so "bootstrap" should get it.
592 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
593 its value.
594 * src/main.c (main): Bind the bison-runtime domain, too.
595
596 2005-07-12 Bruno Haible <bruno@clisp.org>
597
598 * data/yacc.c: Include <libintl.h> when NLS is enabled.
599 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
600 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
601 * runtime-po: New directory.
602 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
603 $(DOMAIN).pot-update rule, so that old messages are never dropped.
604 * runtime-po/Rules-quot: New file, copied from po/.
605 * runtime-po/quot.sed: Likewise.
606 * runtime-po/boldquot.sed: Likewise.
607 * runtime-po/en@quot.header: Likewise.
608 * runtime-po/en@boldquot.header: Likewise.
609 * runtime-po/insert-header.sin: Likewise.
610 * runtime-po/remove-potcdate.sin: Likewise.
611 * runtime-po/Makevars: New file.
612 * runtime-po/POTFILES.in: New file.
613 * runtime-po/LINGUAS: New file.
614 * runtime-po/bison-runtime.pot: New file.
615 * runtime-po/de.po: New file.
616 * m4/bison.m4: New file.
617 * Makefile.am (SUBDIRS): Add runtime-po.
618 (aclocaldir, aclocal_DATA): New variables.
619 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
620 Define aclocaldir.
621 * src/getargs.c (usage): Document --print-localedir option.
622 (PRINT_LOCALEDIR_OPTION): New enum item.
623 (long_options): Add --print-localedir option.
624 (getargs): Handle --print-localedir option.
625 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
626 (Internationalization): New section.
627
628 2005-07-12 Akim Demaille <akim@epita.fr>
629
630 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
631 for consistency with the rest of the code.
632 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
633 Add separators.
634
635 2005-07-12 Akim Demaille <akim@epita.fr>
636
637 * src/parse-gram.y: Use %printer instead of YYPRINT.
638
639 2005-07-12 Akim Demaille <akim@epita.fr>
640
641 * src/symtab.h, src/symtab.c (symbol_print): New.
642 * src/symlist.h, src/symlist.c (symbol_list_print): New.
643 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
644
645 2005-07-12 Akim Demaille <akim@epita.fr>
646
647 * data/glr.c (b4_syncline): Fix (swap) the definitions of
648 b4_at_dollar and b4_dollar_dollar.
649
650 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
651
652 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
653 and Pennello's paper.
654
655 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
656
657 * data/yacc.c (yyparse): Undo previous patch. Instead,
658 set yylsp[0] and yyvsp[0] only if the initial action
659 sets yylloc and yylval, respectively.
660
661 * data/yacc.c (yyparse): In the initial action, set
662 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
663 This avoids the use of undefined variables if the initial
664 action does not set yylloc and/or yylval.
665
666 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
667
668 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
669 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
670 Remove from CVS. These files are automatically generated.
671 * examples/extexi: Clarify that this file is now part of Bison,
672 not GNU M4, and that it works with any POSIX-compatible Awk.
673 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
674 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
675 so that we also get calc++-parser.yy. Geneate it.
676 Use $(AWK), not gawk, since any conforming Awk will do.
677 Put comment before action, since older 'make' can't handle comment
678 in action.
679 $(BUILT_SOURCES): List all built sources, not just some of them.
680 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
681 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
682 $($(calc_sources_generated)): Remove unnecessary test for existence
683 of target. (This had a shell syntax error anyway; a stray "x".)
684 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
685 calc++-parser.yy.
686 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
687
688 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
689 implied by the other modules.
690
691 2005-07-06 Akim Demaille <akim@epita.fr>
692
693 Bind examples/calc++ to the package.
694 * examples/calc++/Makefile: Remove, replaced by...
695 * examples/calc++/Makefile.am: ... this new file.
696 * examples/calc++/test: Remove input.
697 * examples/calc++/compile: Remove.
698 * examples/Makefile.am: New.
699 * configure.ac, Makefile.am: Adjust.
700 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
701
702 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
703
704 * data/glr.c (yyFail): Drastically simplify; since the format argument
705 never had any % directives, we can simply pass it to yyerror.
706 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
707 be modified later, as that is the usual style in glr.c.
708 Problems reported by Paul Hilfinger.
709
710 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
711 and size overflow errors.
712 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
713 in case the user prolog sets feature-test macros like _GNU_SOURCE.
714 (YYSIZEMAX): New macro.
715 (yystpcpy): New function, taken from yacc.c.
716 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
717 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
718 so that we don't have to maintain their signatures.
719 (yyFail): Check for buffer overflow, by using vsnprintf rather
720 than vsprintf. Allocate a bigger buffer if possible.
721 Report an error if buffer allocation fails.
722 (yyStackOverflow): New function.
723 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
724 the initialization was successful. It might fail if storage was
725 exhausted.
726 (yyexpandGLRStack): Add more checks for storage allocation failure.
727 Use yyStackOverflow to report failures.
728 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
729 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
730 Don't assume stack number fits in int.
731 (yysplitStack): Check for storage allocation failure.
732 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
733 can print diagnostics on storage allocation failure. All callers
734 changed.
735 (yyresolveValue): Use yybool for boolean.
736 (yyreportSyntaxError): Check for size-calculation overflow.
737 This code is taken from yacc.c.
738 (yyparse): Check for storage allocation errors when allocating
739 the initial stack.
740
741 2005-07-05 Akim Demaille <akim@epita.fr>
742
743 Extract calc++ from the documentation.
744 * doc/bison.texinfo (Calc++): Add the extraction marks.
745 * examples/extexi: New, from the aborted GNU Programming 2E.
746 Separate the different paragraph of a file with empty lines.
747 * examples/Makefile: Use it to extract the whole calc++ example.
748
749 2005-06-24 Akim Demaille <akim@epita.fr>
750
751 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
752 class typedefs.
753
754 2005-06-22 Akim Demaille <akim@epita.fr>
755
756 * doc/bison.texinfo (C++ Language Interface): First stab.
757 (C++ Parsers): Remove.
758
759 2005-06-22 Akim Demaille <akim@epita.fr>
760
761 * data/lalr1.cc (yylex_): Honor %lex-param.
762
763 2005-06-22 Akim Demaille <akim@epita.fr>
764
765 Start a set of simple examples.
766 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
767 * examples/calc++/calc++-driver.hh,
768 * examples/calc++/calc++-parser.yy,
769 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
770 * examples/calc++/compile, examples/calc++/test: New.
771
772 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
773
774 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
775 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
776 which stems from the 2005-05-27 patch.
777
778 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
779
780 * data/glr.c: Modify treatment of unused parameters to permit use
781 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
782
783 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
784
785 Fix infringement on user name space reported by Janos Zoltan Szabo.
786 * data/yacc.c (yyparse): strlen -> yystrlen.
787
788 2005-05-30 Akim Demaille <akim@epita.fr>
789
790 * data/lalr1.cc (_): New.
791 Translate the various messages.
792
793 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
794
795 Fix infringement on user name space reported by Bruno Haible.
796 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
797 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
798 the user's name space.
799 (alloca): Include <stdlib.h> to get it, if it's not built in.
800 (YYMALLOC, YYFREE): Define only if needed.
801 (malloc, free): Declare, but only if needed, as this infringes on
802 the user name space.
803
804 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
805
806 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
807 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
808 with %d format.
809 * lib/ebitset.c (min, max): Undef before defining.
810 * lib/vbitset.c (min, max): Likewise.
811 * lib/subpipe.c (create_subpipe): Save local variables in case
812 vfork clobbers them.
813
814 2005-05-24 Bruno Haible <bruno@clisp.org>
815
816 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
817 error message syntax used by gcc-4.0.
818
819 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
820
821 * README: Mention m4 1.4.3. Remove obsolete advice about
822 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
823
824 * bootstrap: Remove workaround for problem I encountered with
825 gettext 0.14.1; it seems to be fixed now.
826
827 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
828
829 * NEWS: Version 2.0a.
830
831 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
832 the previous change.
833
834 Various maintainer cleanups.
835 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
836 conftest*, for benefit of CVS commands run at the same time as
837 "configure". Add build-aux, since "bootstrap" now creates it and
838 its subfiles.
839 * Makefile.cfg (move_if_change): Remove.
840 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
841 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
842 (po_repo, do-po-update, po-update, wget_files, get-targets):
843 (config.guess-url_prefix, config.sub-url_prefix):
844 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
845 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
846 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
847 Remove.
848 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
849 this is now the recommended name.
850 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
851 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
852 ylwrap. These files now go into build-aux.
853 * config/move-if-change: Remove.
854 * config/prev-version.txt: Bump from 1.75 to 2.0.
855
856 * bootstrap: Add stdio-safer, unistd-safer modules.
857 Remove m4/glibc2.m4 (introduced by latest gnulib, but
858 we don't need it).
859 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
860 fopen-safer.c, stdio-safer.h, unistd-safer.h.
861 * lib/subpipe.c: Include "unistd-safer.h".
862 (create_subpipe): Make sure all the newly-created
863 file descriptors are > 2, so that diagnostics don't
864 get sent down them (which might cause Bison to hang, in theory).
865 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
866 * src/files.c (xfopen): Use fopen_safer, not fopen.
867
868 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
869 yesterday's yacc.c fix.
870
871 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
872
873 * data/glr.c, data/lalr1.cc: Update copyright date.
874
875 Fix a destructor bug reported by Wolfgang Spraul in
876 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
877 * data/yacc.c (yyabortlab): Don't call destructor, and
878 don't set yychar to EMPTY.
879 (yyoverflowlab): Don't call destructor.
880 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
881 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
882 since we no longer output the message "discarding lookahead token
883 end of input ()".
884
885 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
886
887 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
888 fix a small glitch in debugging output.
889 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
890 after YY_SYMBOL_PRINT where needed.
891
892 (struct yyGLRState): Add some comments.
893 (struct yySemanticOption): Add some comments.
894 (union yyGLRStackItem): Add comment.
895
896 (yymergeOptionSets): Correct this to properly perform the union,
897 avoiding infinite reported by Michael Rosien.
898 Update comment.
899
900 * tests/glr-regression.at: Add test for GLR merging error reported
901 by M. Rosien.
902
903 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
904
905 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
906 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
907 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
908 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
909 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
910 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
911 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
912 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
913 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
914 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
915 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
916 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
917 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
918 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
919 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
920 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
921 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
922 src/derives.h, src/files.c, src/files.h, src/getargs.c,
923 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
924 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
925 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
926 src/output.h, src/parse-gram.c, src/parse-gram.h,
927 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
928 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
929 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
930 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
931 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
932 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
933 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
934 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
935 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
936 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
937 tests/reduce.at, tests/regression.at, tests/sets.at,
938 tests/synclines.at, tests/testsuite.at, tests/torture.at:
939 Update FSF postal mail address.
940
941 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
942
943 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
944 Problem reported by Ralf Menzel.
945
946 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
947
948 * tests/actions.at: Test that stack overflow invokes destructors.
949 From Marcus Holland-Moritz.
950 * data/yacc.c (yyerrlab): Move the code that destroys the stack
951 from here....
952 (yyreturn): to here. That way, destructors are called properly
953 even if the stack overflows, or the user calls YYACCEPT or
954 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
955 (yyoverflowlab): Destroy the lookahead.
956
957 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
958
959 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
960
961 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
962
963 * NEWS: Bison-generated C parsers no longer quote literal strings
964 associated with tokens.
965 * src/output.c (prepare_symbols): Don't escape strings,
966 since users don't want to see C escapes.
967 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
968 in diagnostics.
969 * tests/input.at (Torturing the Scanner): Likewise.
970 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
971
972 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
973
974 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
975 the data size is known to be too small and we can't increase it.
976 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
977
978 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
979
980 * src/parse-gram.y: Include quotearg.h.
981 (string_as_id): Quote $1 before using it as a key, since the
982 lexer no longer quotes it for us.
983 (string_content): Don't strip quotes, since lexer no longer
984 quotes it for us.
985 * src/scan-gram.l: Include quotearg.h.
986 ("\""): Omit quote.
987 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
988 a key, since the rest of the lexer doesn't quote it.
989 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
990 * tests/regression.at (Token definitions): Check for backslashes
991 in token strings.
992
993 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
994 (YYSIZE_T): Define to unsigned long int when using an older compiler.
995 (yyparse): Revamp code to generate long syntax error message, to
996 make it easier to translate, and to avoid problems with arithmetic
997 overflow. Change "virtual memory" to "memory" in diagnostic, since
998 we don't know whether the memory is virtual.
999
1000 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
1001
1002 * NEWS: Bison-generated C parsers now use the _ macro to
1003 translate strings.
1004 * data/yacc.c (_) [!defined _]: New macro.
1005 All English strings wrapped inside this macro.
1006 * doc/bison.texinfo (Bison Parser): Document _.
1007 * po/POTFILES.in: Include src/parse-gram.c, since it now
1008 includes translateable strings that parse-gram.y doesn't.
1009
1010 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
1011
1012 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
1013 reverting the 2004-10-11 change to this function.
1014 (symbol_check_alias_consistency): Don't call symbol_type_set
1015 if the type name is already correct.
1016 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
1017
1018 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
1019
1020 * tests/regression.at (Token definitions): Don't use a token named
1021 c, as that generates a "#define c ..." that runs afoul of buggy
1022 stdlib.h that uses the identifier c as a member of struct
1023 drand48_data. Problem reported by Horst Wente.
1024
1025 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
1026
1027 * bootstrap: Change translation URL from
1028 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
1029 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
1030 redirection glitches. Problem reported by twlevo@xs4all.nl.
1031
1032 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
1033
1034 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
1035 after operands; POSIX says this isn't portable for the c99 command.
1036
1037 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
1038
1039 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
1040 immediately if a data overrun has occurred; this may help us track
1041 down what may be a spurious failure on MacOS.
1042
1043 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
1044
1045 Respond to problems reported by twlevo@xs4all.nl.
1046
1047 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
1048
1049 * src/vcg.h: Comment fix.
1050 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
1051 (G_CMAX): Change to -1 instead of INT_MAX.
1052
1053 * data/yacc.c (yyparse): Omit spaces before #line.
1054
1055 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
1056
1057 * src/tables.c (state_number_to_vector_number): Put it inside an
1058 "#if 0", since it's not currently used. Problem reported by
1059 Roland McGrath.
1060
1061 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
1062
1063 * src/output.c (escaped_output): Renamed from
1064 escaped_file_name_output, since we now use it for symbol tags as
1065 well. All uses changed.
1066 (symbol_destructors_output, symbol_printers_output):
1067 Escape symbol tags too.
1068 Problem reported by Matyas Forstner in
1069 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
1070
1071 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
1072 not needed.
1073 * src/output.c (user_actions_output, token_definitions_output,
1074 symbol_destructors_output, symbol_printers_output): Likewise.
1075 * src/reader.c (prologue_augment): Likewise.
1076 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
1077
1078 * src/vcg.c (output_edge): Don't quote linestyle arg.
1079 Problem reported by twlevo@xs4all.nl.
1080
1081 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
1082
1083 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
1084 example, reported by Derek M Jones. Also, make the example even
1085 more outrageous, to better illustrate how bad the problem is.
1086
1087 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
1088
1089 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
1090 putsym. Typo reported by Sebastian Piping.
1091
1092 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
1093
1094 * doc/bison.texinfo (Language and Grammar): some -> same
1095 (Epilogue): int he -> in the
1096 Typos reported by Sebastian Piping via Justin Pence.
1097
1098 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
1099
1100 * tests/glr-regression.at (Improper handling of embedded actions
1101 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
1102 embedded actions and $-N in GLR parsers", work around an Autoconf bug
1103 with dollar signs in test names.
1104 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
1105 for a similar reason.
1106
1107 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
1108
1109 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
1110 wants to redefine G_VIEW.
1111
1112 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
1113
1114 * src/vcg.c (get_view_str): Remove case for normal_view.
1115 Problem reported by twlevo@xs4all.nl.
1116
1117 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
1118
1119 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
1120 Problem reported by twlevo@xs4all.nl.
1121
1122 * doc/bison.texinfo: Change @dircategory from "GNU programming
1123 tools" to "Software development". Requested by Richard Stallman
1124 via Karl Berry.
1125
1126 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
1127
1128 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
1129 Problem reported by twlevo@xs4all.nl.
1130
1131 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
1132
1133 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
1134 keyword; it's not needed with modern compilers, and it doesn't
1135 affect correctness with older compilers. Suggested by
1136 twlevo@xs4all.nl.
1137
1138 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
1139
1140 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
1141 gcc -Wswitch-default.
1142 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1143 * data/yacc.c (yyparse): Likewise.
1144
1145 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
1146
1147 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
1148 already. Let config.h define any nonstandard values.
1149
1150 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
1151
1152 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
1153 for the benefit of slower hosts. Problem reported by
1154 Nelson H. F. Beebe.
1155
1156 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
1157
1158 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
1159 being defined and not used.
1160 * data/lalr1.cc (yyparse): Likewise.
1161 Use "if (false)" rather than "if (0)".
1162
1163 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
1164
1165 * TODO: Mention that we should allow NUL bytes in tokens.
1166
1167 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
1168
1169 * src/scan-skel.l (<<EOF>>): Don't close standard output.
1170 Problem reported by Hans Aberg.
1171
1172 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
1173
1174 * src/getargs.c (version): Happy new year; update overall
1175 program copyright date from 2004 to 2005.
1176
1177 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
1178 Problem reported by Hans Aberg.
1179 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
1180 (Output file names.): Add a test for the case when standard output
1181 is closed.
1182
1183 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
1184
1185 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
1186 to fix an oversight in the Bison 2.0 manual.
1187
1188 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
1189
1190 * NEWS: Version 2.0. Reformat the existing news items since
1191 1.875, so that related items are grouped together.
1192 * configure.ac (AC_INIT): Bump version to 2.0.
1193 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
1194
1195 * tests/torture.at (Exploding the Stack Size with Alloca): Set
1196 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
1197 otherwise, we're not testing alloca. Unfortunately there's no
1198 simple way to consult HAVE_ALLOCA here.
1199
1200 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
1201 for yymsg, too.
1202
1203 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
1204 hand. This avoids a warning about comparing int to size_t when
1205 GCC warnings are enabled.
1206
1207 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
1208
1209 * NEWS: Bison-generated parsers no longer default to using the
1210 alloca function (when available) to extend the parser stack, due
1211 to widespread problems in unchecked stack-overflow detection.
1212 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
1213 responsibility to set it to a positive value. This lets the user
1214 specify a value that is not a preprocessor constant.
1215 * data/yacc.c (YYMAXDEPTH): Likewise.
1216 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
1217 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
1218 to be a compile-time constant. However, explain the constraints on it.
1219 Also, explain the constraints on YYINITDEPTH.
1220 (Table of Symbols): Explain that alloca is no longer the default.
1221 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
1222 to 1.
1223
1224 * doc/bison.texinfo (Location Default Action): Mention that n must
1225 be zero when k is zero. Suggested by Frank Heckenbach.
1226
1227 2004-12-22 Akim Demaille <akim@epita.fr>
1228
1229 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
1230 (parser::state_type, parser::semantic_type, parser::location_type):
1231 Private, not public.
1232 (parser::parse): Return ints, not bool.
1233 Returning a bool introduces a problem: 0 corresponds to false, and
1234 it seems weird to return false on success. Returning true changes
1235 the conventions for yyparse.
1236 Alternatively we could return void and send an exception.
1237 There is no clear consensus (yet?).
1238 (state_stack, semantic_stack, location_stack): Rename as...
1239 (state_stack_type, semantic_stack_type, location_stack_type): these.
1240 Private, not public.
1241 * tests/c++.at: New.
1242 * tests/testsuite.at, tests/Makefile.am: Adjust.
1243
1244 2004-12-21 Akim Demaille <akim@epita.fr>
1245
1246 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
1247
1248 2004-12-21 Akim Demaille <akim@epita.fr>
1249
1250 Don't impose std::string for filenames.
1251
1252 * data/lalr1.cc (b4_filename_type): New.
1253 (position::filename): Use it.
1254 (parser.hh): Move the inclusion of stack.hh and location.hh below
1255 the user code, so that needed headers for the filename type can be
1256 included first.
1257 Forward declare them before the user code.
1258 * tests/Makefile.am (check-local, installcheck-local): Pass
1259 TESTSUITEFLAGS to the TESTSUITE.
1260
1261 2004-12-20 Akim Demaille <akim@epita.fr>
1262
1263 Use more STL like names: my_class instead of MyClass.
1264
1265 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
1266 (SemanticStack, SemanticType, StateStack, StateType)
1267 (TokenNumberType, Stack, Slice, Traits, Parser::location)
1268 (Parser::value): Rename as...
1269 (location_stack, location_type, rhs_number_type, semantic_stack)
1270 (semantic_type, state_stack, state_type, token_number_type, stack)
1271 (slice, traits, parser::yylloc, parser::yylval): these.
1272
1273 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
1274
1275 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
1276
1277 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
1278 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
1279
1280 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
1281
1282 Remove uses of 'short int' and 'unsigned short int'. This raises
1283 some arbitrary limits. It uses more memory but nowadays that's
1284 not much of an issue.
1285
1286 This change does not affect the generated parsers; that's a different
1287 task, as some users will want to conserve memory there.
1288
1289 Ideally we should use size_t to represent all object counts, and
1290 something like ptrdiff_t to represent signed differences of object
1291 counts; but that will require more code-cleanup than I have the
1292 time to do right now.
1293
1294 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
1295 Use size_t, not int or short int, to count objects.
1296 * src/closure.c (nritemset, closure): Likewise.
1297 * src/closure.h (nritemset, closure): Likewise.
1298 * src/nullable.c (nullable_compute): Likewise.
1299 * src/print.c (print_core): Likewise.
1300 * src/print_graph.c (print_core): Likewise.
1301 * src/state.c (state_compare, state_hash): Likewise.
1302 * src/state.h (struct state): Likewise.
1303 * src/tables.c (default_goto, goto_actions): Likewise.
1304
1305 * src/gram.h (rule_number, rule): Use int, not short int.
1306 * src/output.c (prepare_rules): Likewise.
1307 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
1308 errs, reductions): Likewise.
1309 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
1310 Likewise.
1311 * src/tables.c (vector_number, tally, action_number,
1312 ACTION_NUMBER_MINIMUM): Likewise.
1313 * src/output.c (muscle_insert_short_int_table): Remove.
1314
1315 2004-12-17 Akim Demaille <akim@epita.fr>
1316
1317 * data/lalr1.cc: Extensive Doxygenation.
1318 (error_): Rename as...
1319 (error): this, since it is visible to the user.
1320 Adjust callers.
1321 (Parser::message): Now an automatic variable from...
1322 (Parser::yyreport_syntax_error_): here.
1323 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
1324 Parser::error.
1325 * tests/input.at: Escape $.
1326
1327 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
1328
1329 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
1330 Parenthesize rhs to avoid obscure problems with mistakes like
1331 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
1332 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1333 b4_rhs_location): Likewise.
1334 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1335 b4_rhs_location): Likewise.
1336
1337 2004-12-16 Akim Demaille <akim@epita.fr>
1338
1339 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
1340 yacc.c: be sure to stay within yycheck_.
1341 * tests/actions.at: Re-enable C++ tests.
1342
1343 2004-12-16 Akim Demaille <akim@epita.fr>
1344
1345 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
1346 real.
1347
1348 2004-12-16 Akim Demaille <akim@epita.fr>
1349
1350 Use #define to handle the %name-prefix.
1351
1352 * data/glr.c, data/yacc.c: Comment changes.
1353 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
1354 so that one can refer to yylex in the parser file, and have it
1355 renamed, as is the case with other skeletons.
1356
1357 2004-12-16 Akim Demaille <akim@epita.fr>
1358
1359 Move lalr1.cc internals into yy*.
1360
1361 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
1362 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
1363 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
1364 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
1365 (empty_, final_, terror_, errcode_, ntokens_)
1366 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
1367 (looka_, ilooka_, error_range_, nerrs_):
1368 Rename as...
1369 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
1370 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
1371 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
1372 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
1373 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
1374 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
1375 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
1376 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
1377 these.
1378
1379 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
1380
1381 Fix some problems reported by twlevo at xs4all.
1382 * src/symtab.c (symbol_new): Report an error if the input grammar
1383 contains too many symbols. This is better than calling abort() later.
1384 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
1385 (struct node, struct graph):
1386 Rename member expand to stretch. All uses changed.
1387 (struct graph): Remove member layoutalgorithm. All uses removed.
1388 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
1389 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
1390 All uses changed.
1391 (N_STRETCH): Rename from N_EXPAND. All uses changed.
1392
1393 2004-12-15 Akim Demaille <akim@epita.fr>
1394
1395 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
1396 Add more Doxygen comments.
1397 (symprint_, stack_print_, reduce_print_, destruct_, pop)
1398 (report_syntax_error_, translate_): Rename as...
1399 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
1400 (yypop_, yyreport_syntax_error_, yytranslate_): this.
1401
1402 2004-12-15 Akim Demaille <akim@epita.fr>
1403
1404 * data/lalr1.cc (lex_): Rename as...
1405 (yylex_): this.
1406 Move the trace here.
1407 Take the %name-prefix into account.
1408 Reported by Alexandre Duret-Lutz.
1409
1410 2004-12-15 Akim Demaille <akim@epita.fr>
1411
1412 Simplify the C++ parser constructor.
1413
1414 * data/lalr1.cc (debug_): Rename as...
1415 (yydebug_): so that the parser's internals are always in the yy*
1416 pseudo namespace.
1417 Adjust uses.
1418 (b4_parse_param_decl): Remove the leading comma as it is now only
1419 called as unique argument list.
1420 (Parser::Parser): Remove the constructor accepting a location and
1421 an initial debugging level.
1422 Remove from the other ctor the argument for the debugging level.
1423 (debug_level_type, debug_level, set_debug_level): New.
1424
1425 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
1426 constructor calls.
1427
1428 2004-12-15 Akim Demaille <akim@epita.fr>
1429
1430 Remove b4_root related material: failure experiment
1431 (which goal was to allow to derive from a class).
1432
1433 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
1434 definitions and uses.
1435
1436 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
1437
1438 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
1439 not 2, since it's not portable to subtract 1 from the start of an
1440 array. The new item 0 is never set or used. All uses changed.
1441
1442 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
1443 the default definition of YYLLOC_DEFAULT. Problem reported
1444 by Frank Heckenbach.
1445
1446 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
1447
1448 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
1449 the normal case and one for the error case. Just use the
1450 first one uniformly. Problem reported by Frank Heckenbach.
1451 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
1452 use exactly the same macro in both places.
1453 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
1454 so that the normal-case YYRHSLOC works for the error case too.
1455 All uses changed.
1456 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
1457 (YYLLOC_DEFAULT): Use the same macro as glr.c.
1458 * doc/bison.texinfo (Location Default Action): Don't claim that
1459 we have an array of locations. Use the same macro for both glr
1460 and lalr parsers. Mention YYRHSLOC. Mention what happens when
1461 the index is 0.
1462
1463 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1464
1465 * HACKING: Update email addresses to send announcements to.
1466
1467 * configure.ac (AC_INIT): Bump version to 1.875f.
1468
1469 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1470
1471 * NEWS: Version 1.875e.
1472 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
1473
1474 * src/scan-skel.l: Include "complain.h", for "fatal".
1475
1476 * src/relation.h (relation_print, relation_digraph):
1477 Relation sizes are of type relation_node, not size_t (this is
1478 merely a doc fix, since the two types are equivalent).
1479 (relation_transpose): Relation sizes are of type relation_node,
1480 not int.
1481 * src/relation.c: Likewise.
1482 (top, infinity): Now of type relation_node, not int.
1483 (traverse, relation_transpose): Use relation_node, not int.
1484
1485 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
1486 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
1487 (yyparse): Remove unused local introduced in 2004-10-25 patch.
1488
1489 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
1490 specifying whether the test should be skipped. Use it tp
1491 specify that the [%defines %skeleton "lalr1.cc"] tests currently
1492 fail on some hosts, and should be skipped.
1493
1494 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
1495
1496 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
1497 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
1498 unless otherwise specified below.
1499
1500 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
1501 to allocate kernel_base, kernel_items, kernel_size, since
1502 they needn't be initialized to 0.
1503 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
1504 * src/closure.c (new_closure): Likewise, for itemset.
1505 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
1506 * src/lalr.c (set_goto_map): Likewise, for temp_map.
1507 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
1508 (build_relations): Likewise for edge, states1, includes.
1509 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
1510 * src/reader.c (packgram): Likewise, for ritem, rules.
1511 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
1512 * src/relation.c (relation_digraph): Likewise for VERTICES.
1513 (relation_transpose): Likewise for new_R, end_R.
1514 * src/symtab.c (symbols_token_translations_init): Likewise for
1515 token_translations.
1516 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
1517 (token_actions): Likewise for yydefact, actrow, conflrow,
1518 conflict_list.
1519 (save_column): Likewise for froms[symno], tos[symno].
1520 (goto_actions): Likewise for state_count.
1521 (pack_table): Likewise for base, pos, check.
1522 (tables_generate): Likewise for width.
1523
1524 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
1525 for initial core. Just have a separate core, so we needn't worry
1526 about whether kernel_size and kernel_base are initialized.
1527
1528 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
1529 kernel_size, kernel_items): Remove unnecessary initialization.
1530 * src/conflicts.c (conflicts): Likewise.
1531 * src/derives.c (derives): Likewise.
1532 * src/muscle_tablc (muscle_insert): Likewise.
1533 * src/relation.c (relation_digraph): Likewise.
1534 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
1535 conflrow, conflict_table, conflict_list, table, check):
1536 Likewise.
1537
1538 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
1539 This is because all callers pass unsigned int.
1540 * src/closure.h (new_closure): Likewise.
1541
1542 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
1543 (build_relations): Initialize includes[i] in all cases.
1544 * src/reader.c (packgram): Always initialize rules[ruleno].prec
1545 and rules[ruleno].precsym. Initialize members in order.
1546 * src/relation.c (relation_transpose): Always initialize new_R[i]
1547 and end_R[i].
1548 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
1549
1550 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
1551 conflict_list[0] was always 0, but now it isn't initialized.
1552
1553 * src/table.c (table_grow): When conflict_table grew, the grown
1554 area wasn't cleared. Fix this.
1555
1556 * lib/.cvsignore: Add strdup.c, strdup.h.
1557 * m4/.cvsignore: Add strdup.m4.
1558
1559 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
1560
1561 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
1562 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
1563 GOTO_NUMBER_MAXIMUM, since we occasionally compute
1564 ngotos + 1 without checking for overflow.
1565 (build_relations): Use END_NODE, not -1, to denote end of edges.
1566 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
1567 build_relations): Use goto_number, not int, for goto numbers.
1568 * src/tables.c (save_column, default_goto): Likewise.
1569
1570 2004-11-23 Akim Demaille <akim@epita.fr>
1571
1572 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
1573 of #defining from yystype.
1574 Don't typedef yystype, C++ does not need it.
1575 This lets it possible to forward declare it as union.
1576
1577 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
1578
1579 * bootstrap (gnulib_modules): Add extensions.
1580 Problem reported by Jim Meyering.
1581
1582 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
1583
1584 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
1585 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
1586 src/system.h, src/tables.c: XFREE -> free, to accommodate
1587 recent change to gnulib xalloc.h.
1588 Problem reported by Jim Meyering.
1589
1590 2004-11-17 Akim Demaille <akim@epita.fr>
1591
1592 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
1593
1594 2004-10-28 Akim Demaille <akim@epita.fr>,
1595 Alexandre Duret-Lutz <adl@gnu.org>
1596
1597 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
1598 changes.
1599 (YYCDEBUG): Adjust.
1600 Use it instead of cdebug_.
1601 (Parser::debug_stream, Parser::set_debug_stream): New.
1602 (Parser::symprint_): Define cdebug_ for temporary backward
1603 compatibility.
1604 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
1605 debug_stream ().
1606
1607 2004-11-17 Akim Demaille <akim@epita.fr>
1608
1609 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
1610 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
1611 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
1612 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1613
1614 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
1615
1616 * data/glr.c (yyloc_default): Remove; not used.
1617 Problem reported by Frank Heckenbach.
1618
1619 2004-10-25 Akim Demaille <akim@epita.fr>
1620
1621 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
1622 Introduce another definition to address simple location arrays.
1623 (yyGLRStack): New member: yyerror_range.
1624 (yyrecoverSyntaxError, yyparse): Update it.
1625 (yyrecoverSyntaxError): Use it when shifting the error token to
1626 have an accurate range, equivalent to the one computed by both
1627 yacc.c and lalr1.cc.
1628 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
1629 that column numbers start at column 0, as per GNU Coding
1630 Standards, the others tests, and the doc.
1631 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
1632 Adjust to the above change (first column is 0).
1633 And adjust the location of the "<error>", now covering the whole
1634 line.
1635
1636 2004-10-22 Akim Demaille <akim@epita.fr>
1637 and Paul Eggert <eggert@cs.ucla.edu>
1638
1639 Remove some arbitrary limits on goto numbers and relations.
1640 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
1641 initial values, since they're never used.
1642 (set_goto_map): ngotos is now unsigned, so test for overflow
1643 by seeing whether it wraps around to zero.
1644 * src/lalr.h (goto_number): Now size_t, not short int.
1645 (GOTO_NUMBER_MAXIMUM): Remove.
1646 * src/relation.c (relation_print, traverse, relation_transpose):
1647 Check for END_NODE rather than looking at sign.
1648 * src/relation.h (END_NODE): New macro.
1649 (relation_node): Now size_t, not short int.
1650
1651 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
1652
1653 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
1654 keyword, not an identifier. Problem reported by Baron Schwartz in
1655 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
1656
1657 2004-10-11 Akim Demaille <akim@epita.fr>
1658
1659 * src/symtab.c (symbol_check_alias_consistency): Also check
1660 type names, destructors, and printers.
1661 Reported by Alexandre Duret-Lutz.
1662 Recode the handling of associativity and precedence in terms
1663 of symbol_precedence_set.
1664 Accept no redeclaration at all, not even equal to the previous
1665 value.
1666 (redeclaration): New.
1667 Use it to factor redeclaration complaints.
1668 (symbol_make_alias): Don't set the type of the alias, let
1669 symbol_check_alias_consistency do it as for other features.
1670 * src/symtab.h (symbol): Add new member prec_location, and
1671 type_location.
1672 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
1673 * tests/input.at (Incompatible Aliases): New.
1674
1675 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
1676
1677 .cvsignore fixes to accommodate gnulib changes,
1678 and the practice of naming build directories "_build".
1679 * .cvsignore: Add "_*". Sort.
1680 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
1681 * m4/.cvsignore: Add "*_gl.m4".
1682
1683 2004-10-06 Akim Demaille <akim@epita.fr>
1684
1685 * src/parse-gram.y (add_param): Fix the truncation of trailing
1686 spaces.
1687
1688 2004-10-05 Akim Demaille <akim@epita.fr>
1689
1690 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
1691 whether the reducion was empty or not. This leaves room to
1692 improve the use of YYLLOC_DEFAULT in such a case.
1693 lalr1.cc is still experimental, so changing this is acceptable.
1694 And finally, there are probably not many users who changed the
1695 handling of locations in GLR, so changing is admissible too.
1696
1697 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
1698 empty reduction, set @$ to an empty location ending the previously
1699 stacked symbol.
1700 Adjust uses to make sure the code is triggered on empty
1701 reductions.
1702 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
1703 expected output: empty reductions have empty locations.
1704
1705 2004-09-29 Akim Demaille <akim@epita.fr>
1706
1707 * data/lalr1.cc: Move towards a more standard C++ coding style
1708 for templates: Class < T > -> Class<T>.
1709
1710 2004-09-29 Akim Demaille <akim@epita.fr>
1711
1712 * data/lalr1.cc: Reinstall the former ctor, for sake of
1713 compatibility, but warn it will be removed.
1714 Move towards a more standard C++ coding style (i.e., type *var ->
1715 type* var).
1716
1717 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
1718
1719 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
1720 since it's less likely to work if NULs are involved in the future.
1721
1722 2004-09-27 Akim Demaille <akim@epita.fr>
1723
1724 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
1725
1726 2004-09-27 Akim Demaille <akim@epita.fr>
1727
1728 * data/lalr1.cc (b4_parse_param_decl_1): New.
1729 (b4_parse_param_decl): Use it to have different names between attribute
1730 and argument names.
1731 (b4_cc_constructor_call): Likewise.
1732
1733 2004-09-24 Akim Demaille <akim@epita.fr>
1734
1735 * src/parse-gram.y (add_param): Strip the leading and trailing
1736 blanks from a formal argument declaration.
1737 (YY_LOCATION_PRINT): New.
1738
1739 2004-09-24 Akim Demaille <akim@epita.fr>
1740
1741 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
1742 after the location.
1743
1744 2004-09-24 Akim Demaille <akim@epita.fr>
1745
1746 * doc/bison.texinfo (Table of Symbols): Sort.
1747
1748 2004-09-21 Akim Demaille <akim@epita.fr>
1749
1750 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
1751 the useless parentheses.
1752 Suggested by Paul Eggert.
1753
1754 2004-09-20 Akim Demaille <akim@epita.fr>
1755
1756 Let the initial-action act on the look-ahead, and use it for the
1757 "initial push" (corresponding to an hypothetical beginning-of-file).
1758 And let lalr1.cc honor %initial-action.
1759
1760 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
1761 example.
1762 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
1763 (Parser::Parser): Remove the ctor that used to initialize it.
1764 (Parser::parse): Like in the other skeletons, issue the "starting
1765 parse" message before any action.
1766 Honor %initial-action.
1767 Initialize the stacks with the lookahead.
1768 * data/yacc.c: Let $$ and @$ in %initial-action designate the
1769 look-ahead.
1770 Push them in the stacks.
1771 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
1772
1773 2004-09-20 Akim Demaille <akim@epita.fr>
1774
1775 * doc/bison.texinfo (Initial Action Decl): New.
1776
1777 2004-09-20 Akim Demaille <akim@epita.fr>
1778
1779 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
1780 clearer criterion to define it.
1781 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
1782 When reducing on an empty RHS, use the latest stacked location as
1783 location.
1784 yylloc is not always available.
1785 * data/glr.c: Likewise.
1786 Also, honor initial-actions.
1787
1788 2004-09-20 Akim Demaille <akim@epita.fr>
1789
1790 * data/yacc.c (YY_LOCATION_PRINT): New.
1791 Define when we know YYLTYPE's structure, i.e., when the default
1792 YYLLOC_DEFAULT is used.
1793 * data/c.m4 (b4_yysymprint_generate): Use it.
1794 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
1795 value of the result.
1796 (error_start_): Replace with...
1797 (error_range_): this location array.
1798 This allows to replace code relying on the implementation of
1799 locations by portable code.
1800 * data/yacc.c (yylerrsp): Replace with...
1801 (yyerror_range): this.
1802 Every time a token is popped, update yyerror_range[0], to have an
1803 accurate location for the error token.
1804 * data/glr.c (YY_LOCATION_PRINT): New.
1805 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
1806 deference a pointer.
1807 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
1808 report the location in %printers.
1809
1810 * src/scan-skel.l: Instead of abort, report error messages to ease
1811 understanding skeleton scanning failures.
1812
1813 2004-09-16 Akim Demaille <akim@epita.fr>
1814
1815 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
1816 (iterator, const_iterator): these, to be more in the C++ spirit.
1817 Also, return reverse iterators so that when displaying the stack
1818 we display its bottom first.
1819 (Parser::stack_print_, Parser::reduce_print_): Match the messages
1820 from yacc.c.
1821 We should probably use vector here though.
1822
1823 2004-09-16 Akim Demaille <akim@epita.fr>
1824
1825 Have more complete shift traces.
1826
1827 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
1828 to report Shifts instead of ad hoc YYDPRINTF invocations,
1829 including for the error token.
1830 * data/lalr1.cc (symprint_): Output the location.
1831 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
1832 output the location within the %printer.
1833 Activate GLR tests, at least to make sure they compile properly.
1834 They still don't pass though.
1835 * tests/calc.at: Adjust expect verbose output, since now "Entering
1836 state..." is on a different line than the "Shifting" message.
1837
1838 2004-09-08 Akim Demaille <akim@epita.fr>
1839
1840 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
1841 Bison directive from the Bison file to the invocation of this
1842 macro, so that these directives are passed to
1843 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
1844 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
1845 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
1846 the extra Bison directives instead of the whole series.
1847 Change the grammar so that there are recoverable errors, and
1848 unrecoverable errors. Now we can have the parser give up before
1849 consuming the whole input. As a result we now can observe that
1850 the lookahead is freed when needed.
1851 Change the parser source to parse argv[1] instead of a hard coded
1852 string.
1853 Simplify yylex, and give a value and location to EOF.
1854 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
1855 passed directives already coded in the file.
1856 Add some tests to check the location of "error".
1857 For some tests, the C++ parser is correct, and not yacc.c.
1858 For other tests, they provide different, but unsatisfying, values,
1859 so keep the C++ value so that at least one parser is "correct"
1860 according to the test suite.
1861 (Actions after errors): Remove, this is subsumed by the
1862 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
1863
1864 2004-09-06 Akim Demaille <akim@epita.fr>
1865
1866 * data/lalr1.cc: Adjust the indentation of the labels.
1867 (Parser::pop): New.
1868 Use it.
1869
1870 2004-09-06 Akim Demaille <akim@epita.fr>
1871
1872 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
1873 argument, an informative message.
1874 Call YY_SYMBOL_PRINT.
1875 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
1876 * data/lalr1.cc (destruct_): Likewise.
1877 In addition, no longer depend on b4_yysymprint_generate and
1878 b4_yydestruct_generate to generate these functions, do it "by
1879 hand".
1880
1881 2004-09-03 Akim Demaille <akim@epita.fr>
1882
1883 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
1884 invoked, yydestruct the lookahead.
1885 * tests/calc.at (Calculator $1): Update the expected lengths of
1886 traces: there is an added line for the discarded lookahead.
1887 * doc/bison.texinfo (Destructor Decl): Some rewording.
1888 Define "discarded" symbols.
1889
1890 2004-09-02 Akim Demaille <akim@epita.fr>
1891
1892 * data/lalr1.cc (translate_, destruct_): No reason to be static.
1893
1894 2004-09-02 Akim Demaille <akim@epita.fr>
1895
1896 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
1897 (YYDSYMPRINTF): Rename as...
1898 (YY_SYMBOL_PRINT): this.
1899 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
1900 two.
1901 Use it instead of direct symprint_ calls.
1902 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
1903 one.
1904
1905 2004-09-02 Akim Demaille <akim@epita.fr>
1906
1907 * data/lalr1.cc (b4_yysymprint_generate): New.
1908 (symprint_): New member function, defined when YYDEBUG.
1909 Use it consistently instead of token/nterm debugging output by
1910 hand.
1911 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
1912 %printer calls to use cdebug_ when using lalr1.cc.
1913
1914 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
1915
1916 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
1917 with #ifdef YYDEBUG.
1918
1919 2004-08-26 Akim Demaille <akim@epita.fr>
1920
1921 * doc/bison.texinfo (Implementing Loops): Rename as...
1922 (Implementing Gotos/Loops): this.
1923
1924 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
1925
1926 Adjust to latest gnulib.
1927 * bootstrap (gnulib_modules): Add xalloc-die.
1928 Set LC_ALL=C so that file names sort consistently.
1929 Prefer the gnulib copies of gettext.m4, glibc21.m4,
1930 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
1931 uintmax_t.m4, ulonglong.m4.
1932 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
1933 po.m4 since we are now using _gl.m4 instead.
1934
1935 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
1936
1937 * src/scan-action.l: Remove. Scanning of semantic actions is
1938 handled in scan-gram.l.
1939
1940 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
1941
1942 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
1943
1944 * src/location.h (struct): The file member is a uniqstr.
1945 (equal_boundaries): Use UNIQSTR_EQ for comparison.
1946
1947 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
1948
1949 Fix bug with non-%union parsers that have printers or destructors,
1950 which led to a Bison core dump. Reported by Peter Fales in
1951 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
1952
1953 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
1954 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
1955 not to our own type.
1956 * src/output.c (symbol_destructors_output, symbol_printers_output):
1957 Don't assume %union.
1958 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
1959 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
1960 UNION-FLAG. All callers changed.
1961 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
1962 Use type char, not unsigned int, when declaring an array of char;
1963 this lets us remove a cast.
1964 (Printers and Destructors): Add non-%union test cases.
1965
1966 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
1967
1968 * doc/bison.texinfo: Minor editorial changes, mostly to the new
1969 GLR writeups. E.g., avoid frenchspacing and the future tense,
1970 change "lookahead" to "look-ahead", and change "wrt" to "with
1971 respect to".
1972
1973 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1974
1975 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
1976 New sections, split off from the GLR Parsers section. Put the new
1977 Simple GLR Parser near the start of the GLR section, for clarity.
1978 Rewrite connective text.
1979
1980 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
1981
1982 * doc/bison.texinfo (Simple GLR Parsers): New section.
1983
1984 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
1985
1986 * NEWS, TODO, doc/bison.texinfo:
1987 Use "look-ahead" instead of "lookahead", to be consistent.
1988 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
1989 while we're fixing "look-ahead".
1990 * src/conflicts.c (shift_set): Renamed from shiftset.
1991 (look_ahead_set): Renamed from lookaheadset.
1992 * src/print.c: Likewise.
1993 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
1994 name for "lookahead".
1995 (report_types, usage): Likewise.
1996 * src/getargs.h (report_look_ahead_tokens): Renamed from
1997 report_lookaheads.
1998 * src/lalr.c (compute_look_ahead_tokens): Renamed from
1999 compute_lookaheads.
2000 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
2001 (look_ahead_tokens_print): Renamed from lookaheads_print.
2002 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
2003 state_rule_lookaheads_print.
2004 * src/state.h: Likewise.
2005 (reductions.look_ahead_tokens): Renamed from lookaheads.
2006 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
2007 AT_DATA_LOOKAHEADS_GRAMMAR.
2008
2009 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
2010
2011 * README: Update location of patched M4 distribution.
2012
2013 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
2014
2015 Don't assume the C++ compiler takes the same arguments as the C compiler
2016 (trivial change).
2017 * configure.ac (O0CXXFLAGS): New var.
2018 * tests/atlocal.in (CXXFLAGS): Use it.
2019
2020 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
2021
2022 Fix some "make check" problems with C++ reported by
2023 Albert Chin-A-Young for Tru64 C++ in this thread:
2024 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
2025
2026 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
2027 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2028 Output to a .cc file for C++, not to a .c file.
2029 * tests/calc.at (AT_CHECK_CALC): Likewise.
2030 * tests/regression.at (AT_CHECK_DANCER): Likewise.
2031 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
2032
2033 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
2034
2035 * tests/calc.at, tests/actions.at: Workaround for SGI
2036 C++ compiler. (trivial change)
2037
2038 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
2039
2040 Spent a few hours checking out which prerequisite versions the
2041 current sources actually require. I went all the way back to
2042 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
2043 a seemingly endless set of combinations of versions more recent
2044 than that. The bottom line is that the current sources require
2045 fairly recent versions of the build tools, and it'll be some work
2046 to change this.
2047 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
2048 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
2049 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
2050 Add comments explaining why those particular versions are
2051 currently needed.
2052
2053 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
2054 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
2055 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
2056
2057 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
2058 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
2059
2060 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
2061
2062 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
2063 0.11.5. Suggested by Bruno Haible.
2064 * bootstrap: Remove gettext version checking.
2065
2066 * doc/bison.texinfo (Decl Summary): Also mention that %union
2067 can depend on prerequisite types. Problem reported by Tim
2068 Van Holder.
2069
2070 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
2071
2072 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
2073 * README-alpha: Don't tell people not to package this.
2074
2075 * bootstrap: Don't assume $(...) works; use `...` instead.
2076 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
2077 gettext better.
2078
2079 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
2080 put into the -d output file, and mention what to do if YYSTYPE is
2081 defined as a macro.
2082
2083 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
2084
2085 Undo change made earlier today: it caused autopoint to not bring
2086 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
2087 autopoint's.
2088
2089 * bootstrap: Check that gettext version matches what's in
2090 configure.ac. Warn users to ignore robots.txt ERROR 404.
2091 * bootstrap: Undo today's earlier change (logged below).
2092 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
2093
2094 The gettext version checking is causing more trouble than it's
2095 curing; remove it. Problem reported by Paul Hilfinger.
2096
2097 * bootstrap: Issue a warning that one can expect a message
2098 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
2099 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
2100
2101 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
2102
2103 Ensure that the C++ compiler used for testing actually works on a
2104 simple test program; if not, skip the C++-related tests. Problem
2105 reported by Vin Shelton in:
2106 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
2107
2108 * m4/cxx.m4: New file.
2109 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
2110 * tests/atlocal.in (BISON_CXX_WORKS): Add.
2111 * tests/local.at (AT_COMPILE_CXX): Use it.
2112
2113 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2114
2115 * data/glr.c (yylloc): Output this macro even if locations are not
2116 being generated, as the GLR parser needs it even in that case.
2117 Problem reported by Troy A. Johnson
2118 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
2119
2120 * configure.ac (AC_INIT): Update to 1.875e.
2121
2122 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2123
2124 * NEWS: Version 1.875d.
2125 * configure.ac (AC_INIT): Likewise.
2126 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
2127
2128 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
2129 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
2130 lalr1.cc runs afoul of the first, and the last two are no longer
2131 supported by GCC 3.4.0.
2132 * README: Mention GNU m4 1.4 or later; mention m4 patches.
2133 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
2134
2135 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
2136
2137 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
2138 unsigned int, for compatibility with latest gnulib hash module.
2139 * src/state.c (state_hash, state_hasher): Likewise.
2140 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
2141 * src/uniqstr.c (hash_uniqstr): Likewise.
2142
2143 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
2144
2145 * NEWS: Unescaped newlines are no longer allowed in char & strings.
2146
2147 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
2148 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
2149 character and string literals.
2150 (unexpected_end): New function.
2151 (unexpected_eof): Use it.
2152 (unexpected_newline): New function.
2153 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
2154 actions.
2155
2156 * NEWS: Document %expect-rr.
2157
2158 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
2159 Fix typo by replacing $1 with $option.
2160 Remove more 'intl'-related files.
2161 Don't DEFUN AM_INTL_SUBDIR twice.
2162
2163 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
2164 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
2165 strtoul.c.
2166 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
2167 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
2168 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
2169 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
2170 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
2171 * src/.cvsignore: Add *.output.
2172
2173 * src/parse-gram.y: Put copyright notice inside %{ %} so it
2174 gets copied to the output file.
2175
2176 2004-04-28 Paul Eggert <eggert@twinsun.com>
2177
2178 Get files from the gnulib and po repositories, instead of relying
2179 on them being in our CVS. Upgrade to latest versions of gnulib
2180 and Automake.
2181
2182 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
2183 * bootstrap: Bootstrap from gnulib and po repositories.
2184 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
2185 * README-cvs: Document these changes. Remove version numbers from
2186 mentions of build tools, since they change so often. Mention Flex.
2187
2188 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
2189 (gl_USE_SYSTEM_EXTENSIONS): Add.
2190 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
2191 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
2192 does this for us.
2193 (AC_ISC_POSIX): Remove; we no longer support this
2194 ancient OS, as it gets in the way of latest Autoconf & gnulib.
2195 (AC_HEADER_STDC): Remove: we now assume C89 or better.
2196 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
2197 Do not check for C89 headers, except for locale.h which is used
2198 by the Yacc library and must port to K&R hosts.
2199 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
2200 Do not check for C89 functions, except for setlocale which is
2201 used by the Yacc library.
2202 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
2203 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
2204 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
2205 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
2206 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
2207 AM_GNU_GETTEXT): Remove; now done by:
2208 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
2209 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
2210 for us.
2211
2212 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
2213 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
2214 Define to empty, as gnulib.mk will do the rest for us.
2215 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
2216 for us.
2217 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
2218 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
2219
2220 * src/files.c: Include gnulib's xstrndup.h.
2221
2222 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
2223 (REALLOC): Use xnrealloc, for likewise.
2224 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
2225 (strnlen, memrchr): Remove decls; functions no longer used.
2226 Include <stpcpy.h>.
2227
2228 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
2229 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2230 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
2231 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
2232 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
2233 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
2234 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
2235 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
2236 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
2237 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
2238 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
2239 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
2240 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
2241 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
2242 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
2243 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
2244 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
2245 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
2246 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
2247 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
2248 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
2249 Remove, as these files are now generated automatically
2250 by bootstrap or automake.
2251
2252 * po/ChangeLog: Remove: all but one entry was a duplicate
2253 of this file, and I moved that 2000-11-02 entry here.
2254
2255 * config/.cvsignore: Add Makefile, depcomp, install-sh.
2256 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
2257 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
2258 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
2259 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
2260 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
2261 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
2262 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
2263 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
2264 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
2265 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
2266 xstrndup.h.
2267 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
2268 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
2269 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
2270 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
2271 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
2272 * src/.cvsignore: Remove *_.c.
2273
2274
2275 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
2276 support it. (The latest stable gzip doesn't.)
2277
2278 2004-04-27 Paul Eggert <eggert@twinsun.com>
2279
2280 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
2281 case, as stos_ is now used by destructors due to the 2004-02-09
2282 change.
2283
2284 Remove more K&R C support.
2285 * lib/libiberty.y (PARAMS): Remove. All uses removed.
2286 * lib/subpipe.c (errno): Remove decl.
2287 Include <stdlib.h> unconditionally.
2288 (EXIT_FAILURE): Remove macro.
2289 * src/complain.c (vfprintf, strerror): Remove.
2290 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
2291 unconditionally.
2292 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
2293 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
2294 (strchr, strspn, memchr): Remove decls.
2295 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
2296 unconditionally. Do not declare perror.
2297 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
2298 unconditionally.
2299
2300 * src/complain.c (_): Remove useless defn, as system.h defines this.
2301
2302 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
2303 with latest obstack.h.
2304 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
2305 to procedure types, as obstack.h now does that for us.
2306 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
2307
2308 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
2309 so that this include file can stand alone.
2310 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
2311 does this now. Include subpipe.h first after config.h, to
2312 test whether it can stand alone.
2313
2314 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
2315 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
2316 unused declaration.
2317
2318 * tests/synclines.at (%union synch line): Put a dummy member in
2319 the union, because empty unions aren't allowed in C. Caught
2320 by GCC 3.4.0.
2321
2322 2004-04-13 Jim Meyering <jim@meyering.net>
2323
2324 * src/conflicts.c (conflicts_print): Correct format string typo:
2325 use `%%' to produce literal `%'. (trivial change)
2326
2327 2004-03-30 Paul Eggert <eggert@twinsun.com>
2328
2329 * src/getargs.c (version): Update copyright year to 2004.
2330
2331 * data/c.m4 (b4_int_type): Use 'short int' rather than
2332 'short', and similarly for 'long', 'unsigned', etc.
2333 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
2334 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
2335 yy_yypstack, yydumpstack): Likewise.
2336 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
2337 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
2338 Likewise.
2339 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
2340 yy_stack_print, yyparse): Likewise.
2341 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
2342 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
2343 * lib/bitset.c (bitset_print): Likewise.
2344 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
2345 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2346 * lib/bitsetv.c (bitsetv_dump): Likewise.
2347 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
2348 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
2349 Likewise.
2350 * src/LR0.c (allocate_itemsets): Likewise.
2351 * src/gram.h (rule_number, rule): Likewise.
2352 * src/lalr.h (goto_number): Likewise.
2353 * src/nullable.c (nullable_compute): Likewise.
2354 * src/output.c (prepare_rules): Likewise.
2355 * src/relation.c (relation_print, relation_digraph): Likewise.
2356 * src/relation.h (relation_node): Likewise.
2357 * src/state.h (state_number, transitions, errs, reductions,
2358 struct state): Likewise.
2359 * src/symtab.h (symbol_number, struct symbol): Likewise.
2360 * src/tables.c (vector_number, tally, action_number,
2361 default_goto, goto_actions): Likewise.
2362 * tests/existing.at (GNU Cim Grammar): Likewise.
2363 * tests/regression.at (Web2c Actions): Likewise.
2364
2365 * src/output.c (muscle_insert_short_int_table): Renamed from
2366 muscle_insert_short_table. All uses changed.
2367
2368 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2369
2370 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
2371 (declaration): Replace expected_conflicts with expected_sr_conflicts.
2372 Add %expect-rr rule.
2373
2374 * src/scan-gram.l: Recognize %expect-rr.
2375
2376 * src/conflicts.h (expected_sr_conflicts): Rename from
2377 expected_conflicts.
2378 (expected_rr_conflicts): Declare.
2379
2380 * src/conflicts.c (expected_sr_conflicts): Rename from
2381 expected_conflicts.
2382 (expected_rr_conflicts): Define.
2383 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
2384 for GLR parsers.
2385 Use expected_sr_conflicts in place of expected_conflicts.
2386 Warn if expected_rr_conflicts used in non-GLR parser.
2387
2388 * doc/bison.texinfo: Add documentation for %expect-rr.
2389
2390 2004-03-08 Paul Eggert <eggert@gnu.org>
2391
2392 Add support for hex token numbers. Suggested by Odd Arild Olsen in
2393 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
2394
2395 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
2396 in lalr1.cc.
2397 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
2398 * src/scan-gram.l (scan_integer): New function.
2399 ({int}): Use it.
2400 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
2401 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
2402 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
2403 Say "long int", not "long", for uniformity with GNU style.
2404
2405 2004-02-25 Paul Eggert <eggert@twinsun.com>
2406
2407 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
2408 compilers. This fixes a problem with Intel's C++ compiler being
2409 chatty, reported by Guido Trentalancia in
2410 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
2411
2412 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
2413
2414 Support %destructor and merge error locations in lalr1.cc.
2415
2416 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
2417 (Parser::stos_): Define unconditionally.
2418 (Parser::destruct_): New method. Generate its body with
2419 b4_yydestruct_generate.
2420 (Parser::error_start_): New attribute.
2421 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
2422 token which are discarded.
2423 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
2424 error_start_ when erroneous token are discarded.
2425 (Parser::parse) <yyerrlab1>: Compute the location of the error
2426 token so that it covers all the discarded tokens.
2427 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
2428 it can be called with `%skeleton "lalr1.cc"', and do that.
2429
2430 2004-02-02 Paul Eggert <eggert@twinsun.com>
2431
2432 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
2433 $(top_srcdir)/lib and ../lib. This fixes a bug reported
2434 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
2435 There's no need to mention top_builddir since Automake does that
2436 for us.
2437 (INCLUDES): Remove, as Automake says it's obsolescent.
2438 Contents migrated into AM_CPPFLAGS as described above.
2439 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
2440
2441 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2442
2443 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
2444 (yyreportSyntaxError): Handle case where lookahead token is
2445 YYEMPTY.
2446
2447 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2448
2449 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
2450 resulting parsers are compilable with C++.
2451
2452 2003-12-23 Paul Eggert <eggert@twinsun.com>
2453
2454 * config/depcomp, config/install-sh: Sync with Automake 1.8.
2455 * src/output.c (output_skeleton): Rename local var.
2456 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
2457 Bison tokens, as this runs afoul of the 2003-10-07 change that
2458 disallowed NUL bytes in character constants or string literals.
2459
2460 * tests/local.at: Require Autoconf 2.59's Autotest.
2461 * tests/testsuite.at: Don't include local.at, since we now assume
2462 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
2463 including it.
2464 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
2465 multiple inclusion warnings.
2466
2467 2003-12-02 Akim Demaille <akim@epita.fr>
2468
2469 * doc/bison.texinfo (How Can I Reset the Parser): More about start
2470 conditions.
2471 From Bruno Haible.
2472
2473 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
2474
2475 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
2476
2477 2003-10-07 Paul Eggert <eggert@twinsun.com>
2478
2479 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
2480 if testsuite doesn't exist.
2481
2482 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
2483 literals, unfortunately.
2484 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
2485 Complain about NUL bytes in character constants or string literals.
2486
2487 2003-10-05 Paul Eggert <eggert@twinsun.com>
2488
2489 * NEWS: Don't document %no-default-prec, as it's still
2490 too experimental.
2491 * doc/bison.texinfo: Document %no-default-prec only if
2492 the defaultprec flag is set. Normally it's not.
2493
2494 2003-10-04 Paul Eggert <eggert@twinsun.com>
2495
2496 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
2497 non-modifiable lvalue, instead of a modifiable one.
2498 * doc/bison.texinfo (Actions): Document that $$ can
2499 be assigned to. Do not claim that $$ and $N are
2500 array element references: user code should not rely on this.
2501
2502 2003-10-01 Paul Eggert <eggert@twinsun.com>
2503
2504 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
2505 (grammar_declaration): Use it.
2506 * src/scan-gram.l: New token %no-default-prec.
2507 * tests/conflicts.at: Revamp tests to use %no-default-prec.
2508 * NEWS, doc/bison.texinfo: Document the above.
2509
2510 2003-10-01 Akim Demaille <akim@epita.fr>
2511
2512 VCG no longer supports long_straight_phase.
2513
2514 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
2515 * src/print_graph.c (print_graph): Adjust.
2516
2517 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
2518 and Paul Eggert <eggert@twinsun.com>
2519
2520 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
2521 Table of Symbols): Document %default-prec.
2522 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
2523 (grammar_declaration): Set default_prec on %default-prec.
2524 * src/scan-gram.l (%default-prec): New token.
2525 * src/reader.h (default_prec): New flag.
2526 * src/reader.c: Likewise.
2527 (packgram): Handle it.
2528 * tests/conflicts.at (%default-prec without %prec,
2529 %default-prec with %prec, %default-prec 1): New tests.
2530
2531 2003-09-30 Paul Eggert <eggert@twinsun.com>
2532
2533 * tests/testsuite.at: Include local.at, not input.at, fixing
2534 a typo in the 2003-08-25 patch.
2535
2536 2003-08-27 Akim Demaille <akim@epita.fr>
2537
2538 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
2539 GCC warnings.
2540
2541 2003-08-26 Akim Demaille <akim@epita.fr>
2542
2543 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
2544 "<\#" to avoid magic from Gnus when posting parts of this script.
2545
2546 2003-08-26 Akim Demaille <akim@epita.fr>
2547
2548 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
2549 (Parser::parse): here.
2550 Adjust: nerrs and errstatus is now replaced by...
2551 (Parser::nerrs_, Parser::errstatus_): New.
2552
2553 2003-08-25 Akim Demaille <akim@epita.fr>
2554
2555 * config/announce-gen, Makefile.cfg: New.
2556 * Makefile.am: Adjust.
2557 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
2558 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
2559
2560 2003-08-25 Akim Demaille <akim@epita.fr>
2561
2562 When reducing initial empty rules, Bison parser read an initial
2563 location that is not defined. This results in garbage, and that
2564 affects Bison's own parser. Therefore we need (i) to extend Bison
2565 to support a means to initialize this location, and (ii) to use
2566 this CVS Bison to fix CVS Bison's parser.
2567
2568 * src/reader.h, reader.c (epilogue_augment): Remove, replace
2569 with...
2570 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
2571 * src/parse-gram.y: Adjust.
2572 (%initial-action): New.
2573 (%error-verbose): Since we require CVS Bison, there is no reason
2574 not to use it.
2575 * src/scan-gram.l: Adjust.
2576 * src/Makefile.am (YACC): New, to make sure we use our own parser.
2577 * data/yacc.c (yyparse): Use b4_initial_action.
2578
2579 2003-08-25 Akim Demaille <akim@epita.fr>
2580
2581 * doc/bison.texinfo: Don't promote stdout for error messages.
2582
2583 2003-08-25 Akim Demaille <akim@epita.fr>
2584
2585 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
2586 From Alexandre Duret-Lutz.
2587
2588 2003-08-25 Akim Demaille <akim@epita.fr>
2589
2590 Version 1.875c.
2591
2592 2003-08-25 Akim Demaille <akim@epita.fr>
2593
2594 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
2595 Use them.
2596
2597 2003-08-25 Akim Demaille <akim@epita.fr>
2598
2599 * data/lalr1.cc (Parser::reduce_print_): New.
2600 Use it.
2601
2602 2003-08-25 Akim Demaille <akim@epita.fr>
2603
2604 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
2605 error recovery loops. This patch is based on
2606 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
2607 Also, augment the similarity between lalr1.cc and yacc.c.
2608 Note: the locations of error recovery rules are not correct yet.
2609
2610 * data/lalr1.cc: Comment changes to augment the similarity between
2611 lalr1.cc and yacc.c.
2612 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
2613 (yyerrlab1): Remove, but where it used to be (now the bottom part of
2614 yyerrlab), when hitting EOF, pop the whole stack here instead of
2615 merely falling thru the default error handling mechanism.
2616 (yyerrorlab): New label, with the old contents of YYERROR,
2617 plus the following change: pop the stack of rhs corresponding
2618 to the production that invoked YYERROR. That is how Yacc
2619 behaves (required by POSIX).
2620 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
2621 fail.
2622
2623 2003-08-25 Akim Demaille <akim@epita.fr>
2624
2625 Tune local.at so that people can "autom4te -l autotest calc.at -o
2626 calc" for instance, to extract a sub test suite.
2627
2628 * tests/testsuite.at: Move the initialization, Autotest version
2629 requirement, and AT_TESTED invocation into...
2630 * tests/local.at: here.
2631 * tests/testsuite.at: Include it for compatibility with Autoconf
2632 2.57.
2633 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
2634 be ignore.
2635
2636 2003-08-04 Paul Eggert <eggert@twinsun.com>
2637
2638 Rework code slightly to avoid gcc -Wtraditional warnings.
2639 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
2640 The returned value is now stored in *YY0. All callers changed.
2641 * src/output.c (merge_output): Adjust to the above change.
2642
2643 2003-07-26 Paul Eggert <eggert@twinsun.com>
2644
2645 * data/glr.c (YYASSERT): New macro.
2646 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
2647 yyresolveStates, yyprocessOneStack):
2648 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
2649 Derived from a suggestion by Frank Heckenbach.
2650
2651 2003-07-25 Paul Eggert <eggert@twinsun.com>
2652
2653 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
2654 for portability to K&R C (after ansi2knr, presumably). See
2655 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
2656 by Frank Heckenbach, though I have omitted the structure-initialization
2657 part of his glr-knr.diff patch since I recall that the Portable
2658 C Compiler didn't require that change.
2659
2660 Let the user specify how to allocate and free memory.
2661 Derived from a suggestion by Frank Heckenbach in
2662 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
2663 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
2664 All uses of free, malloc, realloc changed to use these macros,
2665 and unnecessary casts removed.
2666 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
2667
2668 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
2669
2670 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
2671 use s.empty() rather than s == "" to test for empty string; see
2672 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
2673 (trivial change)
2674
2675 2003-06-25 Akim Demaille <akim@epita.fr>
2676
2677 * config/depcomp, config/install-sh: Update from masters.
2678
2679 2003-06-20 Paul Eggert <eggert@twinsun.com>
2680
2681 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
2682 and return properly parenthesized result.
2683 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
2684 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
2685 Remove unnecessary parentheses from uses.
2686 * doc/bison.texinfo (Location Default Action): Describe the
2687 conventions for parentheses.
2688
2689 2003-06-19 Paul Eggert <eggert@twinsun.com>
2690
2691 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
2692 yyreportTree): Do not assume that size_t is the same width as int,
2693 when printing sizes. Print sizes using an unsigned format.
2694 Problem reported by Frank Heckenbach in
2695 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
2696
2697 Port to Forte Developer 7 C compiler.
2698 * data/glr.c (struct YYLTYPE): If locations are not being used,
2699 declare a single dummy member, as empty structs do not conform
2700 to the C standard.
2701 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
2702 the Forte Developer 7 C compiler complains that end-of-loop
2703 code is not reached.
2704
2705 2003-06-17 Paul Eggert <eggert@twinsun.com>
2706
2707 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
2708 avoid warnings from picky compilers about redefinition of PARAMS.
2709
2710 2003-06-17 Paul Eggert <eggert@twinsun.com>
2711
2712 Version 1.875b.
2713
2714 * NEWS: Document 1.875b.
2715
2716 * lib/bbitset.h: Do not include config.h; that's the includer's job.
2717 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
2718 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
2719 Don't use 'index' in comments, as it's a builtin fn on some hosts.
2720 * lib/bitset_stats.c: Include gettext.h unconditionally, as
2721 per recent gettext manual's suggestion.
2722 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
2723 Use prototypes, not old-style definitions.
2724 * lib/lbitset.c (lbitset_unused_clear): Likewise.
2725 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
2726 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
2727 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
2728 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
2729 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
2730 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
2731 vbitset_or_and_cmp, vbitset_copy): Likewise.
2732
2733 * lib/libiberty.h: Do not include config.h; that's the includer's job.
2734 Do not include <stdlib.h>.
2735 (PARAMS): Define unconditionally for C89.
2736 (ATTRIBUTE_NORETURN): Remove.
2737 (ATTRIBUTE_UNUSED): Define unconditionally.
2738
2739 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
2740 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
2741 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
2742 * lib/vbitset.c, lib/vbitset.h: New files.
2743 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2744 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
2745 from libbitset.
2746
2747 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
2748 `How Can I Reset @code{yyparse}', since texinfo does not allow
2749 arbitrary @ in node names.
2750
2751 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
2752 shouldn't be needed according to the gettext 0.12.1 documentation
2753 but which seem to be needed anyway: codeset.m4 glibc21.m4
2754 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
2755 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
2756 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
2757
2758 * lib/.cvsignore: Add stdbool.h.
2759 * m4/.cvsignore: Add nls.m4, po.m4.
2760
2761 Upgrade to CVS gnulib.
2762 * stdbool_.h: File renamed from stdbool.h.in.
2763 * configure.ac (AM_STDBOOL_H): Invoke this instead of
2764 AC_HEADER_STDBOOL.
2765 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
2766 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
2767 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
2768 (MOSTLYCLEANFILES): New var.
2769 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
2770 (stdbool.h): New rule.
2771 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
2772 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
2773 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
2774 m4/quote.m4: Upgrade to today's gnulib.
2775
2776 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
2777 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
2778 the tests right now.
2779 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
2780 yyerror are declared before use; C99 requires this.
2781
2782 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2783
2784 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
2785 first.
2786 (yyrecoverSyntaxError): Correct the logic for setting and testing
2787 yyerrState.
2788 Correct comment on handling EOF.
2789 Allow states with only a default reduction, rather than failing
2790 (I can't quite reconstruct why these were not allowed before).
2791
2792 Fixes to avoid problem that $-N rules in GLR parsers can cause
2793 buffer overruns, corrupting state.
2794
2795 * src/output.c (prepare_rules): Output max_left_semantic_context
2796 definition.
2797 * src/reader.h (max_left_semantic_context): New variable declaration.
2798 * src/scan-gram.l (max_left_semantic_context): Define.
2799 (handle_action_dollar): Update max_left_semantic_context.
2800 * data/glr.c (YYMAXLEFT): New definition.
2801 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
2802 (yyresolveAction): Ditto.
2803
2804 Fixes to problems with location handling in GLR parsers reported by
2805 Frank Heckenbach (2003/06/05).
2806
2807 * data/glr.c (YYLTYPE): Make trivial if locations not used.
2808 (YYRHSLOC): Add parentheses, and define only if locations used.
2809 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
2810 locations not used.
2811 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
2812 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
2813
2814 * tests/cxx-type.at: Exercise location information; update tests
2815 to differentiate output with and without locations.
2816 Remove forward declarations of yylex and yyerror---caused errors
2817 because default YYLTYPE not yet defined.
2818 Change semantic actions to compute strings, rather than printing
2819 them directly (to test proper passing of semantics values). Change
2820 output to prefix notation and update test data and expected results.
2821 (yylex): Track locations.
2822 (stmtMerge): Return value rather than printing, and include arguments
2823 in value.
2824
2825 2003-06-03 Paul Eggert <eggert@twinsun.com>
2826
2827 Avoid warnings generated by GCC 2.95.4 when Bison is
2828 configured with --enable-gcc-warnings.
2829 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
2830 yy::]b4_parser_class_name[::translate_,
2831 yy::Stack::operator[] (unsigned),
2832 yy::Stack::operator[] (unsigned) const,
2833 yy::Slice::operator[] (unsigned),
2834 yy::Slice::operator[] (unsigned) const):
2835 Rename local vars to avoid warnings.
2836 * tests/glr-regression.at (Improper handling of embedded actions
2837 and $-N in GLR parsers): Remove unused local variable from yylex.
2838 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
2839 (void) as arg when not pure, since we now assume C89 when building
2840 Bison. Pacify GCC by using parameter.
2841
2842 2003-06-02 Paul Eggert <eggert@twinsun.com>
2843
2844 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
2845 yy::Location::lines, yy::Location::columns): Rename arguments
2846 to avoid shadowing; this removes a warning generated by GCC 3.3.
2847
2848 2003-06-01 Paul Eggert <eggert@twinsun.com>
2849
2850 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
2851 to g++, as GCC 3.3 complains if you do it.
2852 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
2853 everything that WARNING_CFLAGS has, except omit warnings
2854 not suitable for C++.
2855 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
2856 * tests/atlocal.in (CXXFLAGS): New var.
2857 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
2858
2859 Fix a GLR parser bug I reported in February; see
2860 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
2861 The problem was that GLR parsers did not conform to the C standard,
2862 because actions like { $1 = $2 + $3; } expanded to expressions
2863 that invoked YYFILL in separate subexpressions, and YYFILL assigned
2864 to a local variable. The C standard says that expressions
2865 like (var = f ()) + (var = f ()) have undefined behavior.
2866 Another problem was that GCC sometimes issues warnings that
2867 yyfill and its parameters are unused.
2868
2869 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
2870 as possibly unused.
2871 (yyfill): New function.
2872 (YYFILL): Use it.
2873 (yyuserAction): Change type of yynormal to bool, so that it matches
2874 the new yyfill signature. Mark it as possibly unused.
2875
2876
2877 Follow up on a bug I reported in February, where a Bison-generated
2878 parser can loop. Provide a test case and a fix for yacc.c. I
2879 don't have a fix for lalr1.cc or for glr.c, unfortunately.
2880 The original bug report is in:
2881 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
2882
2883 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
2884 macro's size was becoming unwieldy.
2885 (yyerrlab): Do not discard an empty lookahead symbol, as this
2886 might destroy garbage.
2887 (yyerrorlab): New label, with the old contents of YYERROR,
2888 plus the following change: pop the stack of rhs corresponding
2889 to the production that invoked YYERROR. That is how Yacc
2890 behaves, and POSIX requires this behavior.
2891 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
2892 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
2893 Define 'alarm' to do nothing if unistd.h is not available.
2894 Add a new rule "exp: '-' error;" to test the above change to
2895 data/yacc.c. Use 'alarm' to abort any test taking longer than
2896 10 seconds, as it's probably looping.
2897 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
2898 Also, the new yacc.c generates two fewer diagnostics for an
2899 existing test.
2900
2901 2003-05-24 Paul Eggert <eggert@twinsun.com>
2902
2903 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
2904 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
2905 This fixes a problem reported by John Bowman when the Compaq/HP
2906 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
2907 -ansi -Wall -gall).
2908 * data/yacc.c (union yyalloc): Likewise.
2909 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
2910
2911 Switch from 'int' to 'bool' where that makes sense.
2912
2913 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
2914 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
2915 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
2916 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
2917 Return or accept bool, not int. All callers changed.
2918 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
2919 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
2920 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
2921 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
2922 bitset_or_and_cmp_): Likewise.
2923 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
2924 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
2925 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
2926 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
2927 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
2928 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
2929 bitset_stats_or_and_cmp): Likewise.
2930 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
2931 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
2932 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
2933 ebitset_xor_cmp): Likewise.
2934 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
2935 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
2936 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
2937 lbitset_xor_cmp): Likewise.
2938 * lib/bbitset.h: Include <stdbool.h>.
2939 (struct bitset_vtable): The following members now return bool, not
2940 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
2941 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
2942 or_and_cmp).
2943 * src/conflicts.c (count_rr_conflicts): Likewise.
2944 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
2945 All uses changed.
2946 * lib/ebitset.c (ebitset_obstack_init): Likewise.
2947 * lib/lbitset.c (lbitset_obstack_init): Likewise.
2948 * src/getargs.c (debug_flag, defines_flag, locations_flag,
2949 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
2950 graph_flag): Likewise.
2951 * src/getargs.h (debug_flag, defines_flag, locations_flag,
2952 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
2953 graph_flag): Likewise.
2954 * src/output.c (error_verbose): Likewise.
2955 * src/output.h (error_verbose): Likewise.
2956 * src/reader.c (start_flag, typed): Likewise.
2957 * src/reader.h (typed): Likewise.
2958 * src/getargs.c (LOCATIONS_OPTION): New constant.
2959 (long_options, getargs): Use it.
2960 * src/lalr.c (build_relations): Use bool, not int.
2961 * src/nullable.c (nullable_compute): Likewise.
2962 * src/print.c (print_reductions): Likewise.
2963 * src/tables.c (action_row, pack_vector): Likewise.
2964 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
2965 * src/output.c (prepare): Use it.
2966 * src/output.c (token_definitions_output,
2967 symbol_destructors_output, symbol_destructors_output): Use string,
2968 not boolean integer, to keep track of whether to output separator.
2969 * src/print_graph.c (print_core): Likewise.
2970 * src/state.c (state_rule_lookaheads_print): Likewise.
2971
2972 * config/install-sh: Sync from automake 1.7.5.
2973
2974 2003-05-14 Paul Eggert <eggert@twinsun.com>
2975
2976 * src/parse-gram.y (rules_or_grammar_declaration): Require a
2977 semicolon after a grammar declaration, in the interest of possible
2978 future changes to the Bison input language.
2979 Do not allow a stray semicolon at the start of the grammar.
2980 (rhses.1): Allow one or more semicolons after any rule, including
2981 just before "|" as required by POSIX.
2982 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
2983 grammar.
2984
2985 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
2986
2987 %parse-param support for lalr1.cc.
2988
2989 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
2990 b4_cc_constructor_calls, b4_cc_constructor_call,
2991 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
2992 definitions.
2993 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
2994 parse-param arguments.
2995 (yy::b4_parser_class_name): Declare instance variables to
2996 hold parse-param arguments.
2997 * tests/calc.at: s/value/semantic_value/ because value clashes
2998 with a member of yy::b4_parser_class_name. Adjust C++ code
2999 to handle %parse-param. Enable %parse-param test in C++.
3000
3001 2003-05-12 Paul Eggert <eggert@twinsun.com>
3002
3003 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
3004 English a bit. Fix fclose typo. Change "const char" to "char
3005 const", and use ANSI C rather than K&R for "main". Suggest
3006 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
3007 and suggest yy_switch_to_buffer.
3008
3009 2003-05-05 Paul Eggert <eggert@twinsun.com>
3010
3011 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
3012 C89. This avoids a diagnostic on compilers that define __STDC__
3013 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
3014 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
3015
3016 2003-05-03 Paul Eggert <eggert@twinsun.com>
3017
3018 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
3019 Do not overrun array bounds.
3020 This should fix a bug reported today by Olatunji Oluwabukunmi in
3021 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
3022
3023 2003-04-29 Akim Demaille <akim@epita.fr>
3024
3025 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
3026 * src/getargs.c, src/getargs.h: here, as bool, not int.
3027 (nondeterministic_parser): New.
3028 * src/parse-gram.y, src/scan-gram.l: Support
3029 %nondeterministic-parser.
3030 * src/output.c (prepare): Use nondeterministic_parser instead
3031 of glr_parser where appropriate.
3032 * src/tables.c (conflict_row, action_row, save_row)
3033 (token_actions, token_actions, pack_vector): Ditto.
3034
3035 2003-04-29 Akim Demaille <akim@epita.fr>
3036
3037 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
3038
3039 2003-04-29 Akim Demaille <akim@epita.fr>
3040
3041 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
3042 with %pure-parser and %locations to exercise the patch from Yakov
3043 Markovitch below.
3044
3045 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
3046
3047 * data/yacc.c: (b4_lex_param): Corrected for the case where
3048 %lex-param is provided and %pure-parser isn't.
3049
3050 2003-04-27 Paul Eggert <eggert@twinsun.com>
3051
3052 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
3053 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
3054 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
3055 if it is not defined.
3056 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
3057
3058 2003-04-26 Paul Eggert <eggert@twinsun.com>
3059
3060 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
3061 Declare to be of type suitable for the ninf value itself, not of
3062 type suitable for the corresponding table, since the latter might
3063 be unsigned but the ninf value might be negative. This fixes a
3064 bug reported by Alexandre Duret-Lutz in
3065 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3066
3067 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
3068 invokes it. We shouldn't invoke it twice because it will attempt
3069 to put error.o in the archive twice. This fixes a glitch reported
3070 by Martin Mokrejs in
3071 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
3072
3073 2003-04-21 Paul Eggert <eggert@twinsun.com>
3074
3075 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
3076 to gnulib.
3077
3078 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
3079
3080 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
3081 Fix obvious typo that results in uncompilable GLR parsers
3082 when both %pure-parser and %locations are used. (trivial change)
3083
3084 2003-04-17 Paul Eggert <eggert@twinsun.com>
3085
3086 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
3087 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
3088 Do not insert the expected token via unput, as this runs afoul
3089 of a POSIX-compatibility bug in flex 2.5.31.
3090 All uses changed to BEGIN the parent state,
3091 since we no longer insert the expected token via unput.
3092 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
3093 that is no longer emitted after the above change.
3094
3095 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
3096 the first one. This change is from Paul Hilfinger, and it fixes
3097 regression reported by Werner Lemberg in
3098 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3099
3100 (resolve_sr_conflict): Don't invoke state_errs_set
3101 unless one or more tokens have been explicitly made errors.
3102 Otherwise, the above change causes Bison to abort.
3103
3104 * tests/existing.at (GNU pic Grammar): New test case, taken from
3105 Lemberg's email.
3106
3107 2003-03-31 Akim Demaille <akim@epita.fr>
3108
3109 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
3110
3111 2003-03-31 Akim Demaille <akim@epita.fr>
3112
3113 * src/output.c (prepare_symbols): Avoid trailing spaces in the
3114 output.
3115
3116 2003-03-31 Akim Demaille <akim@epita.fr>
3117
3118 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
3119 From Paul Hilfinger.
3120
3121 2003-03-29 Akim Demaille <akim@epita.fr>
3122
3123 * m4/error.m4: Do not put under dynamic conditions some code which
3124 expansion is under static control.
3125
3126 2003-03-29 Akim Demaille <akim@epita.fr>
3127
3128 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
3129
3130 2003-03-29 Akim Demaille <akim@epita.fr>
3131
3132 * doc/bison.texinfo (Strings are Destroyed): New.
3133
3134 2003-03-13 Paul Eggert <eggert@twinsun.com>
3135
3136 * .cvsignore: Add configure.lineno.
3137 * src/.cvsignore: Add yacc.
3138 * tests/.cvsignore: Add testsuite.log.
3139 * doc/fdl.texi: Sync with latest FSF version.
3140
3141 2003-03-12 Paul Eggert <eggert@twinsun.com>
3142
3143 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
3144 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
3145 cursor, instead of leaving it undefined. This fixes a bug
3146 reported by Tim Van Holder in
3147 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
3148 * tests/input.at (Torturing the Scanner): Test the scanner on
3149 an empty input file, which was Tim Van Holder's test case.
3150
3151 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
3152 <sys/resource.h> can be included, include sys/time.h and
3153 sys/times.h first, if available. This works around the SunOS
3154 4.1.4 porting bug reported by Bruce Becker in
3155 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
3156
3157 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
3158 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
3159 AC_HEADER_SYS_WAIT.
3160
3161 Merge changes from gnulib. This was prompted because the CVS
3162 snapshot didn't build on Solaris 7 due to strnlen problems.
3163
3164 These changes need to be merged back into gnulib:
3165 * lib/hash.c: Include <stdbool.h> unconditionally.
3166 * m4/onceonly.m4 (m4_quote): New macro.
3167 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
3168 Quote AC_FOREACH variable-expansions properly.
3169 The 2003-01-03 obstack.h change also needs merging.
3170 {end of changes requiring merging}
3171
3172 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
3173 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
3174 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
3175 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
3176 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
3177 New files, imported from gnulib.
3178 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
3179 above.
3180
3181 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
3182 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
3183 gnulib sources.
3184
3185 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
3186 Add.
3187 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
3188 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
3189 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
3190 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
3191 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
3192 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
3193 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
3194 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
3195 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
3196 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
3197 (jm_PREREQ_ARGMATCH): Remove.
3198 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
3199 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
3200
3201 * src/system.h: Include <stdbool.h> unconditionally.
3202
3203 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
3204 assuming at least C89 in the bitset code for some time now.
3205
3206 2003-03-03 Akim Demaille <akim@epita.fr>
3207
3208 * ro.po: New.
3209
3210 2003-03-02 Akim Demaille <akim@epita.fr>
3211
3212 * doc/bison.texinfo (Table of Symbols): Reactivate the
3213 documentation for %lex-param, and %parse-param.
3214
3215 2003-03-02 Akim Demaille <akim@epita.fr>
3216
3217 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
3218 generate verbose error messages.
3219 Use the number of tokens as an upper bound in yytname, as it
3220 cannot be a non terminal.
3221
3222 2003-03-02 Akim Demaille <akim@epita.fr>
3223
3224 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
3225 message.
3226
3227 2003-03-02 Akim Demaille <akim@epita.fr>
3228
3229 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
3230 Use them to exercise yycheck overrun.
3231 Based on Andrew Suffield's grammar.
3232
3233 2003-03-02 Akim Demaille <akim@epita.fr>
3234
3235 Create tests/local.at for Bison generic testing macros.
3236
3237 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
3238 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
3239 This new file.
3240 * tests/calc.at (AT_CHECK_CALC): Adjust.
3241 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
3242 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
3243 * tests/local.at: here.
3244 (AT_COMPILE_CXX): Tags the tests using it as c++.
3245 Ignore the test if CXX is not functional.
3246
3247 2003-03-01 Paul Eggert <eggert@twinsun.com>
3248
3249 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
3250 not loc->end, since loc->end might contain garbage and this leads
3251 to undefined behavior on some platforms.
3252 (id_loc, token_start): Use (IF_LINTed) initial values that do not
3253 depend on *loc, so that the reader doesn't give the the false
3254 impression that *loc is initialized.
3255 (<INITIAL>"%%"): Do not bother setting code_start, since its value
3256 does not survive the return.
3257
3258 2003-03-01 Akim Demaille <akim@epita.fr>
3259
3260 * src/scan-gram.l (code_start): Always initialize it when entering
3261 into yylex, as SC_EPILOGUE is activated *before* the corresponding
3262 yylex invocation. An alternative would be making it static, but
3263 then it starts with the second %%'s beginning, instead of its end.
3264
3265 2003-02-28 Paul Eggert <eggert@twinsun.com>
3266
3267 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
3268 around a UnixWare 7.1.1 porting bug reported by John Hughes in
3269 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
3270
3271 2003-02-26 Paul Eggert <eggert@twinsun.com>
3272
3273 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
3274 Remove Sequent/Pyramid discussion (nobody uses them any more).
3275 Merge VMS and MS-DOS discussion; these ports may well be dead
3276 but let's keep mentioning them for now. Put <> around email
3277 addresses. Add copyright notice.
3278
3279 2003-02-24 Paul Eggert <eggert@twinsun.com>
3280
3281 * data/glr.c (yy_reduce_print): yylineno -> yylno,
3282 to avoid collision with flex use of yylineno.
3283 Problem reported by Bruce Lilly in
3284 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
3285 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3286 * data/yacc.c (yy_reduce_print): Likewise.
3287
3288 * config/depcomp: Sync with Automake 1.7.3.
3289
3290 2003-02-21 Akim Demaille <akim@epita.fr>
3291
3292 * data/lalr1.cc: Use temporary variables instead of casts to
3293 change integer types.
3294 Suggested by Paul Eggert.
3295
3296 2003-02-21 Akim Demaille <akim@epita.fr>
3297
3298 * doc/bison.texinfo: Use "location" consistently to refer to @n,
3299 to avoid confusions with lalr1.cc's notion of Position.
3300 Suggested by Paul Eggert.
3301
3302 2003-02-20 Akim Demaille <akim@epita.fr>
3303
3304 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
3305 before initial_columns.
3306 (location.hh): Use consistent variable names when defining the
3307 operator<<.
3308 Use "last" so that we subtract from Positions, not from unsigned.
3309
3310 2003-02-20 Akim Demaille <akim@epita.fr>
3311
3312 * data/lalr1.cc (position.hh): New subfile, including the extended
3313 and Doxygen'ed documentation of class Position.
3314 (location.hh): Use it.
3315 Document a` la Doxygen.
3316 With the help of Benoit Perrot.
3317
3318 2003-02-20 Akim Demaille <akim@epita.fr>
3319
3320 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
3321 AT_YACC_IF.
3322 Redefine AT_YYERROR_SEES_LOC_IF using it.
3323 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
3324 not defined.
3325 Don't use the location in yy::Parser::error_ and
3326 yy::Parser::print_ when not %locations.
3327 Activate more lalr1.cc tests.
3328
3329 2003-02-19 Akim Demaille <akim@epita.fr>
3330
3331 * data/lalr1.cc: When displaying a line number, be sure to make it
3332 an int.
3333
3334 2003-02-19 Akim Demaille <akim@epita.fr>
3335
3336 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
3337 Remove, useless.
3338 (YYABORT, YYACCEPT, YYERROR): New.
3339 * tests/calc.at: Renable the lalr1.cc test.
3340
3341 2003-02-19 Akim Demaille <akim@epita.fr>
3342
3343 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
3344 error recovery, mixing with/without pops and discarding of the
3345 lookahead.
3346 Exercise YYERROR.
3347 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
3348
3349 2003-02-17 Paul Eggert <eggert@twinsun.com>
3350
3351 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
3352 * tests/testsuite.at (AT_COMPILE): Use them.
3353 This fixes the testsuite problem reported by Robert Lentz in
3354 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
3355
3356 2003-02-12 Paul Eggert <eggert@twinsun.com>
3357
3358 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
3359 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
3360 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
3361 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
3362 Check for malloc failure, for consistency with yacc.c.
3363 (yytname_size): Remove, for consistency with yacc.c.
3364
3365 The bug still remains in data/lalr1.cc, as I didn't have time
3366 to fix it there.
3367
3368 2003-02-06 Akim Demaille <akim@epita.fr>
3369
3370 * configure.ac (GXX): Rename as...
3371 (CXX): this, to keep the original Autoconf semantics.
3372 Require 2.57.
3373 * data/lalr1.cc: Fix b4_copyright invocations.
3374 If YYDEBUG is not defined, don't depend upon name_ being defined.
3375 (location.hh): Include string and iostream.
3376 (Position::filename): New member.
3377 (Position::Position ()): New.
3378 (operator<< (Position)): New.
3379 (operator- (Position, int)): New.
3380 (Location::first, Location::last): Rename as...
3381 (Location::begin, Location::end): these, to mock the conventional
3382 iterator names.
3383 (operator<< (Location)): New.
3384 * tests/atlocal.in (CXX): New.
3385 * tests/testsuite.at (AT_COMPILE_CXX): New.
3386 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
3387 locations in a more synthetic way.
3388 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
3389 lalr1.cc is used.
3390 Adjust the C locations to match those from Emacs: first column is
3391 column 0.
3392 Change all the expected results.
3393 Conform to the GCS: simplify the locations when applicable.
3394 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
3395 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
3396 these CPP macros with the m4 macros new defined by...
3397 (AT_CHECK_PUSHDEFS): this, i.e.:
3398 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
3399 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
3400 New macros.
3401 (AT_CHECK_POPDEFS): Undefine them.
3402 (AT_CHECK_CALC_LALR1_CC): New.
3403 Use it for the first lalr1.cc test.
3404
3405 2003-02-04 Akim Demaille <akim@epita.fr>
3406
3407 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
3408 Location as is defined.
3409
3410 2003-02-04 Akim Demaille <akim@epita.fr>
3411
3412 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
3413 name_ being defined.
3414
3415 2003-02-03 Paul Eggert <eggert@twinsun.com>
3416
3417 * src/gram.h (start_symbol): Remove unused decl.
3418
3419 Use more-consistent naming conventions for local vars.
3420
3421 * src/derives.c (derives_compute): Change type of local var from
3422 int to rule_number.
3423 * src/gram.c (grammar_rules_partial_print): Likewise.
3424 * src/print.c (print_core): Likewise.
3425 * src/reduce.c (reduce_grammar_tables): Likewise.
3426
3427 * src/gram.c (grammar_dump): Change name of item_number *
3428 local var from r to rp.
3429 * src/nullable.c (nullable_compute): Likewise.
3430
3431 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
3432
3433 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
3434 for symbol or symbol_number var.
3435 * src/reader.c (grammar_start_symbol_set): Likewise.
3436 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
3437 Likewise.
3438 * src/state.c (transitions_to): Likewise.
3439 * src/state.h: Likewise.
3440 * src/tables.c (symbol_number_to_vector_number): Likewise.
3441
3442 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
3443 char * var.
3444
3445 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
3446 var.
3447
3448 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
3449 var.
3450
3451 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
3452 Use str, not s, for char * var. Use ch, not c, for character var.
3453 Use size for size var.
3454
3455 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
3456 char * var.
3457 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
3458 uniqstr var.
3459 * src/uniqstr.h: Likewise.
3460
3461 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
3462 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
3463 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
3464 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
3465 param to have same name as that of enum, so that we don't use
3466 "s" to stand for a non-state.
3467
3468 2003-02-02 Akim Demaille <akim@epita.fr>
3469
3470 * src/scan-skel.l: Scan more than one inert character per yylex
3471 invocation.
3472
3473 2003-02-01 Paul Eggert <eggert@twinsun.com>
3474
3475 Version 1.875a.
3476
3477 * po/LINGUAS: Add ms.
3478
3479 2003-01-30 Akim Demaille <akim@epita.fr>
3480
3481 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
3482
3483 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3484
3485 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
3486 of $1.
3487
3488 Changes in response to error report by S. Eken: GLR mode does not
3489 handle negative $ indices or $ indices in embedded rules correctly.
3490 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
3491
3492 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
3493 (b4_rhs_location): Ditto.
3494 (yyfill): New function to copy from stack tree into array
3495 incrementally.
3496 (yyuserAction): Modify to allow incremental move of semantic values
3497 to rhs array when in GLR mode.
3498 Define YYFILL to use in user-defined actions to fill semantic array
3499 as needed.
3500 Remove dummy use of yystack, as there is now a guaranteed use.
3501 (yydoAction): Modify to allow incremental move of semantic values
3502 to rhs array when in GLR mode.
3503 (yyresolveAction): Ditto.
3504 (yyglrShiftDefer): Update comment.
3505 (yyresolveStates): Use X == NULL for pointers, not !X.
3506 (yyglrReduce): Ditto.
3507 (yydoAction): Ditto
3508
3509 * tests/glr-regr1.at: Rename to ...
3510 * tests/glr-regression.at: Add new regression test for the problems
3511 described above (adapted from S. Eken).
3512 Update copyright notice.
3513 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
3514 * tests/Makefile.am: Ditto.
3515
3516 2003-01-28 Paul Eggert <eggert@twinsun.com>
3517
3518 * data/lalr1.cc: Do not use @output_header_name@ unless
3519 b4_defines_flag is set. This fixes two bugs reported by
3520 Tim Van Holder in
3521 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
3522 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
3523
3524 2003-01-21 Paul Eggert <eggert@twinsun.com>
3525
3526 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
3527 we don't need to worry about yyerrlab1 being reported as an
3528 "unused label" by non-GCC C compilers. The downside is that if
3529 locations are used then a couple of statements are duplicated each
3530 time YYERROR is invoked, but the upside is that the warnings
3531 should vanish.
3532 (yyerrlab1): Move code to YERROR.
3533 (yyerrlab2): Remove. Change uses back to yyerrlab1.
3534 This reverts some of the 2002-12-27 change.
3535
3536 2003-01-17 Paul Eggert <eggert@twinsun.com>
3537
3538 * src/output.c (symbol_printers_output): Fix typo that led
3539 to core dump. Problem reported by Antonio Rus in
3540 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
3541
3542 2003-01-13 Akim Demaille <akim@epita.fr>,
3543 Quoc Peyrot <chojin@lrde.epita.fr>,
3544 Robert Anisko <anisko_r@lrde.epita.fr>
3545
3546 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
3547 when the stacks contain one element, as the loop would otherwise
3548 free the last state, and then use the top state (the one we just
3549 popped). This means that the initial elements will not be freed
3550 explicitly, as is the case in yacc.c; it is not a problem, as
3551 these elements have fake values.
3552
3553 2003-01-11 Paul Eggert <eggert@twinsun.com>
3554
3555 * NEWS: %expect-violations are now just warnings, reverting
3556 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
3557 bootstrapping problem reported by Matthias Klose; see
3558 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
3559 * src/conflicts.c (conflicts_print): Likewise.
3560 * tests/conflicts.at (%expect not enough, %expect too much,
3561 %expect with reduce conflicts): Likewise.
3562 * doc/bison.texinfo (Expect Decl): Document this. Also mention
3563 that the warning is enabled if the number of conflicts changes
3564 (not necessarily increases).
3565
3566 * src/getargs.c (version): Update copyright year.
3567
3568 2003-01-09 Akim Demaille <akim@epita.fr>
3569
3570 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
3571
3572 2003-01-08 Paul Eggert <eggert@twinsun.com>
3573
3574 * Makefile.maint (WGETFLAGS):
3575 New macro, containing "-C off" to disable proxy caches.
3576 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
3577 (rel-check): Use $(WGET) instead of wget.
3578
3579 2003-01-06 Paul Eggert <eggert@twinsun.com>
3580
3581 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
3582 the GLR paper of Scott, Johnstone and Hussain.
3583
3584 2003-01-04 Paul Eggert <eggert@twinsun.com>
3585
3586 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
3587 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
3588 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
3589 (EXTRA_LIBRARIES): New var, for liby.a.
3590 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
3591 (EXTRA_SCRIPTS): New var, for yacc.
3592
3593 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
3594 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
3595 Problem reported by Nelson H. F. Beebe.
3596
3597 2003-01-03 Paul Eggert <eggert@twinsun.com>
3598
3599 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
3600 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
3601 when compiling Bison 1.875's `bitset bset = obstack_alloc
3602 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
3603
3604 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
3605 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
3606 grow to a huge size with typical invocation.
3607
3608 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
3609 Use the pattern recommended by Autoconf 2.57, except also protect
3610 against double-definition.
3611 * src/system.h: Likewise.
3612 Portability issues reported by Nelson H. F. Beebe.
3613
3614 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
3615 All uses changed. Provide a definition in both C and C++.
3616 (yytrue, yyfalse): Define even if defined (__cplusplus).
3617
3618 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
3619 Reported by Nelson H. F. Beebe.
3620
3621 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
3622
3623 2003-01-02 Paul Eggert <eggert@twinsun.com>
3624
3625 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
3626 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
3627 Bug reported by Nelson H. F. Beebe.
3628
3629 2003-01-01 Paul Eggert <eggert@twinsun.com>
3630
3631 * Version 1.875.
3632
3633 2002-12-30 Paul Eggert <eggert@twinsun.com>
3634
3635 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
3636 Moved here from...
3637 (<INITIAL>","): Here. This causes stray "," to be treated
3638 more uniformly.
3639
3640 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
3641 last brace in braced code when not in Yacc mode, for compatibility
3642 with Bison 1.35. This resurrects the 2001-12-15 patch to
3643 src/reader.c.
3644
3645 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
3646 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
3647
3648 2002-12-28 Paul Eggert <eggert@twinsun.com>
3649
3650 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
3651 that of SYM's type. This fixes Debian bug 168069, reported by
3652 Thomas Olsson.
3653
3654 2002-12-28 Paul Eggert <eggert@twinsun.com>
3655
3656 Version 1.75f.
3657
3658 Switch back to the Yacc style of conflict reports, undoing some
3659 of the 2002-07-30 change.
3660 * doc/bison.texinfo (Understanding): Use Yacc style for
3661 conflict reports. Also, use new way of locating rules.
3662 * src/conflicts.c (conflict_report):
3663 Renamed from conflict_report_yacc, removing the old
3664 'conflict_report'. Translate the entire conflict report at once,
3665 so that we don't assume that "," has the same interpretation in
3666 all languages.
3667 (conflicts_output): Use Yacc-style conflict report for each state,
3668 instead of our more-complicated style.
3669 (conflicts_print): Use Yacc-style conflict report, except print
3670 the input file name when not emulating Yacc.
3671 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
3672 Conflicted Reduction, %expect not enough, %expect too much,
3673 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
3674 * tests/existing.at (GNU Cim Grammar): Likewise.
3675 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
3676
3677 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
3678 fatal): Don't invoke fflush; it's not needed and it might even be
3679 harmful for stdout, as stdout might not be open.
3680 * src/reduce.c (reduce_print): Likewise.
3681
3682 2002-12-27 Paul Eggert <eggert@twinsun.com>
3683
3684 Fix a bug where error locations were not being recorded correctly.
3685 This problem was originally reported by Paul Hilfinger in
3686 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
3687
3688 * data/yacc.c (yyparse): New local var yylerrsp, to record the
3689 top of the location stack's error locations.
3690 (yyerrlab): Set it. When discarding a token, push its location
3691 onto yylerrsp so that we don't lose track of the error's end.
3692 (yyerrlab1): Now is only the target of YYERROR, so that we can
3693 properly record the location of the action that failed. For GCC
3694 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
3695 GCC warning about yyerrlab1 being unused if YYERROR is unused.
3696 (yyerrlab2): New label, which yyerrlab now falls through to.
3697 Compute the error's location by applying YYLLOC_DEFAULT to
3698 the locations of all the symbols that went into the error.
3699 * doc/bison.texinfo (Location Default Action): Mention that
3700 YYLLOC_DEFAULT is also invoked for syntax errors.
3701 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3702 Error locations include the locations of all the tokens that were
3703 discarded, not just the last token.
3704
3705 2002-12-26 Paul Eggert <eggert@twinsun.com>
3706
3707 * src/files.c: Include quote.h.
3708 (compute_output_file_names): Warn if we detect conflicting
3709 outputs to the same file. This should catch the misunderstanding
3710 exemplified by Debian Bug 165349, reported by Bruce Stephens..
3711
3712 * src/conflicts.c (conflicts_print): If the user specifies
3713 "%expect N", report an error if there are any reduce/reduce
3714 conflicts. This is what the manual says should happen.
3715 This fixes Debian bug 130890, reported by Anthony DeRobertis.
3716 * tests/conflicts.at (%expect with reduce conflicts): New test.
3717
3718 Don't use m4_include on relative file names, as it doesn't work as
3719 desired if there happens to be a file with that name under ".".
3720
3721 * m4sugar/version.m4: Remove; it was included but it wasn't used.
3722 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
3723 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
3724 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
3725 * src/output.c (output_skeleton): Use full path names when
3726 specifying a file to include; don't rely on include path, as
3727 it's unreliable when the working file contains a file with
3728 that name.
3729
3730 2002-12-25 Paul Eggert <eggert@twinsun.com>
3731
3732 Remove obsolete references to bison.simple and bison.hairy.
3733 Problem mentioned by Aubin Mahe in
3734 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
3735 * data/glr.c: Comment fix.
3736 * doc/bison.1: Remove references. Also, mention "yacc".
3737
3738 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
3739 with -g option.
3740
3741 * src/parse-gram.y (declaration): Use enum "report_states" rather
3742 than its numeric value 1.
3743
3744 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
3745 opening a new one. This fixes Debian bug 165349, reported by
3746 Bruce Stephens.
3747
3748 2002-12-24 Paul Eggert <eggert@twinsun.com>
3749
3750 Version 1.75e.
3751
3752 * Makefile.maint (cvs-update): Don't assume that the shell
3753 supports $(...), as Solaris sh doesn't.
3754
3755 * src/parse-gram.y (lloc_default): Remove test for empty
3756 nonterminals at the end, since it didn't change the result.
3757
3758 2002-12-24 Paul Eggert <eggert@twinsun.com>
3759
3760 If the user does not define YYSTYPE as a macro, Bison now declares it
3761 using typedef instead of defining it as a macro. POSIX requires this.
3762 For consistency, YYLTYPE is also declared instead of defined.
3763
3764 %union directives can now have a tag before the `{', e.g., the
3765 directive `%union foo {...}' now generates the C code
3766 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
3767 The default union tag is `YYSTYPE', for compatibility with Solaris 9
3768 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
3769 instead of `yyltype'.
3770
3771 `yystype' and `yyltype' are now obsolescent macros instead of being
3772 typedefs or tags; they are no longer documented and will be
3773 withdrawn in a future release.
3774
3775 * data/glr.c (b4_location_type): Remove.
3776 (YYSTYPE): Renamed from yystype.
3777 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
3778 (struct YYLTYPE): Renamed from struct yyltype.
3779 (YYLTYPE): Renamed from yyltype.
3780 (yyltype, yystype): New (and obsolescent) macros,
3781 for backward compatibility.
3782 * data/yacc.c: Likewise.
3783
3784 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
3785 does not specify a union tag. This is for compatibility with
3786 Solaris 9 yacc.
3787
3788 * src/parse-gram.y (add_param): 2nd arg is now char * not char
3789 const *, since it is now modified by stripping surrounding { }.
3790 (current_braced_code): Remove.
3791 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
3792 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
3793 trailing " {...}". Now of type <chars>.
3794 (grammar_declaration): Adjust to bundled tokens.
3795 (code_content): Remove; stripping is now done by add_param.
3796 (print_token_value): Print contents of bundled tokens.
3797 (token_name): New function.
3798
3799 * src/reader.h (braced_code, current_braced_code): Remove.
3800 (token_name): New decl.
3801
3802 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
3803 token_type, not braced_code code_kind. All uses changed.
3804 (SC_PRE_CODE): New state, for scanning after a keyword that
3805 has (or usually has) an immediately-following braced code.
3806 (token_type): New local var, to keep track of which token type
3807 to return when scanning braced code.
3808 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
3809 <INITIAL>"%parse-param", <INITIAL>"%printer",
3810 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
3811 instead of returning a token type immediately.
3812 (<INITIAL>"{"): Set token type.
3813 (<SC_BRACED_CODE>"}"): Use it.
3814 (handle_action_dollar, handle_action_at): Now returns bool
3815 indicating success. Fail if ! current_rule; this prevents a core dump.
3816 (handle_symbol_code_dollar, handle_symbol_code_at):
3817 Remove; merge body into caller.
3818 (handle_dollar, handle_at): Complain in invalid contexts.
3819
3820 * NEWS, doc/bison.texinfo: Document the above.
3821 * NEWS: Fix years and program names in copyright notice.
3822
3823 2002-12-17 Paul Eggert <eggert@twinsun.com>
3824
3825 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
3826 Reporting, Table of Symbols): Omit mentions of %lex-param and
3827 %parse-param from the documentation for now.
3828
3829 2002-12-15 Paul Eggert <eggert@twinsun.com>
3830
3831 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
3832 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
3833 lookahead symbol, and which sets yychar in parser actions) and it
3834 disagreed with the Bison documentation. Bug
3835 reported by Andrew Walrond.
3836
3837 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
3838 as the caller now does that.
3839 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
3840 (YYEMPTY): Parenthesize right hand side, since others use it.
3841 (yyparse): Don't assume that our generated code is the only code
3842 that sets yychar.
3843
3844 2002-12-13 Paul Eggert <eggert@twinsun.com>
3845
3846 Version 1.75d.
3847
3848 POSIX requires a "yacc" command.
3849 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
3850 (MOSTLYCLEANFILES): Add yacc.
3851 (yacc): New rule.
3852 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
3853 as an alias for bison y.
3854
3855 * po/LINGUAS: Add da.
3856
3857 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
3858 problem with latest <getopt.h>.
3859 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
3860
3861 * doc/fdl.texi: Upgrade to 1.2.
3862 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
3863 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
3864 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
3865 gnulib.
3866 * config/install-sh: Sync with autotools.
3867
3868 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
3869 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
3870 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
3871 locations are requested.
3872 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
3873 locations are requested.
3874
3875 2002-12-12 Paul Eggert <eggert@twinsun.com>
3876
3877 Remove unportable casts and storage allocation tricks.
3878 While we're at it, remove almost all casts, since they
3879 usually aren't needed and are a sign of trouble.
3880
3881 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
3882
3883 * src/derives.c (derives_compute): Do not subtract NTOKENS from
3884 the pointer DSET returned by malloc; this isn't portable.
3885 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
3886 Similarly for DERIVES.
3887 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
3888 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
3889 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
3890
3891 * src/derives.c (derives_compute): Do not bother invoking
3892 int_of_rule_number, since rule numbers are integers.
3893
3894 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
3895 rather than XMALLOC (char, N).
3896
3897 * src/files.c (filename_split): Rewrite to avoid cast.
3898
3899 * src/gram.h (symbol_number_as_item_number,
3900 item_number_as_symbol_number, rule_number_as_item_number,
3901 item_number_as_rule_number):
3902 Now inline functions rather than macros, to avoid casts.
3903 * src/state.h (state_number_as_int): Likewise.
3904 * src/tables.c (state_number_to_vector_number,
3905 symbol_number_to_vector_number): Likewise.
3906
3907 * src/gram.h (int_of_rule_number): Remove; no longer used.
3908
3909 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
3910 since the resulting storage is always stored into.
3911
3912 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
3913 where it's needed.
3914
3915 * src/muscle_tab.c (muscle_m4_output):
3916 Now inline. Return bool, not int.
3917 * src/state.c (state_compare): Likewise.
3918 * src/symtab.c (symbol_check_defined,
3919 symbol_check_alias_consistency, symbol_pack, symbol_translation,
3920 hash_compare_symbol, hash_symbol):
3921 Likewise.
3922 * src/uniqstr.c (uniqstr_print): Likewise.
3923 * src/muscle_tab.c (muscle_m4_output_processor):
3924 New function, to avoid casts.
3925 * src/state.c (state_comparator, stage_hasher): Likewise.
3926 * src/symtab.c (symbol_check_defined_processor,
3927 symbol_check_alias_consistency_processor, symbol_pack_processor,
3928 symbol_translation_processor, hash_symbol_comparator,
3929 hash_symbol_hasher): Likewise.
3930 * src/uniqstr.c (uniqstr_print_processor): Likewise.
3931 * src/muscle_tab.c (muscles_m4_output):
3932 Use new functions instead of casting old functions unportably.
3933 * src/state.c (state_hash_new): Likewise.
3934 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
3935 symbols_token_translations_init):
3936 Likewise.
3937 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
3938
3939 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
3940 var instead of casting to long, to avoid casts.
3941 (prepare_states): Use MALLOC rather than alloca, so that we don't
3942 have to worry about alloca.
3943 * src/state.c (state_hash_lookup): Likewise.
3944
3945 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
3946 local var instead of casting to unsigned char, to avoid casts.
3947
3948 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
3949 STATE_ALLOC): Remove.
3950 (transitions_new, errs_new, reductions_new, state_new): Use malloc
3951 rather than calloc, and use offsetof to avoid allocating slightly
3952 too much storage.
3953 (state_new): Initialize all members.
3954
3955 * src/state.c (state_hash): Use unsigned accumulator, not signed.
3956
3957 * src/symtab.c (symbol_free): Remove; unused.
3958 (symbol_get): Remove cast in lhs of assignment.
3959 (symbols_do): Now static. Accept generic arguments, not
3960 hashing-related ones.
3961
3962 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
3963 (symbol_processor): Remove.
3964 (symbols_do): Remove decl; now static.
3965
3966 * src/system.h (alloca): Remove; decl no longer needed.
3967 (<stddef.h>): Include, for offsetof.
3968 (<inttypes.>, <stdint.h>): Include if available.
3969 (uintptr_t): New type, if system lacks it.
3970 (CALLOC, MALLOC, REALLOC): New macros.
3971 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
3972 new macros.
3973
3974 * src/tables.c (table_size): Now int, to pacify GCC.
3975 (table_grow, table_ninf_remap): Use signed table size.
3976 (save_row): Don't bother initializing locals when not needed.
3977 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
3978 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
3979
3980 * src/vcg.h: Correct misspellings.
3981
3982 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
3983
3984
3985 * src/getargs.c (getargs): Don't assume EOF == -1.
3986
3987 2002-12-09 Paul Eggert <eggert@twinsun.com>
3988
3989 Change identifier spellings to avoid collisions with names
3990 that are reserved by POSIX.
3991
3992 Don't use names ending in _t, since POSIX reserves them.
3993 For consistency, remove _e and _s endings -- they're weren't
3994 needed to remove ambiguity. All uses changed.
3995 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
3996 turn was just renamed from struniq_t.
3997 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
3998 which in turn was just renamed from struniq_processor_t.
3999 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
4000 in turn was renamed from hash_compare_struniq_t.
4001 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
4002 (state_list): Renamed from state_list_t.
4003 * src/assoc.h (assoc): Renamed from assoc_t.
4004 * src/conflicts.c (enum conflict_resolution): Renamed from
4005 enum conflict_resolution_e.
4006 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
4007 (rule_list): Renamed from rule_list_t.
4008 * src/getargs.h (enum trace): Renamed from enum trace_e.
4009 (enum report): Renamed from enum report_e.
4010 * src/gram.h (item_number): Renamed from item_number_t.
4011 (rule_number): Renamed from rule_number_t.
4012 (struct rule_s): Remove the "rule_s" part; not used.
4013 (rule): Renamed from rule_t.
4014 (rule_filter): Renamed from rule_filter_t.
4015 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
4016 (goto_list): Renamed from goto_list_t.
4017 * src/lalr.h (goto_number): Renamed from goto_number_t.
4018 * src/location.h (location): Renamed from location_t.
4019 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
4020 and moved here from:
4021 * src/muscle_tab.h (muscle_entry_t): here.
4022 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
4023 (rule_list): Renamed from rule_list_t.
4024 * src/print_graph.c (static_graph): Renamed from graph.
4025 * src/reader.h (braced_code): Renamed from braced_code_t.
4026 Remove brace_code_e tag.
4027 * src/relation.h (relation_node): Renamed from relation_node_t.
4028 (relation_nodes): Renamed from relation_nodes_t.
4029 (relation): Renamed from relation_t.
4030 * src/state.h (state_number): Renamed from state_number_t.
4031 (struct state): Renamed from struct state_s.
4032 (state): Renamed from state_t.
4033 (transitions): Renamed from transitions_t. Unused (and
4034 misspelled) transtion_s tag removed.
4035 (errs): Renamed from errs_t. Unused errs_s tag removed.
4036 (reductions): Renamed from reductions_t. Unused tag
4037 reductions_s removed.
4038 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
4039 (struct symbol_list): Renamed from struct symbol_list_s.
4040 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
4041 (struct symbol): Renamed from struct symbol_s.
4042 (symbol): Renamed from symbol_t.
4043 * src/tables.c (vector_number): Renamed from vector_number_t.
4044 (action_number): Renamed from action_t.
4045 * src/tables.h (base_number): Renamed from base_t.
4046 * src/vcg.h (enum color): Renamed from enum color_e.
4047 (enum textmode): Renamed from enum textmode_e.
4048 (enum shape): Renamed from enum shape_e.
4049 (struct colorentry): Renamed from struct colorentry_s.
4050 (struct classname): Renamed from struct classname_s.
4051 (struct infoname): Renamed from struct infoname_s.
4052 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
4053 (enum decision): Renamed from enum decision_e.
4054 (enum orientation): Renamed from enum orientation_e.
4055 (enum alignment): Renamed from enum alignment_e.
4056 (enum arrow_mode): Renamed from enum arrow_mode_e.
4057 (enum crossing_type): Renamed from enum crossing_type_e.
4058 (enum view): Renamed from enum view_e.
4059 (struct node): Renamed from struct node_s.
4060 (node): Renamed from node_t.
4061 (enum linestyle): Renamed from enum linestyle_e.
4062 (enum arrowstyle): Renamed from enum arrowstyle_e.
4063 (struct edge): Renamed from struct edge.
4064 (edge): Renamed from edge_t.
4065 (struct graph): Renamed from struct graph_s.
4066 (graph): Renamed from graph_t.
4067 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
4068 Rename value_t -> value.
4069 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
4070 value_t_as_yystype -> value_as_yystype.
4071
4072 Don't include <errno.h> in the mainstream code, since it
4073 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
4074 * lib/get-errno.c, lib/get-errno.h: New files.
4075 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
4076 get-errno.c.
4077 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
4078 * src/output.c (output_skeleton): Likewise.
4079 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
4080 instead of errno.
4081 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
4082 Likewise.
4083 (handle_action_dollar, handle_action_at): Likewise.
4084 * src/system.h: Do not include <errno.h>.
4085 (TAB_EXT): Renamed from EXT_TAB.
4086 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
4087
4088 Avoid str[a-z]*, since <string.h> reserves that name space.
4089 Change all instances of "struniq" in names to "uniqstr", and
4090 likewise for "STRUNIQ" and "UNIQSTR".
4091 * src/uniqstr.c: Renamed from src/struniq.c.
4092 * src/uniqstr.h: Renamed from src/struniq.h.
4093 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
4094 * src/files.c (strsuffix): Remove; unused.
4095 (concat2): Renamed from stringappend. Now static.
4096 * src/files.h (strsuffix, stringappend): Remove; unused.
4097 * src/parse-gram.y (<chars>): Renamed from <string>.
4098 (<uniqstr>): Renamed from <struniq>.
4099 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
4100 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
4101 (struct graph_s.expand): Renamed from struct graph_s.stretch.
4102 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
4103 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
4104 (N_EXPAND): Renamed from N_STRETCH.
4105
4106 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
4107 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
4108 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
4109 Remove; unused.
4110 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
4111 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
4112 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
4113 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
4114 (BASE_MAXIMUM): Renamed from BASE_MAX.
4115 (BASE_MINIMUM): Renamed from BASE_MIN.
4116 (ACTION_MAX): Remove; unused.
4117 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
4118 Unnecessary casts removed from above defines.
4119
4120
4121 Fix misspelling in names.
4122 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
4123 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
4124 G_NODE_ALIGNEMENT.
4125
4126
4127 * lib/timevar.c (timevar_report): Renamed from time_report,
4128 for consistency with other names.
4129 * lib/timevar.h (timevar_report): New decl.
4130 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
4131
4132
4133 Sort include-file uses.
4134
4135 Reorder all include files under src to be in the order "system.h".
4136 then the ../lib include files in angle brackets (alphabetized),
4137 then the . include files in double-quotes (alphabetized). Fix
4138 dependency breakages encountered in this process, as follows:
4139 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
4140 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
4141 * src/state.h: Include "symtab.h".
4142
4143 2002-12-08 Paul Eggert <eggert@twinsun.com>
4144
4145 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
4146 since this causes problems when __file__ contains character
4147 sequences like "@" that are treated specially by src/scan-skel.l.
4148 Instead, just use the file's basename. This fixes the bug
4149 reported by Martin Mokrejs in
4150 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
4151
4152 2002-12-06 Paul Eggert <eggert@twinsun.com>
4153
4154 Add support for rules that do not have trailing semicolons, as
4155 POSIX requires. Improve the quality of locations in Bison
4156 diagnostics.
4157
4158 * src/location.c: Include <quotearg.h>.
4159 (empty_location): Now const.
4160 (location_print): New function. Follow the recommendation of the
4161 GNU Coding Standards for locations that span file boundaries.
4162 * src/location.h: Do not include <quotearg.h>; no longer needed.
4163 (boundary): New type.
4164 (location_t): Use it. This allows locations to span file boundaries.
4165 All member uses changed: file -> start.file or end.file (as needed),
4166 first_line -> start.line, first_column -> start.column,
4167 last_line -> end.line, last_column -> end.column.
4168 (equal_boundaries): New function.
4169 (LOCATION_RESET, LOCATION_STEP): Remove.
4170 (LOCATION_PRINT): Remove. All callers changed to use location_print.
4171 (empty_location): Now const.
4172 (location_print): New decl.
4173 * src/parse-gram.y (lloc_default): New function, which handles
4174 empty locations more accurately.
4175 (YYLLOC_DEFAULT): Use it.
4176 (%token COLON): Remove.
4177 (%token ID_COLON): New token.
4178 (rules): Use it.
4179 (declarations, rules): Remove trailing semicolon.
4180 (declaration, rules_or_grammar_declaration):
4181 Allow empty (";") declaration.
4182 (symbol_def): Remove empty actions; no longer needed.
4183 (rules_or_grammar_declaration): Remove trailing semicolon.
4184 (semi_colon.opt): Remove.
4185 * src/reader.h: Include location.h.
4186 (scanner_cursor): New decl.
4187 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
4188 rolling our own.
4189 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
4190 of *loc.
4191 (STEP): Remove. No longer needed, now that adjust_location does
4192 the work. All uses removed.
4193 (scanner_cursor): New var.
4194 (adjust_location): Renamed from extend_location. It now sets
4195 *loc and adjusts the scanner cursor. All uses changed.
4196 Don't bother testing for CR.
4197 (handle_syncline): Remove location arg; now updates scanner cursor.
4198 All callers changed.
4199 (unexpected_end_of_file): Now accepts start boundary of token or
4200 comment, not location. All callers changed. Update scanner cursor,
4201 not the location.
4202 (SC_AFTER_IDENTIFIER): New state.
4203 (context_state): Renamed from c_context. All uses changed.
4204 (id_loc, code_start, token_start): New local vars.
4205 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
4206 processing of Yacc white space and equivalents here.
4207 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
4208 instead of returning ID immediately, since we need to search for
4209 a subsequent colon.
4210 (<INITIAL>"'", "\""): Save token_start.
4211 (<INITIAL>"%{", "{", "%%"): Save code_start.
4212 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
4213 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
4214 BEGIN context_state at end, not INITIAL.
4215 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
4216 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
4217 Return correct token start.
4218 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
4219 the start of a character, string or multiline comment is found.
4220 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
4221 Reduction): Adjust reported locations to match the more-precise
4222 results now expected.
4223 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
4224 * tests/reduce.at (Useless Rules, Reduced Automaton,
4225 Underivable Rules): Likewise.
4226 * tests/regression.at (Invalid inputs): No longer `expecting ";"
4227 or "|"' now that so many other tokens are allowed by the new grammar.
4228
4229 * src/complain.h (current_file): Remove duplicate decl;
4230 current_file is now owned by files.h.
4231 * src/complain.c, src/scan-gram.l: Include files.h.
4232
4233 2002-12-06 Paul Eggert <eggert@twinsun.com>
4234
4235 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
4236 promotes to int; it might be unsigned int.
4237 * data/yacc.c (yy_reduce_print): Likewise.
4238
4239 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
4240 be #defined in the prologue, not in the Bison declarations.
4241 This fixes Debian Bug 102878, reported by Shaul Karl.
4242
4243 2002-12-02 Paul Eggert <eggert@twinsun.com>
4244
4245 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
4246 * lib/strtoul.c: New file, from gnulib.
4247 This fixes a porting bug reported by Peter Klein in
4248 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
4249
4250 2002-11-30 Paul Eggert <eggert@twinsun.com>
4251
4252 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
4253 and put only a forward declaration in the prologue. This is for
4254 consistency with the other scanner helper functions.
4255
4256 Type clashes now generate warnings, not errors, since it
4257 appears that POSIX may allow some grammars with type clashes.
4258 * src/reader.c (grammar_current_rule_check): Warn about
4259 type clashes instead of complaining.
4260 * tests/input.at (Type Clashes): Expect warnings, not complaints.
4261
4262 Add Yacc library, since POSIX requires it.
4263 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
4264 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
4265 * lib/main.c, lib/yyerror.c: New files.
4266
4267 gram_error can be static; it need not be extern.
4268 * src/reader.h (gram_error): Remove decl.
4269 * src/parse-gram.y (gram_error): Now static. Add static decl.
4270 (print_token_value): Omit parameter names from forward decl,
4271 for consistency.
4272
4273 2002-11-29 Paul Eggert <eggert@twinsun.com>
4274
4275 * doc/bison.texinfo: Emphasize that yylex and yyerror must
4276 be declared before being used. E.g., one should typically
4277 declare them in the prologue. Use GNU coding style in examples.
4278 Put "const" consistently after the type it modifies. Mention
4279 that C99 supports "inline". Mention that yyerror traditionally
4280 returns "int".
4281
4282 %parse-param and %lex-param now take just one argument, the
4283 declaration; the argument name is deduced from the declaration.
4284
4285 * doc/bison.texinfo (Parser Function, Pure Calling, Error
4286 Reporting, Table of Symbols): Document this.
4287 * src/parse-gram.y (add_param): New function.
4288 (COMMA): Remove.
4289 (declaration): Implement new rule for %parse-param and %lex-param.
4290 * src/scan-gram.l: "," now elicits a warning, rather than being
4291 a token; this is more compatible with byacc.
4292 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
4293
4294 2002-11-27 Paul Eggert <eggert@twinsun.com>
4295
4296 Rename identifiers to avoid real and potential collisions.
4297
4298 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
4299 to avoid collision with lex macro described by Bruce Lilly in
4300 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
4301 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4302 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
4303 * src/parse-gram.y (print_token_value): Renamed from yyprint.
4304 All uses changed.
4305 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
4306 The name "yycontrol" violates the name space rules, and this stuff
4307 wasn't being used anyway.
4308 (input): Remove action; this stuff wasn't being used.
4309 (gram_error): Rename local variable yylloc -> loc.
4310 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
4311 (YY_DECL): Don't use "yy" at start of local variables.
4312 All uses changed, e.g., yylloc -> loc.
4313 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
4314 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
4315 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
4316 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
4317
4318 * src/parse-gram.y (gram_error): loc is now const *.
4319 * src/reader.h (gram_error): Likewise.
4320
4321 2002-11-24 Paul Eggert <eggert@twinsun.com>
4322
4323 Version 1.75c.
4324
4325 * tests/actions.at (Actions after errors): Use an output format
4326 more similar to that of the Printers and Destructors test.
4327 Test the position of the ';' token too.
4328 (Printers and Destructors): Likewise.
4329 (Printers and Destructors: %glr-parser): Remove for now, to avoid
4330 unnecessarily alarming people when the test fails.
4331
4332 * data/yacc.c (yyerrlab1): Move this label down, so that the
4333 parser does not discard the lookahead token if the user code
4334 invokes YYERROR. This change is required for POSIX conformance.
4335
4336 * lib/error.c: Sync with gnulib.
4337
4338 2002-11-22 Paul Eggert <eggert@twinsun.com>
4339
4340 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
4341 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
4342 * lib/xmalloc.c: Likewise.
4343
4344 2002-11-20 Paul Eggert <eggert@twinsun.com>
4345
4346 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
4347
4348 2002-11-20 Paul Eggert <eggert@twinsun.com>
4349
4350 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
4351 should use `if (! x) abort ();' rather than `assert (x);', and
4352 anyway it's one less thing to worry about configuring.
4353
4354 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
4355 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
4356 and replace all instances of assert with abort.
4357 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
4358 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
4359
4360 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
4361 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
4362 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
4363 hash_find_entry, hash_rehash, hash_insert): Likewise.
4364 * src/conflicts.c (resolve_sr_conflict): Likewise.
4365 * src/lalr.c (set_goto_map, map_goto): Likewise.
4366 * src/nullable.c (nullable_compute): Likewise.
4367 * src/output.c (prepare_rules, token_definitions_output): Likewise.
4368 * src/reader.c (packgram, reader): Likewise.
4369 * src/state.c (state_new, state_free, state_transitions_set,
4370 state_reduction_find): Likewise.
4371 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
4372 symbol_pack): Likewise.
4373 * src/tables.c (conflict_row, pack_vector): Likewise.
4374 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
4375 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
4376 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
4377 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
4378
4379 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
4380 (ARGMATCH_CONSTRAINT): New macro.
4381 (ARGMATCH_ASSERT): Use it.
4382
4383 * src/system.h (verify): New macro.
4384 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
4385 rather than assert.
4386 * src/tables.c (tables_generate): Likewise.
4387
4388 * src/struniq.c (struniq_assert): Now returns void, and aborts
4389 if the assertion is false.
4390 (struniq_assert_p): Remove.
4391 * src/struniq.h: Likewise.
4392
4393 2002-11-18 Paul Eggert <eggert@twinsun.com>
4394
4395 * data/glr.c (yygetLRActions): Replace `yyindex' with
4396 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
4397 This fixes the regression with Sun ONE Studio 7 cc that I reported in
4398 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
4399
4400 2002-11-18 Akim Demaille <akim@epita.fr>
4401
4402 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
4403 space.
4404 From Tim Van Holder.
4405
4406 2002-11-17 Paul Eggert <eggert@twinsun.com>
4407
4408 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
4409 to "SyntaxError" for consistency with my 2002-11-15 change.
4410
4411 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
4412 not define to {}, since this breaks the common use of `YYDPRINTF
4413 ((...));' if a single statement is desired (e.g. before `else').
4414 Work around GCC warnings by surrounding corresponding calls with
4415 {} if needed.
4416 (yyhasResolvedValue): Remove unused function.
4417 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
4418 loop body.
4419 (yyreportSyntaxError): Renamed from yyreportParseError.
4420 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
4421 All uses changed.
4422 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
4423 extern when possible. Remove unused initializations.
4424
4425 2002-11-16 Akim Demaille <akim@epita.fr>
4426
4427 Augment the similarity between GLR and LALR traces.
4428
4429 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
4430 (YY_REDUCE_PRINT): New.
4431 (yyparse): Use them.
4432 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
4433 YYDPRINT here.
4434 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
4435 state reached after the reduction/recovery, since...
4436 (yyparse, yyprocessOneStack): Report the state we are entering in.
4437
4438 2002-11-16 Akim Demaille <akim@epita.fr>
4439
4440 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
4441 Add support for --trace=skeleton.
4442 * src/scan-skel.l: %option debug.
4443 Scan strings of non-@ or \n instead of character by character.
4444 (scan_skel): Handle trace_skeleton.
4445 (QPUTS): New.
4446 (@output_parser_name@, @output_header_name@): ``Restore'' their
4447 support (used to be M4 macros).
4448 * data/yacc.c: Quote larger chunks, a la glr.c.
4449 * data/lalr1.cc: Likewise.
4450 The header guards are no longer available, so use some other
4451 string than `YYLSP_NEEDED'.
4452
4453 2002-11-16 Akim Demaille <akim@epita.fr>
4454
4455 Make the ``Printers and Destructors'' test more verbose, taking
4456 `yacc.c''s behavior as (possibly wrong) reference.
4457
4458 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
4459 instead of fprint on stdout.
4460 Set and report the last_line of the symbols.
4461 Consistently display values and locations.
4462
4463 2002-11-16 Paul Eggert <eggert@twinsun.com>
4464
4465 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
4466
4467 2002-11-15 Paul Eggert <eggert@twinsun.com>
4468
4469 * tests/actions.at (Actions after errors): New test case.
4470
4471 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
4472 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
4473 tests/action.at, tests/calc.at, tests/conflicts.at,
4474 tests/cxx-type.at, tests/regression.at:
4475 "parse error" -> "syntax error" for POSIX compatibility.
4476 "parsing stack overflow..." -> "parser stack overflow" so
4477 that code matches Bison documentation.
4478
4479 2002-11-15 Akim Demaille <akim@epita.fr>
4480
4481 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
4482 take two BRACED_CODE, not two string_content.
4483 Free the scanner's obstack when we are done.
4484 (code_content): New.
4485 * tests/calc.at: Adjust.
4486 * doc/bison.texinfo: Adjust.
4487 Also, make sure to include the `,' for these declarations.
4488
4489 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
4490
4491 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
4492 definition; avoids potential autoreconf problems.
4493
4494 2002-11-15 Akim Demaille <akim@epita.fr>
4495
4496 Always check the value returned by yyparse.
4497
4498 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
4499 returned by yyparse.
4500 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
4501 Adjust calls.
4502 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
4503 returned by yyparse.
4504
4505 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4506
4507 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
4508 on input.at test.
4509
4510 2002-11-14 Paul Eggert <eggert@twinsun.com>
4511
4512 * src/output.c (output_skeleton): Call xfopen instead of
4513 duplicating xfopen's body.
4514
4515 Fix bugs reported by Nelson H. F. Beebe in
4516 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
4517
4518 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
4519 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
4520 Group compiler. Instead, use "$CC -E bar.c". Include the .h
4521 file twice in the grammar, as an extra check.
4522
4523 * tests/input.at (Torturing the Scanner): Surround the
4524 backslash-newline tests with "#if 0", to make it less likely that
4525 we'll run into compiler bugs. Bring back solitary \ inside
4526 comment, but add a closing comment to work around HP C bug. Don't
4527 test backslash-newline in C character constant.
4528
4529 2002-11-14 Akim Demaille <akim@epita.fr>
4530
4531 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
4532 status of the compiler.
4533 Calling `exit 1' is no longer needed.
4534 Reported by Nelson H. F. Beebe.
4535
4536 2002-11-14 Akim Demaille <akim@epita.fr>
4537
4538 * tests/atlocal.in (CPPFLAGS): We have config.h.
4539 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
4540 New.
4541 * tests/actions.at, tests/calc.at, tests/conflicts.at,
4542 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
4543 * tests/regression.at, tests/torture.at: Use them for all the
4544 grammars that are to be compiled.
4545 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
4546 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
4547 * doc/bison.texinfo (GLR Parsers): Document `inline'.
4548
4549 2002-11-14 Akim Demaille <akim@epita.fr>
4550
4551 * doc/bison.texinfo: Various formatting changes (alignments in
4552 samples, additional @group/@end group, GCS in samples.
4553 Use @deffn instead of simple @table to define the directives,
4554 macros, variables etc.
4555
4556 2002-11-13 Paul Eggert <eggert@twinsun.com>
4557
4558 Fix some bugs reported by Albert Chin-A-Young in
4559 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
4560
4561 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
4562 -o c"; the HP C compiler chatters during compilation.
4563 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
4564 * tests/headers.at (export YYLTYPE): Likewise.
4565
4566 * tests/input.at (Torturing the Scanner): Remove lines containing
4567 solitary backslashes, as they tickle a bug in the HP C compiler.
4568
4569 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
4570 comments, since they're not portable. Use GNU coding style.
4571
4572 2002-11-13 Akim Demaille <akim@epita.fr>
4573
4574 * data/yacc.c: Leave bigger chunks of quoted text.
4575 (YYDSYMPRINTF): New.
4576 Use it to report symbol activities.
4577 * data/glr.c (YYDSYMPRINTF): New.
4578 Use it.
4579
4580 2002-11-12 Paul Eggert <eggert@twinsun.com>
4581
4582 Version 1.75b.
4583
4584 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
4585 (yyglrReduce): Return yyok, not 0.
4586 This should avoid the enumerated-type warnings reported
4587 by Nelson H. F. Beebe in
4588 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
4589
4590 * lib/bbitset.h (BITSET_INLINE): Remove.
4591 * lib/bitset.h [! BITSET_INLINE]: Remove.
4592 (bitset_set, bitset_reset, bitset_test): Rename local vars
4593 to avoid shadowing warnings by GCC.
4594
4595 * data/glr.c (inline): Remove #define. It's the user's
4596 responsibility to #define it away, just like 'const'.
4597 This fixes one of the bugs reported by Nelson H. F. Beebe in
4598 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
4599
4600 * Makefile.maint (po-check): Scan .l and .y files instead of the
4601 .c and the .h files that they generate. This fixes the bug
4602 reported by Tim Van Holder in:
4603 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
4604 Look for N_ as well as for _. Try to avoid matching #define for
4605 N_ and _.
4606 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
4607 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
4608 * src/scan-gram.l: Revamp regular expressions so that " and '
4609 do not confuse xgettext.
4610
4611 * src/struniq.h (struniq_new): Do not declare the return type
4612 to be 'const'; this violates the C standard.
4613 * src/struniq.c (struniq_new): Likewise.
4614
4615 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
4616
4617 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
4618 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
4619 linker.
4620
4621 2002-11-12 Akim Demaille <akim@epita.fr>
4622
4623 * Makefile.maint: Sync with Autoconf:
4624 (local_updates): New.
4625
4626 2002-11-12 Akim Demaille <akim@epita.fr>
4627
4628 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
4629
4630 2002-11-12 Akim Demaille <akim@epita.fr>
4631
4632 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
4633 locations.
4634
4635 2002-11-12 Akim Demaille <akim@epita.fr>
4636
4637 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
4638 not yyvalue.
4639
4640 2002-11-12 Akim Demaille <akim@epita.fr>
4641
4642 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
4643 Use it to test the GLR parser.
4644
4645 2002-11-12 Akim Demaille <akim@epita.fr>
4646
4647 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
4648 defines it.
4649 * data/glr.c (yystos): New.
4650 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
4651 (YYDSYMPRINT): New.
4652 (yyval): Don't define it, it is handled via M4.
4653 (yyrecoverParseError): Free verbosely the discarded symbols.
4654 * data/yacc.c (yysymprint): Remove, rather...
4655 (b4_yysymprint_generate): invoke.
4656 * data/c.m4 (b4_yysymprint_generate): New.
4657 Accept pointers as arguments, as opposed to the version from
4658 yacc.c.
4659 (b4_yydestruct_generate): Likewise.
4660 * tests/cations.at (Printers and Destructors): Use Bison directives
4661 instead of CPP macros.
4662 Don't rely on internal details.
4663
4664 2002-11-12 Akim Demaille <akim@epita.fr>
4665
4666 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
4667 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
4668 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
4669 it against YYEMPTY and so forth), work on yytoken (i.e., set
4670 it to YYEMPTY etc.).
4671 (yydestruct): Replace with a b4_yydestruct_generate invocation.
4672 (b4_symbol_actions): Remove.
4673 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
4674 for 0, end-of-input.
4675
4676 2002-11-12 Akim Demaille <akim@epita.fr>
4677
4678 * doc/bison.texinfo (Destructor Decl): New.
4679
4680 2002-11-12 Akim Demaille <akim@epita.fr>
4681
4682 * src/tables.c (tables_generate): Use free for pointers that
4683 cannot be NULL, not XFREE.
4684 (pack_vector): Use assert, not fatal, for bound violations.
4685 * src/state.c (state_new): Likewise.
4686 * src/reader.c (reader): Likewise.
4687 * src/lalr.c (set_goto_map): Likewise.
4688 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
4689 the file name.
4690
4691 2002-11-12 Akim Demaille <akim@epita.fr>
4692
4693 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
4694 Restore.
4695 * src/scan-gram.l (last_string): Is global to the file, not to
4696 yylex.
4697 * src/parse-gram.y (input): Don't append the epilogue here,
4698 (epilogue.opt): do it here, and free the scanner's obstack.
4699 * src/reader.c (epilogue_set): Rename as...
4700 (epilogue_augment): this.
4701 * data/c.m4 (b4_epilogue): Defaults to empty.
4702
4703 2002-11-12 Akim Demaille <akim@epita.fr>
4704
4705 * src/getargs.c (long_options): Remove duplicates.
4706 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
4707 Remove.
4708 * doc/bison.rnh: Remove.
4709 * doc/bison.texinfo (VMS Invocation): Remove.
4710
4711 2002-11-12 Akim Demaille <akim@epita.fr>
4712
4713 * src/struniq.h, src/struniq.c (struniq_t): Is const.
4714 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
4715
4716 Use struniq for symbols.
4717
4718 * src/symtab.h (symbol_t): The tag member is a struniq.
4719 (symbol_type_set): Adjust.
4720 * src/symtab.c (symbol_new): Takes a struniq.
4721 (symbol_free): Don't free the tag member.
4722 (hash_compare_symbol_t, hash_symbol_t): Rename as...
4723 (hash_compare_symbol, hash_symbol): these.
4724 Use the fact that tags as struniqs.
4725 (symbol_get): Use struniq_new.
4726 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
4727 Returns a strniq.
4728 * src/reader.h (merger_list, grammar_currentmerge_set): The name
4729 and type members are struniqs.
4730 * src/reader.c (get_merge_function)
4731 (grammar_current_rule_merge_set): Adjust.
4732 (TYPE, current_type): Are struniq.
4733
4734 Use struniq for file names.
4735
4736 * src/files.h, src/files.c (infile): Split into...
4737 (grammar_file, current_file): these.
4738 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
4739 * src/reduce.c (reduce_print): Likewise.
4740 * src/getargs.c (getargs): Likewise.
4741 * src/complain.h, src/complain.c: Likewise.
4742 * src/main.c (main): Call struniqs_new early enough to use it for
4743 file names.
4744 Don't free the input file name.
4745
4746 2002-11-12 Akim Demaille <akim@epita.fr>
4747
4748 * src/symtab.c (symbol_free): Remove dead deactivated code:
4749 type_name are properly removed.
4750 Don't use XFREE to free items that cannot be NULL.
4751 * src/struniq.h, src/struniq.c: New.
4752 * src/main.c (main): Initialize/free struniqs.
4753 * src/parse-gram.y (%union): Add astruniq member.
4754 (yyprint): Adjust.
4755 * src/scan-gram.l (<{tag}>): Return a struniq.
4756 Free the obstack bit that used to store it.
4757 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
4758
4759 2002-11-11 Paul Eggert <eggert@twinsun.com>
4760
4761 Revamp to fix many (but not all) of the C- and M4-related quoting
4762 problems. Among other things, this fixes the Bison bug reported
4763 by Jan Hubicka when processing the Bash grammar; see:
4764 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
4765
4766 Use new @ escapes consistently. Represent brackets with @{ and @}
4767 rather than @<:@ and @:>@, since this works a bit better with dumb
4768 editors like vi. Represent @ with @@, since @ is now consistently
4769 an escape. Use @oline@ and @ofile@ rather than __oline__ and
4770 __ofile__, to avoid unexpected expansions. Similarly, use @output
4771 rather than #output.
4772
4773 * data/c.m4 (b4_copyright): Omit file name from comment, since
4774 the file name could contain "*/".
4775 (b4_synclines_flag): Don't quote the 2nd argument; it should already
4776 be quoted. All uses changed.
4777
4778 * data/glr.c: Use new @ escapes consistently.
4779 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
4780 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
4781 Remove, since they couldn't handle arbitrary characters in file
4782 names.
4783 * data/lalr1.cc: Likewise.
4784 * data/yacc.c: Likewise.
4785
4786 * src/files.c (output_infix): Remove; all uses removed.
4787 * src/files.h: Likewise.
4788
4789 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
4790 mishandled funny characters in file names, and anyway it isn't
4791 needed any more.
4792 * data/yacc.c: Likewise.
4793 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
4794
4795 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
4796 * data/yacc.c: Likewise.
4797
4798 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
4799 strings now.
4800 (muscle_init): Quote filename as a C string.
4801 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
4802 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
4803 * src/output.c (escaped_file_name_output): New function.
4804 (prepare_symbols): Quote tokens for M4.
4805 (prepare): Don't insert output_infix, output_prefix,
4806 output_parser_name, output_header_name; this is now down by scan-skel.
4807 Insert skeleton as a C string.
4808
4809 * src/output.c (user_actions_output, symbol_destructors_output,
4810 symbol_printers_output): Quote filenames for C and M4.
4811 * src/reader.c (prologue_augment, epilogue_set): Likewise.
4812
4813 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
4814 escapes other than \\ and \'; this simplifies the code.
4815 (<SC_STRING>): Likewise, for \\ and \".
4816 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
4817 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
4818 Use new escapes @{ and @} for [ and ].
4819
4820 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
4821 them with auto vars.
4822 Switch to new escape scheme, where @ is the escape character uniformly.
4823 Abort if a stray escape character is found. Avoid unbounded input
4824 buffer when parsing non-escaped text.
4825
4826 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
4827 __oline__, #output, $@, and @{ do not have unintended meanings.
4828
4829 2002-11-09 Paul Eggert <eggert@twinsun.com>
4830
4831 Fix the test failure due to GCC warnings described in
4832 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
4833 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
4834 evaluate to 0 if it's impossible for NINF to be in the respective
4835 table.
4836 (yygetLRActions, yyrecoverParseError): Use them.
4837
4838 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
4839 counted in the token inserted at end of file. Now takes
4840 location_t *, not location_t, so that the location can be
4841 adjusted. All uses changed.
4842
4843 * tests/regression.at (Invalid inputs): Adjust wording in
4844 diagnostic to match the new behavior.
4845
4846 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
4847 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
4848 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
4849 abort ();'. This reduces the runtime of the "Many lookaheads"
4850 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
4851 GCC 3.2.
4852
4853 2002-11-07 Paul Eggert <eggert@twinsun.com>
4854
4855 * src/parse-gram.y (CHARACTER): Remove unused token.
4856 All uses removed.
4857
4858 * src/scan-gram.l: Remove stack option. We no longer use the
4859 stack, since the stack was never deeper than 1; instead, use the
4860 new auto var c_context to record the stacked value.
4861
4862 Remove nounput option. At an unexpected end of file, we now unput
4863 the minimal input necessary to end cleanly; this simplifies the
4864 code.
4865
4866 Avoid unbounded token sizes where this is easy.
4867
4868 (unexpected_end_of_file): New function.
4869 Use it to systematize the error message on unexpected EOF.
4870 (last-string): Now auto, not static.
4871 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
4872 (scanner_last_string_free): Remove; not used.
4873 (percent_percent_count): Move decl to just before use.
4874 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
4875 not the (never otherwised-used) CHARACTER.
4876
4877 2002-11-07 Akim Demaille <akim@epita.fr>
4878
4879 Let yyerror always receive the msg as last argument, so that
4880 yyerror can be variadic.
4881
4882 * data/yacc.c (b4_yyerror_args): New.
4883 Use it when calling yyerror.
4884 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
4885 Use it when calling yyerror.
4886 * doc/bison.texinfo (Error Reporting): Adjust.
4887 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
4888 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
4889
4890 2002-11-06 Akim Demaille <akim@epita.fr>
4891
4892 #line should have quoted strings.
4893 Ideally, this should be done by m4_quotearg.
4894
4895 * src/scan-skel.l: Include quotearg.h.
4896 Quote __ofile__.
4897 * src/output.c (symbol_printers_output)
4898 (symbol_destructors_output): Quote the file name.
4899
4900 2002-11-06 Akim Demaille <akim@epita.fr>
4901
4902 * tests/regression.at (Invalid inputs): Adjust to the recent
4903 messages.
4904
4905 2002-11-06 Akim Demaille <akim@epita.fr>
4906
4907 Restore --no-lines.
4908 Reported by Jim Kent.
4909
4910 * data/c.m4 (b4_syncline): New.
4911 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
4912 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
4913 * src/output.c (user_actions_output): Likewise.
4914 (prepare): Define 'b4_synclines_flag'.
4915 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
4916
4917 2002-11-06 Akim Demaille <akim@epita.fr>
4918
4919 * src/main.c (main): Free `infile'.
4920 * src/scan-gram.l (handle_syncline): New.
4921 Recognize `#line'.
4922 * src/output.c (user_actions_output, symbol_destructors_output)
4923 (symbol_printers_output): Use the location's file name, not
4924 infile.
4925 * src/reader.c (prologue_augment, epilogue_set): Likewise.
4926
4927 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4928
4929 * src/tables.c (matching_state): Don't allow states to match if
4930 either has GLR conflict entries.
4931
4932 2002-11-05 Paul Eggert <eggert@twinsun.com>
4933
4934 * src/scan-gram.l: Use more accurate diagnostics, e.g.
4935 "integer out of range" rather than "invalid value".
4936 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
4937 accordingly.
4938
4939 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
4940 Also, remove one static variable in the scanner.
4941
4942 * src/scan-gram.l (braces_level): Now auto, not static.
4943 Initialize to zero if the compiler is being picky.
4944 (INITIAL): Clear braces_level instead of incrementing it.
4945 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
4946 as POSIX 1003.1-2001 requires.
4947 * src/system.h (IF_LINT): New macro, taken from coreutils.
4948 * configure.ac: Define "lint" if --enable-gcc-warnings.
4949
4950 2002-11-05 Akim Demaille <akim@epita.fr>
4951
4952 * src/scan-gram.l: When it starts with `%', complain about the
4953 whole directive, not just that `invalid character: %'.
4954
4955 2002-11-04 Akim Demaille <akim@epita.fr>
4956
4957 * Makefile.maint: Update from Autoconf.
4958 (update, cvs-update, po-update, do-po-update): New.
4959
4960 2002-11-04 Akim Demaille <akim@epita.fr>
4961
4962 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
4963 and yyerror.
4964 Have yyerror `use' its arguments.
4965 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
4966 returns true when location & yacc & pure & parse-param.
4967 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
4968
4969 2002-11-04 Akim Demaille <akim@epita.fr>
4970
4971 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
4972 clashes.
4973 * src/scan-gram.l: Use [\'] instead of ['] to pacify
4974 font-lock-mode.
4975 Use complain_at.
4976 Use quote, not quote_n since LOCATION_PRINT no longer uses the
4977 slot 0.
4978
4979 2002-11-03 Paul Eggert <eggert@twinsun.com>
4980
4981 * src/reader.c (get_merge_function, grammar_current_rule_check):
4982 Use consistent diagnostics for reporting type name clashes.
4983 Quote the types with <>, for consistency with Yacc.
4984 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
4985
4986 2002-11-03 Akim Demaille <akim@epita.fr>
4987
4988 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
4989 New.
4990 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
4991 (b4_parse_param): Remove.
4992 Use b4_identification.
4993 Propagate b4_pure_args where needed to pass them to yyerror.
4994 * data/glr.m4 (b4_parse_param): Remove.
4995 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
4996 (b4_lpure_formals): New.
4997 Use b4_identification.
4998 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
4999 b4_user_formals and b4_user_args.
5000 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
5001 (yyreportAmbiguity): When using a pure parser, also need
5002 the location, and the parse-params.
5003 Adjust callers.
5004 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
5005 When using a pure parser, also need the parse-params.
5006 Adjust callers.
5007 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
5008 (%pure-parser + %parse-param) LALR and GLR parsers.
5009 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
5010 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
5011 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
5012 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
5013 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
5014 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
5015 * doc/bison.texinfo: Untabify the whole file.
5016 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
5017 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
5018 (Error Reporting): Adjust to these new directives.
5019 Document %error-verbose, deprecate YYERROR_VERBOSE.
5020
5021 2002-11-03 Akim Demaille <akim@epita.fr>
5022
5023 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
5024 AT_CHECK_CALC_GLR invocations to use % directives, instead of
5025 command line options.
5026 * tests/cxx-type.at: Formatting changes.
5027
5028 2002-11-03 Paul Eggert <eggert@twinsun.com>
5029
5030 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
5031 to count columns correctly, and to check for invalid inputs.
5032
5033 Use mbsnwidth to count columns correctly. Account for tabs, too.
5034 Include mbswidth.h.
5035 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
5036 (extend_location): New function.
5037 (YY_LINES): Remove.
5038
5039 Handle CRLF in C code rather than in Lex code.
5040 (YY_INPUT): New macro.
5041 (no_cr_read): New function.
5042
5043 Scan UCNs, even though we don't fully handle them yet.
5044 (convert_ucn_to_byte): New function.
5045
5046 Handle backslash-newline correctly in C code.
5047 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
5048 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
5049 all uses changed.
5050 (tag, splice): New EREs. Do not allow NUL or newline in tags.
5051 Use {splice} wherever C allows backslash-newline.
5052 YY_STEP after space, newline, vertical-tab.
5053 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
5054
5055 (letter, id): Don't assume ASCII; e.g., spell out a-z.
5056
5057 ({int}, handle_action_dollar, handle_action_at): Check for integer
5058 overflow.
5059
5060 (YY_STEP): Omit trailing semicolon, so that it's more like C.
5061
5062 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
5063 as well as \000. Check for UCHAR_MAX, not 255.
5064 Allow \x with an arbitrary positive number of digits, as in C.
5065 Check for overflow here.
5066 Allow \? and UCNs, for compatibility with C.
5067
5068 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
5069 with quote slot used by complain_at.
5070
5071 * tests/input.at: Add tests for backslash-newline, m4 quotes
5072 in symbols, long literals, and funny escapes in strings.
5073
5074 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
5075 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
5076 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
5077 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
5078 * m4/mbswidth.m4: New file, from GNU coreutils.
5079
5080 * doc/bison.texinfo (Grammar Outline): Document // comments.
5081 (Symbols): Document that trigraphs have no special meaning in Bison,
5082 nor is backslash-newline allowed.
5083 (Actions): Document that trigraphs have no special meaning.
5084
5085 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
5086 no longer used.
5087
5088 2002-11-02 Paul Eggert <eggert@twinsun.com>
5089
5090 * src/reader.c: Don't include quote.h; not needed.
5091 (get_merge_function): Reword warning to be consistent with
5092 type clash diagnostic in grammar_current_rule_check.
5093
5094 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
5095 bug in trigraph handling.
5096
5097 * src/output.c (prepare_symbols): When printing token names,
5098 escape "[" as "@<:@" and likewise for "]".
5099
5100 * src/system.h (errno): Remove declaration, as we are now
5101 assuming C89 or better, and C89 guarantees errno.
5102
5103 2002-10-30 Paul Eggert <eggert@twinsun.com>
5104
5105 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
5106 Check for close failures.
5107 * src/files.h (xfclose): Return void, not int, since it always
5108 returned zero.
5109 * src/files.c (xfclose): Likewise. Report I/O error if ferror
5110 indicates one.
5111 * src/output.c (output_skeleton): Use xfclose rather than fclose
5112 and ferror. xfclose now checks ferror.
5113
5114 * data/glr.c (YYLEFTMOST_STATE): Remove.
5115 (yyreportTree): Use a stack-based leftmost state. This avoids
5116 our continuing battles with bogus warnings about initializers.
5117
5118 2002-10-30 Akim Demaille <akim@epita.fr>
5119
5120 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
5121 #if.
5122
5123 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5124
5125 * tests/glr-regr1.at: New test for reported regressions.
5126 * tests/testsuite.at: Add glr-regr1.at test.
5127 * tests/Makefile.am: Add glr-regr1.at test.
5128
5129 2002-10-24 Paul Eggert <eggert@twinsun.com>
5130
5131 Version 1.75a.
5132
5133 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
5134 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
5135 we use malloc. Don't assume 'A' through 'Z' are contiguous.
5136 Don't assume strdup exists; POSIX says its an XSI extension.
5137 Check for buffer overflow on input.
5138
5139 2002-10-24 Akim Demaille <akim@epita.fr>
5140
5141 * src/output.c (output_skeleton): Don't disable M4sugar comments
5142 too soon: it results in comments being expanded.
5143 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
5144 first output.
5145
5146 2002-10-24 Akim Demaille <akim@epita.fr>
5147
5148 * data/yacc.c (m4_int_type): New.
5149 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
5150 char' as only yacc.c wants K&R portability.
5151 * data/glr.c (yysigned_char): Remove.
5152 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
5153 Reported by Quoc Peyrot.
5154
5155 2002-10-23 Paul Eggert <eggert@twinsun.com>
5156
5157 * src/main.c (main): With --trace=time, report times even if a
5158 non-fatal error occurs. Formerly, the times were reported in some
5159 such cases but not in others.
5160 * src/reader.c (reader): Just return if a complaint has been issued,
5161 instead of exiting, so that 'main' can report times.
5162
5163 2002-10-22 Akim Demaille <akim@epita.fr>
5164
5165 * src/system.h: Include sys/types.
5166 Reported by Bert Deknuydt.
5167
5168 2002-10-23 Paul Eggert <eggert@twinsun.com>
5169
5170 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
5171 Suggested by Art Haas.
5172
5173 2002-10-22 Paul Eggert <eggert@twinsun.com>
5174
5175 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
5176 decl; not needed any more.
5177 * src/main.c (main): Use return to exit, undoing yesterday's change.
5178 The last OS that we could find where this wouldn't work is
5179 SunOS 3.5, and that's too old to worry about now.
5180
5181 * data/glr.c (struct yyltype): Define members even when not
5182 doing locations. This is more consistent with yacc.c, and it
5183 works around the following bug reports:
5184 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
5185 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
5186
5187 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
5188 @acronym consistently. Standardize on "Yacc" instead of "YACC",
5189 "Algol" instead of "ALGOL". Give a bit more history about BNF.
5190
5191 2002-10-22 Akim Demaille <akim@epita.fr>
5192
5193 * data/README: New.
5194
5195 2002-10-21 Paul Eggert <eggert@twinsun.com>
5196
5197 Be consistent about 'bool'; the old code used an enum in one
5198 module and an int in another, and this violates the C standard.
5199 * m4/stdbool.m4: New file, from coreutils 4.5.3.
5200 * configure.ac (AC_HEADER_STDBOOL): Add.
5201 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
5202 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
5203 * src/symtab.c (hash_compare_symbol_t): Likewise.
5204 * src/system.h (bool, false, true): Use a definition consistent
5205 with ../lib/hash.c. All uses changed.
5206
5207 * src/complain.c (warning_issued): Renamed from warn_message_count,
5208 so that we needn't worry about integer overflow (!).
5209 Now of type bool. All uses changed.
5210 (complaint_issued): Renamed from complain_message_count; likewise.
5211
5212 * src/main.c (main): Use exit to exit with failure.
5213
5214 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
5215 rather than 1 and 0.
5216 * src/main.c (main): Likewise.
5217 * src/getargs.c (getargs): Likewise.
5218 * src/reader.c (reader): Likewise.
5219
5220 * src/getarg.c (getargs): Remove duplicate code for
5221 "Try `bison --help'".
5222
5223 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
5224 What was that "2" for?
5225
5226 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
5227 * src/getargs.c (usage): Likewise.
5228
5229 * src/getargs.c (getargs): When there are too few operands, report
5230 the last one. When there are too many, report the first extra
5231 one. This is how diffutils does it.
5232
5233 2002-10-20 Paul Eggert <eggert@twinsun.com>
5234
5235 Remove K&R vestiges.
5236 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
5237 * src/complain.c (VA_START): Remove. Assume prototypes.
5238 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
5239 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
5240 fatal): Assume prototypes.
5241 * src/complain.h: Assume prototypes.
5242 * src/system.h (PARAMS): Remove.
5243 Include <limits.h> unconditionally, since it's guaranteeed even
5244 for a freestanding C89 compiler.
5245 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
5246 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
5247
5248 2002-10-20 Akim Demaille <akim@epita.fr>
5249
5250 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
5251 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
5252 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
5253 (yyresolveStates, yyresolveAction, yyresolveStack)
5254 (yyprocessOneStack): Use them.
5255 (yy_reduce_print): New.
5256 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
5257
5258 2002-10-20 Akim Demaille <akim@epita.fr>
5259
5260 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
5261 arguments and output `void'.
5262 (b4_c_function): Rename as...
5263 (b4_c_function_def): this.
5264 (b4_c_function_decl, b4_c_ansi_function_def)
5265 (b4_c_ansi_function_decl): New.
5266 Change the interpretation of the arguments: before `int, foo', now
5267 `int foo, foo'.
5268 * data/yacc.c (yyparse): Prototype and define thanks to these.
5269 Adjust b4_c_function_def uses.
5270 * data/glr.c (yyparse): Likewise, but ANSI only.
5271
5272 2002-10-20 Akim Demaille <akim@epita.fr>
5273
5274 * src/output.c (prepare): Move the definition of `tokens_number',
5275 `nterms_number', `undef_token_number', `user_token_number_max'
5276 to...
5277 (prepare_tokens): Here.
5278 (prepare_tokens): Rename as...
5279 (prepare_symbols): this.
5280 (prepare): Move the definition of `rules_number' to...
5281 (prepare_rules): here.
5282 (prepare): Move the definition of `last', `final_state_number',
5283 `states_number' to...
5284 (prepare_states): here.
5285 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
5286
5287 2002-10-20 Akim Demaille <akim@epita.fr>
5288
5289 * src/tables.h, src/tables.c, src/output.c: Comment changes.
5290
5291 2002-10-20 Akim Demaille <akim@epita.fr>
5292
5293 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
5294 * data/c.m4: here.
5295
5296 2002-10-20 Akim Demaille <akim@epita.fr>
5297
5298 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
5299 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
5300 `pair'.
5301 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
5302 `name' to...
5303 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
5304 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
5305 These.
5306
5307 2002-10-19 Paul Eggert <eggert@twinsun.com>
5308
5309 Do not create a temporary file, as that involves security and
5310 cleanup headaches. Instead, use a pair of pipes.
5311 Derived from a suggestion by Florian Krohm.
5312 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
5313 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
5314 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
5315 (BISON_PREREQ_SUBPIPE): Add.
5316 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
5317 Add subpipe.h, subpipe.c.
5318 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
5319 * po/POTFILES.in: Add lib/subpipe.c.
5320 * src/output.c: Include "subpipe.h".
5321 (m4_invoke): Remove decl.
5322 (scan_skel): New decl.
5323 (output_skeleton): Use pipe rather than temporary file for m4 input.
5324 Check that m4sugar.m4 is readable, to avoid deadlock.
5325 Check for pipe I/O error.
5326 * src/scan-skel.l (readpipe): Remove decl.
5327 (scan_skel): New function, to be used in place of m4_invoke.
5328 Read from stream rather than file.
5329
5330 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
5331 float, as this generates a warning on Solaris 8 + GCC 3.2 with
5332 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
5333 this generates a more-accurate value anyway.
5334
5335 * lib/timevar.c (timervar_accumulate): Rename locals to
5336 avoid confusion with similarly-named more-global.
5337 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
5338
5339 * src/output.c (prepare): Use xstrdup to convert char const *
5340 to char *, to avoid GCC warning.
5341
5342 2002-10-19 Akim Demaille <akim@epita.fr>
5343
5344 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
5345 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
5346 Use them to have `calc.y' ready for %pure-parser.
5347 * data/yacc.c (YYLEX): Pass a yylex return type to
5348 b4_c_function_call.
5349
5350 2002-10-19 Akim Demaille <akim@epita.fr>
5351
5352 Prototype support of %lex-param and %parse-param.
5353
5354 * src/parse-gram.y: Add the definition of the %lex-param and
5355 %parse-param tokens, plus their rules.
5356 Drop the `_' version of %glr-parser.
5357 Add the "," token.
5358 * src/scan-gram.l (INITIAL): Scan them.
5359 * src/muscle_tab.c: Comment changes.
5360 (muscle_insert, muscle_find): Rename `pair' as `probe'.
5361 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
5362 (muscle_entry_s): The `value' member is no longer const.
5363 Adjust all dependencies.
5364 * src/muscle_tab.c (muscle_init): Adjust: use
5365 MUSCLE_INSERT_STRING.
5366 Initialize the obstack earlier.
5367 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
5368 (muscle_pair_list_grow): New.
5369 * data/c.m4 (b4_c_function_call, b4_c_args): New.
5370 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
5371 * tests/calc.at: Use %locations, not --locations.
5372 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
5373
5374 2002-10-19 Akim Demaille <akim@epita.fr>
5375
5376 * src/getargs.c (usage): Take status as argument and exit
5377 accordingly.
5378 Report the traditional `Try ... --help' message when status != 0.
5379 (usage, version): Don't take a FILE * as arg, it is pointless.
5380 (getargs): When there is an incorrect number of arguments, make it
5381 an error, and report it GNUlically thanks to `usage ()'.
5382
5383 2002-10-18 Paul Eggert <eggert@twinsun.com>
5384
5385 * data/glr.c (yyreportParseError): Don't assume that sprintf
5386 yields the length of the printed string, as this is not true
5387 on SunOS 4.1.4. Reported by Peter Klein.
5388
5389 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
5390 * tests/conflicts.at (%nonassoc and eof): Likewise.
5391 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
5392
5393 2002-10-17 Akim Demaille <akim@epita.fr>
5394
5395 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
5396 * src/getargs.c (trace_types, trace_args): Adjust.
5397 * src/reader.c (grammar_current_rule_prec_set)
5398 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
5399 Standardize error messages.
5400 And s/@prec/%prec/!
5401 (reader): Use trace_flag to enable scanner/parser debugging,
5402 instead of an adhoc scheme.
5403 * src/scan-gram.l: Remove trailing debugging code.
5404
5405 2002-10-16 Paul Eggert <eggert@twinsun.com>
5406
5407 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
5408 MUSCLE_TAB_H.
5409
5410 * NEWS: Officially drop support for building Bison with K&R C,
5411 since it didn't work anyway and it's not worth worrying about.
5412 * Makefile.maint (wget_files): Remove ansi2knr.c.
5413 (ansi2knr.c-url_prefix): Remove.
5414 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
5415 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5416 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5417
5418 2002-10-15 Paul Eggert <eggert@twinsun.com>
5419
5420 Stop using the "enum_" trick for K&R-style function definitions;
5421 it confused me, and I was the author! Instead, assume that people
5422 who want to use K&R C compilers (when using these modules in GCC,
5423 perhaps?) will run ansi2knr.
5424
5425 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
5426 All uses of "enum_" changed to "enum ".
5427 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
5428 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
5429
5430 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
5431 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
5432 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
5433 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
5434 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
5435 abitset_not, abitset_ones, abitset_or, abitset_or_and,
5436 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
5437 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
5438 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
5439 Use function prototypes; this removes the need for declaring
5440 static functions simply to provide their prototypes.
5441 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
5442 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
5443 bitset_count_, bitset_create, bitset_dump, bitset_first,
5444 bitset_free, bitset_init, bitset_last, bitset_next,
5445 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
5446 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
5447 bitset_print, bitset_release_memory, bitset_toggle_,
5448 bitset_type_choose, bitset_type_get, bitset_type_name_get,
5449 debug_bitset): Likewise.
5450 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
5451 * lib/bitset_stats.c (bitset_log_histogram_print,
5452 bitset_percent_histogram_print, bitset_stats_and,
5453 bitset_stats_and_cmp, bitset_stats_and_or,
5454 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
5455 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
5456 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
5457 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
5458 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
5459 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
5460 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
5461 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
5462 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
5463 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
5464 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
5465 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
5466 bitset_stats_zero): Likewise.
5467 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
5468 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
5469 bitsetv_dump, debug_bitsetv): Likewise.
5470 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
5471 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
5472 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
5473 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
5474 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
5475 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
5476 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
5477 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
5478 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
5479 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
5480 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
5481 Likewise.
5482 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
5483 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
5484 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
5485 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
5486 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
5487 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
5488 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
5489 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
5490 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
5491 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
5492 lbitset_xor_cmp, lbitset_zero): Likewise.
5493
5494 2002-10-14 Akim Demaille <akim@epita.fr>
5495
5496 Version 1.75.
5497
5498 2002-10-14 Akim Demaille <akim@epita.fr>
5499
5500 * tests/Makefile.am (maintainer-check-posix): New.
5501
5502 2002-10-14 Akim Demaille <akim@epita.fr>
5503
5504 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
5505 member.
5506
5507 2002-10-14 Akim Demaille <akim@epita.fr>
5508
5509 * src/tables.c (table_ninf_remap): base -> tab.
5510 Reported by Matt Rosing.
5511
5512 2002-10-14 Paul Eggert <eggert@twinsun.com>
5513
5514 * tests/action.at, tests/calc.at, tests/conflicts.at,
5515 tests/cxx-type.at, tests/headers.at, tests/input.at,
5516 tests/regression.at, tests/synclines.at, tests/torture.at:
5517 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
5518 so that the tests still work even if POSIXLY_CORRECT is set.
5519 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
5520
5521 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
5522 for portability to K&R hosts. Fix typo: signed char is guaranteed
5523 only to 127, not to 128.
5524 * data/glr.c (yysigned_char): New type.
5525 * data/yacc.c (yysigned_char): Likewise.
5526 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
5527
5528 2002-10-13 Paul Eggert <eggert@twinsun.com>
5529
5530 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
5531 true due to limited range of data type" warning from GCC.
5532
5533 * data/c.m4 (b4_token_defines): Protect against double-inclusion
5534 by wrapping enum yytokentype's definition inside #ifndef
5535 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
5536
5537 2002-10-13 Akim Demaille <akim@epita.fr>
5538
5539 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
5540 Un yy- yyrhs to avoid the name clash with the global YYRHS.
5541
5542 2002-10-13 Akim Demaille <akim@epita.fr>
5543
5544 * Makefile.maint: Update from Autoconf 2.54.
5545 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
5546
5547 2002-10-13 Akim Demaille <akim@epita.fr>
5548
5549 * src/print.c (print_state): Separate the list of solved conflicts
5550 from the other items.
5551 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
5552
5553 2002-10-13 Akim Demaille <akim@epita.fr>
5554
5555 Let nondeterministic skeletons be usable with deterministic
5556 tables.
5557
5558 With the patch, GAWK compiled by GCC without -O2 passes its test
5559 suite using a GLR parser driven by LALR tables. It fails with -O2
5560 because `struct stat' gives two different answers on my machine:
5561 88 (definition of an auto var) and later 96 (memset on this var).
5562 Hence the stack is badly corrumpted. The headers inclusion is to
5563 blame: if I move the awk.h inclusion before GLR's system header
5564 inclusion, the two struct stat have the same size.
5565
5566 * src/tables.c (pack_table): Always create conflict_table.
5567 (token_actions): Always create conflict_list.
5568 * data/glr.c (YYFLAG): Remove, unused.
5569
5570 2002-10-13 Akim Demaille <akim@epita.fr>
5571
5572 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
5573 (O0FLAGS): New.
5574 (VALGRIND, GXX): New.
5575 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
5576 * tests/bison.in: Run $PREBISON a pre-command.
5577 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
5578 (maintainer-check-g++): New.
5579 * Makefile.am (maintainer-check): New.
5580
5581 2002-10-13 Akim Demaille <akim@epita.fr>
5582
5583 * data/glr.c: Formatting changes.
5584 Tweak some trace messages to match yacc.c's.
5585
5586 2002-10-13 Akim Demaille <akim@epita.fr>
5587
5588 GLR parsers sometimes raise parse errors instead of performing the
5589 default reduction.
5590 Reported by Charles-Henry de Boysson.
5591
5592 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
5593 check the length of the traces when %glr.
5594 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
5595 GLR's traces.
5596 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
5597 Test GLR parsers.
5598 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
5599 (yyltype): Remove the yy prefix from the member names.
5600 (yytable): Complete its comment.
5601 (yygetLRActions): Map error action number from YYTABLE from
5602 YYTABLE_NINF to 0.
5603 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
5604 (which was a bug: it should have been YYTABEL_NINF, and yet it was
5605 not satisfying as we could compare an YYACTION computed from
5606 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
5607 only value for error actions.
5608 (yyreportParseError): In verbose parse error messages, don't issue
5609 `error' in the list of expected tokens.
5610 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
5611 next action to perform to match glr.c's decoding.
5612 (yytable): Complete its comment.
5613
5614 2002-10-13 Paul Eggert <eggert@twinsun.com>
5615
5616 Fix problem reported by Henrik Grubbstroem in
5617 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
5618 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
5619 because the Bison parser reads the second action before reducing
5620 the first one.
5621 * src/scan-gram.l (rule_length): New static var.
5622 Use it to keep track of the rule length in the scanner, since
5623 we can't expect the parser to be in lock-step sync with the scanner.
5624 (handle_action_dollar, handle_action_at): Use this var.
5625 * tests/actions.at (Exotic Dollars): Test for the problem.
5626
5627 2002-10-12 Paul Eggert <eggert@twinsun.com>
5628
5629 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
5630 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
5631 Include <sys/time.h> when checking for clock_t and struct tms.
5632 Use same include order as source.
5633 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
5634 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
5635
5636 * lib/timevar.c: Update copyright date and clarify comments.
5637 (get_time) [IN_GCC]: Keep the GCC version for reference.
5638
5639 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
5640 GCC version as of today, then merge Bison's changes.
5641 Change "GCC" to "Bison" in copyright notice. timevar.def's
5642 author is Akim, so change that too.
5643
5644 * src/reader.c (grammar_current_rule_check):
5645 Don't worry about the default action if $$ is untyped.
5646 Prevents bogus warnings reported by Jim Gifford in
5647 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
5648
5649 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
5650 * data/glr.c, data/lalr1.cc, data/yacc.c:
5651 Output token definitions before the first part of user declarations.
5652 Fixes compatibility problem reported by Jim Gifford for kbd in
5653 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
5654
5655 2002-10-11 Paul Eggert <eggert@twinsun.com>
5656
5657 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
5658 (yyparse): here. This undoes some of the 2002-07-25 change.
5659 Compatibility problem reported by Ralf S. Engelschall with
5660 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
5661
5662 2002-10-11 Akim Demaille <akim@epita.fr>
5663
5664 * tests/regression.at Characters Escapes): New.
5665 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
5666 characters.
5667 Reported by Jan Nieuwenhuizen.
5668
5669 2002-10-11 Akim Demaille <akim@epita.fr>
5670
5671 * po/id.po: New.
5672
5673 2002-10-10 Paul Eggert <eggert@twinsun.com>
5674
5675 Portability fixes for bitsets; this also avoids several GCC
5676 warnings.
5677
5678 * lib/abitset.c: Include <stddef.h>, for offsetof.
5679 * lib/lbitset.c: Likewise.
5680
5681 * lib/abitset.c (abitset_bytes): Return a size that is aligned
5682 properly for vectors of objects. Do not assume that adding a
5683 header size to a multiple of a word size yields a value that is
5684 properly aligned for the whole union.
5685 * lib/bitsetv.c (bitsetv_alloc): Likewise.
5686
5687 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
5688 unique names for structures.
5689 * lib/ebitset.c (ebitset_bytes): Likewise.
5690 * lib/lbitset.c (lbitset_bytes): Likewise.
5691
5692 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
5693 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
5694 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
5695 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
5696 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
5697 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
5698 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
5699 to improve the type-checking that GCC can do.
5700 * lib/bitset.c (bitset_op4_cmp): Likewise.
5701 * lib/bitset_stats.c (bitset_stats_count,
5702 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
5703 bitset_stats_copy, bitset_stats_disjoint_p,
5704 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
5705 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
5706 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
5707 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
5708 bitset_stats_and_or_cmp, bitset_stats_andn_or,
5709 bitset_stats_andn_or_cmp, bitset_stats_or_and,
5710 bitset_stats_or_and_cmp): Likewise.
5711 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
5712 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
5713 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
5714 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
5715
5716 * lib/abitset.h: Include bitset.h, not bbitset.h.
5717 * lib/ebitset.h: Likewise.
5718 * lib/lbitset.h: Likewise.
5719
5720 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
5721 All instances of parameters of type enum bitset_opts are now of
5722 type enum_bitset_opts, to conform to the C Standard, and similarly
5723 for enum_bitset_type.
5724 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
5725 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
5726
5727 Do not use "struct bitset_struct" to mean different things in
5728 different modules. Not only is this confusing, it violates
5729 the C Standard, which requires that structure types in different
5730 modules must be compatible if one is to be passed to the other.
5731 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
5732 All instances of "struct bitset_struct *" replaced with "bitset".
5733 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
5734 (union bitset_union, struct abitset_struct, struct ebitset_struct,
5735 struct lbitset_struct, struct bitset_stats_struct): New types.
5736 All uses of struct bitset_struct changed to union bitset_union,
5737 etc.
5738 * lib/abitset.c (struct abitset_struct, abitset,
5739 struct bitset_struct): Remove.
5740 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
5741 struct bitset_struct): Remove.
5742 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
5743 bitset_struct): Remove.
5744 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
5745 Likewise.
5746
5747 Do not call a function of type T using a call that assumes the
5748 function is of a different type U. Standard C requires that a
5749 function must be called with a type that is compatible with its
5750 definition.
5751 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
5752 New decls.
5753 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
5754 New functions.
5755 * lib/ebitset.c (PFV): Remove.
5756 * lib/lbitset.c (PFV): Likewise.
5757 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
5758 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
5759 decls.
5760 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
5761 (ebitset_vtable): Use them.
5762 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
5763 lbitset_xor): New functions.
5764 (lbitset_vtable): Use them.
5765
5766 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
5767 Declare.
5768
5769 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
5770 GCC warning.
5771 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
5772 Use offsetof, for simplicity.
5773
5774 2002-10-06 Paul Eggert <eggert@twinsun.com>
5775
5776 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
5777 the same width as int. This reapplies a hunk of the 2002-08-12 patch
5778 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
5779 which was inadvertently undone by the 2002-09-30 patch.
5780 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
5781 the same width as int.
5782
5783 2002-10-04 Paul Eggert <eggert@twinsun.com>
5784
5785 Version 1.50.
5786
5787 * configure.ac (AC_INIT), NEWS: Increment version number.
5788
5789 * doc/bison.texinfo: Minor spelling, grammar, and white space
5790 fixes.
5791 (Symbols): Mention that any negative value returned from yylex
5792 signifies end-of-input. Warn about negative chars. Mention
5793 the portable Standard C character set.
5794
5795 The GNU coding standard says CFLAGS and YFLAGS are reserved
5796 for the installer to set.
5797 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
5798 * src/Makefile.am (AM_CFLAGS): Likewise.
5799 (AM_YFLAGS): Renamed from YFLAGS.
5800
5801 Fix some MAX and MIN problems.
5802 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
5803 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
5804 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
5805 * src/reader.c (reader): Use it.
5806
5807 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
5808 POSIX 1003.1-2001 has removed fgrep.
5809
5810 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5811
5812 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
5813 interpreted as signed.
5814 * lib/ebitset.c (ebitset_list): Fix bug.
5815
5816 2002-10-01 Paul Eggert <eggert@twinsun.com>
5817
5818 More fixes for 64-bit hosts and large bitsets.
5819
5820 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
5821 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
5822 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
5823 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
5824 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
5825 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
5826 bitset_count_): Likewise.
5827 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
5828 bitset_first, bitset_last): Likewise.
5829 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
5830 bitset_stats_list_reverse, bitset_stats_size,
5831 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
5832 Likewise.
5833 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5834 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
5835 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
5836 bitsetv_reflexive_transitive_closure): Likewise.
5837 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
5838 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
5839 Likewise.
5840 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
5841 Likewise.
5842
5843 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
5844 Use size_t, not unsigned int, to count bytes.
5845 * lib/abitset.h (abitset_bytes): Likewise.
5846 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
5847 Likewise.
5848 * lib/bitset.h (bitset_bytes): Likewise.
5849 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
5850 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
5851 * lib/bitsetv.c (bitsetv_alloc): Likewise.
5852 * lib/ebitset.c (ebitset_bytes): Likewise.
5853 * lib/ebitset.h (ebitset_bytes): Likewise.
5854 * lib/lbitset.c (lbitset_bytes): Likewise.
5855 * lib/lbitset.h (lbitset_bytes): Likewise.
5856
5857 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
5858 abitset_subset_p, abitset_disjoint_p, abitset_and,
5859 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
5860 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
5861 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
5862 abitset_or_and, abitset_or_and_cmp):
5863 Use bitset_windex instead of unsigned int.
5864 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
5865 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
5866 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
5867 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
5868 Likewise.
5869 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
5870
5871 * lib/bitset.c (bitset_print):
5872 Use proper printf formats for widths of integer types.
5873 * lib/bitset_stats.c (bitset_percent_histogram_print,
5874 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
5875 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5876 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
5877 * lib/lbitset.c (lbitset_bytes): Likewise.
5878
5879 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
5880 BITSET_SIZE_MAX): New macros.
5881 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
5882 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
5883 to BITSET_WINDEX_MAX.
5884
5885 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
5886 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
5887 since we now return the bitset_bindex type (not int).
5888
5889 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
5890 when computing sizes.
5891 * lib/ebitset.c (ebitset_elts_grow): Likewise.
5892
5893 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
5894 and avoid cast to unsigned.
5895
5896 2002-09-30 Akim Demaille <akim@epita.fr>
5897
5898 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
5899 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
5900 Updates from Michael Hayes.
5901
5902 2002-09-30 Art Haas <ahaas@neosoft.com>
5903
5904 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
5905 invocations.
5906 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
5907 defined.
5908
5909 2002-09-27 Akim Demaille <akim@epita.fr>
5910
5911 Version 1.49c.
5912
5913 2002-09-27 Akim Demaille <akim@epita.fr>
5914
5915 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
5916 (Because of AC_LIBSOURCE).
5917
5918 2002-09-27 Akim Demaille <akim@epita.fr>
5919
5920 Playing with Autoscan.
5921
5922 * configure.ac: Remove the old LIBOBJ tweaks.
5923 (AC_REPLACE_FUNCS): Add strrchr and strtol.
5924 * lib/strrchr.c: New.
5925 * lib/strtol.c: New, from the Coreutils 4.5.1.
5926
5927 2002-09-27 Akim Demaille <akim@epita.fr>
5928
5929 Playing with Autoscan.
5930
5931 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
5932 * lib/Makefile.am (libbison_a_SOURCES): No longer include
5933 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
5934 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
5935 Coreutils 4.5.1.
5936
5937 2002-09-24 Akim Demaille <akim@epita.fr>
5938
5939 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
5940 (Frequently Asked Questions, Parser Stack Overflow): New.
5941
5942 2002-09-13 Akim Demaille <akim@epita.fr>
5943
5944 Playing with autoscan.
5945
5946 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
5947 * src/files.c (skeleton_find): Remove, unused.
5948 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
5949 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
5950
5951 2002-09-13 Akim Demaille <akim@epita.fr>
5952
5953 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
5954 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
5955
5956 2002-09-13 Akim Demaille <akim@epita.fr>
5957
5958 * configure.ac: Require 2.54.
5959 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
5960 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
5961 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
5962 Remove, provided by Autoconf macros.
5963
5964 2002-09-12 Akim Demaille <akim@epita.fr>
5965
5966 * m4/prereq.m4: Update, from Coreutils 4.5.1.
5967
5968 2002-09-12 Akim Demaille <akim@epita.fr>
5969
5970 * m4/prereq.m4: Update, from Fileutils 4.1.5.
5971 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
5972 Reported by Martin Mokrejs.
5973
5974 2002-09-10 Akim Demaille <akim@epita.fr>
5975
5976 * src/parse-gram.y: Associate a human readable string to each
5977 token type.
5978 * tests/regression.at (Invalid inputs): Adjust.
5979
5980 2002-09-10 Gary V. Vaughan <gary@gnu.org>
5981
5982 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
5983 with an Autoconf-2.5x style configure.ac.
5984
5985 2002-09-06 Paul Eggert <eggert@twinsun.com>
5986
5987 * doc/bison.texinfo (Conditions): Make explicit that the GPL
5988 exception applies only to yacc.c. This is a modification of a
5989 patch originally suggested by Akim Demaille.
5990
5991 2002-09-06 Akim Demaille <akim@epita.fr>
5992
5993 * data/c.m4 (b4_copyright): Move the GPL exception comment from
5994 here to...
5995 * data/yacc.c: here.
5996
5997 * data/lalr1.cc (struct yyltype): Don't define it, since we use
5998 LocationType.
5999 (b4_ltype): Default to yy::Location from location.hh.
6000
6001 2002-09-04 Jim Meyering <jim@meyering.net>
6002
6003 * data/yacc.c: Guard the declaration of yytoknum also with
6004 `#ifdef YYPRINT', so it is declared only when used.
6005
6006 2002-09-04 Akim Demaille <akim@epita.fr>
6007
6008 * configure.in: Rename as...
6009 * configure.ac: this.
6010 Bump to 1.49c.
6011
6012 2002-09-04 Akim Demaille <akim@epita.fr>
6013
6014 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
6015 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
6016 translate maintainer only messages.
6017
6018 2002-08-12 Paul Eggert <eggert@twinsun.com>
6019
6020 Version 1.49b.
6021
6022 * Makefile.am (SUBDIRS): Remove intl.
6023 (DISTCLEANFILES): Remove.
6024 * NEWS: Mention that GNU M4 is now required. Clarify what is
6025 meant by "larger grammars". Mention the pt_BR translation.
6026 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
6027 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
6028 Bump version from 0.11.2 to 0.11.5.
6029 (BISON_PREREQ_STAGE): Remove.
6030 (AM_GNU_GETTEXT): Use external gettext.
6031 (AC_OUTPUT): Remove intl/Makefile.
6032
6033 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
6034
6035 * data/glr.c: Include string.h, for strlen.
6036 (yyreportParseError): Use size_t for yysize.
6037 (yy_yypstack): No longer nested inside yypstates, as nested
6038 functions are not portable. Do not assume size_t is the
6039 same width as int.
6040 (yypstates): Do not assume that ptrdiff_t is the same width
6041 as int, and similarly for yyposn and YYINDEX.
6042
6043 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
6044
6045 * lib/Makefile.am (INCLUDES): Do not include from the intl
6046 directory, which has been removed.
6047 * src/Makefile.am (INCLUDES): Likewise.
6048
6049 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
6050 (bitsets_sources, additional_bitsets_sources, timevars_sources):
6051 New vars.
6052
6053 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
6054 * tests/Makefile.am (EXTRA_DIST): Likewise.
6055
6056 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
6057 Do not assume that bitset_windex is the same width as unsigned.
6058
6059 * lib/abitset.c (abitset_unused_clear): Do not assume that
6060 bitset_word is the same width as int.
6061 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
6062 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
6063 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
6064 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
6065 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
6066
6067 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
6068 portability to one's complement hosts!).
6069 * lib/ebitset.c (ebitset_op1): Likewise.
6070 * lib/lbitset.c (lbitset_op1): Likewise.
6071
6072 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
6073 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
6074 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
6075 Sync with fileutils.
6076 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
6077 lib/gettext.h: Sync with diffutils.
6078
6079 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
6080 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
6081
6082 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
6083 PROTOTYPES to check for prototypes, and "defined __STDC__" to
6084 check for void *.
6085
6086 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
6087 size_t; the old version tried to do this but casted improperly.
6088 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
6089 (bitset_test): Now returns int, not unsigned long.
6090
6091 * lib/bitset_stats.c: Include "gettext.h".
6092 (_): New macro.
6093 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
6094 name locals "index", as it generates unnecessary warnings on some
6095 hosts that have an "index" function.
6096
6097 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
6098 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
6099 they need translation.
6100 * src/LR0.c (state_list_append, new_itemsets, get_state,
6101 append_states, generate_states): Likewise.
6102 * src/assoc.c (assoc_to_string): Likewise.
6103 * src/closure.c (print_closure, set_firsts, closure): Likewise.
6104 * src/gram.c (grammar_dump): Likewise.
6105 * src/injections.c (injections_compute): Likewise.
6106 * src/lalr.c (lookaheads_print): Likewise.
6107 * src/relation.c (relation_transpose): Likewise.
6108 * src/scan-gram.l: Likewise.
6109 * src/tables.c (table_grow, pack_vector): Likewise.
6110
6111 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
6112 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
6113 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
6114 * m4/mbstate_t.m4: Sync with fileutils.
6115 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
6116
6117 * po/LINGUAS: Add pt_BR.
6118 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
6119 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
6120 lib/timevar.c.
6121 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
6122 manual recommends.
6123 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
6124
6125 * src/complain.c (strerror_r): Remove decl; not needed.
6126 (strerror): Use same pattern as ../lib/error.c.
6127
6128 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
6129
6130 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
6131
6132 * src/main.c (main): Cast result of bindtextdomain and textdomain
6133 to void, to avoid a GCC warning when --disable-nls is in effect.
6134
6135 * src/scan-gram.l: Use strings rather than escapes when possible,
6136 to minimize the number of warnings from xgettext.
6137 (handle_action_dollar, handle_action_at): Don't use isdigit,
6138 as it mishandles negative chars and it may not work as expected
6139 outside the C locale.
6140
6141 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
6142 this is a GCC extension and is not portable to other compilers.
6143
6144 * src/system.h (alloca): Use same pattern as ../lib/error.c.
6145 Do not include <ctype.h>; no longer needed.
6146 Do not include <malloc.h>; no longer needed (and generates
6147 warnings on OpenBSD 3.0).
6148
6149 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
6150 it's not portable.
6151
6152 * tests/regression.at: Do not use 'cc -c input.c -o input';
6153 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
6154
6155 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
6156 exit status as failure, not just exit status 1. Sun C exits
6157 with status 2 sometimes.
6158
6159 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
6160 Use it for the two large tests.
6161
6162 2002-08-02 Akim Demaille <akim@epita.fr>
6163
6164 * src/conflicts.c (conflicts_output): Don't output rules never
6165 reduced here, since anyway that computation doesn't work.
6166 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
6167 (rule_useless_p, rule_never_reduced_p): New.
6168 (grammar_rules_partial_print): Use a filter instead of a range.
6169 Display the title only if needed.
6170 (grammar_rules_print): Adjust.
6171 (grammar_rules_never_reduced_report): New.
6172 * src/tables.c (action_row): Move the computation of rules never
6173 reduced to...
6174 (token_actions): here.
6175 * src/main.c (main): Make the parser before making the report, so
6176 that rules never reduced are computed.
6177 Call grammar_rules_never_reduced_report.
6178 * src/print.c (print_results): Report rules never reduced.
6179 * tests/conflicts.at, tests/reduce.at: Adjust.
6180
6181 2002-08-01 Akim Demaille <akim@epita.fr>
6182
6183 Instead of attaching lookaheads and duplicating the rules being
6184 reduced by a state, attach the lookaheads to the reductions.
6185
6186 * src/state.h (state_t): Remove the `lookaheads',
6187 `lookaheads_rule' member.
6188 (reductions_t): Add a `lookaheads' member.
6189 Use a regular array for the `rules'.
6190 * src/state.c (reductions_new): Initialize the lookaheads member
6191 to 0.
6192 (state_rule_lookaheads_print): Adjust.
6193 * src/state.h, src/state.c (state_reductions_find): New.
6194 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
6195 (count_rr_conflicts): Adjust.
6196 * src/lalr.c (LArule): Remove.
6197 (add_lookback_edge): Adjust.
6198 (state_lookaheads_count): New.
6199 (states_lookaheads_initialize): Merge into...
6200 (initialize_LA): this.
6201 (lalr_free): Adjust.
6202 * src/main.c (main): Don't free nullable and derives too early: it
6203 is used by --verbose.
6204 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
6205
6206 2002-08-01 Akim Demaille <akim@epita.fr>
6207
6208 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
6209 `rule_number_t**'.
6210 (set_derives, free_derives): Rename as...
6211 (derives_compute, derives_free): this.
6212 Adjust all dependencies.
6213 * src/nullable.c (set_nullable, free_nullable): Rename as...
6214 (nullable_compute, nullable_free): these.
6215 (rule_list_t): Store rule_t *, not rule_number_t.
6216 * src/state.c (state_rule_lookaheads_print): Directly compare rule
6217 pointers, instead of their numbers.
6218 * src/main.c (main): Call nullable_free, and derives_free earlier,
6219 as they were lo longer used.
6220
6221 2002-08-01 Akim Demaille <akim@epita.fr>
6222
6223 * lib/timevar.c (get_time): Include children time.
6224 * src/lalr.h (LA, LArule): Don't export them: used with the
6225 state_t.
6226 * src/lalr.c (LA, LArule): Static.
6227 * src/lalr.h, src/lalr.c (lalr_free): New.
6228 * src/main.c (main): Call it.
6229 * src/tables.c (pack_vector): Check whether loc is >= to the
6230 table_size, not >.
6231 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
6232 (tables_generate): do it, since that's also it which allocates
6233 them.
6234 Don't free LA and LArule, main does.
6235
6236 2002-07-31 Akim Demaille <akim@epita.fr>
6237
6238 Separate parser tables computation and output.
6239
6240 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
6241 (conflict_list, conflict_list_cnt, table, check, table_ninf)
6242 (yydefgoto, yydefact, high): Move to...
6243 * src/tables.h, src/tables.c: here.
6244 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6245 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6246 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
6247 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
6248 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
6249 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
6250 (action_row, save_row, token_actions, save_column, default_goto)
6251 (goto_actions, sort_actions, matching_state, pack_vector)
6252 (table_ninf_remap, pack_table, prepare_actions): Move to...
6253 * src/tables.c: here.
6254 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
6255 * src/output.c (token_actions, output_base, output_conflicts)
6256 (output_check): Merge into...
6257 (prepare_actions): this.
6258 (actions_output): Rename as...
6259 (user_actions_output): this.
6260 * src/main.c (main): Call tables_generate and tables_free.
6261
6262 2002-07-31 Akim Demaille <akim@epita.fr>
6263
6264 Steal GCC's --time-report support.
6265
6266 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
6267 stolen/adjusted from GCC.
6268 * m4/stage.m4: Remove time related checks.
6269 * m4/timevar.m4: New.
6270 * configure.in: Adjust.
6271 * src/system.h: Adjust to using timevar.h.
6272 * src/getargs.h, src/getargs.c: Support trace_time for
6273 --trace=time.
6274 * src/main.c (stage): Remove.
6275 (main): Replace `stage' invocations with timevar calls.
6276 * src/output.c: Insert pertinent timevar calls.
6277
6278 2002-07-31 Akim Demaille <akim@epita.fr>
6279
6280 Let --trace have arguments.
6281
6282 * src/getargs.h (enum trace_e): New.
6283 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
6284 (long_options, short_options): --trace/-T takes an optional
6285 argument.
6286 Change all the uses of trace_flag to reflect the new flags.
6287 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
6288
6289 Strengthen `stage' portability.
6290
6291 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
6292 * configure.in: Use it.
6293 Don't check for malloc.h and sys/times.h.
6294 * src/system.h: Include them when appropriate.
6295 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
6296 times and struct tms are available.
6297
6298 2002-07-30 Akim Demaille <akim@epita.fr>
6299
6300 In verbose parse error message, don't report `error' as an
6301 expected token.
6302 * tests/actions.at (Printers and Destructors): Adjust.
6303 * tests/calc.at (Calculator $1): Adjust.
6304 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
6305 error message, do not report the parser accepts the error token in
6306 that state.
6307
6308 2002-07-30 Akim Demaille <akim@epita.fr>
6309
6310 Normalize conflict related messages.
6311
6312 * src/complain.h, src/complain.c (warn, complain): New.
6313 * src/conflicts.c (conflicts_print): Use them.
6314 (conflict_report_yacc): New, extracted from...
6315 (conflicts_print): here.
6316 * tests/conflicts.at, tests/existing.at: Adjust.
6317
6318 2002-07-30 Akim Demaille <akim@epita.fr>
6319
6320 Report rules which are never reduced by the parser: those hidden
6321 by conflicts.
6322
6323 * src/LR0.c (save_reductions): Don't make the final state too
6324 different: save its reduction (accept) instead of having a state
6325 without any action (no shift or goto, no reduce).
6326 Note: the final state is now a ``regular'' state, i.e., the
6327 parsers now contain `reduce 0' as default reduction.
6328 Nevertheless, since they decide to `accept' when yystate =
6329 final_state, they still will not reduce rule 0.
6330 * src/print.c (print_actions, print_reduction): Adjust.
6331 * src/output.c (action_row): Track reduced rules.
6332 (token_actions): Report rules never reduced.
6333 * tests/conflicts.at, tests/regression.at: Adjust.
6334
6335 2002-07-30 Akim Demaille <akim@epita.fr>
6336
6337 `stage' was accidently included in a previous patch.
6338 Initiate its autoconfiscation.
6339
6340 * configure.in: Look for malloc.h and sys/times.h.
6341 * src/main.c (stage): Adjust.
6342 Report only when trace_flag.
6343
6344 2002-07-29 Akim Demaille <akim@epita.fr>
6345
6346 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
6347 state_number_t.
6348 (errs_t): symbol_t*, not symbol_number_t.
6349 (reductions_t): rule_t*, not rule_number_t.
6350 (FOR_EACH_SHIFT): New.
6351 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
6352 * src/print.c, src/print_graph.c: Adjust.
6353
6354 2002-07-29 Akim Demaille <akim@epita.fr>
6355
6356 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
6357
6358 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
6359 (endtoken, accept): these.
6360 * src/reader.c (reader): Set endtoken's default tag to "$end".
6361 Set undeftoken's tag to "$undefined" instead of "$undefined.".
6362 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
6363 Adjust.
6364
6365 2002-07-29 Akim Demaille <akim@epita.fr>
6366
6367 * src/reduce.c (reduce_grammar): When the language is empty,
6368 complain about the start symbol, not the axiom.
6369 Use its location.
6370 * tests/reduce.at (Empty Language): New.
6371
6372 2002-07-26 Akim Demaille <akim@epita.fr>
6373
6374 * src/reader.h, src/reader.c (gram_error): ... can't get
6375 yycontrol without making too strong assumptions on the parser
6376 itself.
6377 * src/output.c (prepare_tokens): Use the real 0th value of
6378 token_translations instead of `0'.
6379 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
6380 visible here.
6381 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
6382 for the time being: %locations ought to provide it to yyerror.
6383
6384 2002-07-25 Akim Demaille <akim@epita.fr>
6385
6386 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
6387 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
6388 * tests/regression.at (Web2c Actions): Adjust.
6389
6390 2002-07-25 Akim Demaille <akim@epita.fr>
6391
6392 Stop storing rules from 1 to nrules + 1.
6393
6394 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
6395 * src/nullable.c, src/output.c, src/print.c, src/reader.c
6396 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
6397 Iterate from 0 to nrules.
6398 Use rule_number_as_item_number and item_number_as_rule_number.
6399 Adjust to `derive' now containing possibly 0.
6400 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
6401 Handle the `- 1' part in rule numbers from/to item numbers.
6402 * src/conflicts.c (log_resolution): Fix the message which reversed
6403 shift and reduce.
6404 * src/output.c (action_row): Initialize default_rule to -1.
6405 (token_actions): Adjust.
6406 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
6407 expected output.
6408 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
6409
6410 2002-07-25 Akim Demaille <akim@epita.fr>
6411
6412 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
6413 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
6414 (b4_c_knr_arg_decl): New.
6415 * data/yacc.c: Use it to define yysymprint, yydestruct, and
6416 yyreport_parse_error.
6417
6418 2002-07-25 Akim Demaille <akim@epita.fr>
6419
6420 * data/yacc.c (yyreport_parse_error): New, extracted from...
6421 (yyparse): here.
6422 (yydestruct, yysymprint): Move above yyparse.
6423 Be K&R compliant.
6424
6425 2002-07-25 Akim Demaille <akim@epita.fr>
6426
6427 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
6428 replace...
6429 (b4_sint_type, b4_uint_type): these.
6430 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
6431 * tests/regression.at (Web2c Actions): Adjust.
6432
6433 2002-07-25 Akim Demaille <akim@epita.fr>
6434
6435 * src/gram.h (TIEM_NUMBER_MAX): New.
6436 (item_number_of_rule_number, rule_number_of_item_number): Rename
6437 as...
6438 (rule_number_as_item_number, item_number_as_rule_number): these.
6439 Adjust dependencies.
6440 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6441 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6442 (symbol_number_to_vector_number): New.
6443 (order): Of vector_number_t* type.
6444 (base_t, BASE_MAX, BASE_MIN): New.
6445 (froms, tos, width, pos, check): Of base_t type.
6446 (action_number_t, ACTION_MIN, ACTION_MAX): New.
6447 (actrow): Of action_number_t type.
6448 (conflrow): Of unsigned int type.
6449 (table_ninf, base_ninf): New.
6450 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
6451 (muscle_insert_int_table, muscle_insert_base_table)
6452 (muscle_insert_rule_number_table): New.
6453 (prepare_tokens): Output `toknum' as int_table.
6454 (action_row): Returns a rule_number_t.
6455 Use ACTION_MIN, not SHRT_MIN.
6456 (token_actions): yydefact is rule_number_t*.
6457 (table_ninf_remap): New.
6458 (pack_table): Use it for `base' and `table'.
6459 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
6460 replaced with...
6461 (YYPACT_NINF, YYTABLE_NINF): these.
6462 (yypact, yytable): Compute their types instead of hard-coded
6463 `short'.
6464 * tests/regression.at (Web2c Actions): Adjust.
6465
6466 2002-07-19 Akim Demaille <akim@epita.fr>
6467
6468 * src/scan-gram.l (id): Can start with an underscore.
6469
6470 2002-07-16 Akim Demaille <akim@epita.fr>
6471
6472 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
6473 Adjust all former `associativity' dependencies.
6474 * src/symtab.c (symbol_new): Default associativity is `undef', not
6475 `right'.
6476 (symbol_check_alias_consistence): Adjust.
6477
6478 2002-07-09 Akim Demaille <akim@epita.fr>
6479
6480 * doc/bison.texinfo: Properly set the ``header'' part.
6481 Use @dircategory ``GNU programming tools'' as per Texinfo's
6482 documentation.
6483 Use @copying.
6484
6485 2002-07-09 Akim Demaille <akim@epita.fr>
6486
6487 * lib/quotearg.h: Protect against multiple inclusions.
6488 * src/location.h (location_t): Add a `file' member.
6489 (LOCATION_RESET, LOCATION_PRINT): Adjust.
6490 * src/complain.c (warn_at, complain_at, fatal_at): Drop
6491 `error_one_per_line' support.
6492
6493 2002-07-09 Akim Demaille <akim@epita.fr>
6494
6495 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
6496 * src/reader.c (lineno): Remove.
6497 Adjust all dependencies.
6498 (get_merge_function): Take a location and use complain_at.
6499 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
6500 * tests/regression.at (Invalid inputs, Mixing %token styles):
6501 Adjust.
6502
6503 2002-07-09 Akim Demaille <akim@epita.fr>
6504
6505 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
6506 recovery rule, and forbid extensions when --yacc.
6507 (gram_error): Use complain_at.
6508 * src/reader.c (reader): Exit if there were parse errors.
6509
6510 2002-07-09 Akim Demaille <akim@epita.fr>
6511
6512 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
6513 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
6514 Reported by R Blake <blakers@mac.com>.
6515
6516 2002-07-09 Akim Demaille <akim@epita.fr>
6517
6518 * data/yacc.c: Output the copyright notive in the header.
6519
6520 2002-07-03 Akim Demaille <akim@epita.fr>
6521
6522 * src/output.c (froms, tos): Are state_number_t.
6523 (save_column): sp, sp1, and sp2 are state_number_t.
6524 (prepare): Rename `final' as `final_state_number', `nnts' as
6525 `nterms_number', `nrules' as `rules_number', `nstates' as
6526 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
6527 unused.
6528 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
6529 * data/lalr1.cc (nsym_): Remove, unused.
6530
6531 2002-07-03 Akim Demaille <akim@epita.fr>
6532
6533 * src/lalr.h, src/lalr.c (goto_number_t): New.
6534 * src/lalr.c (goto_list_t): New.
6535 Propagate them.
6536 * src/nullable.c (rule_list_t): New.
6537 Propagate.
6538 * src/types.h: Remove.
6539
6540 2002-07-03 Akim Demaille <akim@epita.fr>
6541
6542 * src/closure.c (print_fderives): Use rule_rhs_print.
6543 * src/derives.c (print_derives): Use rule_rhs_print.
6544 (rule_list_t): New, replaces `shorts'.
6545 (set_derives): Add comments.
6546 * tests/sets.at (Nullable, Firsts): Adjust.
6547
6548 2002-07-03 Akim Demaille <akim@epita.fr>
6549
6550 * src/output.c (prepare_actions): Free `tally' and `width'.
6551 (prepare_actions): Allocate and free `order'.
6552 * src/symtab.c (symbols_free): Free `symbols'.
6553 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
6554 * src/output.c (m4_invoke): Move to...
6555 * src/scan-skel.l: here.
6556 (<<EOF>>): Close yyout, and free its name.
6557
6558 2002-07-03 Akim Demaille <akim@epita.fr>
6559
6560 Fix some memory leaks, and fix a bug: state 0 was examined twice.
6561
6562 * src/LR0.c (new_state): Merge into...
6563 (state_list_append): this.
6564 (new_states): Merge into...
6565 (generate_states): here.
6566 (set_states): Don't ensure a proper `errs' state member here, do it...
6567 * src/conflicts.c (conflicts_solve): here.
6568 * src/state.h, src/state.c: Comment changes.
6569 (state_t): Rename member `shifts' as `transitions'.
6570 Adjust all dependencies.
6571 (errs_new): For consistency, also take the values as argument.
6572 (errs_dup): Remove.
6573 (state_errs_set): New.
6574 (state_reductions_set, state_transitions_set): Assert that no
6575 previous value was assigned.
6576 (state_free): New.
6577 (states_free): Use it.
6578 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
6579 temporary storage: use `errs' and `nerrs' as elsewhere.
6580 (set_conflicts): Allocate and free this `errs'.
6581
6582 2002-07-02 Akim Demaille <akim@epita.fr>
6583
6584 * lib/libiberty.h: New.
6585 * lib: Update the bitset implementation from upstream.
6586 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
6587 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
6588 * src/main.c: Adjust bitset stats calls.
6589
6590 2002-07-01 Paul Eggert <eggert@twinsun.com>
6591
6592 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
6593 char, so that negative chars don't collide with $.
6594
6595 2002-06-30 Akim Demaille <akim@epita.fr>
6596
6597 Have the GLR tests be `warning' checked, and fix the warnings.
6598
6599 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
6600 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
6601 (yyremoveDeletes): `yyi' and `yyj' are size_t.
6602 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
6603 (yyaddDeferredAction): static.
6604 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
6605 (yyreportParseError): yyprefix is const.
6606 yytokenp is used only when verbose.
6607 (yy__GNUC__): Replace with __GNUC__.
6608 (yypdumpstack): yyi is size_t.
6609 (yypreference): Un-yy local variables and arguments, to avoid
6610 clashes with `yyr1'. Anyway, we are not in the user name space.
6611 (yytname_size): be an int, as is compared with ints.
6612 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
6613 Use them.
6614 * tests/cxx-gram.at: Use quotation to protect $1.
6615 Use AT_COMPILE to enable warnings hunts.
6616 Prototype yylex and yyerror.
6617 `Use' argc.
6618 Include `string.h', not `strings.h'.
6619 Produce and prototype stmtMerge only when used.
6620 yylex takes a location.
6621
6622 2002-06-30 Akim Demaille <akim@epita.fr>
6623
6624 We spend a lot of time in quotearg, in particular when --verbose.
6625
6626 * src/symtab.c (symbol_get): Store a quoted version of the key.
6627 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
6628 Adjust all callers.
6629
6630 2002-06-30 Akim Demaille <akim@epita.fr>
6631
6632 * src/state.h (reductions_t): Rename member `nreds' as num.
6633 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
6634 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
6635
6636 2002-06-30 Akim Demaille <akim@epita.fr>
6637
6638 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
6639 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
6640 (shifts_to): Rename as...
6641 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
6642 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
6643 (TRANSITION_IS_DISABLED, transitions_to): these.
6644
6645 2002-06-30 Akim Demaille <akim@epita.fr>
6646
6647 * src/print.c (print_shifts, print_gotos): Merge into...
6648 (print_transitions): this.
6649 (print_transitions, print_errs, print_reductions): Align the
6650 lookaheads columns.
6651 (print_core, print_transitions, print_errs, print_state,
6652 print_grammar): Output empty lines separator before, not after.
6653 (state_default_rule_compute): Rename as...
6654 (state_default_rule): this.
6655 * tests/conflicts.at (Defaulted Conflicted Reduction),
6656 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
6657 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
6658
6659 2002-06-30 Akim Demaille <akim@epita.fr>
6660
6661 Display items as we display rules.
6662
6663 * src/gram.h, src/gram.c (rule_lhs_print): New.
6664 * src/gram.c (grammar_rules_partial_print): Use it.
6665 * src/print.c (print_core): Likewise.
6666 * tests/conflicts.at (Defaulted Conflicted Reduction),
6667 (Unresolved SR Conflicts): Adjust.
6668 (Unresolved SR Conflicts): Adjust and rename as...
6669 (Resolved SR Conflicts): this, as was meant.
6670 * tests/regression.at (Web2c Report): Adjust.
6671
6672 2002-06-30 Akim Demaille <akim@epita.fr>
6673
6674 * src/print.c (state_default_rule_compute): New, extracted from...
6675 (print_reductions): here.
6676 Pessimize, but clarify the code.
6677 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
6678
6679 2002-06-30 Akim Demaille <akim@epita.fr>
6680
6681 * src/output.c (action_row): Let default_rule be always a rule
6682 number.
6683
6684 2002-06-30 Akim Demaille <akim@epita.fr>
6685
6686 * src/closure.c (print_firsts, print_fderives, closure):
6687 Use BITSET_EXECUTE.
6688 * src/lalr.c (lookaheads_print): Likewise.
6689 * src/state.c (state_rule_lookaheads_print): Likewise.
6690 * src/print_graph.c (print_core): Likewise.
6691 * src/print.c (print_reductions): Likewise.
6692 * src/output.c (action_row): Likewise.
6693 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
6694
6695 2002-06-30 Akim Demaille <akim@epita.fr>
6696
6697 * src/print_graph.c: Use report_flag.
6698
6699 2002-06-30 Akim Demaille <akim@epita.fr>
6700
6701 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
6702 to...
6703 * src/relation.h, src/relation.c (traverse, relation_digraph)
6704 (relation_print, relation_transpose): New.
6705
6706 2002-06-30 Akim Demaille <akim@epita.fr>
6707
6708 * src/state.h, src/state.c (shifts_to): New.
6709 * src/lalr.c (build_relations): Use it.
6710
6711 2002-06-30 Akim Demaille <akim@epita.fr>
6712
6713 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
6714 (item_number_of_rule_number, rule_number_of_item_number): New.
6715 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
6716 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
6717 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
6718 Propagate their use.
6719 Much remains to be done, in particular wrt `shorts' from types.h.
6720
6721 2002-06-30 Akim Demaille <akim@epita.fr>
6722
6723 * src/symtab.c (symbol_new): Initialize the `printer' member.
6724
6725 2002-06-30 Akim Demaille <akim@epita.fr>
6726
6727 * src/LR0.c (save_reductions): Remove, replaced by...
6728 * src/state.h, src/state.c (state_reductions_set): New.
6729 (reductions, errs): Rename as...
6730 (reductions_t, errs_t): these.
6731 Adjust all dependencies.
6732
6733 2002-06-30 Akim Demaille <akim@epita.fr>
6734
6735 * src/LR0.c (state_list_t, state_list_append): New.
6736 (first_state, last_state): Now symbol_list_t.
6737 (this_state): Remove.
6738 (new_itemsets, append_states, save_reductions): Take a state_t as
6739 argument.
6740 (set_states, generate_states): Adjust.
6741 (save_shifts): Remove, replaced by...
6742 * src/state.h, src/state.c (state_shifts_set): New.
6743 (shifts): Rename as...
6744 (shifts_t): this.
6745 Adjust all dependencies.
6746 * src/state.h (state_t): Remove the `next' member.
6747
6748 2002-06-30 Akim Demaille <akim@epita.fr>
6749
6750 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
6751 escaped in slot 0.
6752
6753 2002-06-30 Akim Demaille <akim@epita.fr>
6754
6755 Use hash.h for the state hash table.
6756
6757 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
6758 (allocate_storage): Use state_hash_new.
6759 (free_storage): Use state_hash_free.
6760 (new_state, get_state): Adjust.
6761 * src/lalr.h, src/lalr.c (states): Move to...
6762 * src/states.h (state_t): Remove the `link' member, no longer
6763 used.
6764 * src/states.h, src/states.c: here.
6765 (state_hash_new, state_hash_free, state_hash_lookup)
6766 (state_hash_insert, states_free): New.
6767 * src/states.c (state_table, state_compare, state_hash): New.
6768 * src/output.c (output_actions): Do not free states now, since we
6769 still need to know the final_state number in `prepare', called
6770 afterwards. Do it...
6771 * src/main.c (main): here: call states_free after `output'.
6772
6773 2002-06-30 Akim Demaille <akim@epita.fr>
6774
6775 * src/state.h, src/state.c (state_new): New, extracted from...
6776 * src/LR0.c (new_state): here.
6777 * src/state.h (STATE_ALLOC): Move to...
6778 * src/state.c: here.
6779 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
6780 * src/state.h, src/state.c: here.
6781
6782 2002-06-30 Akim Demaille <akim@epita.fr>
6783
6784 * src/reader.c (gensym): Rename as...
6785 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
6786 (getsym): Rename as...
6787 (symbol_get): this.
6788
6789 2002-06-30 Akim Demaille <akim@epita.fr>
6790
6791 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
6792 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
6793 * src/output.c, src/print.c, src/print_graph.c: Propagate.
6794 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
6795
6796 2002-06-30 Akim Demaille <akim@epita.fr>
6797
6798 Make the test suite pass with warnings checked.
6799
6800 * tests/actions.at (Printers and Destructors): Improve.
6801 Avoid unsigned vs. signed issues.
6802 * tests/calc.at: Don't exercise the scanner here, do it...
6803 * tests/input.at (Torturing the Scanner): here.
6804
6805 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6806
6807 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
6808 reorganize first lines parallel to yacc.c.
6809
6810 2002-06-28 Akim Demaille <akim@epita.fr>
6811
6812 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
6813 (b4_token_enum, b4_token_defines): New, factored from...
6814 * data/lalr1.cc, data/yacc.c, glr.c: here.
6815
6816 2002-06-28 Akim Demaille <akim@epita.fr>
6817
6818 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
6819 unused variables.
6820 * src/output.c (merger_output): static.
6821
6822 2002-06-28 Akim Demaille <akim@epita.fr>
6823
6824 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
6825 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
6826 pacify GCC.
6827 * src/output.c (save_row): Initialize all the variables to pacify GCC.
6828
6829 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6830
6831 Accumulated changelog for new GLR parsing features.
6832
6833 * src/conflicts.c (count_total_conflicts): Change name to
6834 conflicts_total_count.
6835 * src/conflicts.h: Ditto.
6836 * src/output.c (token_actions): Use the new name.
6837 (output_conflicts): Change conflp => conflict_list_heads, and
6838 confl => conflict_list for better readability.
6839 * data/glr.c: Use the new names.
6840 * NEWS: Add self to GLR announcement.
6841
6842 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
6843
6844 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
6845 Akim Demaille.
6846
6847 * data/bison.glr: Change name to glr.c
6848 * data/glr.c: Renamed from bison.glr.
6849 * data/Makefile.am: Add glr.c
6850
6851 * src/getargs.c:
6852
6853 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
6854 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
6855
6856 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6857
6858 * data/bison.glr: Be sure to restore the
6859 current #line when returning to the skeleton contents after having
6860 exposed the input file's #line.
6861
6862 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6863
6864 * data/bison.glr: Bring up to date with changes to bison.simple.
6865
6866 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6867
6868 * data/bison.glr: Correct definitions that use b4_prefix.
6869 Various reformatting.
6870 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
6871 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
6872 yytokenp argument; now part of stack.
6873 (yychar): Define to behave as documented.
6874 (yyclearin): Ditto.
6875
6876 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6877
6878 * src/reader.h: Add declaration for free_merger_functions.
6879
6880 * src/reader.c (merge_functions): New variable.
6881 (get_merge_function): New function.
6882 (free_merger_functions): New function.
6883 (readgram): Check for %prec that is not followed by a symbol.
6884 Handle %dprec and %merge declarations.
6885 (packgram): Initialize dprec and merger fields in rules array.
6886
6887 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
6888 conflict_list_cnt, conflict_list_free): New variables.
6889 (table_grow): Also grow conflict_table.
6890 (prepare_rules): Output dprec and merger tables.
6891 (conflict_row): New function.
6892 (action_row): Output conflict lists for GLR parser. Don't use
6893 default reduction in conflicted states for GLR parser so that there
6894 are spaces for the conflict lists.
6895 (save_row): Also save conflict information.
6896 (token_actions): Allocate conflict list.
6897 (merger_output): New function.
6898 (pack_vector): Pack conflict table, too.
6899 (output_conflicts): New function to output yyconflp and yyconfl.
6900 (output_check): Allocate conflict_tos.
6901 (output_actions): Output conflict tables, also.
6902 (output_skeleton): Output b4_mergers definition.
6903 (prepare): Output b4_max_rhs_length definition.
6904 Use 'bison.glr' as default skeleton for GLR parsers.
6905
6906 * src/gram.c (glr_parser): New flag.
6907 (grammar_free): Call free_merger_functions.
6908
6909 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
6910 all pairs of conflicting reductions, rather than just all tokens
6911 causing conflicts. Needed to size conflict tables.
6912 (conflicts_output): Modify call to count_rr_conflicts for new
6913 interface.
6914 (conflicts_print): Ditto.
6915 (count_total_conflicts): New function.
6916
6917 * src/reader.h (merger_list): New type.
6918 (merge_functions): New variable.
6919
6920 * src/lex.h (tok_dprec, tok_merge): New token types.
6921
6922 * src/gram.h (rule_s): Add dprec and merger fields.
6923 (glr_parser): New flag.
6924
6925 * src/conflicts.h (count_total_conflicts): New function.
6926
6927 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
6928
6929 * doc/bison.texinfo (Generalized LR Parsing): New section.
6930 (GLR Parsers): New section.
6931 (Language and Grammar): Mention GLR parsing.
6932 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
6933 Correct typo ("tge" -> "the").
6934
6935 * data/bison.glr: New skeleton for GLR parsing.
6936
6937 * tests/cxx-gram.at: New tests for GLR parsing.
6938
6939 * tests/testsuite.at: Include cxx-gram.at.
6940
6941 * tests/Makefile.am: Add cxx-gram.at.
6942
6943 * src/parse-gram.y:
6944
6945 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
6946
6947 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
6948
6949 2002-06-27 Akim Demaille <akim@epita.fr>
6950
6951 * src/options.h, src/options.c: Remove.
6952 * src/getargs.c (short_options, long_options): New.
6953
6954 2002-06-27 Akim Demaille <akim@epita.fr>
6955
6956 * data/bison.simple, data/bison.c++: Rename as...
6957 * data/yacc.c, data/lalr1.cc: these.
6958 * doc/bison.texinfo (Environment Variables): Remove.
6959
6960 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
6961
6962 * src/getargs.c (report_argmatch): Initialize strtok().
6963
6964 2002-06-20 Akim Demaille <akim@epita.fr>
6965
6966 * data/bison.simple (b4_symbol_actions): New, replaces...
6967 (b4_symbol_destructor, b4_symbol_printer): these.
6968 (yysymprint): Be sure to call YYPRINT only for tokens, and using
6969 user token numbers.
6970
6971 2002-06-20 Akim Demaille <akim@epita.fr>
6972
6973 * data/bison.simple (yydestructor): Rename as...
6974 (yydestruct): this.
6975
6976 2002-06-20 Akim Demaille <akim@epita.fr>
6977
6978 * src/symtab.h, src/symtab.c (symbol_type_set)
6979 (symbol_destructor_set, symbol_precedence_set): The location is
6980 the last argument.
6981 Adjust all callers.
6982
6983 2002-06-20 Akim Demaille <akim@epita.fr>
6984
6985 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
6986 internals.
6987 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
6988 Takes a location.
6989 * src/symtab.h, src/symtab.c (symbol_class_set)
6990 (symbol_user_token_number_set): Likewise.
6991 Adjust all callers.
6992 Promote complain_at.
6993 * tests/input.at (Type Clashes): Adjust.
6994
6995 2002-06-20 Akim Demaille <akim@epita.fr>
6996
6997 * data/bison.simple (YYLEX): Fix the declaration when
6998 %pure-parser.
6999
7000 2002-06-20 Akim Demaille <akim@epita.fr>
7001
7002 * data/bison.simple (yysymprint): Don't print the token number,
7003 just its name.
7004 * tests/actions.at (Destructors): Rename as...
7005 (Printers and Destructors): this.
7006 Also exercise %printer.
7007
7008 2002-06-20 Akim Demaille <akim@epita.fr>
7009
7010 * data/bison.simple (YYDSYMPRINT): New.
7011 Use it to remove many of the #if YYDEBUG/if (yydebug).
7012
7013 2002-06-20 Akim Demaille <akim@epita.fr>
7014
7015 * src/symtab.h, src/symtab.c (symbol_t): printer and
7016 printer_location are new members.
7017 (symbol_printer_set): New.
7018 * src/parse-gram.y (PERCENT_PRINTER): New token.
7019 Handle its associated rule.
7020 * src/scan-gram.l: Adjust.
7021 (handle_destructor_at, handle_destructor_dollar): Rename as...
7022 (handle_symbol_code_at, handle_symbol_code_dollar): these.
7023 * src/output.c (symbol_printers_output): New.
7024 (output_skeleton): Call it.
7025 * data/bison.simple (yysymprint): New. Cannot be named yyprint
7026 since there are already many grammar files with a user `yyprint'.
7027 Replace the calls to YYPRINT to calls to yysymprint.
7028 * tests/calc.at: Adjust.
7029 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
7030 taking advantage of parser very internal details (stack size!).
7031
7032 2002-06-20 Akim Demaille <akim@epita.fr>
7033
7034 * src/scan-gram.l: Complete the scanner with the missing patterns
7035 to pacify Flex.
7036 Use `quote' and `symbol_tag_get' where appropriate.
7037
7038 2002-06-19 Akim Demaille <akim@epita.fr>
7039
7040 * tests/actions.at (Destructors): Augment to test locations.
7041 * data/bison.simple (yydestructor): Pass it the current location
7042 if locations are enabled.
7043 Prototype only when __STDC__ or C++.
7044 Change the argument names to move into the yy name space: there is
7045 user code here.
7046
7047 2002-06-19 Akim Demaille <akim@epita.fr>
7048
7049 * data/bison.simple (b4_pure_if): New.
7050 Use it instead of #ifdef YYPURE.
7051
7052 2002-06-19 Akim Demaille <akim@epita.fr>
7053
7054 * data/bison.simple (b4_location_if): New.
7055 Use it instead of #ifdef YYLSP_NEEDED.
7056
7057 2002-06-19 Akim Demaille <akim@epita.fr>
7058
7059 Prepare @$ in %destructor, but currently don't bind it in the
7060 skeleton, as %location use is not cleaned up yet.
7061
7062 * src/scan-gram.l (handle_dollar, handle_destructor_at)
7063 (handle_action_at): New.
7064 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
7065 a braced_code_t and a location as additional arguments.
7066 (handle_destructor_dollar): Instead of requiring `b4_eval', just
7067 unquote one when outputting `b4_dollar_dollar'.
7068 Adjust callers.
7069 * data/bison.simple (b4_eval): Remove.
7070 (b4_symbol_destructor): Adjust.
7071 * tests/input.at (Invalid @n): Adjust.
7072
7073 2002-06-19 Zack Weinberg <zack@codesourcery.com>
7074
7075 * doc/bison.texinfo: Document ability to have multiple
7076 prologue sections.
7077
7078 2002-06-18 Akim Demaille <akim@epita.fr>
7079
7080 * src/files.c (compute_base_names): When computing the output file
7081 names from the input file name, strip the directory part.
7082
7083 2002-06-18 Akim Demaille <akim@epita.fr>
7084
7085 * data/bison.simple.new: Comment changes.
7086 Reported by Andreas Schwab.
7087
7088 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
7089
7090 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
7091 there are no `label `yyoverflowlab' defined but not used' warnings
7092 when yyoverflow is defined.
7093
7094 2002-06-18 Akim Demaille <akim@epita.fr>
7095
7096 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
7097 new member.
7098 (symbol_destructor_set): Adjust.
7099 * src/output.c (symbol_destructors_output): Output the destructor
7100 locations.
7101 Output the symbol name.
7102 * data/bison.simple (b4_symbol_destructor): Adjust.
7103
7104 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
7105 and Akim Demaille <akim@epita.fr>
7106
7107 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
7108 what's left on the stack when the error recovery hits EOF.
7109 * tests/actions.at (Destructors): Complete to exercise this case.
7110
7111 2002-06-17 Akim Demaille <akim@epita.fr>
7112
7113 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
7114 arguments is really empty, not only equal to `[]'.
7115 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
7116 member.
7117 (symbol_destructor_set): New.
7118 * src/output.c (symbol_destructors_output): New.
7119 * src/reader.h (brace_code_t, current_braced_code): New.
7120 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
7121 (handle_dollar): Rename as...
7122 (handle_action_dollar): this.
7123 (handle_destructor_dollar): New.
7124 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
7125 (grammar_declaration): Use it.
7126 * data/bison.simple (yystos): Is always defined.
7127 (yydestructor): New.
7128 * tests/actions.at (Destructors): New.
7129 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
7130
7131 2002-06-17 Akim Demaille <akim@epita.fr>
7132
7133 * src/symlist.h, src/symlist.c (symbol_list_length): New.
7134 * src/scan-gram.l (handle_dollar, handle_at): Compute the
7135 rule_length only when needed.
7136 * src/output.c (actions_output, token_definitions_output): Output
7137 the full M4 block.
7138 * src/symtab.c: Don't access directly to the symbol tag, use
7139 symbol_tag_get.
7140 * src/parse-gram.y: Use symbol_list_free.
7141
7142 2002-06-17 Akim Demaille <akim@epita.fr>
7143
7144 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
7145 (symbol_list_prepend, get_type_name): Move to...
7146 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
7147 (symbol_list_prepend, symbol_list_n_type_name_get): here.
7148 Adjust all callers.
7149 (symbol_list_free): New.
7150 * src/scan-gram.l (handle_dollar): Takes a location.
7151 * tests/input.at (Invalid $n): Adjust.
7152
7153 2002-06-17 Akim Demaille <akim@epita.fr>
7154
7155 * src/reader.h, src/reader.c (symbol_list_new): Export it.
7156 (symbol_list_prepend): New.
7157 * src/parse-gram.y (%union): `list' is a new member.
7158 (symbols.1): New, replaces...
7159 (terms_to_prec.1, nterms_to_type.1): these.
7160 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
7161 Take a location as additional argument.
7162 Adjust all callers.
7163
7164 2002-06-15 Akim Demaille <akim@epita.fr>
7165
7166 * src/parse-gram.y: Move %token in the declaration section so that
7167 we don't depend upon CVS Bison.
7168
7169 2002-06-15 Akim Demaille <akim@epita.fr>
7170
7171 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
7172 * src/print.c (print_core): Use it.
7173
7174 2002-06-15 Akim Demaille <akim@epita.fr>
7175
7176 * src/conflicts.c (log_resolution): Accept the rule involved in
7177 the sr conflicts instead of the lookahead number that points to
7178 that rule.
7179 (flush_reduce): Accept the current lookahead vector as argument,
7180 instead of the index in LA.
7181 (resolve_sr_conflict): Accept the current number of lookahead
7182 bitset to consider for the STATE, instead of the index in LA.
7183 (set_conflicts): Adjust.
7184 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
7185
7186 2002-06-15 Akim Demaille <akim@epita.fr>
7187
7188 * src/state.h (state_t): Replace the `lookaheadsp' member, a
7189 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
7190 Adjust all dependencies.
7191 * src/lalr.c (initialize_lookaheads): Split into...
7192 (states_lookaheads_count, states_lookaheads_initialize): these.
7193 (lalr): Adjust.
7194
7195 2002-06-15 Akim Demaille <akim@epita.fr>
7196
7197 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
7198 out of...
7199 (grammar_rules_print): here.
7200 * src/reduce.c (reduce_output): Use it.
7201 * tests/reduce.at (Useless Rules, Reduced Automaton)
7202 (Underivable Rules): Adjust.
7203
7204 2002-06-15 Akim Demaille <akim@epita.fr>
7205
7206 Copy BYacc's nice way to report the grammar.
7207
7208 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
7209 New.
7210 Don't print the rules' location, it is confusing and useless.
7211 (rule_print): Use grammar_rhs_print.
7212 * src/print.c (print_grammar): Use grammar_rules_print.
7213
7214 2002-06-15 Akim Demaille <akim@epita.fr>
7215
7216 Complete and rationalize `useless thing' warnings.
7217
7218 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
7219 (symbol_tag_print): New.
7220 Use them everywhere in place of accessing directly the tag member.
7221 * src/gram.h, src/gram.c (rule_print): New.
7222 Use it where a rule used to be printed `by hand'.
7223 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
7224 (reduce_grammar_tables): Report the useless rules.
7225 (reduce_print): Useless things are a warning, not an error.
7226 Report it as such.
7227 * tests/reduce.at (Useless Nonterminals, Useless Rules):
7228 (Reduced Automaton, Underivable Rules): Adjust.
7229 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
7230 * tests/conflicts.at (Unresolved SR Conflicts)
7231 (Solved SR Conflicts): Adjust.
7232
7233 2002-06-15 Akim Demaille <akim@epita.fr>
7234
7235 Let symbols have a location.
7236
7237 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
7238 (getsym): Adjust.
7239 Adjust all callers.
7240 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
7241 Use location_t, not int.
7242 * src/symtab.c (symbol_check_defined): Take advantage of the
7243 location.
7244 * tests/regression.at (Invalid inputs): Adjust.
7245
7246 2002-06-15 Akim Demaille <akim@epita.fr>
7247
7248 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
7249 (input): Don't try to initialize yylloc here, do it in the
7250 scanner.
7251 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
7252 * src/gram.h (rule_t): Change line and action_line into location
7253 and action_location, of location_t type.
7254 Adjust all dependencies.
7255 * src/location.h, src/location.c (empty_location): New.
7256 * src/reader.h, src/reader.c (grammar_start_symbol_set)
7257 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
7258 (grammar_current_rule_symbol_append)
7259 (grammar_current_rule_action_append): Expect a location as argument.
7260 * src/reader.c (grammar_midrule_action): Adjust to attach an
7261 action's location as dummy symbol location.
7262 * src/symtab.h, src/symtab.c (startsymbol_location): New.
7263 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
7264 the line numbers.
7265
7266 2002-06-14 Akim Demaille <akim@epita.fr>
7267
7268 Grammar declarations may be found in the grammar section.
7269
7270 * src/parse-gram.y (rules_or_grammar_declaration): New.
7271 (declarations): Each declaration may end with a semicolon, not
7272 just...
7273 (grammar_declaration): `"%union"'.
7274 (grammar): Branch to rules_or_grammar_declaration.
7275
7276 2002-06-14 Akim Demaille <akim@epita.fr>
7277
7278 * src/main.c (main): Invoke scanner_free.
7279
7280 2002-06-14 Akim Demaille <akim@epita.fr>
7281
7282 * src/output.c (m4_invoke): Extracted from...
7283 (output_skeleton): here.
7284 Free tempfile.
7285
7286 2002-06-14 Akim Demaille <akim@epita.fr>
7287
7288 * src/parse-gram.y (directives, directive, gram)
7289 (grammar_directives, precedence_directives, precedence_directive):
7290 Rename as...
7291 (declarations, declaration, grammar, grammar_declaration)
7292 (precedence_declaration, precedence_declarator): these.
7293 (symbol_declaration): New.
7294
7295 2002-06-14 Akim Demaille <akim@epita.fr>
7296
7297 * src/files.c (action_obstack): Remove, unused.
7298 (output_obstack): Remove it, and all its dependencies, as it is no
7299 longer needed.
7300 * src/reader.c (epilogue_set): Build the epilogue in the
7301 muscle_obstack.
7302 * src/output.h, src/output.c (muscle_obstack): Move to...
7303 * src/muscle_tab.h, src/muscle_tab.h: here.
7304 (muscle_init): Initialize muscle_obstack.
7305 (muscle_free): New.
7306 * src/main.c (main): Call it.
7307
7308 2002-06-14 Akim Demaille <akim@epita.fr>
7309
7310 * src/location.h: New, extracted from...
7311 * src/reader.h: here.
7312 * src/Makefile.am (noinst_HEADERS): Merge into
7313 (bison_SOURCES): this.
7314 Add location.h.
7315 * src/parse-gram.y: Use location_t instead of Bison's.
7316 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
7317 Use location_t instead of ints.
7318
7319 2002-06-14 Akim Demaille <akim@epita.fr>
7320
7321 * data/bison.simple, data/bison.c++: Be sure to restore the
7322 current #line when returning to the skeleton contents after having
7323 exposed the input file's #line.
7324
7325 2002-06-12 Akim Demaille <akim@epita.fr>
7326
7327 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
7328 eager.
7329 * tests/actions.at (Exotic Dollars): New.
7330
7331 2002-06-12 Akim Demaille <akim@epita.fr>
7332
7333 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
7334 ['"/] too eagerly.
7335 * tests/input.at (Torturing the Scanner): New.
7336
7337 2002-06-11 Akim Demaille <akim@epita.fr>
7338
7339 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
7340 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
7341 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
7342 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
7343 * src/reader.c (reader): Use it.
7344
7345 2002-06-11 Akim Demaille <akim@epita.fr>
7346
7347 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
7348 Adjust all callers.
7349 (scanner_last_string_free): New.
7350
7351 2002-06-11 Akim Demaille <akim@epita.fr>
7352
7353 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
7354 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
7355 (last_string, YY_OBS_FREE): New.
7356 Use them when returning an ID.
7357
7358 2002-06-11 Akim Demaille <akim@epita.fr>
7359
7360 Have Bison grammars parsed by a Bison grammar.
7361
7362 * src/reader.c, src/reader.h (prologue_augment): New.
7363 * src/reader.c (copy_definition): Remove.
7364
7365 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
7366 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
7367 (grammar_current_rule_prec_set, grammar_current_rule_check)
7368 (grammar_current_rule_symbol_append)
7369 (grammar_current_rule_action_append): Export.
7370 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
7371 (symbol_list_action_append): Remove.
7372 Hook the routines from reader.
7373 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
7374 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
7375
7376 * src/reader.c (read_declarations): Remove, unused.
7377
7378 * src/parse-gram.y: Handle the epilogue.
7379 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
7380 (grammar_start_symbol_set): this.
7381 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
7382 * src/reader.c (readgram): Remove, unused.
7383 (reader): Adjust to insert eoftoken and axiom where appropriate.
7384
7385 * src/reader.c (copy_dollar): Replace with...
7386 * src/scan-gram.h (handle_dollar): this.
7387 * src/parse-gram.y: Remove `%thong'.
7388
7389 * src/reader.c (copy_at): Replace with...
7390 * src/scan-gram.h (handle_at): this.
7391
7392 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
7393 New.
7394
7395 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
7396 time being.
7397
7398 * src/reader.h, src/reader.c (grammar_rule_end): New.
7399
7400 * src/parse.y (current_type, current_class): New.
7401 Implement `%nterm', `%token' support.
7402 Merge `%term' into `%token'.
7403 (string_as_id): New.
7404 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
7405 type name.
7406
7407 * src/parse-gram.y: Be sure to handle properly the beginning of
7408 rules.
7409
7410 * src/parse-gram.y: Handle %type.
7411 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
7412
7413 * src/parse-gram.y: More directives support.
7414 * src/options.c: No longer handle source directives.
7415
7416 * src/parse-gram.y: Fix %output.
7417
7418 * src/parse-gram.y: Handle %union.
7419 Use the prologue locations.
7420 * src/reader.c (parse_union_decl): Remove.
7421
7422 * src/reader.h, src/reader.c (epilogue_set): New.
7423 * src/parse-gram.y: Use it.
7424
7425 * data/bison.simple, data/bison.c++: b4_stype is now either not
7426 defined, then default to int, or to the contents of %union,
7427 without `union' itself.
7428 Adjust.
7429 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
7430
7431 * src/output.c (actions_output): Don't output braces, as they are
7432 already handled by the scanner.
7433
7434 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
7435 characters to themselves.
7436
7437 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
7438 that the epilogue has a proper #line.
7439
7440 * src/parse-gram.y: Handle precedence/associativity.
7441
7442 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
7443 a terminal.
7444 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
7445 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
7446 at all to define terminals that cannot be emitted.
7447
7448 * src/scan-gram.l: Escape M4 characters.
7449
7450 * src/scan-gram.l: Working properly with escapes in user
7451 strings/characters.
7452
7453 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
7454 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
7455 grammar.
7456 Use more modest sizes, as for the time being the parser does not
7457 release memory, and therefore the process swallows a huge amount
7458 of memory.
7459
7460 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
7461 stricter %token grammar.
7462
7463 * src/symtab.h (associativity): Add `undef_assoc'.
7464 (symbol_precedence_set): Do nothing when passed an undef_assoc.
7465 * src/symtab.c (symbol_check_alias_consistence): Adjust.
7466
7467 * tests/regression.at (Invalid %directive): Remove, as it is now
7468 meaningless.
7469 (Invalid inputs): Adjust to the new error messages.
7470 (Token definitions): The new grammar doesn't allow too many
7471 eccentricities.
7472
7473 * src/lex.h, src/lex.c: Remove.
7474 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
7475 (copy_character, copy_string2, copy_string, copy_identifier)
7476 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
7477 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
7478 (parse_action): Remove.
7479 * po/POTFILES.in: Adjust.
7480
7481 2002-06-11 Akim Demaille <akim@epita.fr>
7482
7483 * src/reader.c (parse_action): Don't store directly into the
7484 rule's action member: return the action as a string.
7485 Don't require `rule_length' as an argument: compute it.
7486 (grammar_current_rule_symbol_append)
7487 (grammar_current_rule_action_append): New, eved out from
7488 (readgram): here.
7489 Remove `action_flag', `rulelength', unused now.
7490
7491 2002-06-11 Akim Demaille <akim@epita.fr>
7492
7493 * src/reader.c (grammar_current_rule_prec_set).
7494 (grammar_current_rule_check): New, eved out from...
7495 (readgram): here.
7496 Remove `xaction', `first_rhs': useless.
7497 * tests/input.at (Type clashes): New.
7498 * tests/existing.at (GNU Cim Grammar): Adjust.
7499
7500 2002-06-11 Akim Demaille <akim@epita.fr>
7501
7502 * src/reader.c (grammar_midrule_action): New, Eved out from
7503 (readgram): here.
7504
7505 2002-06-11 Akim Demaille <akim@epita.fr>
7506
7507 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
7508 New.
7509 (readgram): Use them as replacement of inlined code, crule and
7510 crule1.
7511
7512 2002-06-11 Akim Demaille <akim@epita.fr>
7513
7514 * src/reader.c (grammar_end, grammar_symbol_append): New.
7515 (readgram): Use them.
7516 Make the use of `p' as local as possible.
7517
7518 2002-06-10 Akim Demaille <akim@epita.fr>
7519
7520 GCJ's parser requires the tokens to be defined before the prologue.
7521
7522 * data/bison.simple: Output the token definition before the user's
7523 prologue.
7524 * tests/regression.at (Braces parsing, Duplicate string)
7525 (Mixing %token styles): Check the output from bison.
7526 (Early token definitions): New.
7527
7528 2002-06-10 Akim Demaille <akim@epita.fr>
7529
7530 * src/symtab.c (symbol_user_token_number_set): Don't complain when
7531 assigning twice the same user number to a token, so that we can
7532 use it in...
7533 * src/lex.c (lex): here.
7534 Also use `symbol_class_set' instead of hand written code.
7535 * src/reader.c (parse_assoc_decl): Likewise.
7536
7537 2002-06-10 Akim Demaille <akim@epita.fr>
7538
7539 * src/symtab.c, src/symtab.c (symbol_class_set)
7540 (symbol_user_token_number_set): New.
7541 * src/reader.c (parse_token_decl): Use them.
7542 Use a switch instead of ifs.
7543 Use a single argument.
7544
7545 2002-06-10 Akim Demaille <akim@epita.fr>
7546
7547 Remove `%thong' support as it is undocumented, unused, duplicates
7548 `%token's job, and creates useless e-mail traffic with people who
7549 want to know what it is, why it is undocumented, unused, and
7550 duplicates `%token's job.
7551
7552 * src/reader.c (parse_thong_decl): Remove.
7553 * src/options.c (option_table): Remove "thong".
7554 * src/lex.h (tok_thong): Remove.
7555
7556 2002-06-10 Akim Demaille <akim@epita.fr>
7557
7558 * src/symtab.c, src/symtab.c (symbol_type_set)
7559 (symbol_precedence_set): New.
7560 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
7561 (value_components_used): Remove, unused.
7562
7563 2002-06-09 Akim Demaille <akim@epita.fr>
7564
7565 Move symbols handling code out of the reader.
7566
7567 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
7568 (axiom): Move to...
7569 * src/symtab.h, src/symtab.c: here.
7570
7571 * src/gram.c (start_symbol): Remove: use startsymbol->number.
7572 * src/reader.c (startval): Rename as...
7573 * src/symtab.h, src/symtab.c (startsymbol): this.
7574 * src/reader.c: Adjust.
7575
7576 * src/reader.c (symbol_check_defined, symbol_make_alias)
7577 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
7578 (token_translations_init)
7579 Move to...
7580 * src/symtab.c: here.
7581 * src/reader.c (packsymbols): Move to...
7582 * src/symtab.h, src/symtab.c (symbols_pack): here.
7583 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
7584 argument.
7585
7586 2002-06-03 Akim Demaille <akim@epita.fr>
7587
7588 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
7589 then statements.
7590
7591 2002-06-03 Akim Demaille <akim@epita.fr>
7592
7593 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
7594 structs with non literals.
7595 * src/scan-skel.l: never-interactive.
7596 * src/conflicts.c (enum conflict_resolution_e): No trailing
7597 comma.
7598 * src/getargs.c (usage): Split long literal strings.
7599 Reported by Hans Aberg.
7600
7601 2002-05-28 Akim Demaille <akim@epita.fr>
7602
7603 * data/bison.c++: Use C++ ostreams.
7604 (cdebug_): New member.
7605
7606 2002-05-28 Akim Demaille <akim@epita.fr>
7607
7608 * src/output.c (output_skeleton): Be sure to allocate enough room
7609 for `/' _and_ for `\0' in full_skeleton.
7610
7611 2002-05-28 Akim Demaille <akim@epita.fr>
7612
7613 * data/bison.c++: Catch up with bison.simple:
7614 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7615 and Paul Eggert <eggert@twinsun.com>: `error' handing.
7616 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
7617 and popping traces.
7618
7619 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7620
7621 * src/output.c (output_skeleton): Put an explicit path in front of
7622 the skeleton file name, rather than relying on the -I directory,
7623 to partially alleviate effects of having a skeleton file lying around
7624 in the current directory.
7625
7626 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7627
7628 * src/conflicts.c (log_resolution): Correct typo:
7629 obstack_printf should be obstack_fgrow1.
7630
7631 2002-05-26 Akim Demaille <akim@epita.fr>
7632
7633 * src/state.h (state_t): `solved_conflicts' is a new member.
7634 * src/LR0.c (new_state): Set it to 0.
7635 * src/conflicts.h, src/conflicts.c (print_conflicts)
7636 (free_conflicts, solve_conflicts): Rename as...
7637 (conflicts_print, conflicts_free, conflicts_solve): these.
7638 Adjust callers.
7639 * src/conflicts.c (enum conflict_resolution_e)
7640 (solved_conflicts_obstack): New, used by...
7641 (log_resolution): this.
7642 Adjust to attach the conflict resolution to each state.
7643 Complete the description with the precedence/associativity
7644 information.
7645 (resolve_sr_conflict): Adjust.
7646 * src/print.c (print_state): Output its solved_conflicts.
7647 * tests/conflicts.at (Unresolved SR Conflicts)
7648 (Solved SR Conflicts): Exercise --report=all.
7649
7650 2002-05-26 Akim Demaille <akim@epita.fr>
7651
7652 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
7653 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
7654 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
7655 (token_number_t, item_number_as_token_number)
7656 (token_number_as_item_number, muscle_insert_token_number_table):
7657 Rename as...
7658 (symbol_number_t, item_number_as_symbol_number)
7659 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
7660 these, since it is more appropriate.
7661
7662 2002-05-26 Akim Demaille <akim@epita.fr>
7663
7664 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
7665 `Error:' lines.
7666 * data/bison.simple (yystos) [YYDEBUG]: New.
7667 (yyparse) [YYDEBUG]: Display the symbols which are popped during
7668 error recovery.
7669 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
7670
7671 2002-05-25 Akim Demaille <akim@epita.fr>
7672
7673 * doc/bison.texinfo (Debugging): Split into...
7674 (Tracing): this new section, its former contents, and...
7675 (Understanding): this new section.
7676 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
7677 by...
7678 (report_flag): this.
7679 Adjust all dependencies.
7680 (report_args, report_types, report_argmatch): New.
7681 (usage, getargs): Report/support -r, --report.
7682 * src/options.h
7683 (struct option_table_struct): Rename as..,
7684 (struct option_table_s): this.
7685 Rename the `set_flag' member to `flag' to match with getopt_long's
7686 struct.
7687 * src/options.c (option_table): Split verbose into an entry for
7688 %verbose, and another for --verbose.
7689 Support --report/-r, so remove -r from the obsolete --raw.
7690 * src/print.c: Attach full item sets and lookaheads reports to
7691 report_flag instead of trace_flag.
7692 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
7693
7694 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7695 and Paul Eggert <eggert@twinsun.com>
7696
7697 * data/bison.simple (yyparse): Correct error handling to conform to
7698 POSIX and yacc. Specifically, after syntax error is discovered,
7699 do not reduce further before shifting the error token.
7700 Clean up the code a bit by removing the labels yyerrdefault,
7701 yyerrhandle, yyerrpop.
7702 * NEWS: Document the above.
7703
7704 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7705
7706 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
7707 type; it isn't always big enough, since it doesn't necessarily
7708 include non-terminals.
7709 (yytranslate): Expand definition of yy_token_number_type, so that
7710 the latter can be removed.
7711 (yy_token_number_type): Remove, only one use.
7712 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
7713 don't use TokenNumberType as element type.
7714
7715 * tests/regression.at: Modify expected output to agree with change
7716 to yyr1 and yytranslate.
7717
7718 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
7719
7720 * src/reader.c (parse_action): Use copy_character instead of
7721 obstack_1grow.
7722
7723 2002-05-13 Akim Demaille <akim@epita.fr>
7724
7725 * tests/regression.at (Token definitions): Prototype yylex and
7726 yyerror.
7727
7728 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7729
7730 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
7731 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
7732 32-bit arithmetic.
7733 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
7734
7735 2002-05-07 Akim Demaille <akim@epita.fr>
7736
7737 * tests/synclines.at: Be sure to prototype yylex and yyerror to
7738 avoid GCC warnings.
7739
7740 2002-05-07 Akim Demaille <akim@epita.fr>
7741
7742 Kill GCC warnings.
7743
7744 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
7745 over the RHS of each rule.
7746 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
7747 * src/state.h (state_t): Member `nitems' is unsigned short.
7748 * src/LR0.c (get_state): Adjust.
7749 * src/reader.c (packgram): Likewise.
7750 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
7751 `Type'.
7752 (muscle_insert_int_table): Remove, unused.
7753 (prepare_rules): Remove `max'.
7754
7755 2002-05-06 Akim Demaille <akim@epita.fr>
7756
7757 * src/closure.c (print_firsts): Display of the symbol tags.
7758 (bitmatrix_print): Move to...
7759 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
7760 here.
7761 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
7762
7763 2002-05-06 Akim Demaille <akim@epita.fr>
7764
7765 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
7766 hash_do_for_each.
7767
7768 2002-05-06 Akim Demaille <akim@epita.fr>
7769
7770 * src/LR0.c (new_state, get_state): Instead of using the global
7771 `kernel_size' and `kernel_base', have two new arguments:
7772 `core_size' and `core'.
7773 Adjust callers.
7774
7775 2002-05-06 Akim Demaille <akim@epita.fr>
7776
7777 * src/reader.c (packgram): No longer end `ritem' with a 0
7778 sentinel: it is not used.
7779
7780 2002-05-05 Akim Demaille <akim@epita.fr>
7781
7782 New experimental feature: display the lookaheads in the report and
7783 graph.
7784
7785 * src/print (print_core): When --trace-flag, display the rules
7786 lookaheads.
7787 * src/print_graph.c (print_core): Likewise.
7788 Swap the arguments.
7789 Adjust caller.
7790
7791 2002-05-05 Akim Demaille <akim@epita.fr>
7792
7793 * tests/torture.at (Many lookaheads): New test.
7794
7795 2002-05-05 Akim Demaille <akim@epita.fr>
7796
7797 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
7798 (GENERATE_MUSCLE_INSERT_TABLE): this.
7799 (output_int_table, output_unsigned_int_table, output_short_table)
7800 (output_token_number_table, output_item_number_table): Replace with...
7801 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
7802 (muscle_insert_short_table, muscle_insert_token_number_table)
7803 (muscle_insert_item_number_table): these.
7804 Adjust all callers.
7805 (prepare_tokens): Don't free `translations', since...
7806 * src/reader.h, src/reader.c (grammar_free): do it.
7807 Move to...
7808 * src/gram.h, src/gram.c (grammar_free): here.
7809 * data/bison.simple, data/bison.c++: b4_token_number_max is now
7810 b4_translate_max.
7811
7812 2002-05-05 Akim Demaille <akim@epita.fr>
7813
7814 * src/output.c (output_unsigned_int_table): New.
7815 (prepare_rules): `i' is unsigned.
7816 `prhs', `rline', `r2' are unsigned int.
7817 Rename muscle `rhs_number_max' as `rhs_max'.
7818 Output muscles `prhs_max', `rline_max', and `r2_max'.
7819 Free rline and r1.
7820 * data/bison.simple, data/bison.c++: Adjust to use these muscles
7821 to compute types instead of constant types.
7822 * tests/regression.at (Web2c Actions): Adjust.
7823
7824 2002-05-04 Akim Demaille <akim@epita.fr>
7825
7826 * src/symtab.h (SALIAS, SUNDEF): Rename as...
7827 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
7828 Adjust dependencies.
7829 * src/output.c (token_definitions_output): Be sure not to output a
7830 `#define 'a'' when fed with `%token 'a' "a"'.
7831 * tests/regression.at (Token definitions): New.
7832
7833 2002-05-03 Paul Eggert <eggert@twinsun.com>
7834
7835 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
7836 for K&R C.
7837
7838 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
7839
7840 * Makefile.am (SUBDIRS): Remove intl.
7841 (EXTRA_DIST): Add config/config.rpath.
7842
7843 2002-05-03 Akim Demaille <akim@epita.fr>
7844
7845 * data/bison.simple (m4_if): Don't output empty enums.
7846 And actually, output valid enum definitions :(.
7847
7848 2002-05-03 Akim Demaille <akim@epita.fr>
7849
7850 * configure.bat: Remove, completely obsolete.
7851 * Makefile.am (EXTRA_DIST): Adjust.
7852 Don't distribute config.rpath...
7853 * config/Makefile.am (EXTRA_DIST): Do it.
7854
7855 2002-05-03 Akim Demaille <akim@epita.fr>
7856
7857 * configure.in (GETTEXT_VERSION): New.
7858 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
7859
7860 2002-05-03 Akim Demaille <akim@epita.fr>
7861
7862 * data/bison.simple (b4_token_enum): New.
7863 (b4_token_defines): Use it to output tokens both as #define and
7864 enums.
7865 Suggested by Paul Eggert.
7866 * src/output.c (token_definitions_output): Don't output spurious
7867 white spaces.
7868
7869 2002-05-03 Akim Demaille <akim@epita.fr>
7870
7871 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
7872
7873 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
7874
7875 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
7876 Update the stack class, give a try to deque as the default container.
7877
7878 2002-05-02 Akim Demaille <akim@epita.fr>
7879
7880 * data/bison.simple (yyparse): Do not implement @$ = @1.
7881 (YYLLOC_DEFAULT): Adjust to do it.
7882 * doc/bison.texinfo (Location Default Action): Fix.
7883
7884 2002-05-02 Akim Demaille <akim@epita.fr>
7885
7886 * src/reader.c (parse_braces): Merge into...
7887 (parse_action): this.
7888
7889 2002-05-02 Akim Demaille <akim@epita.fr>
7890
7891 * configure.in (ALL_LINGUAS): Remove.
7892 * po/LINGUAS, hr.po: New.
7893
7894 2002-05-02 Akim Demaille <akim@epita.fr>
7895
7896 Remove the so called hairy (semantic) parsers.
7897
7898 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
7899 * src/gram.h, src/gram.c (semantic_parser): Remove.
7900 (rule_t): Remove the guard and guard_line members.
7901 * src/lex.h (token_t): remove tok_guard.
7902 * src/options.c (option_table): Remove %guard and %semantic_parser
7903 support.
7904 * src/output.c, src/output.h (guards_output): Remove.
7905 (prepare): Adjust.
7906 (token_definitions_output): Don't output the `T'
7907 tokens (???).
7908 (output_skeleton): Don't output the guards.
7909 * src/files.c, src/files.c (attrsfile): Remove.
7910 * src/reader.c (symbol_list): Remove the guard and guard_line
7911 members.
7912 Adjust dependencies.
7913 (parse_guard): Remove.
7914 * data/bison.hairy: Remove.
7915 * doc/bison.texinfo (Environment Variables): Remove occurrences of
7916 BISON_HAIRY.
7917
7918 2002-05-02 Akim Demaille <akim@epita.fr>
7919
7920 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
7921 (parse_guard): Rename the formal argument `stack_offset' as
7922 `rule_length', which is more readable.
7923 Adjust callers.
7924 (copy_at, copy_dollar): Instead of outputting the hard coded
7925 values of $$, $n and so forth, output invocation to b4_lhs_value,
7926 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
7927 Note: this patch partially drops `semantic-parser' support: it
7928 always does `rule_length - n', where semantic parsers ought to
7929 always use `-n'.
7930 * data/bison.simple, data/bison.c++ (b4_lhs_value)
7931 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
7932
7933 2002-05-02 Akim Demaille <akim@epita.fr>
7934
7935 * configure.in (AC_INIT): Bump to 1.49b.
7936 (AM_INIT_AUTOMAKE): Short invocation.
7937
7938 2002-05-02 Akim Demaille <akim@epita.fr>
7939
7940 Version 1.49a.
7941
7942 2002-05-01 Akim Demaille <akim@epita.fr>
7943
7944 * src/skeleton.h: Remove.
7945
7946 2002-05-01 Akim Demaille <akim@epita.fr>
7947
7948 * src/skeleton.h: Fix the #endif.
7949 Reported by Magnus Fromreide.
7950
7951 2002-04-26 Paul Eggert <eggert@twinsun.com>
7952
7953 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
7954 Define if we define YYSTYPE and YYLTYPE, respectively.
7955 (YYCOPY): Fix [] quoting problem in the non-GCC case.
7956
7957 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
7958
7959 * src/scan-skel.l: Postprocess quadrigraphs.
7960
7961 * src/reader.c (copy_character): New function, used to output
7962 single characters while replacing `[' and `]' with quadrigraphs, to
7963 avoid troubles with M4 quotes.
7964 (copy_comment): Output characters with copy_character.
7965 (read_additionnal_code): Likewise.
7966 (copy_string2): Likewise.
7967 (copy_definition): Likewise.
7968
7969 * tests/calc.at: Exercise M4 quoting.
7970
7971 2002-04-25 Akim Demaille <akim@epita.fr>
7972
7973 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
7974 between `!' and the command.
7975 Reported by Paul Eggert.
7976
7977 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
7978
7979 * tests/calc.at: Exercise prologue splitting.
7980
7981 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
7982 `b4_post_prologue' instead of `b4_prologue'.
7983
7984 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
7985 muscles.
7986 (output): Free pre_prologue_obstack and post_prologue_obstack.
7987 * src/files.h, src/files.c (attrs_obstack): Remove.
7988 (pre_prologue_obstack, post_prologue_obstack): New.
7989 * src/reader.c (copy_definition): Add a parameter to specify the
7990 obstack to fill, instead of using attrs_obstack unconditionally.
7991 (read_declarations): Pass pre_prologue_obstack to copy_definition if
7992 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
7993
7994 2002-04-23 Paul Eggert <eggert@twinsun.com>
7995
7996 * data/bison.simple: Remove unnecessary commentary and white
7997 space differences from 1_29-branch.
7998 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
7999
8000 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
8001 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
8002 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
8003 constructors or destructors.
8004
8005 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
8006
8007 2002-04-23 Akim Demaille <akim@epita.fr>
8008
8009 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
8010 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
8011 location with columns.
8012 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
8013 All reported by Paul Eggert.
8014
8015 2002-04-22 Akim Demaille <akim@epita.fr>
8016
8017 * src/reduce.c (dump_grammar): Move to...
8018 * src/gram.h, src/gram.c (grammar_dump): here.
8019 Be sure to separate long item numbers.
8020 Don't read the members of a rule's prec if its nil.
8021
8022 2002-04-22 Akim Demaille <akim@epita.fr>
8023
8024 * src/output.c (table_size, table_grow): New.
8025 (MAXTABLE): Remove, replace uses with table_size.
8026 (pack_vector): Instead of dying when the table is too big, grow it.
8027
8028 2002-04-22 Akim Demaille <akim@epita.fr>
8029
8030 * data/bison.simple (yyr1): Its type is that of a token number.
8031 * data/bison.c++ (r1_): Likewise.
8032 * tests/regression.at (Web2c Actions): Adjust.
8033
8034 2002-04-22 Akim Demaille <akim@epita.fr>
8035
8036 * src/reader.c (token_translations_init): 256 is now the default
8037 value for the error token, i.e., it will be assigned another
8038 number if the user assigned 256 to one of her tokens.
8039 (reader): Don't force 256 to error.
8040 * doc/bison.texinfo (Symbols): Adjust.
8041 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
8042 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
8043 etc. instead of 10, 20, 30 (which was used to `jump' over error
8044 (256) and undefined (2)).
8045
8046 2002-04-22 Akim Demaille <akim@epita.fr>
8047
8048 Propagate more token_number_t.
8049
8050 * src/gram.h (token_number_as_item_number)
8051 (item_number_as_token_number): New.
8052 * src/output.c (GENERATE_OUTPUT_TABLE): New.
8053 Use it to create output_item_number_table and
8054 output_token_number_table.
8055 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
8056 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
8057 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
8058 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
8059
8060 2002-04-22 Akim Demaille <akim@epita.fr>
8061
8062 * src/output.h, src/output.c (get_lines_number): Remove.
8063
8064 2002-04-19 Akim Demaille <akim@epita.fr>
8065
8066 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
8067 as Lex/Flex'.
8068 (Debugging): More details about enabling the debugging features.
8069 (Table of Symbols): Describe $$, $n, @$, and @n.
8070 Suggested by Tim Josling.
8071
8072 2002-04-19 Akim Demaille <akim@epita.fr>
8073
8074 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
8075
8076 2002-04-10 Akim Demaille <akim@epita.fr>
8077
8078 * src/system.h: Rely on HAVE_LIMITS_H.
8079 Suggested by Paul Eggert.
8080
8081 2002-04-09 Akim Demaille <akim@epita.fr>
8082
8083 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
8084 full stderr, and strip it according to the bison options, instead
8085 of composing the error message from different bits.
8086 This makes it easier to check for several error messages.
8087 Adjust all the invocations.
8088 Add an invocation exercising the error token.
8089 Add an invocation demonstrating a stupid error message.
8090 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
8091 Adjust the tests.
8092 Error message are for stderr, not stdout.
8093
8094 2002-04-09 Akim Demaille <akim@epita.fr>
8095
8096 * src/gram.h, src/gram.c (error_token_number): Remove, use
8097 errtoken->number.
8098 * src/reader.c (reader): Don't specify the user token number (2)
8099 for $undefined, as it uselessly prevents using it.
8100 * src/gram.h (token_number_t): Move to...
8101 * src/symtab.h: here.
8102 (state_t.number): Is a token_number_t.
8103 * src/print.c, src/reader.c: Use undeftoken->number instead of
8104 hard coded 2.
8105 (Even though this 2 is not the same as above: the number of the
8106 undeftoken remains being 2, it is its user token number which
8107 might not be 2).
8108 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
8109 `user_token_number_max'.
8110 Output `undef_token_number'.
8111 * data/bison.simple, data/bison.c++: Use them.
8112 Be sure to map invalid yylex return values to
8113 `undef_token_number'. This saves us from gratuitous SEGV.
8114
8115 * tests/conflicts.at (Solved SR Conflicts)
8116 (Unresolved SR Conflicts): Adjust.
8117 * tests/regression.at (Web2c Actions): Adjust.
8118
8119 2002-04-08 Akim Demaille <akim@epita.fr>
8120
8121 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
8122 Adding #line.
8123 Remove the duplicate `typedefs'.
8124 (RhsNumberType): Fix the declaration and various other typos.
8125 Use __ofile__.
8126 * data/bison.simple: Use __ofile__.
8127 * src/scan-skel.l: Handle __ofile__.
8128
8129 2002-04-08 Akim Demaille <akim@epita.fr>
8130
8131 * src/gram.h (item_number_t): New, the type of item numbers in
8132 RITEM. Note that it must be able to code symbol numbers as
8133 positive number, and the negation of rule numbers as negative
8134 numbers.
8135 Adjust all dependencies (pretty many).
8136 * src/reduce.c (rule): Remove this `short *' pointer: use
8137 item_number_t.
8138 * src/system.h (MINSHORT, MAXSHORT): Remove.
8139 Include `limits.h'.
8140 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
8141 (shortcpy): Remove.
8142 (MAXTABLE): Move to...
8143 * src/output.c (MAXTABLE): here.
8144 (prepare_rules): Use output_int_table to output rhs.
8145 * data/bison.simple, data/bison.c++: Adjust.
8146 * tests/torture.at (Big triangle): Move the limit from 254 to
8147 500.
8148 * tests/regression.at (Web2c Actions): Ajust.
8149
8150 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
8151 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
8152 passes, but produces negative #line number, once fixed, GCC is
8153 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
8154 C), it passes.
8155 * src/state.h (state_h): Code input lines on ints, not shorts.
8156
8157 2002-04-08 Akim Demaille <akim@epita.fr>
8158
8159 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
8160 and then the grammar.
8161
8162 2002-04-08 Akim Demaille <akim@epita.fr>
8163
8164 * src/system.h: No longer using strndup.
8165
8166 2002-04-07 Akim Demaille <akim@epita.fr>
8167
8168 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
8169 * src/output.c (output_table_data): Return the longest number.
8170 (prepare_tokens): Output `token_number_max').
8171 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
8172 New.
8173 Use them to define yy_token_number_type/TokenNumberType.
8174 Use this type for yytranslate.
8175 * tests/torture.at (Big triangle): Push the limit from 124 to
8176 253.
8177 * tests/regression.at (Web2c Actions): Adjust.
8178
8179 2002-04-07 Akim Demaille <akim@epita.fr>
8180
8181 * tests/torture.at (Big triangle): New.
8182 (GNU AWK Grammar, GNU Cim Grammar): Move to...
8183 * tests/existing.at: here.
8184
8185 2002-04-07 Akim Demaille <akim@epita.fr>
8186
8187 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
8188 nritems.
8189 Adjust dependencies.
8190
8191 2002-04-07 Akim Demaille <akim@epita.fr>
8192
8193 * src/reader.c: Normalize increments to prefix form.
8194
8195 2002-04-07 Akim Demaille <akim@epita.fr>
8196
8197 * src/reader.c, symtab.c: Remove debugging code.
8198
8199 2002-04-07 Akim Demaille <akim@epita.fr>
8200
8201 Rename all the `bucket's as `symbol_t'.
8202
8203 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
8204 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
8205 * src/symtab.c, src/symtab.h (bucket): Rename as...
8206 (symbol_t): this.
8207 (symbol_list_new, bucket_check_defined, bucket_make_alias)
8208 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
8209 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8210 (buckets_new, buckets_free, buckets_do): Rename as...
8211 (symbol_list_new, symbol_check_defined, symbol_make_alias)
8212 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
8213 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
8214 (symbols_new, symbols_free, symbols_do): these.
8215
8216 2002-04-07 Akim Demaille <akim@epita.fr>
8217
8218 Use lib/hash for the symbol table.
8219
8220 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
8221 EOF.
8222 * src/lex.c (lex): Set the `number' member of new terminals.
8223 * src/reader.c (bucket_check_defined, bucket_make_alias)
8224 (bucket_check_alias_consistence, bucket_translation): New.
8225 (reader, grammar_free, readgram, token_translations_init)
8226 (packsymbols): Adjust.
8227 (reader): Number the predefined tokens.
8228 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
8229 for predefined tokens.
8230 * src/symtab.h (bucket): Remove all the hash table related
8231 members.
8232 * src/symtab.c (symtab): Replace by...
8233 (bucket_table): this.
8234 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8235 (buckets_new, buckets_do): New.
8236
8237 2002-04-07 Akim Demaille <akim@epita.fr>
8238
8239 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
8240 (start_symbol, max_user_token_number, semantic_parser)
8241 (error_token_number): Initialize.
8242 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
8243 Initialize.
8244 (reader): Don't.
8245 (errtoken, eoftoken, undeftoken, axiom): Extern.
8246
8247 2002-04-07 Akim Demaille <akim@epita.fr>
8248
8249 * src/gram.h (rule_s): prec and precsym are now pointers
8250 to the bucket giving the priority/associativity.
8251 Member `associativity' removed: useless.
8252 * src/reduce.c, src/conflicts.c: Adjust.
8253
8254 2002-04-07 Akim Demaille <akim@epita.fr>
8255
8256 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
8257 Properly escape the symbols' TAG when outputting them.
8258
8259 2002-04-07 Akim Demaille <akim@epita.fr>
8260
8261 * src/lalr.h (LA): Is a bitsetv, not bitset*.
8262
8263 2002-04-07 Akim Demaille <akim@epita.fr>
8264
8265 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
8266 (LArule): this, which is an array to rule_t*.
8267 * src/print.c, src/conflicts.c: Adjust.
8268
8269 2002-04-07 Akim Demaille <akim@epita.fr>
8270
8271 * src/gram.h (rule_t): Rename `number' as `user_number'.
8272 `number' is a new member.
8273 Adjust dependencies.
8274 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
8275
8276 2002-04-07 Akim Demaille <akim@epita.fr>
8277
8278 As a result of the previous patch, it is no longer needed
8279 to reorder ritem itself.
8280
8281 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
8282
8283 2002-04-07 Akim Demaille <akim@epita.fr>
8284
8285 Be sure never to walk through RITEMS, but use only data related to
8286 the rules themselves. RITEMS should be banished.
8287
8288 * src/output.c (output_token_translations): Rename as...
8289 (prepare_tokens): this.
8290 In addition to `translate', prepare the muscles `tname' and
8291 `toknum', which were handled by...
8292 (output_rule_data): this.
8293 Remove, and move the remainder of its outputs into...
8294 (prepare_rules): this new routines, which also merges content from
8295 (output_gram): this.
8296 (prepare_rules): Be sure never to walk through RITEMS.
8297 (output_stos): Rename as...
8298 (prepare_stos): this.
8299 (output): Always invoke prepare_states, after all, just don't use it
8300 in the output if you don't need it.
8301
8302 2002-04-07 Akim Demaille <akim@epita.fr>
8303
8304 * src/LR0.c (new_state): Display `nstates' as the name of the
8305 newly created state.
8306 Adjust to initialize first_state and last_state if needed.
8307 Be sure to distinguish the initial from the final state.
8308 (new_states): Create the itemset of the initial state, and use
8309 new_state.
8310 * src/closure.c (closure): Now that the initial state has its
8311 items properly set, there is no need for a special case when
8312 creating `ruleset'.
8313
8314 As a result, now the rule 0, reducing to $axiom, is visible in the
8315 outputs. Adjust the test suite.
8316
8317 * tests/conflicts.at (Solved SR Conflicts)
8318 (Unresolved SR Conflicts): Adjust.
8319 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
8320 * tests/conflicts.at (S/R in initial): New.
8321
8322 2002-04-07 Akim Demaille <akim@epita.fr>
8323
8324 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
8325 the RHS of the rules.
8326 * src/output.c (output_gram): Likewise.
8327
8328 2002-04-07 Akim Demaille <akim@epita.fr>
8329
8330 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
8331 bucket.
8332 Adjust all dependencies.
8333 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
8334 `number' of the buckets too.
8335 * src/gram.h: Include `symtab.h'.
8336 (associativity): Move to...
8337 * src/symtab.h: here.
8338 No longer include `gram.h'.
8339
8340 2002-04-07 Akim Demaille <akim@epita.fr>
8341
8342 * src/gram.h, src/gram.c (rules_rhs_length): New.
8343 (ritem_longest_rhs): Use it.
8344 * src/gram.h (rule_t): `number' is a new member.
8345 * src/reader.c (packgram): Set it.
8346 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
8347 the end of `rules', and count them out of `nrules'.
8348 (reduce_output, dump_grammar): Adjust.
8349 * src/print.c (print_grammar): It is no longer needed to check for
8350 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
8351 * tests/reduce.at (Reduced Automaton): New test.
8352
8353 2002-04-07 Akim Demaille <akim@epita.fr>
8354
8355 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
8356 lacking `+ 1' to nrules, Bison reported as useless a token if it
8357 was used solely to set the precedence of the last rule...
8358
8359 2002-04-07 Akim Demaille <akim@epita.fr>
8360
8361 * data/bison.c++, data/bison.simple: Don't output the current file
8362 name in #line, to avoid useless diffs between two identical
8363 outputs under different names.
8364
8365 2002-04-07 Akim Demaille <akim@epita.fr>
8366
8367 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
8368 Normalize loops to using `< nrules + 1', not `<= nrules'.
8369
8370 2002-04-07 Akim Demaille <akim@epita.fr>
8371
8372 * TODO: Update.
8373
8374 2002-04-07 Akim Demaille <akim@epita.fr>
8375
8376 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
8377 bucket.value as bucket.number.
8378
8379 2002-04-07 Akim Demaille <akim@epita.fr>
8380
8381 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
8382 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
8383 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
8384 RHS, instead of being an index in RITEMS.
8385
8386 2002-04-04 Paul Eggert <eggert@twinsun.com>
8387
8388 * doc/bison.texinfo: Update copyright date.
8389 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
8390 (Symbols): Warn about running Bison in one character set,
8391 but compiling and/or running in an incompatible one.
8392 Warn about character code 256, too.
8393
8394 2002-04-03 Paul Eggert <eggert@twinsun.com>
8395
8396 * src/bison.data (YYSTACK_ALLOC): Depend on whether
8397 YYERROR_VERBOSE is nonzero, not whether it is defined.
8398
8399 Merge changes from bison-1_29-branch.
8400
8401 2002-03-20 Paul Eggert <eggert@twinsun.com>
8402
8403 Merge fixes from Debian bison_1.34-1.diff.
8404
8405 * configure.in (AC_PREREQ): 2.53.
8406
8407 2002-03-20 Akim Demaille <akim@epita.fr>
8408
8409 * src/conflicts.c (log_resolution): Argument `resolution' is const.
8410
8411 2002-03-19 Paul Eggert <eggert@twinsun.com>
8412
8413 * src/bison.simple (YYCOPY): New macro.
8414 (YYSTACK_RELOCATE): Use it.
8415 Remove Type arg; no longer needed. All callers changed.
8416 (yymemcpy): Remove; no longer needed.
8417
8418 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
8419 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8420
8421 2002-03-19 Akim Demaille <akim@epita.fr>
8422
8423 Test and fix the #line outputs.
8424
8425 * tests/atlocal.at (GCC): New.
8426 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
8427 (Prologue synch line, %union synch line, Postprologue synch line)
8428 (Action synch line, Epilogue synch line): New tests.
8429 * src/reader.c (parse_union_decl): Define the muscle stype_line.
8430 * data/bison.simple, data/bison.c++: Use it.
8431
8432 2002-03-19 Akim Demaille <akim@epita.fr>
8433
8434 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
8435 (Solved SR Conflicts, %expect not enough, %expect right)
8436 (%expect too much): Move to...
8437 * tests/conflicts.at: this new file.
8438
8439 2002-03-19 Akim Demaille <akim@epita.fr>
8440
8441 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8442 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
8443 that we can move to enums for instance.
8444 * src/output.c (token_definitions_output): Output a list of
8445 `token-name, token-number' instead of the #define.
8446 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
8447
8448 2002-03-14 Akim Demaille <akim@epita.fr>
8449
8450 Use Gettext 0.11.1.
8451
8452 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
8453
8454 * data/bison.c++: Make the user able to add members to the generated
8455 parser by subclassing.
8456
8457 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
8458
8459 * src/reader.c (read_additionnal_code): `c' should be an integer, not
8460 a character.
8461 Reported by Nicolas Tisserand and Nicolas Burrus.
8462
8463 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8464
8465 * src/reader.c: Warn about lacking semi-colons, do not complain.
8466
8467 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8468
8469 * data/bison.c++: Remove a debug line.
8470
8471 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8472
8473 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
8474 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
8475 provide a default implementation.
8476
8477 2002-03-04 Akim Demaille <akim@epita.fr>
8478
8479 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
8480 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
8481 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
8482 * tests/semantic.at (Parsing Guards): Similarly.
8483 * src/reader.at (readgram): Complain if the last rule is not ended
8484 with a semi-colon.
8485
8486 2002-03-04 Akim Demaille <akim@epita.fr>
8487
8488 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
8489 * src/closure.c: here.
8490 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
8491 RTC.
8492 * src/warshall.h, src/warshall.c: Remove.
8493 * tests/sets.at (Broken Closure): Adjust.
8494
8495 2002-03-04 Akim Demaille <akim@epita.fr>
8496
8497 * src/output.c (output_skeleton): tempdir is const.
8498 bytes_read is unused.
8499
8500 2002-03-04 Akim Demaille <akim@epita.fr>
8501
8502 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
8503 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
8504 Update.
8505 From Michael Hayes.
8506
8507 2002-03-04 Akim Demaille <akim@epita.fr>
8508
8509 * src/closure.c (closure): `r' is unused.
8510
8511 2002-03-04 Akim Demaille <akim@epita.fr>
8512
8513 * tests/sets.at (Broken Closure): Add the ending `;'.
8514 * src/reader.at (readgram): Complain if a rule is not ended with a
8515 semi-colon.
8516
8517 2002-03-04 Akim Demaille <akim@epita.fr>
8518
8519 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
8520 (count_sr_conflicts): Use bitset_count.
8521 * src/reduce.c (inaccessable_symbols): Ditto.
8522 (bits_size): Remove.
8523 * src/warshall.h, src/warshall.c: Convert to bitsetv.
8524
8525 2002-03-04 Akim Demaille <akim@epita.fr>
8526
8527 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
8528 * src/reduce.c: Remove the `bitset_zero's following the
8529 `bitset_create's, as now it is performed by the latter.
8530
8531 2002-03-04 Akim Demaille <akim@epita.fr>
8532
8533 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
8534 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
8535 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
8536 latest sources from Michael.
8537
8538 2002-03-04 Akim Demaille <akim@epita.fr>
8539
8540 * src/output.c (output): Don't free the grammar.
8541 * src/reader.c (grammar_free): New.
8542 * src/main.c (main): Call it and don't free symtab here.
8543
8544 2002-03-04 Akim Demaille <akim@epita.fr>
8545
8546 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
8547 before returning.
8548 Reported by Benoit Perrot.
8549
8550 2002-03-04 Akim Demaille <akim@epita.fr>
8551
8552 Use bitset operations when possible, not loops over bits.
8553
8554 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
8555 bitset_or.
8556 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
8557 * src/reduce.c (useless_nonterminals): Formatting changes.
8558 * src/warshall.c (TC): Use bitset_or.
8559
8560 2002-03-04 Akim Demaille <akim@epita.fr>
8561
8562 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
8563 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
8564 Ditto.
8565
8566 2002-03-04 Akim Demaille <akim@epita.fr>
8567
8568 * src/lalr.c (F): Now a bitset*.
8569 Adjust all dependencies.
8570
8571 2002-03-04 Akim Demaille <akim@epita.fr>
8572
8573 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
8574 Adjust all dependencies.
8575
8576 2002-03-04 Akim Demaille <akim@epita.fr>
8577
8578 * src/L0.c, src/LR0.h (nstates): Be size_t.
8579 Adjust comparisons (signed vs unsigned).
8580 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
8581 bitset*.
8582 Adjust all dependencies.
8583
8584 2002-03-04 Akim Demaille <akim@epita.fr>
8585
8586 * src/closure.c (firsts): Now, also a bitset.
8587 Adjust all dependencies.
8588 (varsetsize): Remove, now unused.
8589 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
8590
8591 2002-03-04 Akim Demaille <akim@epita.fr>
8592
8593 * src/print.c: Convert to use bitset.h, not hand coded iterations
8594 over ints.
8595
8596 2002-03-04 Akim Demaille <akim@epita.fr>
8597
8598 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
8599
8600 2002-03-04 Akim Demaille <akim@epita.fr>
8601
8602 * src/closure.c (ruleset): Be a bitset.
8603 (rulesetsize): Remove.
8604
8605 2002-03-04 Akim Demaille <akim@epita.fr>
8606
8607 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
8608 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
8609 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
8610 * src/closure.c (fderives): Be an array of bitsets.
8611
8612 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
8613
8614 * data/bison.c++: Merge the two generated headers. Insert a copyright
8615 notice in each output file.
8616
8617 2002-02-28 Akim Demaille <akim@epita.fr>
8618
8619 * data/bison.c++: Copy the prologue of bison.simple to fetch
8620 useful M4 definitions, such as b4_header_guard.
8621
8622 2002-02-25 Akim Demaille <akim@epita.fr>
8623
8624 * src/getargs.c (version): Give the name of the authors, and use a
8625 translator friendly scheme for the bgr
8626 copyright notice.
8627
8628 2002-02-25 Akim Demaille <akim@epita.fr>
8629
8630 * src/output.c (header_output): Remove, now handled completely via
8631 M4.
8632
8633 2002-02-25 Akim Demaille <akim@epita.fr>
8634
8635 * m4/m4.m4: New, from CVS Autoconf.
8636 * configure.in: Invoke it.
8637 * src/output.c (output_skeleton): Use its result instead of the
8638 hard coded name.
8639
8640 2002-02-25 Akim Demaille <akim@epita.fr>
8641
8642 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
8643 Fileutils 4.1.5.
8644 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
8645 * src/output.c (output_skeleton): Use mkstemp to create a real
8646 temporary file.
8647 Move the filling of `skeleton' and its muscle to...
8648 (prepare): here.
8649 (output): Move the definition of the prologue muscle to...
8650 (prepare): here.
8651 * src/system.h (DEFAULT_TMPDIR): New.
8652
8653 2002-02-14 Paul Eggert <eggert@twinsun.com>
8654
8655 Remove the support for C++ namespace cleanliness; it was
8656 causing more problems than it was curing, since it didn't work
8657 properly on some nonstandard C++ compilers. This can wait
8658 for a proper C++ parser.
8659
8660 * NEWS: Document this.
8661 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
8662 of C++, as it's treated like C now.
8663 * src/bison.simple (YYSTD): Remove.
8664 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
8665 Treat C++ just like Standard C instead of trying to support
8666 namespace cleanliness.
8667
8668 2002-02-14 Akim Demaille <akim@epita.fr>
8669
8670 * tests/regression.at (else): Adjust to Andreas' change.
8671
8672 2002-02-14 Akim Demaille <akim@epita.fr>
8673
8674 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
8675
8676 2002-02-13 Andreas Schwab <schwab@suse.de>
8677
8678 * src/output.c (output_rule_data): Don't output NULL, it might
8679 not be defined yet.
8680
8681 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
8682
8683 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
8684 (Copyright notice): Update.
8685
8686 2002-02-11 Akim Demaille <akim@epita.fr>
8687
8688 * tests/regression.at (%nonassoc and eof): Don't include
8689 nonportable headers.
8690
8691 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
8692
8693 * data/bison.c++: Correct error recovery. Make the user able to
8694 initialize the starting location.
8695
8696 2002-02-07 Akim Demaille <akim@epita.fr>
8697
8698 * tests/input.at: New.
8699
8700 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8701
8702 * data/bison.c++: Replace some direct m4 expansions by constants. Be
8703 more consistent when naming methods and variables. Put preprocessor
8704 directives around tables only needed for debugging.
8705
8706 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8707
8708 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
8709 C++ parsers.
8710 (yy::b4_name::parse): Use print_.
8711
8712 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8713
8714 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
8715
8716 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8717
8718 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
8719 C++ parsers.
8720 (yy::b4_name::parse): Build verbose error messages, and use error_.
8721
8722 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
8723
8724 * data/bison.c++: Fix m4 quoting in comments.
8725
8726 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
8727
8728 * data/bison.c++: Adjust the parser code. Fix some muscles that were
8729 not expanded by m4.
8730
8731 2002-02-05 Akim Demaille <akim@epita.fr>
8732
8733 * data/bison.c++: Adjust to the M4 back end.
8734 More is certainly needed.
8735
8736 2002-02-05 Akim Demaille <akim@epita.fr>
8737
8738 Give a try to M4 as a back end.
8739
8740 * lib/readpipe.c: New, from wdiff.
8741 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
8742 BISON_HAIRY.
8743 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
8744 specific values. Now it is m4 that performs the lookup.
8745 * src/parse-skel.y: Remove.
8746 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
8747 * src/output.c (actions_output, guards_output)
8748 (token_definitions_output): No longer keeps track of the output
8749 line number, hence remove the second argument.
8750 (guards_output): Check against the guard member of a rule, not the
8751 action member.
8752 Adjust callers.
8753 (output_skeleton): Don't look for the skeleton location, let m4 do
8754 that.
8755 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
8756 file will be used.
8757 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
8758 (prepare): Given that for the time being changesyntax is not
8759 usable in M4, rename the muscles using `-' to `_'.
8760 Define `defines_flag', `output_parser_name' and `output_header_name'.
8761 * src/output.h (actions_output, guards_output)
8762 (token_definitions_output): Adjust prototypes.
8763 * src/scan-skel.l: Instead of scanning the skeletons, it now
8764 processes the output of m4: `__oline__' and `#output'.
8765 * data/bison.simple: Adjust to be used by M4(sugar).
8766 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
8767 to date.
8768 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
8769 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
8770 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
8771 shamelessly stolen from CVS Autoconf.
8772
8773 2002-02-05 Akim Demaille <akim@epita.fr>
8774
8775 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
8776 * configure.in: Check for the declarations of free and malloc.
8777 * src/muscle_tab.c: Adjust.
8778
8779 2002-02-05 Akim Demaille <akim@epita.fr>
8780
8781 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
8782 which have no values.
8783
8784 2002-02-05 Akim Demaille <akim@epita.fr>
8785
8786 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
8787 * data/: here.
8788
8789 2002-01-29 Paul Eggert <eggert@twinsun.com>
8790
8791 * src/bison.simple (YYSIZE_T): Do not define merely because
8792 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
8793 On some platforms, <alloca.h> does not declare YYSTD (size_t).
8794
8795 2002-01-27 Akim Demaille <akim@epita.fr>
8796
8797 Fix `%nonassoc and eof'.
8798
8799 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
8800 which were not properly copied! Replace
8801 memcpy (res->errs, src->errs, src->nerrs);
8802 with
8803 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
8804 !!!
8805 * tests/regression.at (%nonassoc and eof): Adjust to newest
8806 Autotest: `.' is not in the PATH.
8807
8808 2002-01-27 Akim Demaille <akim@epita.fr>
8809
8810 * tests/sets.at (AT_EXTRACT_SETS): New.
8811 (Nullable): Use it.
8812 (Firsts): New.
8813
8814 2002-01-26 Akim Demaille <akim@epita.fr>
8815
8816 * tests/actions.at, tests/calc.at, tests/headers.at,
8817 * tests/torture.at: Adjust to the newest Autotest which no longer
8818 forces `.' in the PATH.
8819
8820 2002-01-25 Akim Demaille <akim@epita.fr>
8821
8822 * tests/regression.at (%nonassoc and eof): New.
8823 Suggested by Robert Anisko.
8824
8825 2002-01-24 Akim Demaille <akim@epita.fr>
8826
8827 Bison dumps core when trying to complain about broken input files.
8828 Reported by Cris van Pelt.
8829
8830 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
8831 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
8832 into...
8833 (Invalid inputs): Strengthen: exercise parse_percent_token.
8834
8835 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
8836
8837 * src/Makefile.am: Add bison.c++.
8838 * src/bison.c++: New skeleton.
8839
8840 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
8841
8842 * po/it.po: New.
8843
8844 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
8845
8846 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
8847
8848 2002-01-20 Marc Autret <marc@gnu.org>
8849
8850 * src/files.c (compute_output_file_names): Fix
8851
8852 2002-01-20 Marc Autret <marc@gnu.org>
8853
8854 * tests/output.at: New test.
8855 * src/files.c (compute_base_names): Don't map extensions when
8856 the YACC flag is set, use defaults.
8857 Reported by Evgeny Stambulchik.
8858
8859 2002-01-20 Marc Autret <marc@gnu.org>
8860
8861 * src/system.h: Need to define __attribute__ away for non-GCC
8862 compilers as well (i.e. the vendor C compiler).
8863 Suggested by Albert Chin-A-Young.
8864
8865 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
8866
8867 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
8868 canonical definition.
8869 * src/system.h: Use the canonical definition for PARAMS (avoids
8870 a conflict with the macro from lib/hash.h).
8871
8872 2002-01-11 Akim Demaille <akim@epita.fr>
8873
8874 * configure.in: Use AC_FUNC_STRNLEN.
8875 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
8876
8877 2002-01-09 Akim Demaille <akim@epita.fr>
8878
8879 * src/files.c, src/files.h (output_infix): New.
8880 (tab_extension): Remove.
8881 (compute_base_names): Compute the former, drop the latter.
8882 * src/output.c (prepare): Insert the muscles `output-infix', and
8883 `output-suffix'.
8884 * src/parse-skel.y (string, string.1): New.
8885 (section.header): Use it.
8886 (section.yacc): Remove.
8887 (prefix): Remove too.
8888 * src/scan-skel.l: Adjust.
8889 * src/bison.simple, src/bison.hairy: Adjust.
8890
8891 2002-01-09 Akim Demaille <akim@epita.fr>
8892
8893 * configure.in (WERROR_CFLAGS): Compute it.
8894 * src/Makefile.am (CFLAGS): Pass it.
8895 * tests/atlocal.in (CFLAGS): Idem.
8896 * src/files.c: Fix a few warnings.
8897 (get_extension_index): Remove, unused.
8898
8899 2002-01-08 Akim Demaille <akim@epita.fr>
8900
8901 * src/getargs.c (AS_FILE_NAME): New.
8902 (getargs): Use it to convert DOSish file names.
8903 * src/files.c (base_name): Rename as full_base_name to avoid
8904 clashes with `base_name ()'.
8905 (filename_split): New.
8906 (compute_base_names): N-th rewrite, using filename_split.
8907
8908 2002-01-08 Akim Demaille <akim@epita.fr>
8909
8910 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
8911 New, stolen from the Fileutils 4.1.
8912 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8913 * configure.in: Check for the presence of memrchr, and of its
8914 prototype.
8915
8916 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
8917
8918 * lib/hash.h (__P): Added definition for this macro.
8919 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
8920 BUILT_SOURCES, to ensure they are generated first.
8921 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
8922 %error-verbose to allow bootstrapping with bison 1.30x.
8923
8924 2002-01-06 Akim Demaille <akim@epita.fr>
8925
8926 * src/reader.c (parse_braces): Don't fetch the next char, the
8927 convention is to fetch on entry.
8928 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
8929 'switch' without a following semicolon.
8930 * tests/regression.at (braces parsing): New.
8931
8932 2002-01-06 Akim Demaille <akim@epita.fr>
8933
8934 Bison is dead wrong in its RR conflict reports.
8935
8936 * tests/torture.at (GNU Cim Grammar): New.
8937 * src/conflicts.c (count_rr_conflicts): Fix.
8938
8939 2002-01-06 Akim Demaille <akim@epita.fr>
8940
8941 Creating package.m4 from configure.ac causes too many problems.
8942
8943 * tests/Makefile.am (package.m4): Create it by hand,
8944 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
8945
8946 2002-01-06 Akim Demaille <akim@epita.fr>
8947
8948 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
8949 skeleton.h.
8950
8951 2002-01-04 Paul Eggert <eggert@twinsun.com>
8952
8953 * doc/bison.texinfo (Debugging):
8954 Remove YYSTDERR; it's no longer defined or used.
8955 Also, s/cstdio.h/cstdio/.
8956
8957 2002-01-03 Akim Demaille <akim@epita.fr>
8958
8959 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
8960
8961 2002-01-03 Akim Demaille <akim@epita.fr>
8962
8963 * src/parse-skel.y (process_skeleton): Don't bind the parser's
8964 tracing code to --trace, wait for a better --trace option, with
8965 args.
8966
8967 2002-01-03 Akim Demaille <akim@epita.fr>
8968
8969 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
8970 The ISO C++ standard is extremely clear about it: stderr is
8971 considered a macro, not a regular symbol (see table 94 `Header
8972 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
8973 Therefore std:: does not apply to it. It still does with fprintf.
8974 Also, s/cstdio.h/cstdio/.
8975
8976 2002-01-03 Akim Demaille <akim@epita.fr>
8977
8978 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
8979 for non system headers.
8980
8981 2002-01-02 Akim Demaille <akim@epita.fr>
8982
8983 Equip the skeleton chain with location tracking, runtime trace,
8984 pure parser and scanner.
8985
8986 * src/parse-skel.y: Request a pure parser, locations, and prefix
8987 renaming.
8988 (%union): Having several members with the same type does not help
8989 type mismatches, simplify.
8990 (YYPRINT, yyprint): New.
8991 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
8992 (skel_error): this.
8993 Handle locations.
8994 * src/scan-skel.l: Adjust to these changes.
8995 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
8996 (LOCATION_PRINT, skel_control_t): New.
8997
8998 2001-12-30 Akim Demaille <akim@epita.fr>
8999
9000 * src/parse-skel.y: Get rid of the shift/reduce conflict:
9001 replace `gb' with BLANKS.
9002 * src/scan-skel.l: Adjust.
9003
9004 2001-12-30 Akim Demaille <akim@epita.fr>
9005
9006 * src/system.h: We don't need nor want bcopy.
9007 Throw away MS-DOS crap: we don't need getpid.
9008 * configure.in: We don't need strndup. It was even causing
9009 problems: because Flex includes the headers *before* us,
9010 _GNU_SOURCE is not defined by config.h, and therefore strndup was
9011 not visible.
9012 * lib/xstrndup.c: New.
9013 * src/scan-skel.l: Use it.
9014 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
9015 * src/parse-skel.y: Use %directives instead of #defines.
9016
9017 2001-12-30 Akim Demaille <akim@epita.fr>
9018
9019 * src/skeleton.h: New.
9020 * src/output.c (output_parser, output_master_parser): Remove, dead
9021 code.
9022 * src/output.h (get_lines_number, actions_output, guards_output)
9023 (token_definitions_output): Prototype them.
9024 * src/parse-skel.y: Add the license notice.
9025 Include output.h and skeleton.h.
9026 (process_skeleton): Returns void, and takes a single parameter.
9027 * src/scan-skel.l: Add the license notice.
9028 Include skeleton.h.
9029 Don't use %option yylineno: it seems that then Flex imagines
9030 REJECT has been used, and therefore it won't reallocate its
9031 buffers (which makes no other sense to me than a bug). It results
9032 in warnings for `unused: yy_flex_realloc'.
9033
9034 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
9035
9036 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9037 (MUSCLE_INSERT_PREFIX): ...to there.
9038 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9039 (MUSCLE_INSERT_PREFIX): Move from here...
9040
9041 * src/bison.hairy: Add a section directive. Put braces around muscle
9042 names. This parser skeleton is still broken, but Bison should not
9043 choke on a bad muscle 'syntax'.
9044 * src/bison.simple: Add a section directive. Put braces around muscle
9045 names.
9046
9047 * src/files.h (strsuffix, stringappend): Add declarations.
9048 (tab_extension): Add declaration.
9049 (short_base_name): Add declaration.
9050
9051 * src/files.c (strsuffix, stringappend): No longer static. These
9052 functions are used in the skeleton parser.
9053 (tab_extension): New.
9054 (compute_base_names): Use the computations done in this function
9055 to guess if the generated parsers should have '.tab' in their
9056 names.
9057 (short_base_name): No longer static.
9058
9059 * src/output.c (output_skeleton): New.
9060 (output): Disable call to output_master_parser, and give a try to
9061 a new skeleton handling system.
9062 (guards_output, actions_output): No longer static.
9063 (token_definitions_output, get_lines_number): No longer static.
9064
9065 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
9066
9067 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9068 parse-skel.y.
9069
9070 * src/parse-skel.y: New file.
9071 * src/scan-skel.l: New file.
9072
9073 2001-12-29 Akim Demaille <akim@epita.fr>
9074
9075 %name-prefix is broken.
9076
9077 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
9078 Adjust all dependencies.
9079 * tests/headers.at (export YYLTYPE): Strengthen this test: use
9080 %name-prefix.
9081
9082 Renaming yylval but not yylloc is not consistent. Now we do.
9083
9084 * src/bison.simple: Prefix yylloc if used.
9085 * doc/bison.texinfo (Decl Summary): Document that.
9086
9087 2001-12-29 Akim Demaille <akim@epita.fr>
9088
9089 * doc/bison.texinfo: Promote `%long-directive' over
9090 `%long_directive'.
9091 Remove all references to fixed-output-files, yacc is enough.
9092
9093 2001-12-29 Akim Demaille <akim@epita.fr>
9094
9095 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
9096 user prologue. These are defaults.
9097 * tests/actions.at (Mid-rule actions): Make sure the user can
9098 define YYDEBUG and YYERROR_VERBOSE.
9099
9100 2001-12-29 Akim Demaille <akim@epita.fr>
9101
9102 * src/output.c (header_output): Don't forget to export YYLTYPE and
9103 yylloc.
9104 * tests/headers.at (export YYLTYPE): New, make sure it does.
9105 * tests/regression.at (%union and --defines, Invalid CPP headers):
9106 Move to...
9107 * tests/headers.at: here.
9108
9109 2001-12-29 Akim Demaille <akim@epita.fr>
9110
9111 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
9112
9113 2001-12-29 Akim Demaille <akim@epita.fr>
9114
9115 * tests/actions.at (Mid-rule actions): Output on a single line
9116 instead of several.
9117
9118 2001-12-29 Akim Demaille <akim@epita.fr>
9119
9120 * doc/bison.texinfo: Formatting changes.
9121
9122 2001-12-29 Akim Demaille <akim@epita.fr>
9123
9124 Don't store the token defs in a muscle, just be ready to output it
9125 on command. Now possible via `symbols'. Fixes a memory leak.
9126
9127 * src/output.c (token_definitions_output): New.
9128 (output_parser, header_output): Use it.
9129 * src/reader.c (symbols_save): Remove.
9130
9131 2001-12-29 Akim Demaille <akim@epita.fr>
9132
9133 * src/bison.simple: Do not provide a default for YYSTYPE and
9134 YYLTYPE before the user's prologue. Otherwise it's hardly... a
9135 default.
9136
9137 2001-12-29 Akim Demaille <akim@epita.fr>
9138
9139 Mid-rule actions are simply... ignored!
9140
9141 * src/reader.c (readgram): Be sure to attach mid-rule actions to
9142 the empty-rule associated to the dummy symbol, not to the host
9143 rule.
9144 * tests/actions.at (Mid-rule actions): New.
9145
9146 2001-12-29 Akim Demaille <akim@epita.fr>
9147
9148 Memory leak.
9149
9150 * src/reader.c (reader): Free grammar.
9151
9152 2001-12-29 Akim Demaille <akim@epita.fr>
9153
9154 Memory leak.
9155
9156 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
9157 since it allocates it for each state, although only one is needed.
9158 (allocate_storage): Do it here.
9159
9160 2001-12-29 Akim Demaille <akim@epita.fr>
9161
9162 * src/options.h, src/options.c (create_long_option_table): Rename
9163 as...
9164 (long_option_table_new): this, with a clearer prototype.
9165 (percent_table): Remove, unused,
9166 * src/getargs.c (getargs): Adjust.
9167
9168 2001-12-29 Akim Demaille <akim@epita.fr>
9169
9170 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
9171 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
9172 as states.
9173
9174 2001-12-29 Akim Demaille <akim@epita.fr>
9175
9176 * src/lalr.c (build_relations): Rename `states' as `states1'.
9177 Sorry, I don't understand exactly what it is, no better name...
9178
9179 2001-12-29 Akim Demaille <akim@epita.fr>
9180
9181 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
9182 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
9183 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
9184 as rules.
9185
9186 2001-12-29 Akim Demaille <akim@epita.fr>
9187
9188 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
9189 ago.
9190
9191 2001-12-29 Akim Demaille <akim@epita.fr>
9192
9193 * src/reader.c, src/reader.h (user_toknums): Remove.
9194 Adjust all users to use symbols[i]->user_token_number.
9195
9196 2001-12-29 Akim Demaille <akim@epita.fr>
9197
9198 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
9199 Adjust all users to use symbols[i]->prec or ->assoc.
9200
9201 2001-12-29 Akim Demaille <akim@epita.fr>
9202
9203 * src/reader.c, src/reader.h (tags): Remove.
9204 Adjust all users to use symbols[i]->tag.
9205
9206 2001-12-29 Akim Demaille <akim@epita.fr>
9207
9208 * src/gram.h, src/gram.c (symbols): New, similar to state_table
9209 and rule_table.
9210 * src/reader.c (packsymbols): Fill this table.
9211 Drop sprec.
9212 * src/conflicts.c (resolve_sr_conflict): Adjust.
9213 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
9214 single table.
9215 Use symbols[i]->tag instead of tags[i].
9216
9217 2001-12-29 Akim Demaille <akim@epita.fr>
9218
9219 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
9220 In addition, put a comment in there, to replace...
9221 * tests/regression.at (%union and C comments): Remove.
9222
9223 2001-12-29 Akim Demaille <akim@epita.fr>
9224
9225 * tests/regression.at (Web2c Actions): Blindly move the actual
9226 output as expected output. The contents *seem* right to me, but I
9227 can't pretend reading perfectly parser tables... Nonetheless, all
9228 the other tests pass correctly, the table look OK, even though the
9229 presence of `$axiom' is to be noted: AFAICS it is useless (but
9230 harmless).
9231
9232 2001-12-29 Akim Demaille <akim@epita.fr>
9233
9234 * src/reader.c (readgram): Don't add the rule 0 if there were no
9235 rules read. In other words, add it _after_ having performed
9236 grammar sanity checks.
9237 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
9238
9239 2001-12-29 Akim Demaille <akim@epita.fr>
9240
9241 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
9242 visible, and some states have now a different number.
9243
9244 2001-12-29 Akim Demaille <akim@epita.fr>
9245
9246 * src/reader.c (readgram): Bind the initial rule's lineno to that
9247 of the first rule.
9248 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
9249 (Solved SR Conflicts): Adjust rule 0's line number.
9250
9251 2001-12-29 Akim Demaille <akim@epita.fr>
9252
9253 Fix the `GAWK Grammar' failure.
9254
9255 * src/LR0.c (final_state): Initialize to -1 so that we do compute
9256 the reductions of the first state which was mistakenly confused
9257 with the final state because precisely final_state was initialized
9258 to 0.
9259 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
9260 now noticed by Bison.
9261 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
9262 have a reduction on $default.
9263
9264 2001-12-29 Akim Demaille <akim@epita.fr>
9265
9266 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
9267 rule line numbers.
9268 * src/closure.c (print_closure): Likewise.
9269 * src/derives.c (print_derives): Likewise.
9270 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
9271 now.
9272
9273 2001-12-29 Akim Demaille <akim@epita.fr>
9274
9275 * src/lalr.c (lookaheads_print): New.
9276 (lalr): Call it when --trace-flag.
9277 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
9278 are dumped.
9279
9280 2001-12-29 Akim Demaille <akim@epita.fr>
9281
9282 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
9283 when walking through ritem, even via rule->rhs.
9284 * src/reduce.c (dump_grammar, useful_production, reduce_output)
9285 (useful_production, useless_nonterminals): Likewise.
9286 (reduce_grammar_tables): Likewise, plus update nritems.
9287 * src/nullable.c (set_nullable): Likewise.
9288 * src/lalr.c (build_relations): Likewise.
9289 * tests/sets.at (Nullable): Adjust.
9290 Fortunately, now, the $axiom is no longer nullable.
9291
9292 2001-12-29 Akim Demaille <akim@epita.fr>
9293
9294 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
9295 the 0-sentinel.
9296 * src/gram.c (ritem_longest_rhs): Likewise.
9297 * src/reduce.c (nonterminals_reduce): Likewise.
9298 * src/print_graph.c (print_graph): Likewise.
9299 * src/output.c (output_rule_data): Likewise.
9300 * src/nullable.c (set_nullable): Likewise.
9301
9302 2001-12-29 Akim Demaille <akim@epita.fr>
9303
9304 * src/output.c: Comment changes.
9305
9306 2001-12-27 Paul Eggert <eggert@twinsun.com>
9307
9308 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
9309 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
9310 Sparc, as they were causing more porting problems than the
9311 (minor) performance improvement was worth.
9312
9313 Also, catch up with 1.31's YYSTD.
9314
9315 2001-12-27 Akim Demaille <akim@epita.fr>
9316
9317 * src/output.c (output_gram): Rely on nritems, not the
9318 0-sentinel. See below.
9319 Use -1 as separator, not 0.
9320 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
9321 Rely on -1 as separator in yyrhs, instead of 0.
9322 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
9323 twice `Now at end of input', therefore there are two lines less to
9324 expect.
9325
9326 2001-12-27 Akim Demaille <akim@epita.fr>
9327
9328 * tests/regression.at (Unresolved SR Conflicts):
9329 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
9330 below.
9331
9332 2001-12-27 Akim Demaille <akim@epita.fr>
9333
9334 * src/LR0.c (new_state): Recognize the final state by the fact it
9335 is reached by eoftoken.
9336 (insert_start_shifting_state, insert_eof_shifting_state)
9337 (insert_accepting_state, augment_automaton): Remove, since now
9338 these states are automatically computed from the initial state.
9339 (generate_states): Adjust.
9340 * src/print.c: When reporting a rule number to the user, substract
9341 1, so that the axiom rule is rule 0, and the first user rule is 1.
9342 * src/reduce.c: Likewise.
9343 * src/print_graph.c (print_core): For the time being, just as for
9344 the report, depend upon --trace-flags to dump the full set of
9345 items.
9346 * src/reader.c (readgram): Once the grammar read, insert the rule
9347 0: `$axiom: START-SYMBOL $'.
9348 * tests/set.at: Adjust: rule 0 is now displayed, and since the
9349 number of the states has changed (the final state is no longer
9350 necessarily the last), catch up.
9351
9352 2001-12-27 Akim Demaille <akim@epita.fr>
9353
9354 Try to make the use of the eoftoken valid. Given that its value
9355 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
9356 is used instead of > 0 where appropriate, (ii), depend upon nritems
9357 instead of the 0-sentinel.
9358
9359 * src/gram.h, src/gram.c (nritems): New.
9360 Expected to be duplication of nitems, but for the time being...
9361 * src/reader.c (packgram): Assert nritems and nitems are equal.
9362 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
9363 * src/closure.c (print_closure, print_fderives): Likewise.
9364 * src/gram.c (ritem_print): Likewise.
9365 * src/print.c (print_core, print_grammar): Likewise.
9366 * src/print_graph.c: Likewise.
9367
9368 2001-12-27 Akim Demaille <akim@epita.fr>
9369
9370 * src/main.c (main): If there are complains after grammar
9371 reductions, then output the report anyway if requested, then die.
9372 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
9373 * src/reader.c (eoftoken): New.
9374 (parse_token_decl): If the token being defined has value `0', it
9375 is the eoftoken.
9376 (packsymbols): No longer hack `tags' to insert `$' by hand.
9377 Be sure to preserve the value of the eoftoken.
9378 (reader): Make sure eoftoken is defined.
9379 Initialize nsyms to 0: now eoftoken is created just like the others.
9380 * src/print.c (print_grammar): Don't special case the eof token.
9381 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
9382 lie anyway, albeit pleasant.
9383 * tests/calc.at: Exercise error messages with eoftoken.
9384 Change the grammar so that empty input is invalid.
9385 Adjust expectations.
9386 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
9387
9388 2001-12-27 Akim Demaille <akim@epita.fr>
9389
9390 * configure.in: Check the protos of strchr ans strspn.
9391 Replace strchr if needed.
9392 * src/system.h: Provide the protos of strchr, strspn and memchr if
9393 missing.
9394 * lib/strchr.c: New.
9395 * src/reader.c (symbols_save): Use strchr.
9396
9397 2001-12-27 Akim Demaille <akim@epita.fr>
9398
9399 * src/print.c, src/print_graph.c (escape): New.
9400 Use it to quote the TAGS outputs.
9401 * src/print_graph.c (print_state): Now errors are in red, and
9402 reductions in green.
9403 Prefer high to wide: output the state number on a line of its own.
9404
9405 2001-12-27 Akim Demaille <akim@epita.fr>
9406
9407 * src/state.h, src/state.c (reductions_new): New.
9408 * src/LR0.c (set_state_table): Let all the states have a
9409 `reductions', even if reduced to 0.
9410 (save_reductions): Adjust.
9411 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
9412 * src/print.c (print_reductions, print_actions): Adjust.
9413 * src/output.c (action_row): Adjust.
9414
9415 2001-12-27 Akim Demaille <akim@epita.fr>
9416
9417 * src/state.h, src/state.c (errs_new, errs_dup): New.
9418 * src/LR0.c (set_state_table): Let all the states have an errs,
9419 even if reduced to 0.
9420 * src/print.c (print_errs, print_reductions): Adjust.
9421 * src/output.c (output_actions, action_row): Adjust.
9422 * src/conflicts.c (resolve_sr_conflict): Adjust.
9423
9424 2001-12-27 Akim Demaille <akim@epita.fr>
9425
9426 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
9427
9428 2001-12-27 Akim Demaille <akim@epita.fr>
9429
9430 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
9431 * src/print.c: here.
9432 (lookaheadset, shiftset): New, used as additional storage by
9433 print_reductions.
9434 (print_results): Adjust.
9435 (print_shifts, print_gotos, print_errs): New, extracted from...
9436 (print_actions): here.
9437 * src/print_graph.c (print_actions): Remove dead code.
9438
9439 2001-12-27 Akim Demaille <akim@epita.fr>
9440
9441 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
9442 `$n' and `@n'.
9443
9444 2001-12-27 Akim Demaille <akim@epita.fr>
9445
9446 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
9447 (build_relations): Adjust.
9448
9449 2001-12-27 Akim Demaille <akim@epita.fr>
9450
9451 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
9452 duplication.
9453
9454 2001-12-27 Akim Demaille <akim@epita.fr>
9455
9456 * src/reader.c (packgram): Catch nitems overflows.
9457
9458 2001-12-27 Akim Demaille <akim@epita.fr>
9459
9460 * src/files.c, src/files.h (guard_obstack): Remove.
9461 * src/output.c (output): Adjust.
9462 * src/reader.c (parse_braces): New, factoring...
9463 (copy_action, copy_guard): these two which are renamed as...
9464 (parse_action, parse_guard): these.
9465 As a voluntary consequence, using braces around guards is now
9466 mandatory.
9467
9468 2001-12-27 Akim Demaille <akim@epita.fr>
9469
9470 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
9471 * src/reader.c (symbol_list): `guard' and `guard_line' are new
9472 members.
9473 (symbol_list_new): Adjust.
9474 (copy_action): action_line is the first line, not the last.
9475 (copy_guard): Just as for actions, store the `action' only, not
9476 the switch/case/break flesh.
9477 Don't parse the user action that might follow the guard, let...
9478 (readgram): do it, i.e., now, there can be an action after a
9479 guard.
9480 In other words the guard is just explicitly optional.
9481 (packgram): Adjust.
9482 * src/output.c (guards_output): New.
9483 (output_parser): Call it when needed.
9484 (output): Also free the guard and attrs obstacks.
9485 * src/files.c, src/files.h (obstack_save): Remove.
9486 (output_files): Remove.
9487 As a result, if one needs the former `.act' file, using an
9488 appropriate skeleton which requires actions and guards is now
9489 required.
9490 * src/main.c (main): Adjust.
9491 * tests/semantic.at: New.
9492 * tests/regression.at: Use `input.y' as input file name.
9493 Avoid 8+3 problems by requiring input.c when the test needs the
9494 parser.
9495
9496 2001-12-27 Akim Demaille <akim@epita.fr>
9497
9498 * src/reader.c (symbol_list_new): Be sure to initialize all the
9499 fields.
9500
9501 2001-12-27 Akim Demaille <akim@epita.fr>
9502
9503 All the hacks using a final pseudo state are now useless.
9504
9505 * src/LR0.c (set_state_table): state_table holds exactly nstates.
9506 * src/lalr.c (nLA): New.
9507 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
9508 instead of lookaheadsp from the pseudo state (nstate + 1).
9509
9510 2001-12-27 Akim Demaille <akim@epita.fr>
9511
9512 * src/output.c (action_row, token_actions): Use a state_t instead
9513 of a integer, and nlookaheads instead of the following state's
9514 lookaheadsp.
9515
9516 2001-12-27 Akim Demaille <akim@epita.fr>
9517
9518 * src/conflicts.c (log_resolution, flush_shift)
9519 (resolve_sr_conflict, set_conflicts, solve_conflicts)
9520 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
9521 (conflicts_print, print_reductions): Use a state_t instead of an
9522 integer when referring to a state.
9523 As much as possible, depend upon nlookaheads, instead of the
9524 `lookaheadsp' member of the following state (since lookaheads of
9525 successive states are successive, the difference between state n + 1
9526 and n served as the number of lookaheads for state n).
9527 * src/lalr.c (add_lookback_edge): Likewise.
9528 * src/print.c (print_core, print_actions, print_state)
9529 (print_results): Likewise.
9530 * src/print_graph.c (print_core, print_actions, print_state)
9531 (print_graph): Likewise.
9532 * src/conflicts.h: Adjust.
9533
9534 2001-12-27 Akim Demaille <akim@epita.fr>
9535
9536 * src/bison.hairy: Formatting/comment changes.
9537 ANSIfy.
9538 Remove `register' indications.
9539 Add plenty of `static'.
9540
9541 2001-12-27 Akim Demaille <akim@epita.fr>
9542
9543 * src/output.c (prepare): Drop the muscle `ntbase' which
9544 duplicates ntokens.
9545 * src/bison.simple: Formatting/comment changes.
9546 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
9547 is an undocumented synonym.
9548
9549 2001-12-22 Akim Demaille <akim@epita.fr>
9550
9551 * src/output.c (output_table_data): Change the prototype to use
9552 `int' for array ranges: some invocations do pass an int, not a
9553 short.
9554 Reported by Wayne Green.
9555
9556 2001-12-22 Akim Demaille <akim@epita.fr>
9557
9558 Some actions of web2c.y are improperly triggered.
9559 Reported by Mike Castle.
9560
9561 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
9562 * tests/regression.at (Web2c): Rename as...
9563 (Web2c Report): this.
9564 (Web2c Actions): New.
9565
9566 2001-12-22 Akim Demaille <akim@epita.fr>
9567
9568 Reductions in web2c.y are improperly reported.
9569 Reported by Mike Castle.
9570
9571 * src/conflicts.c (print_reductions): Fix.
9572 * tests/regression.at (Web2c): New.
9573
9574 2001-12-18 Akim Demaille <akim@epita.fr>
9575
9576 Some host fail on `assert (!"foo")', which expands to
9577 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
9578 Reported by Nelson Beebee.
9579
9580 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
9581 `#define it_succeeded 0' and `assert (it_succeeded)'.
9582
9583 2001-12-17 Marc Autret <autret_m@epita.fr>
9584
9585 * src/bison.simple: Don't hard code the skeleton line and filename.
9586 * src/output.c (output_parser): Rename 'line' as 'output_line'.
9587 New line counter 'skeleton_line' (skeleton-line muscle).
9588
9589 2001-12-17 Paul Eggert <eggert@twinsun.com>
9590
9591 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
9592 YYDEBUG must be defined to a nonzero value.
9593
9594 * src/bison.simple (yytname): Do not assume that the user defines
9595 YYDEBUG to a properly parenthesized expression.
9596
9597 2001-12-17 Akim Demaille <akim@epita.fr>
9598
9599 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
9600 nlookaheads is a new member.
9601 Adjust all users.
9602 * src/lalr.h (nlookaheads): Remove this orphan declaration.
9603 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
9604 state.
9605
9606 2001-12-17 Akim Demaille <akim@epita.fr>
9607
9608 * src/files.h, src/files.c (open_files, close_files): Remove.
9609 * src/main.c (main): Don't open/close files, nor invoke lex_free,
9610 let...
9611 * src/reader.c (reader): Do it.
9612
9613 2001-12-17 Akim Demaille <akim@epita.fr>
9614
9615 * src/conflicts.c (print_reductions): Formatting changes.
9616
9617 2001-12-17 Akim Demaille <akim@epita.fr>
9618
9619 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
9620 (flush_reduce): New.
9621 (resolve_sr_conflict): Adjust.
9622
9623 2001-12-17 Akim Demaille <akim@epita.fr>
9624
9625 * src/output.c (output_obstack): Be static and rename as...
9626 (format_obstack): this, to avoid any confusion with files.c's
9627 output_obstack.
9628 * src/reader.h (muscle_obstack): Move to...
9629 * src/output.h: here, since it's defined in output.c.
9630
9631 2001-12-17 Akim Demaille <akim@epita.fr>
9632
9633 * src/output.c (action_row, save_column, default_goto)
9634 (sort_actions, matching_state, pack_vector): Better variable
9635 locality.
9636
9637 2001-12-17 Akim Demaille <akim@epita.fr>
9638
9639 * src/output.c: Various formatting changes.
9640
9641 2001-12-17 Akim Demaille <akim@epita.fr>
9642
9643 * src/files.c (output_files): Free the output_obstack.
9644 * src/main.c (main): Call print and print_graph conditionally.
9645 * src/print.c (print): Work unconditionally.
9646 * src/print_graph.c (print_graph): Work unconditionally.
9647 * src/conflicts.c (log_resolution): Output only if verbose_flag.
9648
9649 2001-12-16 Marc Autret <autret_m@epita.fr>
9650
9651 * src/output.c (actions_output): Fix. When we use %no-lines,
9652 there is one less line per action.
9653
9654 2001-12-16 Marc Autret <autret_m@epita.fr>
9655
9656 * src/bison.simple: Remove a useless #line directive.
9657 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
9658 * src/output.c (get_lines_number): New.
9659 (output_parser): Adjust, now takes care about the lines of a
9660 output muscles.
9661 Fix line numbering.
9662 (actions_output): Computes the number of lines taken by actions.
9663 (output_master_parser): Insert new skeleton which is the name of
9664 the output parser file name.
9665
9666 2001-12-15 Marc Autret <autret_m@epita.fr>
9667
9668 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
9669
9670 2001-12-15 Marc Autret <autret_m@epita.fr>
9671
9672 * src/output.c (output_gram): Keep track of the hairy one.
9673
9674 2001-12-15 Akim Demaille <akim@epita.fr>
9675
9676 Make `make distcheck' work.
9677
9678 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
9679 system.h which uses libgettext.h.
9680
9681 2001-12-15 Akim Demaille <akim@epita.fr>
9682
9683 * src/nullable.c (set_nullable): Useless rules must be skipped,
9684 otherwise, since we range over their symbols, we might look at a
9685 nonterminal which no longer ``exists'', i.e., it is not counted in
9686 `nvars', hence we overflow our arrays.
9687
9688 2001-12-15 Akim Demaille <akim@epita.fr>
9689
9690 The header can also be produced directly, without any obstack!
9691 Yahoo!
9692
9693 * src/files.c, src/files.h (defines_obstack): Remove.
9694 (compute_header_macro): Global.
9695 (defines_obstack_save): Remove.
9696 * src/reader.c (parse_union_decl): No longer output to
9697 defines_obstack: its content can be found in the `stype' muscle
9698 anyway.
9699 (output_token_translations): Merge into...
9700 (symbols_output): this.
9701 Rename as...
9702 (symbols_save): this.
9703 (reader): Adjust.
9704 * src/output.c (header_output): New.
9705 (output): Call it.
9706
9707 2001-12-15 Akim Demaille <akim@epita.fr>
9708
9709 * src/reader.c (parse_union_decl): Instead of handling two obstack
9710 simultaneously, use one to define the `stype' muscle, and use the
9711 value of the latter to fill defines_obstack.
9712 (copy_comment): Remove.
9713 (copy_comment2): Work for a single obstack.
9714 Rename as...
9715 (copy_comment): this.
9716
9717 2001-12-15 Akim Demaille <akim@epita.fr>
9718
9719 * src/lex.c, src/lex.h (xgetc): No longer static.
9720 * src/reader.c (parse_union_decl): Revamp.
9721
9722 2001-12-15 Akim Demaille <akim@epita.fr>
9723
9724 Still making progress in separating Bison into (i) input, (ii)
9725 process, (iii) output: now we can directly output the parser file
9726 without using table_obstack at all.
9727
9728 * src/files.c, src/files.h (table_obstack): Bye bye.
9729 (parser_file_name): New.
9730 * src/files.c (compute_output_file_names): Compute it.
9731 * src/output.c (actions_output, output_parser)
9732 (output_master_parser): To a file instead of an obstack.
9733
9734 2001-12-15 Akim Demaille <akim@epita.fr>
9735
9736 Attach actions to rules, instead of pre-outputting them to
9737 actions_obstack.
9738
9739 * src/gram.h (rule_t): action and action_line are new members.
9740 * src/reader.c (symbol_list): Likewise.
9741 (copy_action): Save the actions within the rule.
9742 (packgram): Save them in rule_table.
9743 * src/output.c (actions_output): New.
9744 (output_parser): Use it on `%%actions'.
9745 (output_rule_data): Don't free rule_table.
9746 (output): Do it.
9747 (prepare): Don't save the `action' muscle.
9748 * src/bison.simple: s/%%action/%%actions/.
9749
9750 2001-12-15 Akim Demaille <akim@epita.fr>
9751
9752 * src/reader.c (copy_action): When --yacc, don't append a `;'
9753 to the user action: let it fail if lacking.
9754 Suggested by Arnold Robbins and Tom Tromey.
9755
9756 2001-12-14 Akim Demaille <akim@epita.fr>
9757
9758 * src/lex.c (literalchar): Simply return the char you decoded, non
9759 longer mess around with obstacks and int pointers.
9760 Adjust all callers.
9761
9762 2001-12-14 Akim Demaille <akim@epita.fr>
9763
9764 * src/lex.c (literalchar): Don't escape the special characters,
9765 just decode them, and keep them as char (before, eol was output as
9766 the 2 char string `\n' etc.).
9767 * src/output.c (output_rule_data): Use quotearg to output the
9768 token strings.
9769
9770 2001-12-13 Paul Eggert <eggert@twinsun.com>
9771
9772 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
9773 Do not infringe on the global user namespace when using C++.
9774 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
9775 All uses of `fprintf' and `stderr' changed.
9776
9777 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
9778
9779 2001-12-13 Akim Demaille <akim@epita.fr>
9780
9781 The computation of nullable is broken: it doesn't handle empty
9782 RHS's properly.
9783
9784 * tests/torture.at (GNU AWK Grammar): New.
9785 * tests/sets.at (Nullable): New.
9786 * src/nullable.c (set_nullable): Instead of blindly looping over
9787 `ritems', loop over the rules, and then over their rhs's.
9788
9789 Work around Autotest bugs.
9790
9791 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
9792 frame, because Autotest understand lines starting with a `+' as
9793 traces from the shell. Then, they are not processed properly.
9794 Admittedly an Autotest bug, but we don't have time to wait for
9795 Autotest to catch up.
9796 * tests/regression.at (Broken Closure): Adjust to the new table
9797 frames.
9798 Move to...
9799 * tests/sets.at: here.
9800
9801 2001-12-13 Akim Demaille <akim@epita.fr>
9802
9803 * src/closure.c (closure): Use nrules instead of playing tricks
9804 with BITS_PER_WORD.
9805
9806 2001-12-13 Akim Demaille <akim@epita.fr>
9807
9808 * src/print.c (print_actions): Output the handling of `$' as the
9809 traces do: shifting the token EOF. Before EOF was treated as a
9810 nonterminal.
9811 * tests/regression.at: Adjust some tests.
9812 * src/print_graph.c (print_core): Complete the set of items via
9813 closure. The next-to-final and final states are still unsatisfying,
9814 but that's to be addressed elsewhere.
9815 No longer output the rule numbers, but do output the state number.
9816 A single loop for the shifts + gotos is enough, but picked a
9817 distinct color for each.
9818 (print_graph): Initialize and finalize closure.
9819
9820 2001-12-13 Akim Demaille <akim@epita.fr>
9821
9822 * src/reader.c (readgram): Remove dead code, an strip useless
9823 braces.
9824 (get_type): Remove, unused.
9825
9826 2001-12-12 Akim Demaille <akim@epita.fr>
9827
9828 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
9829 on that of lib/error.c.
9830
9831 2001-12-12 Akim Demaille <akim@epita.fr>
9832
9833 Some hosts don't like `/' in includes.
9834
9835 * src/system.h: Include libgettext.h without qualifying the path.
9836 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
9837 $(top_srcdir).
9838
9839 2001-12-11 Marc Autret <autret_m@epita.fr>
9840
9841 * src/output.c (output_parser): Remove useless muscle.
9842
9843 2001-12-11 Marc Autret <autret_m@epita.fr>
9844
9845 * src/bison.simple: Remove #line just before %%epilogue. It
9846 is now handled in ...
9847 * src/reader.c (read_additionnal_code): Add the output of a
9848 #line for the epilogue.
9849
9850 2001-12-10 Marc Autret <autret_m@epita.fr>
9851
9852 * src/reader.c (copy_definition): Re-use CPP-outed code which
9853 replace precedent remove.
9854 * src/bison.simple: Remove #line before %%prologue because
9855 %%input-line is wrong at this time.
9856
9857 2001-12-10 Marc Autret <autret_m@epita.fr>
9858
9859 * src/reader.c (symbols_output): Clean up.
9860 * src/output.c (output_gram, output): Clean up.
9861
9862 2001-12-10 Akim Demaille <akim@epita.fr>
9863
9864 * src/lalr.c (initialize_lookaheads): New. Extracted from...
9865 * src/LR0.c (set_state_table): here.
9866 * src/lalr.c (lalr): Call it.
9867
9868 2001-12-10 Akim Demaille <akim@epita.fr>
9869
9870 * src/state.h (shifts): Remove the `number' member: shifts are
9871 attached to state, hence no longer need to be labelled with a
9872 state number.
9873
9874 2001-12-10 Akim Demaille <akim@epita.fr>
9875
9876 Now that states have a complete set of members, the linked list of
9877 shifts is useless: just fill directly the state's shifts member.
9878
9879 * src/state.h (shifts): Remove the `next' member.
9880 * src/LR0.c (first_state, last_state): Remove.
9881 Adjust the callers.
9882 (augment_automaton): Don't look for the shifts that must be added
9883 a shift on EOF: it is those of the state we looked for! But now,
9884 since shifts are attached, it is no longer needed to looking
9885 merely by its id: its number.
9886
9887 2001-12-10 Akim Demaille <akim@epita.fr>
9888
9889 * src/LR0.c (augment_automaton): Better variable locality.
9890 Remove an impossible branch: if there is a state corresponding to
9891 the start symbol being shifted, then there is shift for the start
9892 symbol from the initial state.
9893
9894 2001-12-10 Akim Demaille <akim@epita.fr>
9895
9896 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
9897 only when appropriate: when insert_start_shifting_state' is not
9898 invoked.
9899 * tests/regression.at (Rule Line Numbers): Adjust.
9900
9901 2001-12-10 Akim Demaille <akim@epita.fr>
9902
9903 * src/LR0.c (augment_automaton): Now that all states have shifts,
9904 merge the two cases addition shifts to the initial state.
9905
9906 2001-12-10 Akim Demaille <akim@epita.fr>
9907
9908 * src/lalr.c (set_state_table): Move to...
9909 * src/LR0.c: here.
9910 * src/lalr.c (lalr): Don't call it...
9911 * src/LR0.c (generate_states): do it.
9912 * src/LR0.h (first_state): Remove, only the table is used.
9913
9914 2001-12-10 Akim Demaille <akim@epita.fr>
9915
9916 * src/LR0.h (first_shift, first_reduction): Remove.
9917 * src/lalr.c: Don't use first_shift: find shifts through the
9918 states.
9919
9920 2001-12-10 Akim Demaille <akim@epita.fr>
9921
9922 * src/LR0.c: Attach shifts to states as soon as they are
9923 computed.
9924 * src/lalr.c (set_state_table): Instead of assigning shifts to
9925 state, just assert that the mapping was properly done.
9926
9927 2001-12-10 Akim Demaille <akim@epita.fr>
9928
9929 * src/LR0.c (insert_start_shift): Rename as...
9930 (insert_start_shifting_state): this.
9931 (insert_eof_shifting_state, insert_accepting_state): New.
9932 (augment_automaton): Adjust.
9933 Better locality of the variables.
9934 When looking if the start_symbol is shifted from the initial
9935 state, using `while (... symbol != start_symbol ...)' sounds
9936 better than `while (... symbol < start_symbol ...)': If fail
9937 to see how the order between symbols could be relevant!
9938
9939 2001-12-10 Akim Demaille <akim@epita.fr>
9940
9941 * src/getargs.h: Don't declare `spec_name_prefix' and
9942 `spec_file_prefix', declared by src/files.h.
9943 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
9944 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
9945 * src/output.c (prepare): Adjust.
9946 * src/reader.c (symbols_output): Likewise.
9947 * src/vmsgetargs.c: Vaguely adjust, but who cares?
9948
9949 2001-12-10 Akim Demaille <akim@epita.fr>
9950
9951 * src/muscle_tab.c (muscle_init): NULL is a better default than
9952 `"0"'.
9953
9954 2001-12-10 Akim Demaille <akim@epita.fr>
9955
9956 * src/reader.c (reader): Calling symbols_output once is enough.
9957
9958 2001-12-10 Akim Demaille <akim@epita.fr>
9959
9960 Now that states have a complete set of members, the linked list of
9961 reductions is useless: just fill directly the state's reductions
9962 member.
9963
9964 * src/state.h (struct reductions): Remove member `number' and
9965 `next'.
9966 * src/LR0.c (first_reduction, last_reduction): Remove.
9967 (save_reductions): Don't link the new reductions, store them in
9968 this_state.
9969 * src/lalr.c (set_state_table): No need to attach reductions to
9970 states, it's already done.
9971 * src/output.c (output_actions): No longer free the shifts, then
9972 the reductions, then the states: free all the states and their
9973 members.
9974
9975 2001-12-10 Akim Demaille <akim@epita.fr>
9976
9977 * src/options.c (OPTN, DRTV, BOTH): New.
9978 (option_table): Use them.
9979
9980 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
9981 the job of system.h.
9982 * src/options.c: Don't include stdio.h and xalloc.h for the same
9983 reasons.
9984
9985 2001-12-10 Akim Demaille <akim@epita.fr>
9986
9987 * src/output.c (output, prepare): Make sure the values of the
9988 muscles `action' and `prologue' are 0-terminated.
9989
9990 2001-12-10 Akim Demaille <akim@epita.fr>
9991
9992 Clean up GCC warnings.
9993
9994 * src/reader.c (copy_action): `buf' is not used.
9995 (parse_skel_decl): Be static.
9996 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
9997 * src/options.h (create_long_option_table): Have a real prototype.
9998 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
9999 (hash_delete_at): Return const void *.
10000 Adjust casts to preserve the const.
10001
10002 2001-12-10 Akim Demaille <akim@epita.fr>
10003
10004 * configure.in: Require 2.52g.
10005 M4 is not needed, but AUTOM4TE is.
10006 * m4/m4.m4: Remove.
10007 * tests/Makefile.am: Adjust.
10008
10009 2001-12-10 Akim Demaille <akim@epita.fr>
10010
10011 One structure for states is enough, even though theoretically
10012 there are LR(0) states and LALR(1) states.
10013
10014 * src/lalr.h (state_t): Remove.
10015 (state_table): Be state_t **, not state_t *.
10016 * src/state.h (core, CORE_ALLOC): Rename as...
10017 (state_t, STATE_ALLOC): this.
10018 Add the LALR(1) members: shifts, reductions, errs.
10019 * src/LR0.c (state_table): Rename as...
10020 (state_hash): this, to avoid name clashes with the global
10021 `state_table'.
10022 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
10023 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
10024
10025 2001-12-10 Akim Demaille <akim@epita.fr>
10026
10027 Bison dumps core on bash.y.
10028 Reported by Pascal Bart.
10029
10030 * src/warshall.c (bitmatrix_print): New.
10031 (TC): Use it.
10032 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
10033 j must be the outer loop.
10034 * tests/regression.at (Broken Closure): New.
10035
10036 2001-12-05 Akim Demaille <akim@epita.fr>
10037
10038 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
10039 its argument.
10040 Reported by Peter Hamorsky.
10041
10042 2001-12-05 Akim Demaille <akim@epita.fr>
10043
10044 * src/conflicts.c (err_table): Remove.
10045 (resolve_sr_conflict): Adjust.
10046 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
10047 Rename as...
10048 (state_t.reductions, state_t.shifts): this.
10049
10050 2001-12-05 Akim Demaille <akim@epita.fr>
10051
10052 * src/reduce.c (reduce_grammar_tables): No longer disable the
10053 removal of useless rules via CPP but via `if (0)', so that the
10054 compiler still check the code is valid.
10055 For instance, it should have noticed `rline' no longer exists: use
10056 the `line' member of rule_t.
10057 * src/gram.c (dummy, rline): Remove, unused.
10058
10059 2001-12-05 Akim Demaille <akim@epita.fr>
10060
10061 * src/output.c (pack_vector): Use assert, not berror.
10062 * src/main.c (berror): Remove, unused.
10063
10064 2001-12-05 Akim Demaille <akim@epita.fr>
10065
10066 New experimental feature: if --verbose --trace output all the
10067 items of a state, not only its kernel.
10068
10069 * src/print.c (print_core): If `trace_flag', then invoke closure
10070 before outputting the items of the state (print_core is no longer
10071 a correct name them).
10072 (print_results): Invoke new_closure/free_closure if needed.
10073
10074 2001-12-05 Akim Demaille <akim@epita.fr>
10075
10076 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
10077 * src/closure.c, src/closure.h (itemsetsize): Rename as...
10078 (nitemset): for consistency with the rest of the project.
10079
10080 2001-12-05 Akim Demaille <akim@epita.fr>
10081
10082 * src/closure.c (print_closure): Improve.
10083 (closure): Use it for printing input and output.
10084
10085 2001-12-05 Akim Demaille <akim@epita.fr>
10086
10087 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
10088 indexed by nonterminals.
10089
10090 2001-12-05 Akim Demaille <akim@epita.fr>
10091
10092 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
10093 what it was!).
10094 * src/warshall.h: Remove accidental duplication of the content.
10095
10096 2001-12-05 Akim Demaille <akim@epita.fr>
10097
10098 * src/closure.c (set_fderives): De-obfuscate.
10099
10100 2001-12-05 Akim Demaille <akim@epita.fr>
10101
10102 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
10103
10104 2001-12-05 Akim Demaille <akim@epita.fr>
10105
10106 * src/closure.c (set_firsts): De-obfuscate.
10107
10108 2001-12-05 Akim Demaille <akim@epita.fr>
10109
10110 * src/output.c (action_row): De-obfuscate
10111 using the good o' techniques: arrays not pointers, variable
10112 locality, BITISSET, RESETBIT etc.
10113
10114 2001-12-05 Akim Demaille <akim@epita.fr>
10115
10116 Pessimize the code to simplify it: from now on, all the states
10117 have a valid SHIFTS, which NSHIFTS is possibly 0.
10118
10119 * src/LR0.c (shifts_new): Be global and move to..
10120 * src/state.c, src/state.h: here.
10121 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
10122 * src/print_graph: Adjust.
10123
10124 2001-12-05 Akim Demaille <akim@epita.fr>
10125
10126 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
10127 * src/conflicts.c: Use it.
10128 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
10129 incorrectly ``simplified''.
10130
10131 2001-12-05 Akim Demaille <akim@epita.fr>
10132
10133 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
10134 using the good o' techniques: arrays not pointers, variable
10135 locality, BITISSET, RESETBIT etc.
10136
10137 2001-12-05 Akim Demaille <akim@epita.fr>
10138
10139 * src/state.h (SHIFT_SYMBOL): New.
10140 * src/conflicts.c: Use it to deobfuscate.
10141
10142 2001-12-05 Akim Demaille <akim@epita.fr>
10143
10144 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
10145 (print_reductions): De-obfuscate using the good o' techniques:
10146 arrays not pointers, variable locality, BITISSET.
10147
10148 2001-12-05 Akim Demaille <akim@epita.fr>
10149
10150 * src/conflicts.c (print_reductions): Arrays, not pointers.
10151 Use BITISSET.
10152
10153 2001-12-05 Akim Demaille <akim@epita.fr>
10154
10155 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10156
10157 2001-12-05 Akim Demaille <akim@epita.fr>
10158
10159 * src/conflicts.c (print_reductions): Improve variable locality.
10160
10161 2001-12-05 Akim Demaille <akim@epita.fr>
10162
10163 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10164
10165 2001-12-05 Akim Demaille <akim@epita.fr>
10166
10167 * src/conflicts.c (print_reductions): Improve variable locality.
10168
10169 2001-12-05 Akim Demaille <akim@epita.fr>
10170
10171 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
10172 * src/lalr.c: Use them.
10173
10174 2001-12-05 Akim Demaille <akim@epita.fr>
10175
10176 * src/LR0.c (augment_automaton): Formatting changes.
10177 Better variable locality.
10178
10179 2001-12-05 Akim Demaille <akim@epita.fr>
10180
10181 * src/lalr.c (matrix_print): New.
10182 (transpose): Use it.
10183 Use arrays instead of pointers.
10184
10185 2001-12-05 Akim Demaille <akim@epita.fr>
10186
10187 * src/lalr.c (maxrhs): Move to...
10188 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
10189 * src/lalr.c (build_relations): Adjust.
10190
10191 2001-12-05 Akim Demaille <akim@epita.fr>
10192
10193 * src/lalr.c (transpose): Free the memory allocated to the
10194 argument, as it is replaced by the results by the unique caller.
10195 (build_relations): Merely invoke transpose: it handles the memory
10196 deallocation.
10197 Improve variable locality.
10198 Avoid variables used as mere abbreviations.
10199 (compute_lookaheads): Use arrays instead of pointers.
10200
10201 2001-12-05 Akim Demaille <akim@epita.fr>
10202
10203 * src/lalr.c (initialize_F): Improve variable locality.
10204 Avoid variables used as mere abbreviations.
10205
10206 2001-12-05 Akim Demaille <akim@epita.fr>
10207
10208 * src/derives.c (print_derives): Display the ruleno.
10209 * src/lalr.c (initialize_F, transpose): Better variable locality
10210 to improve readability.
10211 Avoid variables used as mere abbreviations.
10212
10213 2001-12-05 Akim Demaille <akim@epita.fr>
10214
10215 * src/lalr.c (traverse): Use arrays instead of pointers.
10216
10217 2001-12-05 Akim Demaille <akim@epita.fr>
10218
10219 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
10220 the handling of squeue.
10221 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10222
10223 2001-12-05 Akim Demaille <akim@epita.fr>
10224
10225 Because useless nonterminals are now kept alive (instead of being
10226 `destroyed'), we now sometimes examine them, and store information
10227 related to them. Hence we need to know their number, and adjust
10228 memory allocations.
10229
10230 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
10231 static.
10232 * src/LR0.c (allocate_itemsets): The memory allocated to
10233 `symbol_count' was used for two different purpose: once to count
10234 the number of occurrences of each symbol, and later reassigned to
10235 `shift_symbol', containing the symbol that can be shifted from a
10236 given state.
10237 Deobfuscate, i.e., allocate, use and free `symbol_count' here
10238 only, and...
10239 (new_itemsets): Allocate `shift_symbol' here.
10240 (allocate_itemsets): symbol_count includes useless nonterminals.
10241 Make room for them.
10242 (free_storage): Use `free', not `XFREE', for pointers that cannot
10243 be null.
10244
10245 2001-12-05 Akim Demaille <akim@epita.fr>
10246
10247 * src/nullable.c (set_nullable): Deobfuscate the handling of
10248 ritem.
10249 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10250
10251 2001-12-05 Akim Demaille <akim@epita.fr>
10252
10253 * src/gram.c, src/gram.h (ritem_print): New.
10254 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
10255 (This useless function was defined only to work around VMS linkers
10256 that can't handle compilation units with variables only).
10257 * src/reduce.c (dump_grammar): Use it to trace the construction of
10258 ritem.
10259
10260 2001-12-04 Paul Eggert <eggert@twinsun.com>
10261
10262 * src/bison.simple (union yyalloc): Change member names
10263 to be the same as the stack names.
10264 (yyparse): yyptr is now union yyalloc *, not char *.
10265 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
10266 and may generate better code on some machines.
10267 (yystpcpy): Use prototype if __STDC__ is defined, not just
10268 if __cplusplus is defined.
10269
10270 2001-11-30 Akim Demaille <akim@epita.fr>
10271
10272 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
10273 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
10274 Gettext doesn't compile cleanly, and dies with -Werror.
10275 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
10276 Include WARNING_CFLAGS here.
10277 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
10278 before being defined.
10279
10280 2001-11-27 Paul Eggert <eggert@twinsun.com>
10281
10282 * lib/quotearg.h (quotearg_n, quotearg_n_style):
10283 First arg is int, not unsigned.
10284 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
10285 (SIZE_MAX, UINT_MAX): New macros.
10286 (quotearg_n_options): Abort if N is negative.
10287 Avoid overflow check on hosts where size_t is 64 bits and int
10288 is 32 bits, as overflow is impossible there.
10289 Fix off-by-one typo that caused unnecessary reallocation.
10290
10291 2001-11-29 Paul Eggert <eggert@twinsun.com>
10292
10293 Name space cleanup in generated parser.
10294
10295 * doc/bison.texinfo (Bison Parser): Discuss system headers
10296 and their effect on the user name space.
10297
10298 * src/bison.simple:
10299 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
10300 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
10301 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
10302
10303 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
10304 on user names when possible.
10305
10306 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
10307 Simplify test for whather <alloca.h> exists.
10308
10309 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
10310
10311 (<stdio.h>): Include if YYDEBUG.
10312
10313 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
10314 ! defined (yyoverflow) && ! defined (yymemcpy).
10315
10316 (yymemcpy, yyparse): Rename local variables as needed so that
10317 they all begin with 'yy'.
10318
10319 (yystrlen, yystpcpy): New functions.
10320
10321 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
10322 All uses changed.
10323
10324 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
10325 instead of relying on string.h functions. Use YYSTACK_ALLOC
10326 and YYSTACK_FREE instead of malloc and free.
10327
10328 2001-11-30 Akim Demaille <akim@epita.fr>
10329
10330 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
10331 before their first uses.
10332 (YYBISON, YYPURE): Move to the top of the output.
10333
10334 2001-11-30 Akim Demaille <akim@epita.fr>
10335
10336 * tests/reduce.at (Useless Nonterminals): Fix.
10337
10338 2001-11-30 Akim Demaille <akim@epita.fr>
10339
10340 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
10341 if body instead of `;' to pacify GCC's warnings.
10342
10343 2001-11-30 Akim Demaille <akim@epita.fr>
10344
10345 Instead of mapping the LHS of unused rules to -1, keep the LHS
10346 valid, but flag the rules as invalid.
10347
10348 * src/gram.h (rule_t): `useful' is a new member.
10349 * src/print.c (print_grammar): Adjust.
10350 * src/derives.c (set_derives): Likewise.
10351 * src/reader.c (packgram, reduce_output): Likewise.
10352 * src/reduce.c (reduce_grammar_tables): Likewise.
10353 * tests/reduce.at (Underivable Rules, Useless Rules): New.
10354
10355 2001-11-30 Akim Demaille <akim@epita.fr>
10356
10357 * src/reduce.c (reduce_output): Formatting changes.
10358 * src/print.c (print_results, print_grammar): Likewise.
10359 * tests/regression.at (Rule Line Numbers)
10360 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
10361
10362 2001-11-30 Akim Demaille <akim@epita.fr>
10363
10364 * src/reduce.c (nonterminals_reduce): Instead of throwing away
10365 useless nonterminals, move them at the end of the symbol arrays.
10366 (reduce_output): Adjust.
10367 * tests/reduce.at (Useless Nonterminals): Adjust.
10368
10369 2001-11-30 Akim Demaille <akim@epita.fr>
10370
10371 * src/reduce.c: Various comment/formatting changes.
10372 (nonterminals_reduce): New, extracted from...
10373 (reduce_grammar_tables): here.
10374 (reduce_grammar): Call nonterminals_reduce.
10375
10376 2001-11-29 Paul Eggert <eggert@twinsun.com>
10377
10378 * src/bison.simple (YYSTACK_REALLOC): Remove.
10379 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
10380 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
10381 New macros.
10382 (union yyalloc): New type.
10383 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
10384 an arbitrary restriction on hosts where size_t is wider than int.
10385
10386 (yyparse): Don't dump core if alloca or malloc fails; instead, report
10387 a parser stack overflow. Allocate just one block of memory for all
10388 three stacks, instead of allocating three blocks; this typically is
10389 faster and reduces fragmentation.
10390
10391 Do not limit the number of items in the stack to a value that fits
10392 in 'int', as this is an arbitrary limit on hosts with 64-bit
10393 size_t and 32-bit int.
10394
10395 2001-11-29 Marc Autret <autret_m@epita.fr>
10396
10397 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
10398 of defining YYERROR_VERBOSE.
10399 [AT_DATA]: $4 is now out of C declarations in the prologue.
10400
10401 2001-11-28 Marc Autret <autret_m@epita.fr>
10402
10403 * src/reader.c (parse_dquoted_param): New.
10404 (parse_skel_decl): Use it.
10405 * src/lex.h: Add its prototype.
10406 * src/lex.c (literalchar): Become not static.
10407
10408 2001-11-28 Marc Autret <autret_m@epita.fr>
10409
10410 * src/output.h: And put its extern declaration here.
10411 * src/output.c (error_verbose): Define here.
10412 (prepare): Echo name modification.
10413 * src/getargs.h: Clean its extern declaration.
10414 * src/getargs.c (error_verbose_flag): Remove.
10415 (getargs): Remove case 'e'.
10416 * src/options.c (option_table): 'error-verbose' is now seen as simple
10417 percent option.
10418 Include output.h.
10419
10420 * src/reader.c (read_declarations): Remove case tok_include.
10421 (parse_include_decl): Remove.
10422 * src/lex.h (token_t): Remove tok_include.
10423 * src/options.c (option_table): 'include' is now a simple command line
10424 option.
10425
10426 2001-11-28 Marc Autret <autret_m@epita.fr>
10427
10428 * src/bison.simple: Adjust muscle names.
10429 * src/muscle_tab.c (muscle_init): Also rename the muscles.
10430 * src/output.c (prepare): s/_/-/ for the muscles names.
10431 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
10432
10433 2001-11-28 Marc Autret <autret_m@epita.fr>
10434
10435 * src/bison.simple: Fix debug.
10436 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
10437
10438 2001-11-28 Akim Demaille <akim@epita.fr>
10439
10440 * src/LR0.c (shifts_new): New.
10441 (save_shifts, insert_start_shift, augment_automaton): Use it.
10442
10443 2001-11-28 Akim Demaille <akim@epita.fr>
10444
10445 * src/closure.c (closure): `b' and `ruleno' denote the same value:
10446 keep ruleno only.
10447
10448 2001-11-28 Akim Demaille <akim@epita.fr>
10449
10450 * src/closure.c (closure): Instead of looping over word in array
10451 then bits in words, loop over bits in array.
10452
10453 2001-11-28 Akim Demaille <akim@epita.fr>
10454
10455 * src/closure.c (closure): No longer optimize the special case
10456 where all the bits of `ruleset[r]' are set to 0, to make the code
10457 clearer.
10458
10459 2001-11-28 Akim Demaille <akim@epita.fr>
10460
10461 * src/closure.c (closure): `r' and `c' are new variables, used to
10462 de-obfuscate accesses to RULESET and CORE.
10463
10464 2001-11-28 Akim Demaille <akim@epita.fr>
10465
10466 * src/reduce.c (reduce_print): Use ngettext.
10467 (dump_grammar): Improve the trace accuracy.
10468
10469 2001-11-28 Akim Demaille <akim@epita.fr>
10470
10471 * src/reduce.c (dump_grammar): Don't translate trace messages.
10472
10473 2001-11-28 Akim Demaille <akim@epita.fr>
10474
10475 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
10476 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
10477 as all tags are free'ed afterwards.
10478 From Enrico Scholz.
10479
10480 2001-11-27 Paul Eggert <eggert@twinsun.com>
10481
10482 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
10483 use alloca when we didn't want to, and vice versa.
10484
10485 2001-11-27 Marc Autret <autret_m@epita.fr>
10486
10487 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
10488 initialization.
10489 * src/output.c (prepare): Remove its update.
10490
10491 2001-11-27 Marc Autret <autret_m@epita.fr>
10492
10493 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
10494 Use %error-verbose.
10495
10496 2001-11-27 Marc Autret <autret_m@epita.fr>
10497
10498 * src/bison.simple: Remove YYERROR_VERBOSE using.
10499 Use %%error_verbose.
10500 (yyparse): Likewise.
10501 * src/output.c (prepare): Give its final value.
10502 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
10503 * src/getargs.h: Add its extern declaration.
10504 * src/getargs.c (error_verbose_flag): New int.
10505 (getargs): Update to catch new case.
10506 * src/options.c (option_table): 'error-verbose' is a new option.
10507 (shortopts): Update.
10508
10509 2001-11-27 Akim Demaille <akim@epita.fr>
10510
10511 * src/system.h: Use intl/libgettext.h.
10512 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
10513
10514 2001-11-27 Akim Demaille <akim@epita.fr>
10515
10516 * tests/torture.at (Exploding the Stack Size with Malloc):
10517 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
10518
10519 2001-11-27 Akim Demaille <akim@epita.fr>
10520
10521 * src/files.c: Include error.h.
10522 Reported by Hans Aberg.
10523
10524 2001-11-26 Marc Autret <autret_m@epita.fr>
10525
10526 * src/reader.c (parse_include_decl): New, not yet implemented.
10527 (read_declarations): Add case tok_include.
10528 * src/getargs.h (include): Add its extern definition.
10529 * src/getargs.c (include): New const char *.
10530 (getargs): Add case '-I'.
10531 * src/options.c (option_table): Add include as command line and
10532 percent option.
10533 * src/lex.h (token_t): Add tok_include.
10534
10535 2001-11-26 Akim Demaille <akim@epita.fr>
10536
10537 * src/reader.c (readgram): Make sure rules for mid-rule actions
10538 have a lineno equal to that of their host rule.
10539 Reported by Hans Aberg.
10540 * tests/regression.at (Rule Line Numbers): New.
10541
10542 2001-11-26 Akim Demaille <akim@epita.fr>
10543
10544 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
10545 size_ts.
10546
10547 2001-11-26 Akim Demaille <akim@epita.fr>
10548
10549 * src/complain.c, src/complain.h (error): Remove, provided by
10550 lib/error.[ch].
10551
10552 2001-11-26 Akim Demaille <akim@epita.fr>
10553
10554 * src/reader.c (read_declarations): Don't abort on tok_illegal,
10555 issue an error message.
10556 * tests/regression.at (Invalid %directive): New.
10557 Reported by Hans Aberg.
10558
10559 2001-11-26 Akim Demaille <akim@epita.fr>
10560
10561 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
10562 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
10563
10564 2001-11-26 Akim Demaille <akim@epita.fr>
10565
10566 * src/conflicts.c (conflicts_print): Don't complain at all when
10567 there are no reduce/reduce conflicts, and as many shift/reduce
10568 conflicts as expected.
10569 * tests/regression.at (%expect right): Adjust.
10570
10571 2001-11-23 Akim Demaille <akim@epita.fr>
10572
10573 * lib/alloca.c: Update, from fileutils.
10574
10575 2001-11-23 Akim Demaille <akim@epita.fr>
10576
10577 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
10578
10579 2001-11-23 Akim Demaille <akim@epita.fr>
10580
10581 * src/system.h: Include alloca.h.
10582 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
10583
10584 2001-11-23 Akim Demaille <akim@epita.fr>
10585
10586 * src/print_graph.c (print_actions): Remove `rule', unused.
10587 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
10588 pacify GCC's signed < unsigned warnings.
10589 * src/closure.c (itemsetsize): Likewise.
10590 * src/reader.c (symbol_list_new): Static.
10591
10592 2001-11-23 Akim Demaille <akim@epita.fr>
10593
10594 Attaching lineno to buckets is stupid, since only one copy of each
10595 symbol is kept, only the line of the first occurrence is kept too.
10596
10597 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
10598 * src/reader.c (rline_allocated): Remove, unused.
10599 (symbol_list): Have a `line' member.
10600 (symbol_list_new): New.
10601 (readgram): Use it.
10602 * src/print.c (print_grammar): Output the rule line numbers.
10603 * tests/regression.at (Solved SR Conflicts)
10604 (Unresolved SR Conflicts): Adjust.
10605 Reported by Hans Aberg.
10606
10607 2001-11-22 Marc Autret <autret_m@epita.fr>
10608
10609 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
10610
10611 2001-11-22 Marc Autret <autret_m@epita.fr>
10612
10613 * src/muscle_tab.c (muscle_init): Remove initialization of
10614 skeleton muscle.
10615 * src/output.c (output_master_parser): Do it here.
10616
10617 2001-11-20 Akim Demaille <akim@epita.fr>
10618
10619 * po/sv.po: New.
10620 * configure.in (ALL_LINGUAS): Adjust.
10621 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
10622 longer contains strings to translate.
10623
10624 2001-11-19 Akim Demaille <akim@epita.fr>
10625
10626 * src/conflicts.c (conflicts_print): Add a missing \n.
10627
10628 2001-11-19 Akim Demaille <akim@epita.fr>
10629
10630 * src/nullable.c (nullable_print): New.
10631 (set_nullable): Call it when tracing.
10632 Better locality of variables.
10633
10634 2001-11-19 Akim Demaille <akim@epita.fr>
10635
10636 * src/print.c (print_actions): Better locality of variables.
10637
10638 2001-11-19 Akim Demaille <akim@epita.fr>
10639
10640 * src/derives.c (print_derives): Fix and enrich.
10641 * src/closure.c (print_fderives): Likewise.
10642
10643 2001-11-19 Akim Demaille <akim@epita.fr>
10644
10645 * src/closure.c (itemsetend): Remove, replaced with...
10646 (itemsetsize): new.
10647
10648 2001-11-19 Akim Demaille <akim@epita.fr>
10649
10650 * src/LR0.c (kernel_end): Remove, replaced with...
10651 (kernel_size): new.
10652
10653 2001-11-19 Akim Demaille <akim@epita.fr>
10654
10655 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
10656 to clarify.
10657
10658 2001-11-19 Akim Demaille <akim@epita.fr>
10659
10660 * src/closure.c (closure): Use arrays instead of pointers to clarify.
10661
10662 2001-11-19 Akim Demaille <akim@epita.fr>
10663
10664 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
10665 trace messages.
10666 * src/LR0.c: Likewise.
10667 (allocate_itemsets): Use arrays instead of pointers to clarify.
10668
10669 2001-11-19 Akim Demaille <akim@epita.fr>
10670
10671 * src/getargs.c (statistics_flag): Replace with...
10672 (trace_flag): New.
10673 (longopts): Accept --trace instead of --statistics.
10674 * src/getargs.h, src/options.c: Adjust.
10675 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
10676 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
10677
10678 2001-11-19 Akim Demaille <akim@epita.fr>
10679
10680 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
10681 pointers to clarify the code.
10682 (save_reductions, save_shifts): Factor common parts of alternatives.
10683
10684 2001-11-19 Akim Demaille <akim@epita.fr>
10685
10686 * src/LR0.c (new_state, get_state): Complete TRACE code.
10687 * src/closure.c: Include `reader.h' to get `tags', needed by the
10688 trace code.
10689 Rename the conditional DEBUG as TRACE.
10690 Output consistently TRACEs to stderr, not stdout.
10691 * src/derives.c: Likewise.
10692 * src/reduce.c: (inaccessable_symbols): Using if is better style
10693 than goto.
10694 Use `#if TRACE' instead of `#if 0' for tracing code.
10695
10696 2001-11-19 Akim Demaille <akim@epita.fr>
10697
10698 * src/system.h (LIST_FREE, shortcpy): New.
10699 * src/LR0.c: Use them.
10700 * src/output.c (free_itemsets, free_reductions, free_shifts):
10701 Remove, replaced by LIST_FREE.
10702
10703 2001-11-19 Akim Demaille <akim@epita.fr>
10704
10705 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
10706 (REDUCTIONS_ALLOC): New.
10707 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
10708 allocation.
10709
10710 2001-11-19 Akim Demaille <akim@epita.fr>
10711
10712 * src/LR0.c (new_state): Complete trace code.
10713 * src/nullable.c (set_nullable): Don't translate traces.
10714
10715 2001-11-19 Akim Demaille <akim@epita.fr>
10716
10717 * src/print_graph.c (print_core): Better locality of variables.
10718 * src/print.c (print_core): Likewise.
10719
10720 2001-11-19 Akim Demaille <akim@epita.fr>
10721
10722 * src/vcg.c: You do the output, so you are responsible of the
10723 handling of VCG syntax, in particular: use quotearg.
10724 * src/print_graph.c: Don't.
10725 (print_actions): Don't output the actions as part of the nodes,
10726 since that's the job of the edges.
10727 (print_state): Don't output by hand: fill the node description,
10728 and ask for its output.
10729
10730 2001-11-19 Akim Demaille <akim@epita.fr>
10731
10732 * src/bison.simple (yyparse): When verbosely reporting an error,
10733 no longer put additional quotes around token names.
10734 * tests/calc.at: Adjust.
10735
10736 2001-11-19 Akim Demaille <akim@epita.fr>
10737
10738 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
10739 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
10740 * src/output.c: Adjust.
10741
10742 2001-11-19 Akim Demaille <akim@epita.fr>
10743
10744 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
10745 (rule_t): this.
10746 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
10747
10748 2001-11-19 Akim Demaille <akim@epita.fr>
10749
10750 * src/gram.h (rule_t): New.
10751 (rule_table): New.
10752 (rrhs, rlhs): Remove, part of state_t.
10753 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
10754 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
10755 * src/reader.c, src/reduce.c: Adjust.
10756
10757 2001-11-19 Akim Demaille <akim@epita.fr>
10758
10759 * src/reader.c (symbols_output): New, extracted from...
10760 (packsymbols): Here.
10761 (reader): Call it.
10762
10763 2001-11-19 Akim Demaille <akim@epita.fr>
10764
10765 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
10766 (maxrhs): this new function.
10767
10768 2001-11-19 Akim Demaille <akim@epita.fr>
10769
10770 * src/lalr.c (F): New macro to access the variable F.
10771 Adjust.
10772
10773 2001-11-19 Akim Demaille <akim@epita.fr>
10774
10775 * src/lalr.h (LA): New macro to access the variable LA.
10776 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10777 * src/lalr.c: Adjust.
10778
10779 2001-11-19 Akim Demaille <akim@epita.fr>
10780
10781 * src/lalr.c (initialize_LA): Only initialize LA. Let...
10782 (set_state_table): handle the `lookaheads' members.
10783
10784 2001-11-19 Akim Demaille <akim@epita.fr>
10785
10786 * src/lalr.h (lookaheads): Removed array, whose contents is now
10787 a member of...
10788 (state_t): this structure.
10789 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10790 Adjust.
10791
10792 2001-11-19 Akim Demaille <akim@epita.fr>
10793
10794 * src/lalr.h (consistent): Removed array, whose contents is now
10795 a member of...
10796 (state_t): this structure.
10797 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10798 Adjust.
10799
10800 2001-11-19 Akim Demaille <akim@epita.fr>
10801
10802 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
10803 contents are now members of...
10804 (state_t): this structure.
10805 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10806 Adjust.
10807
10808 2001-11-19 Akim Demaille <akim@epita.fr>
10809
10810 * src/lalr.h (state_t): New.
10811 (state_table): Be a state_t * instead of a core **.
10812 (accessing_symbol): Remove, part of state_t.
10813 * src/lalr.c: Adjust.
10814 (set_accessing_symbol): Merge into...
10815 (set_state_table): this.
10816 * src/print_graph.c, src/conflicts.c: Adjust.
10817
10818 2001-11-14 Akim Demaille <akim@epita.fr>
10819
10820 * tests/calc.at, tests/output.at, tests/regression.at,
10821 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
10822 now the tests are run in private dirs, therefore AC_CLEANUP and
10823 family can be simplified to 0-ary.
10824 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
10825 use abs. path to find config.h.
10826 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
10827 stderr, there can be way too much random noise.
10828 Instead pass -Werror to GCC and rely on the exit status.
10829 Reported by Wolfram Wagner.
10830
10831 2001-11-14 Akim Demaille <akim@epita.fr>
10832
10833 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
10834 defined only if yyoverflow is defined, to avoid `warning: unused
10835 variable `yyvs1''.
10836 Reported by The Test Suite.
10837
10838 2001-11-14 Akim Demaille <akim@epita.fr>
10839
10840 * src/print.c: Include reduce.h.
10841 Reported by Hans Aberg.
10842
10843 2001-11-14 Akim Demaille <akim@epita.fr>
10844
10845 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
10846 Revert a previous patch: these are really const.
10847 * src/conflicts.c (conflict_report): Additional useless pair of
10848 braces to pacify GCC's warnings for `if () if () {} else {}'.
10849 * src/lex.c (parse_percent_token): Replace equal_offset with
10850 arg_offset.
10851 arg is const.
10852 Be sure to strdup `arg' when used, since there is no reason for
10853 token_buffer not to change.
10854
10855 2001-11-14 Akim Demaille <akim@epita.fr>
10856
10857 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
10858 definition.
10859 * src/main.c (main): Use them.
10860 Suggested by Hans Aberg.
10861
10862 2001-11-12 Akim Demaille <akim@epita.fr>
10863
10864 * src/system.h (ngettext): Now that we use ngettext, be sure to
10865 provide a default definition when NLS are not used.
10866
10867 2001-11-12 Akim Demaille <akim@epita.fr>
10868
10869 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
10870 Use @kbd to denote user input.
10871 (Language and Grammar): ANSIfy the example.
10872 Adjust its layout for info/notinfo.
10873 (Location Tracking Calc): Output error messages to stderr.
10874 Output locations in a more GNUtically correct way.
10875 Fix a couple of Englishos.
10876 Adjust @group/@end group pairs.
10877
10878 2001-11-12 Akim Demaille <akim@epita.fr>
10879
10880 %expect was not functioning at all.
10881
10882 * src/conflicts.c (expected_conflicts): Set to -1.
10883 (conflict_report): Use ngettext.
10884 (conflicts_print): Check %expect and make its violation an error.
10885 * doc/bison.texinfo (Expect Decl): Adjust.
10886 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
10887 * tests/regression.at (%expect not enough, %expect right)
10888 (%expect too much): New.
10889
10890 2001-11-12 Akim Demaille <akim@epita.fr>
10891
10892 * tests/regression.at (Conflicts): Rename as...
10893 (Unresolved SR Conflicts): this.
10894 (Solved SR Conflicts): New.
10895
10896 2001-11-12 Akim Demaille <akim@epita.fr>
10897
10898 * src/reduce.c (print_results): Rename as...
10899 (reduce_output): This.
10900 Output to OUT, passed as argument, instead of output_obstack.
10901 (dump_grammar): Likewise.
10902 (reduce_free): New.
10903 Also free V1.
10904 (reduce_grammar): No longer call reduce_output, since...
10905 * src/print.c (print_results): do it.
10906 * src/main.c (main): Call reduce_free;
10907
10908 2001-11-12 Akim Demaille <akim@epita.fr>
10909
10910 * src/conflicts.c (print_reductions): Accept OUT as argument.
10911 Output to it, not to output_obstack.
10912 * src/print.c (print_actions): Adjust.
10913
10914 2001-11-12 Akim Demaille <akim@epita.fr>
10915
10916 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
10917 the result instead of using...
10918 (src_total, rrc_total, src_count, rrc_count): Remove.
10919 (any_conflicts): Remove.
10920 (print_conflicts): Split into...
10921 (conflicts_print, conflicts_output): New.
10922 * src/conflicts.h: Adjust.
10923 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
10924 * src/print.c (print_grammar): Issue `\n' between two rules.
10925 * tests/regression.at (Conflicts): New.
10926 Reported by Tom Lane.
10927
10928 2001-11-12 Akim Demaille <akim@epita.fr>
10929
10930 * tests/regression.at (Invalid input): Remove, duplicate with
10931 ``Invalid input: 1''.
10932
10933 2001-11-12 Akim Demaille <akim@epita.fr>
10934
10935 * tests/torture.at (AT_DATA_STACK_TORTURE)
10936 (Exploding the Stack Size with Alloca)
10937 (Exploding the Stack Size with Malloc): New.
10938
10939 2001-11-12 Akim Demaille <akim@epita.fr>
10940
10941 * src/bison.simple (YYSTACK_REALLOC): New.
10942 (yyparse) [!yyoverflow]: Use it and free the old stack.
10943 Reported by Per Allansson.
10944
10945 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
10946
10947 * src/bison.simple: Define type yystype instead of YYSTYPE, and
10948 define CPP macro, which substitute YYSTYPE by yystype.
10949 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
10950 with yyltype/YYLTYPE. This allows inclusion of the generated
10951 header within the parser if the compiler, such as GGC, accepts
10952 multiple equivalent #defines.
10953 From Akim.
10954
10955 2001-11-05 Akim Demaille <akim@epita.fr>
10956
10957 * src/reader.c (symbols_output): New, extracted from...
10958 (packsymbols): here.
10959 (reader): Adjust.
10960
10961 2001-11-05 Akim Demaille <akim@epita.fr>
10962
10963 * src/lex.c (parse_percent_token): s/quotearg/quote/.
10964
10965 2001-11-05 Akim Demaille <akim@epita.fr>
10966
10967 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
10968 pattern.
10969
10970 2001-11-05 Akim Demaille <akim@epita.fr>
10971
10972 * src/options.h (struct option_table_struct): set_flags is void*.
10973 * src/options.c (longopts): Support `--output' and `%output'.
10974 (usage): Adjust.
10975 * src/lex.h (tok_setopt): Remove, replaced with...
10976 (tok_intopt, tok_stropt): these new guys.
10977 * src/lex.c (getopt.h): Not needed.
10978 (token_buffer, unlexed_token_buffer): Not const.
10979 (percent_table): Promote `-' over `_' in directive names.
10980 Active `%name-prefix', `file-prefix', and `output'.
10981 (parse_percent_token): Accept possible arguments to directives.
10982 Promote `-' over `_' in directive names.
10983
10984 2001-11-04 Akim Demaille <akim@epita.fr>
10985
10986 * doc/bison.texinfo (Decl Summary): Split the list into
10987 `directives for grammars' and `directives for bison'.
10988 Sort'em.
10989 Add description of `%name-prefix', `file-prefix', and `output'.
10990 Promote `-' over `_' in directive names.
10991 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
10992 Simplify the description of `--name-prefix'.
10993 Promote `-' over `_' in directive names.
10994 Promote `--output' over `--output-file'.
10995 Fix the description of `--defines'.
10996 * tests/output.at: Exercise %file-prefix and %output.
10997
10998 2001-11-02 Akim Demaille <akim@epita.fr>
10999
11000 * doc/refcard.tex: Update.
11001
11002 2001-11-02 Akim Demaille <akim@epita.fr>
11003
11004 * src/symtab.h (SUNDEF): New.
11005 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
11006 stand for `uninitialized', instead of 0.
11007 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
11008 * src/lex.c (lex): Adjust.
11009
11010 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
11011 Number it 0.
11012 Let yylex return it instead of a plain 0.
11013 Reported by Dick Streefland.
11014
11015 2001-11-02 Akim Demaille <akim@epita.fr>
11016
11017 * tests/regression.at (Mixing %token styles): New test.
11018
11019 2001-11-02 Akim Demaille <akim@epita.fr>
11020
11021 * src/reader.c (parse_thong_decl): Formatting changes.
11022 (token_translations_init): New, extracted from...
11023 (packsymbols): Here.
11024 Adjust.
11025
11026 2001-11-01 Akim Demaille <akim@epita.fr>
11027
11028 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
11029 Check that `9foo.y' produces correct cpp guards.
11030 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
11031 guards.
11032 Reported by Wwp.
11033
11034 2001-11-01 Akim Demaille <akim@epita.fr>
11035
11036 * tests/regression.at (Invalid input: 2): New.
11037 * src/lex.c (unlexed_token_buffer): New.
11038 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
11039 too.
11040 Reported by Wwp.
11041
11042 2001-11-01 Akim Demaille <akim@epita.fr>
11043
11044 * tests/calc.at: Catch up with 1.30.
11045 * configure.in: Bump to 1.49a.
11046 Adjust to newer Autotest.
11047
11048 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
11049
11050 * src/conflicts.c: Move global variables rrc_total and src_total ...
11051 (print_conflicts): here.
11052 * src/output.c (output): Free global variable user_toknums.
11053 * src/lex.c (token_obstack): Become static.
11054
11055 2001-10-18 Akim Demaille <akim@epita.fr>
11056
11057 * tests/atlocal.in (GCC): Add.
11058 * tests/calc.at: s/m4_match/m4_bmatch/.
11059 s/m4_patsubst/m4_bpatsubst/.
11060 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
11061 * configure.in: AC_SUBST(GCC).
11062
11063 2001-10-14 Marc Autret <autret_m@epita.fr>
11064
11065 * src/options.c (create_long_option_table): Fix.
11066
11067 2001-10-10 Akim Demaille <akim@epita.fr>
11068
11069 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
11070
11071 2001-10-04 Akim Demaille <akim@epita.fr>
11072
11073 * src/reader.c (parse_union_decl): Push the caracters in
11074 union_obstack, not attrs_obstack.
11075
11076 2001-10-04 Akim Demaille <akim@epita.fr>
11077
11078 Merge in the branch 1.29.
11079
11080 * src/reader.c (packsymbols): Use a temporary obstack for
11081 `%%tokendef', since output_stack is already used elsewhere.
11082
11083 2001-10-02 Akim Demaille <akim@epita.fr>
11084
11085 Bump 1.29d.
11086
11087 2001-10-02 Akim Demaille <akim@epita.fr>
11088
11089 Version 1.29c.
11090
11091 2001-10-02 Akim Demaille <akim@epita.fr>
11092
11093 * tests/regression.at (Invalid CPP headers): New.
11094 From Alexander Belopolsky.
11095 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
11096
11097 2001-10-02 Akim Demaille <akim@epita.fr>
11098
11099 * tests/regression.at (Invalid input): New.
11100 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
11101 Reported by Shura.
11102
11103 2001-10-02 Akim Demaille <akim@epita.fr>
11104
11105 * tests/calc.at: Now that --debug works, the tests must be adjusted.
11106
11107 2001-10-02 Akim Demaille <akim@epita.fr>
11108
11109 * src/output.c (output_parser): Assert `skeleton'.
11110 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
11111 systems.
11112 From Shura.
11113
11114 2001-10-01 Marc Autret <autret_m@epita.fr>
11115
11116 * src/lex.h: Echo modifications.
11117 * src/lex.c (unlex): Parameter is now token_t.
11118 From Hans Aberg.
11119
11120 2001-10-01 Marc Autret <autret_m@epita.fr>
11121
11122 * src/main.c: Include lex.h.
11123 From Hans Aberg.
11124
11125 2001-09-29 Akim Demaille <akim@epita.fr>
11126
11127 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
11128
11129 2001-09-28 Akim Demaille <akim@epita.fr>
11130
11131 * tests/testsuite.at: Update to newer Autotest.
11132 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
11133
11134 2001-09-27 Akim Demaille <akim@epita.fr>
11135
11136 Position independent wrapper.
11137
11138 * tests/bison: Remove.
11139 * tests/bison.in: New.
11140 * configure.in: Adjust.
11141
11142 2001-09-27 Paul Eggert <eggert@twinsun.com>
11143
11144 Port quotearg fixes from tar 1.13.24.
11145
11146 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
11147 tm to be declared.
11148 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
11149 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
11150
11151 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
11152 * m4/mbrtowc.m4: New file.
11153 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
11154 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
11155
11156 2001-09-27 Akim Demaille <akim@epita.fr>
11157
11158 Bump to 1.29c.
11159
11160 2001-09-27 Akim Demaille <akim@epita.fr>
11161
11162 Version 1.29b.
11163
11164 2001-09-25 Akim Demaille <akim@epita.fr>
11165
11166 * src/system.h: Include `xalloc.h'.
11167 Remove it from the C files.
11168 * src/files.c (output_files): Free the obstacks.
11169 * src/lex.c (init_lex): Rename as...
11170 (lex_init): this.
11171 (lex_free): New.
11172 * src/main.c (main): Use it.
11173
11174 2001-09-24 Marc Autret <autret_m@epita.fr>
11175
11176 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
11177 to output informations in fout (FILE*).
11178 (open_graph, close_graph): Likewise.
11179 (output_graph, output_edge, output_node): Likewise.
11180 * src/vcg.h: Update function prototypes.
11181 * src/print_graph.c (print_graph): Open output graph file.
11182 (print_actions): Adjust.
11183 * src/files.h: Remove extern declaration.
11184 * src/files.c: Remove graph_obstack declaration.
11185 (open_files): Remove graph_obstack initialization.
11186 (output_files): Remove graph_obstack saving.
11187
11188 2001-09-24 Marc Autret <autret_m@epita.fr>
11189
11190 * src/files.c (compute_output_file_names): Fix.
11191
11192 2001-09-24 Marc Autret <autret_m@epita.fr>,
11193 Akim Demaille <akim@epita.fr>
11194
11195 * src/reader.c (reader): Remove call to free_symtab ().
11196 * src/main.c (main): Call it here.
11197 Include symtab.h.
11198 * src/conflicts.c (initialize_conflicts): Rename as...
11199 (solve_conflicts): this.
11200 * src/print.c (print_core, print_actions, print_state)
11201 (print_grammar): Dump to a file instead a `output_obstack'.
11202 (print_results): Dump `output_obstack', and then proceed with the
11203 FILE *.
11204 * src/files.c (compute_output_file_names, close_files): New.
11205 (output_files): Adjust.
11206 * src/main.c (main): Adjust.
11207
11208 2001-09-23 Marc Autret <autret_m@epita.fr>
11209
11210 * src/files.c (compute_header_macro): Computes header macro name
11211 from spec_defines_file when given.
11212
11213 2001-09-23 Marc Autret <autret_m@epita.fr>
11214
11215 * src/files.c (output_files): Add default extensions.
11216
11217 2001-09-22 Akim Demaille <akim@epita.fr>
11218
11219 * src/conflicts.c (finalize_conflicts): Rename as...
11220 (free_conflicts): this.
11221
11222 2001-09-22 Akim Demaille <akim@epita.fr>
11223
11224 * src/gram.c (gram_free): Rename back as...
11225 (dummy): this.
11226 (output_token_translations): Free `token_translations'.
11227 * src/symtab.c (free_symtab): Free the tag field.
11228
11229 2001-09-22 Akim Demaille <akim@epita.fr>
11230
11231 Remove `translations' as it is always set to true.
11232
11233 * src/gram.h: Adjust.
11234 * src/reader.c (packsymbols, parse_token_decl): Adjust
11235 * src/print.c (print_grammar): Adjust.
11236 * src/output.c (output_token_translations): Adjust.
11237 * src/lex.c (lex): Adjust.
11238 * src/gram.c: Be sure the set pointers to NULL.
11239 (dummy): Rename as...
11240 (gram_free): this.
11241
11242 2001-09-22 Akim Demaille <akim@epita.fr>
11243
11244 * configure.in: Invoke AM_LIB_DMALLOC.
11245 * src/system.h: Use dmalloc.
11246 * src/LR0.c: Be sure to have pointers initialized to NULL.
11247 (allocate_itemsets): Allocate kernel_items only if needed.
11248
11249 2001-09-22 Akim Demaille <akim@epita.fr>
11250
11251 * configure.in: Bump to 1.29b.
11252 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
11253 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
11254 need xmalloc.c in calc.y.
11255 From Pascal Bart.
11256
11257 2001-09-21 Akim Demaille <akim@epita.fr>
11258
11259 Version 1.29a.
11260 * Makefile.maint, config/config.guess, config/config.sub,
11261 * config/missing: Update from masters.
11262 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
11263 upon package.m4.
11264 * configure.in (ALL_LINGUAS): Add `tr'.
11265
11266 2001-09-21 Akim Demaille <akim@epita.fr>
11267
11268 * tests/Makefile.am (package.m4): Move to...
11269 ($(srcdir)/$(TESTSUITE)): here.
11270
11271 2001-09-20 Akim Demaille <akim@epita.fr>
11272
11273 * src/complain.c: No longer try to be standalone: use system.h.
11274 Don't assume __STDC__ is defined to 1. Just test if it is defined.
11275 * src/complain.h: Likewise.
11276 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
11277 Remove the unused variable `n'.
11278 From Albert Chin-A-Young.
11279
11280 2001-09-18 Marc Autret <autret_m@epita.fr>
11281
11282 * doc/bison.1: Update.
11283 * doc/bison.texinfo (Bison Options): Update --defines and --graph
11284 descriptions.
11285 (Option Cross Key): Update.
11286 Add --graph.
11287
11288 2001-09-18 Marc Autret <autret_m@epita.fr>
11289
11290 * tests/regression.at: New test (comment in %union).
11291
11292 2001-09-18 Marc Autret <autret_m@epita.fr>
11293
11294 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
11295 do that.
11296 Reported by Keith Browne.
11297
11298 2001-09-18 Marc Autret <autret_m@epita.fr>
11299
11300 * tests/output.at: Add tests for --defines and --graph.
11301
11302 2001-09-18 Marc Autret <autret_m@epita.fr>
11303
11304 * tests/output.at: Removes tests of %{header,src}_extension features.
11305
11306 2001-09-18 Akim Demaille <akim@epita.fr>
11307
11308 * tests/Makefile.am (package.m4): New.
11309 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
11310 (_AT_CHECK_CALC_ERROR): Likewise.
11311 Factor the `, ' part of verbose error messages.
11312
11313 2001-09-18 Marc Autret <autret_m@epita.fr>
11314
11315 * src/getargs.c (longopts): Declare --defines and --graph as options
11316 with optional arguments.
11317 * src/files.h: Add extern declarations.
11318 * src/files.c (spec_graph_file, spec_defines_file): New.
11319 (output_files): Update.
11320 Remove CPP-outed code.
11321
11322 2001-09-18 Marc Autret <autret_m@epita.fr>
11323
11324 Turn off %{source,header}_extension feature.
11325
11326 * src/files.c (compute_exts_from_gf): Update.
11327 (compute_exts_from_src): Update.
11328 (output_files): CPP-out useless code.
11329 * src/files.h: Remove {header,source}_extension extern declarations.
11330 * src/reader.c (parse_dquoted_param): CPP-out.
11331 (parse_header_extension_decl): Remove.
11332 (parse_source_extension_decl): Remove.
11333 (read_declarations): Remove cases tok_{hdrext,srcext}.
11334 * src/lex.c (percent_table): Remove {header,source}_extension entries.
11335 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
11336
11337 2001-09-10 Akim Demaille <akim@epita.fr>
11338
11339 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
11340 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
11341 (AT_CHECK_OUTPUT): this.
11342 Merely check ls' exit status, its output is useless.
11343
11344 2001-09-10 Akim Demaille <akim@epita.fr>
11345
11346 * tests/calc.at: Use m4_match.
11347 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
11348
11349 2001-09-10 Marc Autret <autret_m@epita.fr>,
11350 Akim Demaille <akim@epita.fr>
11351
11352 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
11353 enum color_e.
11354 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
11355 to `normal'.
11356 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
11357 * src/lex.h: Adjust prototype.
11358 (token_t): Add `tok_undef'.
11359 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
11360 (parse_percent_token): Now returns token_t.
11361 Add default statement in switch.
11362 (lex): Separate `c' as an input variable, from the token_t result
11363 part.
11364 (unlexed): Is a token_t.
11365
11366 2001-09-10 Akim Demaille <akim@epita.fr>
11367
11368 * configure.in: Bump to 1.29a.
11369
11370 2001-09-07 Akim Demaille <akim@epita.fr>
11371
11372 Version 1.29.
11373
11374 2001-08-30 Akim Demaille <akim@epita.fr>
11375
11376 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
11377 * m4/atconfig.m4: Remove.
11378 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
11379 * tests/bison: New.
11380 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
11381 m4_if, m4_patsubst, and m4_regexp.
11382 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
11383 `input' file instead of echo.
11384
11385 2001-08-29 Akim Demaille <akim@epita.fr>
11386
11387 Bump to 1.28e.
11388
11389 2001-08-29 Akim Demaille <akim@epita.fr>
11390
11391 Version 1.28d.
11392
11393 2001-08-29 Paul Eggert <eggert@twinsun.com>
11394
11395 * src/bison.simple (yyparse): Don't take the address of an
11396 item before the start of an array, as that doesn't conform to
11397 the C Standard.
11398
11399 2001-08-29 Robert Anisko <anisko_r@epita.fr>
11400
11401 * doc/bison.texinfo (Location Tracking Calc): New node.
11402
11403 2001-08-29 Paul Eggert <eggert@twinsun.com>
11404
11405 * src/output.c (output): Do not define const, as this now
11406 causes more problems than it cures.
11407
11408 2001-08-29 Akim Demaille <akim@epita.fr>
11409
11410 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
11411 the nodes.
11412 Be sure to tag the `detailmenu'.
11413
11414 2001-08-29 Akim Demaille <akim@epita.fr>
11415
11416 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
11417 download in a tmp dir.
11418
11419 2001-08-28 Marc Autret <autret_m@epita.fr>
11420
11421 * config/depcomp: New file.
11422
11423 2001-08-28 Marc Autret <autret_m@epita.fr>
11424
11425 * doc/bison.1 (mandoc): Adjust.
11426 From Juan Manuel Guerrero.
11427
11428 2001-08-28 Marc Autret <autret_m@epita.fr>
11429
11430 * src/print_graph.c (print_state): Fix.
11431
11432 2001-08-27 Marc Autret <autret_m@epita.fr>
11433
11434 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
11435 char * members.
11436 Echo modifications to the functions prototypes.
11437 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
11438
11439 2001-08-27 Marc Autret <autret_m@epita.fr>
11440
11441 * src/vcg.c: Include `xalloc.h'.
11442 (add_colorentry): New.
11443 (add_classname): New.
11444 (add_infoname): New.
11445 * src/vcg.h: Add new prototypes.
11446
11447 2001-08-27 Akim Demaille <akim@epita.fr>
11448
11449 * Makefile.maint: Sync. again with CVS Autoconf.
11450
11451 2001-08-27 Akim Demaille <akim@epita.fr>
11452
11453 * Makefile.maint: Formatting changes.
11454 (po-update, cvs-update, update): New targets.
11455 (AMTAR): Remove.
11456
11457 2001-08-27 Akim Demaille <akim@epita.fr>
11458
11459 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
11460 * Makefile.maint: Sync. with CVS Autoconf.
11461
11462 2001-08-27 Marc Autret <autret_m@epita.fr>
11463
11464 * src/vcg.h (struct infoname_s): New.
11465 (struct colorentry_s): New.
11466 (graph_s): New fields {vertical,horizontal}_order in structure.
11467 Add `infoname' field.
11468 Add `colorentry' field;
11469 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
11470 (G_HORIZONTAL_ORDER): New.
11471 (G_INFONAME): New.
11472 (G_COLORENTRY): New.
11473 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
11474 Add output of `infoname'.
11475 Add output of `colorentry'.
11476
11477 2001-08-27 Marc Autret <autret_m@epita.fr>
11478
11479 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
11480 This one shadowed a global parameter.
11481
11482 2001-08-24 Marc Autret <autret_m@epita.fr>
11483
11484 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
11485 instead of `unsigned'.
11486 (print_state): Do not call obstack_object_size () in obstack_grow ()
11487 to avoid macro variables shadowing.
11488
11489 2001-08-23 Marc Autret <autret_m@epita.fr>
11490
11491 * src/lex.c (percent_table): Typo: s/naem/name/.
11492 Add graph option.
11493 Normalize new options declarations.
11494
11495 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
11496
11497 * tests/suite.at: Exercise %header_extension and %source_extension.
11498
11499 2001-08-16 Marc Autret <autret_m@epita.fr>
11500
11501 * src/reader.c (parse_dquoted_param): New.
11502 (parse_header_extension_decl): Use it.
11503 (parse_source_extension_decl): Likewise.
11504
11505 2001-08-16 Marc Autret <autret_m@epita.fr>
11506
11507 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
11508 (get_xxxx_str): Use assert () instead of complain ().
11509 Remove return invokations in default cases.
11510 (get_decision_str): Modify default behaviour. Remove second argument.
11511 Echo modifications on calls.
11512 (output_graph): Fix.
11513
11514 2001-08-16 Marc Autret <autret_m@epita.fr>
11515
11516 * src/getargs.c (usage): Update with ``-g, --graph''.
11517
11518 2001-08-16 Marc Autret <autret_m@epita.fr>
11519
11520 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
11521 (Option Cross Key): Likewise.
11522 * doc/bison.1: Update.
11523
11524 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
11525
11526 * src/output.c (output_master_parser): Don't finish action_obstack.
11527 (output_parser): Don't care about the muscle action, here.
11528 (prepare): Copy the action_obstack in the action muscle.
11529 (output): Free action_obstack.
11530
11531 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
11532
11533 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
11534 will contain `%union' declaration.
11535 (parse_union_decl): Delete #line directive output.
11536 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
11537 informations about %union.
11538 (parse_union_decl): Copy the union_obstack in the muscle stype.
11539 * src/bison.simple: Add new #line directive.
11540 Add typdef %%stype YYSTYPE.
11541
11542 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
11543
11544 * src/bison.simple: Add new `#line' directive.
11545
11546 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
11547
11548 * src/bison.simple: New `#line' directive.
11549 * src/output.c (output_parser): Support new dynamic muscle input_line.
11550
11551 2001-09-22 Marc Autret <autret_m@epita.fr>
11552
11553 * src/output.c (output_master_parser): New.
11554 (output_parser): Be more re-entrant.
11555
11556 2001-09-21 Marc Autret <autret_m@epita.fr>
11557
11558 * src/reader.c (copy_definition, parse_union_decl): Update and use
11559 `linef' muscle.
11560 (copy_action): Likewise.
11561 Use obstack_1grow ().
11562 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
11563
11564 2001-09-21 Marc Autret <autret_m@epita.fr>
11565
11566 * src/options.c (option_table): Adjust.
11567 * src/lex.c (parse_percent_token): Fix.
11568
11569 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
11570
11571 * src/options.c (symtab.h): Include it, need by lex.h.
11572
11573 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
11574
11575 * src/lex.c (parse_percent_token): Change type of variable `tx', which
11576 is now an option_table_struct*.
11577 (option_strcmp): New function option_strcmp.
11578 (parse_percent_token): Call option_strcmp.
11579 * src/getargs.c (xalloc.h, options.h): Include it.
11580 (getargs): Call create_long_option_table.
11581 (getargs): Free longopts at the end of the function.
11582 (shortopts): Move in options.c.
11583 * src/options.c (create_long_option_table): New function. Convert
11584 information from option_table to option structure.
11585 * src/reader.c (options.h): Include it.
11586
11587 * src/Makefile.am: Adjust.
11588 * src/options.c (option_table): Create from longopts and percent_table.
11589 * src/getargs.c (longopts): Delete.
11590 * src/lex.c (struct percent_table_struct): Delete.
11591 (percent_table): Delete.
11592 (options.h): Include it.
11593 * src/options.c: Create.
11594 * src/options.h: Create.
11595 Declare enum opt_access_e.
11596 Define struct option_table_struct.
11597
11598 2001-09-20 Marc Autret <autret_m@epita.fr>
11599
11600 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
11601 sections of Bison.
11602
11603 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
11604
11605 * src/bison.simple: s/%%filename/%%skeleton.
11606 * src/muscle_tab.c (getargs.h): Include it.
11607 (muscle_init): Insert new muscle skeleton.
11608
11609 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
11610
11611 * src/output.c (output_parser): Delete unused variable actions_dumped.
11612
11613 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
11614
11615 * src/output.c (output): Delete call to reader_output_yylsp.
11616 * src/reader.c (reader): Likewise.
11617 * src/reader.h: Delete declaration of reader_output_yylsp.
11618
11619 2001-09-02 Marc Autret <autret_m@epita.fr>
11620
11621 * src/reader.c: Include muscle_tab.h.
11622 (parse_union_decl): Update.
11623 (parse_macro_decl): Rename parse_muscle_decl.
11624 Update to use renamed functions and variable.
11625 (read_declarations, copy_action, read_additionnal_code, : Updated
11626 with correct variables and functions names.
11627 (packsymbols, reader): Likewise.
11628
11629 * src/reader.h (muscle_obstack): Extern declaration update.
11630
11631 * src/output.c: Include muscle_tab.h
11632 In all functions using macro_insert, change by using muscle_insert ().
11633 (macro_obstack): Rename muscle_obstack.
11634 Echo modifications in the whole file.
11635 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
11636 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
11637 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
11638
11639 * src/muscle_tab.h: Update double inclusion macros.
11640 (macro_entry_s): Rename muscle_entry_s.
11641 Update prototypes.
11642
11643 * src/muscle_tab.c: Include muscle_tab.h.
11644 Rename macro_tabble to muscle_table.
11645 (mhash1, mhash2, mcmp): Use muscle_entry.
11646 (macro_init): Rename muscle_init. Update.
11647 (macro_insert): Rename muscle_insert. Update.
11648 (macro_find): Rename muscle_find. Update.
11649
11650 * src/main.c: Include muscle_tab.h.
11651 (main): Call muscle_init ().
11652 * src/Makefile.am (bison_SOURCES): Echo modifications.
11653
11654 2001-09-02 Marc Autret <autret_m@epita.fr>
11655
11656 Now the files macro_tab.[ch] are named muscle_tab.[ch].
11657
11658 * src/muscle_tab.c, src/muscle_tab.h: Add files.
11659
11660 2001-09-02 Marc Autret <autret_m@epita.fr>
11661
11662 * src/macrotab.c, src/macrotab.h: Remove.
11663
11664 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
11665
11666 * src/reader.c (copy_guard): Use muscle to specify the `#line'
11667 filename.
11668
11669 2001-09-01 Marc Autret <autret_m@epita.fr>
11670
11671 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
11672 to an explicit value to activate the feature. We do it here.
11673
11674 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11675
11676 * src/output.c (prepare): Delete the `filename' muscule insertion.
11677 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
11678 (parse_union_decl): Likewise.
11679 * src/macrotab.c (macro_init): Initialize filename by infile.
11680
11681 2001-08-31 Marc Autret <autret_m@epita.fr>
11682
11683 * src/bison.simple (YYLSP_NEEDED): New definition.
11684 * src/output.c (prepare): Add macro insertion of `locations_flag'
11685
11686 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11687
11688 * src/output.c (prepare): Delete insertion of previous muscles,
11689 and insert the `prefix' muscles.
11690 * src/macrotab.c (macro_init): Likewise.
11691 (macro_init): Initialization prefix directive by `yy'.
11692 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
11693 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
11694 yylval, yydebug, yyerror, yynerrs and yyparse.
11695 New directive `#define' to substitute yydebug, ... with option
11696 name_prefix.
11697
11698 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11699
11700 * src/main.c (main): Standardize.
11701 * src/output.c (output_table_data, output_parser): Likewise.
11702 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
11703
11704 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
11705
11706 * src/reader.c (read_additionnal_code): Rename %%user_code to
11707 %%epilogue.
11708 * src/output.c (output): Rename %%declarations to %%prologue.
11709 * src/bison.simple: Echo modifications.
11710
11711 2001-08-31 Marc Autret <autret_m@epita.fr>
11712
11713 * src/reader.c (readgram): CleanUp.
11714 (output_token_defines): Likewise.
11715 (packsymbols): Likewise.
11716 (reader): Likewise.
11717 * src/output.c (output): CPP-out useless code.
11718
11719 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11720
11721 * src/reader.c (reader): Delete obsolete call to function
11722 output_trailers and output_headers.
11723 * src/output.h: Remove obsolete functions prototypes of output_headers
11724 and output_trailers.
11725
11726 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
11727
11728 * src/main.c: Include macrotab.h.
11729 * src/macrotab.h (macro_entry_s): Constify fields.
11730 Adjust functions prototypes.
11731 * src/macrotab.c (macro_insert): Constify key and value.
11732 (macro_find): Constify key.
11733 (macro_insert): Include 'xalloc.h'
11734 (macro_insert): Use XMALLOC.
11735 (macro_find): Constify return value.
11736 * src/output.c (output_table_data): Rename table to table_data.
11737 (output_parser): Constify macro_key, macro_value.
11738
11739 2001-08-30 Marc Autret <autret_m@epita.fr>
11740
11741 * src/reader.c (parse_skel_decl): New.
11742 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
11743 * src/lex.h (token_t): New token `tok_skel'.
11744 * src/lex.c (percent_table): Add skeleton option entry.
11745 Standardize.
11746
11747 2001-08-29 Marc Autret <autret_m@epita.fr>
11748
11749 * src/bison.simple: Add %%user_code directive at the end.
11750 * src/reader.c (read_additionnal_code): New.
11751 (reader): Use it.
11752 * src/output.c (output_program): Remove.
11753 (output): Update.
11754
11755 2001-08-28 Marc Autret <autret_m@epita.fr>
11756
11757 * src/output.c (output_actions): Clean up.
11758 (output_gram): CPP-out useless code.
11759 * src/reader.c (reader): Clean up, CPP-out useless code.
11760
11761 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
11762
11763 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
11764 directive.
11765 * src/bison.simple: Add `%%definitions'.
11766
11767 2001-08-28 Marc Autret <autret_m@epita.fr>
11768
11769 * config/depcomp: New file.
11770
11771 2001-08-27 Paul Eggert <eggert@twinsun.com>
11772
11773 * src/bison.simple (yyparse): Don't take the address of an
11774 item before the start of an array, as that doesn't conform to
11775 the C Standard.
11776
11777 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
11778
11779 * src/output.c (output): Remove the initialization of the macro
11780 obstack. It was done too late here.
11781
11782 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
11783 completely wrong.
11784 (reader): Initialize the macro obstack here, since we need it to grow
11785 '%define' directives.
11786
11787 * src/reader.h: Declare the macro obstack as extern.
11788
11789 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
11790
11791 * src/output.c (output_parser): Fix. Store single '%' characters in
11792 the output obstack instead of throwing them away.
11793
11794 2001-08-27 Akim Demaille <akim@epita.fr>
11795
11796 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
11797
11798 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11799
11800 * lib/Makefile.am: Adjust.
11801
11802 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11803
11804 * src/bison.simple: Update and add '%%' directives.
11805
11806 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11807
11808 * src/reader.c (reader): Remove calls to 'output_headers' and
11809 'output_trailers'. Remove some C output.
11810 (readgram): Disable a piece of code that was writing a default
11811 definition for 'YYSTYPE'.
11812 (reader_output_yylsp): Remove.
11813 (packsymbols): Output token defintions to a macro.
11814 (copy_definition): Disable C output.
11815
11816 * src/reader.c (parse_macro_decl): New function used to parse macro
11817 declarations.
11818 (copy_string2): Put the body of copy_string into this new function.
11819 Add a parameter to let the caller choose whether he wants to copy the
11820 string delimiters or not.
11821 (copy_string): Be a simple call to copy_string2 with the last argument
11822 bound to true.
11823 (read_declarations): Add case for macro definition.
11824 (copy_identifier): New.
11825 (parse_macro_decl): Read macro identifiers using copy_identifier
11826 rather than lex.
11827
11828 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11829
11830 * src/output.c (prepare): Add prefixed names.
11831 (output_parser): Output semantic actions.
11832 (output_parser): Fix bug on '%%line' directives.
11833
11834 * src/output.c (output_headers): Remove. The C code printed by this
11835 function should now be in the skeletons.
11836 (output_trailers): Remove.
11837 (output): Disable call to 'reader_output_yylsp'.
11838 (output_rule_data): Do not output tables to the table obstack.
11839
11840 * src/output.c: Remove some C dedicated output.
11841 Improve the use of macro and output obstacks.
11842 (output_defines): Remove.
11843
11844 * src/output.c (output_token_translations): Associate 'translate'
11845 table with a macro. No output to the table obstack.
11846 (output_gram): Same for 'rhs' and 'prhs'.
11847 (output_stos): Same for 'stos'.
11848 (output_rule_data): Same for 'r1' and 'r2'.
11849 (token_actions): Same for 'defact'.
11850 (goto_actions): Same for 'defgoto'.
11851 (output_base): Same for 'pact' and 'pgoto'.
11852 (output_table): Same for 'table'.
11853 (output_check): Same for 'check'.
11854
11855 * src/output.c (output_table_data): New function.
11856 (output_short_table): Remove.
11857 (output_short_or_char_table): Remove.
11858
11859 * src/output.c (output_parser): Replace most of the skeleton copy code
11860 with something new. Skeletons are now processed character by character
11861 rather than line by line, and Bison looks for '%%' macros. This is the
11862 first step in making Bison's output process (a lot) more flexible.
11863 (output_parser): Use the macro table.
11864
11865 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11866
11867 * src/main.c (main): Initialize the macro table.
11868
11869 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11870
11871 * src/lex.c (percent_table): Add tok_define.
11872 * src/lex.h: Add tok_define.
11873
11874 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11875
11876 * src/macrotab.c: New file.
11877 * src/macrotab.h: New file.
11878 * src/Makefile.am: Update.
11879
11880 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11881
11882 * lib/hash.c: New file.
11883 * lib/hash.h: New file.
11884 * lib/Makefile.am: Update.
11885
11886 2001-08-15 Akim Demaille <akim@epita.fr>
11887
11888 Version 1.28c.
11889
11890 2001-08-15 Marc Autret <autret_m@epita.fr>
11891
11892 * src/reader.c (readgram): Indent output macro YYSTYPE.
11893 (packsymbols): Likewise.
11894 (output_token_defines): Likewise.
11895 * src/files.c: Standardize.
11896 (compute_header_macro): New.
11897 (defines_obstack_save): New. Use compute_header_macro.
11898 (output_files): Update. Use defines_obstack_save.
11899
11900 2001-08-15 Akim Demaille <akim@epita.fr>
11901
11902 * doc/bison.texinfo (Table of Symbols): Document
11903 YYSTACK_USE_ALLOCA.
11904
11905 2001-08-15 Akim Demaille <akim@epita.fr>
11906
11907 * missing: Update from CVS Automake.
11908 * config/config.guess, config/config.sub, config/texinfo.tex:
11909 Update from gnu.org.
11910
11911 2001-08-15 Akim Demaille <akim@epita.fr>
11912
11913 * Makefile.maint: Sync with CVS Autoconf.
11914
11915 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
11916
11917 * doc/bison.texinfo: Include GNU Free Documentation License from
11918 `fdl.texi'.
11919 * doc/fdl.texi: Add to package.
11920
11921 2001-08-14 Marc Autret <autret_m@epita.fr>
11922
11923 Turn on %{source,header}_extension features.
11924
11925 * src/lex.c (percent_table): Un-CPP out header_extension and
11926 source_extension.
11927 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
11928 (compute_exts_from_src): Remove conditions. It restores priorities
11929 between options.
11930
11931 2001-08-14 Marc Autret <autret_m@epita.fr>
11932
11933 * src/files.c (compute_base_names): Add extensions computing when
11934 `--file-prefix' used.
11935 Standardize function calls.
11936
11937 2001-08-13 Marc Autret <autret_m@epita.fr>
11938
11939 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
11940 defining it (defined but null disables alloca).
11941
11942 2001-08-13 Marc Autret <autret_m@epita.fr>
11943
11944 * src/bison.simple (_yy_memcpy): CPP reformat.
11945
11946 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
11947
11948 * tests/atconfig.in (CPPFLAGS): Fix.
11949
11950 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
11951
11952 * doc/bison.texinfo: Include GNU General Public License from
11953 `gpl.texi'.
11954 * doc/gpl.texi: Add to package.
11955
11956 2001-08-10 Marc Autret <autret_m@epita.fr>
11957
11958 * src/print_graph.h: Fix.
11959 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
11960
11961 2001-08-10 Akim Demaille <akim@epita.fr>
11962
11963 * src/system.h: Provide default declarations for stpcpy, strndup,
11964 and strnlen.
11965
11966 2001-08-10 Robert Anisko <anisko_r@epita.fr>
11967
11968 * doc/bison.texinfo (Locations): Update @$ stuff.
11969
11970 2001-08-09 Robert Anisko <anisko_r@epita.fr>
11971
11972 * src/bison.simple (YYLLOC_DEFAULT): Update.
11973 (yyparse): Adjust.
11974
11975 2001-08-08 Marc Autret <autret_m@epita.fr>
11976
11977 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
11978 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
11979 Reported by Fabrice Bauzac.
11980
11981 2001-08-08 Marc Autret <autret_m@epita.fr>
11982
11983 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
11984 * src/vcg.c (output_node): Fix.
11985 * src/vcg.h: Cleanup.
11986 * src/print_graph.c: Add comments.
11987 (node_output_size): New global variable. Simplify the formatting of
11988 the VCG graph output.
11989 (print_actions): Unused code is now used. It notifies the final state
11990 and no action states in the VCG graph. It also give the reduce actions.
11991 The `shift and goto' edges are red and the `go to state' edges are
11992 blue.
11993 Get the current node name and node_obstack by argument.
11994 (node_obstack): New variable.
11995 (print_state): Manage node_obstack.
11996 (print_core): Use node_obstack given by argument.
11997 A node is not only computed here but in print_actions also.
11998 (print_graph): CPP out useless code instead of commenting it.
11999
12000 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
12001
12002 * tests/atconfig.in (CPPFLAGS): Fix.
12003
12004 2001-08-07 Akim Demaille <akim@epita.fr>
12005
12006 * src/print_graph.c (quote): New.
12007 (print_core): Use it.
12008
12009 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
12010
12011 * src/vcg.c (complain.h): Include it.
12012 Unepitaize `return' invocations.
12013 [NDEBUG] (main): Remove.
12014 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
12015 * src/files.c (open_files): Initialize graph_obstack.
12016 * src/print_graph.c (print_actions): CPP out useless code.
12017 (print_core): Don't output the last `\n' in labels.
12018 Use `quote'.
12019 * src/files.c (output_files): Output the VCG file.
12020 * src/main.c (main): Invoke print_graph ();
12021
12022 2001-08-06 Marc Autret <autret_m@epita.fr>
12023
12024 Automaton VCG graph output.
12025 Using option ``-g'' or long option ``--graph'', you can generate
12026 a gram_filename.vcg file containing a VCG description of the LALR (1)
12027 automaton of your grammar.
12028
12029 * src/main.c: Call to print_graph() function.
12030 * src/getargs.h: Update.
12031 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
12032 (graph_flag): New flag.
12033 (longopts): Update.
12034 (getargs): Add case `g'.
12035 * src/files.c (graph_obstack): New obstack struct.
12036 (open_files): Initialize new obstack.
12037 (output_files): Saves graph_obstack if required.
12038 * src/files.h (graph_obstack): New extern declaration.
12039 * src/Makefile.am: Add new source files.
12040
12041 2001-08-06 Marc Autret <autret_m@epita.fr>
12042
12043 * src/print_graph.c, src/print_graph.h (graph): New.
12044 * src/vcg.h: New file.
12045 * src/vcg.c: New file, VCG graph handling.
12046
12047 2001-08-06 Marc Autret <autret_m@epita.fr>
12048
12049 Add of %source_extension and %header_extension which specify
12050 the source or/and the header output file extension.
12051
12052 * src/files.c (compute_base_names): Remove initialisation of
12053 src_extension and header_extension.
12054 (compute_exts_from_gf): Update.
12055 (compute_exts_from_src): Update.
12056 (output_files): Update.
12057 * src/reader.c (parse_header_extension_decl): New.
12058 (parse_source_extension_decl): New.
12059 (read_declarations): New case statements for the new tokens.
12060 * src/lex.c (percent_table): Add entries for %source_extension
12061 and %header_extension.
12062 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
12063
12064 2001-08-06 Marc Autret <autret_m@epita.fr>
12065
12066 * configure.in: Bump to 1.28c.
12067 * doc/bison.texinfo: Texinfo thingies.
12068
12069 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
12070
12071 * tests/atconfig.in (CPPFLAGS): Add.
12072 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
12073
12074 2001-08-03 Akim Demaille <akim@epita.fr>
12075
12076 Version 1.28b.
12077
12078 2001-08-03 Akim Demaille <akim@epita.fr>
12079
12080 * tests/Makefile.am (check-local): Ship testsuite.
12081 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
12082 Include `string.h'.
12083
12084 2001-08-03 Akim Demaille <akim@epita.fr>
12085
12086 * configure.in: Try using -Wformat when compiling.
12087
12088 2001-08-03 Akim Demaille <akim@epita.fr>
12089
12090 * configure.in: Bump to 1.28b.
12091
12092 2001-08-03 Akim Demaille <akim@epita.fr>
12093
12094 * src/complain.c: Adjust strerror_r portability issues.
12095
12096 2001-08-03 Akim Demaille <akim@epita.fr>
12097
12098 Version 1.28a.
12099
12100 2001-08-03 Akim Demaille <akim@epita.fr>
12101
12102 * src/getargs.c, src/getarg.h (skeleton)): Constify.
12103 * src/lex.c (literalchar): Avoid name clashes on `buf'.
12104 * src/getargs.c: Include complain.h.
12105 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
12106 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
12107
12108 2001-08-03 Akim Demaille <akim@epita.fr>
12109
12110 * src/reader.c (readgram): Display hidden chars in error messages.
12111
12112 2001-08-03 Akim Demaille <akim@epita.fr>
12113
12114 Update to gettext 0.10.39.
12115
12116 2001-08-03 Akim Demaille <akim@epita.fr>
12117
12118 * lib/strspn.c: New.
12119
12120 2001-08-01 Marc Autret <autret_m@epita.fr>
12121
12122 * doc/bison.texinfo: Update.
12123 * doc/bison.1 (mandoc): Update.
12124 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
12125 * src/files.c: Support output files extensions computing.
12126 (src_extension): New static variable.
12127 (header_extension): New static variable.
12128 (tr): New function.
12129 (get_extension_index): New function, gets the index of an extension
12130 filename in a string.
12131 (compute_exts_from_gf): New function, computes extensions from the
12132 grammar file extension.
12133 (compute_exts_from_src): New functions, computes extensions from the
12134 C source file extension, file given by ``-o'' option.
12135 (compute_base_names): Update.
12136 (output_files): Update.
12137
12138 2001-08-01 Robert Anisko <anisko_r@epita.fr>
12139
12140 * doc/bison.texi: Document @$.
12141 (Locations): New section.
12142
12143 2001-07-18 Akim Demaille <akim@epita.fr>
12144
12145 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
12146 * config/prev-version.txt, config/move-if-change: New.
12147 * Makefile.am: Adjust.
12148
12149 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
12150
12151 * src/bison.simple (yyparse): Suppress warning `comparaison
12152 between signed and unsigned'.
12153
12154 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
12155
12156 * src/getargs.h (raw_flag): Remove.
12157 * src/getargs.c: Die on `-r'/`--raw'.
12158 * src/lex.c (parse_percent_token): Die on `%raw'.
12159 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
12160 * tests/calc.at: Suppress test with option `--raw'.
12161
12162 2001-07-14 Akim Demaille <akim@epita.fr>
12163
12164 * config/: New.
12165 * configure.in: Require Autoconf 2.50.
12166 Update to gettext 0.10.38.
12167
12168 2001-03-16 Akim Demaille <akim@epita.fr>
12169
12170 * doc/bison.texinfo: ANSIfy the examples.
12171
12172 2001-03-16 Akim Demaille <akim@epita.fr>
12173
12174 * getargs.c (skeleton): New variable.
12175 (longopts): --skeleton is a new option.
12176 (shortopts, getargs): -S is a new option.
12177 * getargs.h: Declare skeleton.
12178 * output.c (output_parser): Use it.
12179
12180 2001-03-16 Akim Demaille <akim@epita.fr>
12181
12182 * m4/strerror_r.m4: New.
12183 * m4/error.m4: Run AC_FUNC_STRERROR_R.
12184 * lib/error.h, lib/error.c: Update.
12185
12186 2001-03-16 Akim Demaille <akim@epita.fr>
12187
12188 * src/getargs.c (longopts): Clean up.
12189
12190 2001-02-21 Akim Demaille <akim@epita.fr>
12191
12192 * src/reader.c (gensym): `gensym_count' is your own.
12193 Use a static buf to create the symbol name, as token_buffer is no
12194 longer a buffer.
12195
12196 2001-02-08 Akim Demaille <akim@epita.fr>
12197
12198 * src/conflicts.c (conflict_report): Be sure not to append to res
12199 between two calls, which could happen if both first sprintf were
12200 skipped, but not the first cp += strlen.
12201
12202 2001-02-08 Akim Demaille <akim@epita.fr>
12203
12204 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
12205 New, from fileutils 4.0.37.
12206 * configure.in: Require Autoconf 2.49c. I took some time before
12207 making this decision. This is the only way out for portability
12208 issues in Bison, it would mean way too much duplicate effort to
12209 import in Bison features implemented in 2.49c since 2.13.
12210 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
12211
12212 2001-02-02 Akim Demaille <akim@epita.fr>
12213
12214 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
12215 * lib/xalloc.h, lib/xmalloc.c: Update.
12216
12217 2001-01-19 Akim Demaille <akim@epita.fr>
12218
12219 Get rid of the ad hoc handling of token_buffer in the scanner: use
12220 the obstacks.
12221
12222 * src/lex.c (token_obstack): New.
12223 (init_lex): Initialize it. No longer call...
12224 (grow_token_buffer): this. Remove it.
12225 Adjust all the places which used it to use the obstack.
12226
12227 2001-01-19 Akim Demaille <akim@epita.fr>
12228
12229 * src/lex.h: Rename all the tokens:
12230 s/\bENDFILE\b/tok_eof/g;
12231 s/\bIDENTIFIER\b/tok_identifier/g;
12232 etc.
12233 Let them be enums, not #define, to ease debugging.
12234 Adjust all the code.
12235
12236 2001-01-18 Akim Demaille <akim@epita.fr>
12237
12238 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
12239 * src/lex.c (maxtoken, grow_token_buffer): Static.
12240
12241 2001-01-18 Akim Demaille <akim@epita.fr>
12242
12243 Since we now use obstacks, more % directives can be enabled.
12244
12245 * src/lex.c (percent_table): Also accept `%yacc',
12246 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
12247 `%debug'.
12248 Handle the actions for `%semantic_parser' and `%pure_parser' here,
12249 instead of returning a token.
12250 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
12251 * src/reader.c (read_declarations): Adjust.
12252 * src/files.c (open_files): Don't call `compute_base_names', don't
12253 compute `attrsfile' since they depend upon data which might be
12254 *in* the input file now.
12255 (output_files): Do it here.
12256 * src/output.c (output_headers): Document the fact that this patch
12257 introduces a guaranteed SEGV for semantic parsers.
12258 * doc/bison.texinfo: Document them.
12259 * tests/suite.at: Exercise these %options.
12260
12261 2000-12-20 Akim Demaille <akim@epita.fr>
12262
12263 Also handle the output file (--verbose) with obstacks.
12264
12265 * files.c (foutput): Remove.
12266 (output_obstack): New.
12267 Adjust all dependencies.
12268 * src/conflicts.c: Return a string.
12269 * src/system.h (obstack_grow_string): Rename as...
12270 (obstack_sgrow): this. Be ready to work with non literals.
12271 (obstack_fgrow4): New.
12272
12273 2000-12-20 Akim Demaille <akim@epita.fr>
12274
12275 * src/files.c (open_files): Fix the computation of short_base_name
12276 in the case of `-o foo.tab.c'.
12277
12278 2000-12-20 Akim Demaille <akim@epita.fr>
12279
12280 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
12281 (copy_dollar): Now that everything uses obstacks, get rid of the
12282 FILE * parameters.
12283
12284 2000-12-20 Akim Demaille <akim@epita.fr>
12285
12286 * src/files.c (open_files): Actually the `.output' file is based
12287 on the short_base_name, not base_name.
12288 * tests/suite.at (Checking output file names): Adjust.
12289
12290 2000-12-20 Akim Demaille <akim@epita.fr>
12291
12292 * src/bison.s1: Remove, we now use directly...
12293 * src/bison.simple: this.
12294 * src/Makefile.am: Use pkgdata instead of data.
12295
12296 2000-12-20 Akim Demaille <akim@epita.fr>
12297
12298 * src/files.c (guard_obstack): New.
12299 (open_files): Initialize it.
12300 (output_files): Dump it...
12301 * src/files.h: Export it.
12302 * src/reader.c (copy_guard): Use it.
12303
12304 2000-12-19 Akim Demaille <akim@epita.fr>
12305
12306 * src/files.c (outfile, defsfile, actfile): Removed as global
12307 vars.
12308 (open_files): Don't compute them.
12309 (output_files): Adjust.
12310 (base_name, short_base_name): Be global.
12311 Adjust dependencies.
12312
12313 2000-12-19 Akim Demaille <akim@epita.fr>
12314
12315 * src/files.c (strsuffix): New.
12316 (stringappend): Be just like strcat but allocate.
12317 (base_names): Eve out from open_files.
12318 Try to simplify the rather hairy computation of base_name and
12319 short_base_name.
12320 (open_files): Use it.
12321 * tests/suite.at (Checking output file names): New test.
12322
12323 2000-12-19 Akim Demaille <akim@epita.fr>
12324
12325 * src/system.h (obstack_grow_literal_string): Rename as...
12326 (obstack_grow_string): this.
12327 * src/output.c (output_parser): Recognize `%% actions' instead of
12328 `$'.
12329 * src/bison.s1: s/$/%% actions/.
12330 * src/bison.hairy: Likewise.
12331
12332 2000-12-19 Akim Demaille <akim@epita.fr>
12333
12334 * src/output.c (output_parser): Compute the `#line' lines when
12335 there are.
12336 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
12337 Suggested by Hans Aberg.
12338
12339 2000-12-19 Akim Demaille <akim@epita.fr>
12340
12341 Let the handling of the skeleton files be local to the procedures
12342 that use it.
12343
12344 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
12345 longer static.
12346 (fparser, open_extra_files): Remove.
12347 (open_files, output_files): Don't take care of fparser.
12348 * src/files.h: Adjust.
12349 * src/output.c (output_parser): Open and close the file to the
12350 skeleton.
12351 * src/reader.c (read_declarations): When %semantic_parser, open
12352 fguard.
12353
12354 2000-12-19 Akim Demaille <akim@epita.fr>
12355
12356 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
12357 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
12358
12359 2000-12-19 Akim Demaille <akim@epita.fr>
12360
12361 * src/files.c (open_files): Yipee! We no longer need all the code
12362 looking for `/tmp' since we have no tmp file.
12363
12364 2000-12-19 Akim Demaille <akim@epita.fr>
12365
12366 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
12367 New macros.
12368 * src/files.c (open_files): Less dependency on MSDOS etc.
12369
12370 2000-12-14 Akim Demaille <akim@epita.fr>
12371
12372 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
12373 Provide a default definition.
12374 Use it when executing the default @ action.
12375 * src/reader.c (reader_output_yylsp): No longer include
12376 `timestamp' and `text' in the default YYLTYPE.
12377
12378 2000-12-12 Akim Demaille <akim@epita.fr>
12379
12380 * src/reader.c (copy_definition, parse_union_decl, copy_action)
12381 (copy_guard): Quote the file names.
12382 Reported by Laurent Mascherpa.
12383
12384 2000-12-12 Akim Demaille <akim@epita.fr>
12385
12386 * src/output.c (output_headers, output_program, output): Be sure
12387 to escape special characters when outputting filenames.
12388 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
12389 (output_headers): Don't depend on them, Use ACTSTR.
12390
12391 2000-11-17 Akim Demaille <akim@epita.fr>
12392
12393 * lib/obstack.h: Formatting changes.
12394 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
12395 prevents type checking.
12396 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
12397 cast the value to (void *): assigning a `foo *' to a `void *'
12398 variable is valid.
12399 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
12400 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
12401 append characters.
12402
12403 2000-11-17 Akim Demaille <akim@epita.fr>
12404
12405 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
12406 as...
12407 (suite.m4, regression.m4, calc.m4): these.
12408 * tests/atgeneral.m4: Update from CVS Autoconf.
12409
12410 2000-11-17 Akim Demaille <akim@epita.fr>
12411
12412 * tests/regression.m4 (%union and --defines): New test,
12413 demonstrating a current bug in the obstack implementation.
12414
12415 2000-11-17 Akim Demaille <akim@epita.fr>
12416
12417 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
12418 macros.
12419 Use them to declare the variables which are global or local to
12420 `yyparse'.
12421
12422 2000-11-17 Akim Demaille <akim@epita.fr>
12423
12424 * acconfig.h: Remove, no longer used.
12425
12426 2000-11-07 Akim Demaille <akim@epita.fr>
12427
12428 * src: s/Copyright (C)/Copyright/g.
12429
12430 2000-11-07 Akim Demaille <akim@epita.fr>
12431
12432 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
12433 defining.
12434 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
12435
12436 2000-11-07 Akim Demaille <akim@epita.fr>
12437
12438 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
12439 Merge in a single CPP if/else.
12440
12441 2000-11-07 Akim Demaille <akim@epita.fr>
12442
12443 * src/output.c (output): Remove useless variables.
12444 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
12445 argument `data' for consistency with the prototypes.
12446 Qualify it `const'.
12447 (obstack_copy, obstack_copy0): Rename the second argument as
12448 `address' for consistency. Qualify it `const'.
12449 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
12450 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
12451 `const' their input argument (`data' or `address').
12452 Adjust the corresponding macros to include `const' in casts.
12453
12454 2000-11-03 Akim Demaille <akim@epita.fr>
12455
12456 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
12457 s/PFILE1/BISON_HAIRY/.
12458 Adjust dependencies.
12459
12460 2000-11-03 Akim Demaille <akim@epita.fr>
12461
12462 For some reason, this was not applied.
12463
12464 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12465 `unlink': it's no longer used.
12466
12467 2000-11-03 Akim Demaille <akim@epita.fr>
12468
12469 * src/files.c (skeleton_find): New function, eved out of...
12470 (open_files, open_extra_files): here.
12471
12472 2000-11-03 Akim Demaille <akim@epita.fr>
12473
12474 Don't use `atexit'.
12475
12476 * src/files.c (obstack_save): New function.
12477 (done): Rename as...
12478 (output_files): this.
12479 Use `obstack_save'.
12480 * src/main.c (main): Don't use `atexit' to register `done', since
12481 it no longer has to remove tmp files, just call `output_files'
12482 when there are no errors.
12483
12484 2000-11-02 Akim Demaille <akim@epita.fr>
12485
12486 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12487 `unlink': it's no longer used.
12488 * src/files.h: Formatting changes.
12489
12490 2000-11-02 Akim Demaille <akim@epita.fr>
12491
12492 Remove the last uses of mktemp and unlink/delete.
12493
12494 * src/files.c (fdefines, ftable): Removed.
12495 (defines_ostack, table_obstack): New.
12496 Adjust dependencies of the former into uses of the latter.
12497 * src/output.c (output_short_or_char_table, output_short_table):
12498 Convert to using obstacks.
12499 * src/reader.c (copy_comment2): Accept one FILE * and two
12500 obstacks.
12501 (output_token_defines, reader_output_yylsp): Use obstacks.
12502 * src/system.h (obstack_fgrow3): New.
12503 * po/POTFILES.in: Adjust.
12504
12505 2000-11-01 Akim Demaille <akim@epita.fr>
12506
12507 Change each use of `fattrs' into a use of `attrs_obstack'.
12508
12509 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
12510 * src/files.c (fattrs): Remove.
12511 (attrs_obstack): New.
12512 Adjust all dependencies.
12513 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
12514
12515 2000-11-01 Akim Demaille <akim@epita.fr>
12516
12517 Introduce obstacks.
12518 Change each use of `faction' into a use of `action_obstack'.
12519
12520 * lib/obstack.h, lib/obstack.c: New files.
12521 * src/files.c (faction): Remove.
12522 (action_obstack): New.
12523 Adjust all dependencies.
12524
12525 2000-10-20 Akim Demaille <akim@epita.fr>
12526
12527 * lib/quote.h (PARAMS): New macro. Use it.
12528
12529 2000-10-16 Akim Demaille <akim@epita.fr>
12530
12531 * src/output.c (output_short_or_char_table): New function.
12532 (output_short_table, output_token_translations): Use it.
12533 (goto_actions): Use output_short_table.
12534
12535 2000-10-16 Akim Demaille <akim@epita.fr>
12536
12537 * src/symtab.c (bucket_new): New function.
12538 (getsym): Use it.
12539
12540 * src/output.c (output_short_table): New argument to display the
12541 comment associated with the table.
12542 Adjust dependencies.
12543 (output_gram): Use it.
12544 (output_rule_data): Nicer output layout for YYTNAME.
12545
12546 2000-10-16 Akim Demaille <akim@epita.fr>
12547
12548 * src/lex.c (read_typename): New function.
12549 (lex): Use it.
12550 * src/reader.c (copy_dollar): Likewise.
12551
12552 2000-10-16 Akim Demaille <akim@epita.fr>
12553
12554 * src/reader.c (copy_comment2): Expect the input stream to be on
12555 the `/' which is suspected to open a comment, instead of being
12556 called after `//' or `/*' was read.
12557 (copy_comment, copy_definition, parse_union_decl, copy_action)
12558 (copy_guard): Adjust.
12559
12560 2000-10-16 Akim Demaille <akim@epita.fr>
12561
12562 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
12563 `read_signed_integer'.
12564
12565 2000-10-16 Akim Demaille <akim@epita.fr>
12566
12567 * src/reader.c (copy_dollar): New function.
12568 (copy_guard, copy_action): Use it.
12569
12570 2000-10-16 Akim Demaille <akim@epita.fr>
12571
12572 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
12573 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
12574 New files, from Fileutils 4.0.27.
12575 * src/main.c (printable_version): Remove.
12576 * src/lex.c, src/reader.c: Use `quote'.
12577
12578 2000-10-04 Akim Demaille <akim@epita.fr>
12579
12580 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
12581
12582 2000-10-04 Akim Demaille <akim@epita.fr>
12583
12584 * doc/bison.texinfo: Various typos spotted by Neil Booth.
12585
12586 2000-10-04 Akim Demaille <akim@epita.fr>
12587
12588 When a literal string is used to define two different tokens,
12589 `bison -v' segfaults.
12590 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
12591
12592 * tests/regression.m4: New file.
12593 Include the core of the sample provided by Piotr Gackiewicz.
12594 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
12595 properly.
12596
12597 2000-10-04 Akim Demaille <akim@epita.fr>
12598
12599 * src/reader.c (parse_expect_decl): Keep `count' within the size
12600 of `buffer'.
12601 From Neil Booth.
12602
12603 2000-10-02 Paul Eggert <eggert@twinsun.com>
12604
12605 * bison.s1 (yyparse): Assign the default value
12606 unconditionally, to avoid a GCC warning and make the parser a
12607 tad smaller.
12608
12609 2000-10-02 Akim Demaille <akim@epita.fr>
12610
12611 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
12612 options.
12613
12614 2000-10-02 Akim Demaille <akim@epita.fr>
12615
12616 * src/derives.c, src/print.c, src/reduce.c: To ease the
12617 translation, move some `\n' out of the translated strings.
12618
12619 2000-10-02 Akim Demaille <akim@epita.fr>
12620
12621 The location tracking mechanism is precious for parse error
12622 messages. Nevertheless, it is enabled only when `@n' is used in
12623 the grammar, which is a different issue (you can use it in error
12624 message, but not in the grammar per se). Therefore, there should
12625 be another means to enable it.
12626
12627 * src/getargs.c (getargs): Support `--locations'.
12628 (usage): Report it.
12629 * src/getargs.h (locationsflag): Export it.
12630 * src/lex.c (percent_table): Support `%locations'.
12631 * src/reader.c (yylsp_needed): Remove this variable, now replaced
12632 with `locationsflag'.
12633 * doc/bison.texinfo: Document `--locations' and `%locations'.
12634 Sort the options.
12635 * tests/calc.m4: Test it.
12636
12637 For regularity of the names, replace each
12638 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
12639 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
12640 In addition replace each `flag' with `_flag'.
12641
12642 2000-10-02 Akim Demaille <akim@epita.fr>
12643
12644 Also test parse error messages, including with YYERROR_VERBOSE.
12645
12646 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
12647 associative).
12648 Use it to check the computations.
12649 Use it to check `nonassoc' is honored.
12650 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
12651 `--yyerror-verbose'.
12652 (_AT_CHECK_CALC): Adjust to this option.
12653 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
12654
12655 2000-10-02 Akim Demaille <akim@epita.fr>
12656
12657 Test also `--verbose', `--defines' and `--name-prefix'. Testing
12658 the latter demonstrates a flaw in the handling of non debugging
12659 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
12660 was used in order to simplify:
12661
12662 #if YYDEBUG
12663 if (yydebug)
12664 {
12665 ...
12666 }
12667 #endif
12668
12669 into
12670
12671 if (yydebug)
12672 {
12673 ...
12674 }
12675
12676 unfortunately this leads to a CPP conflict when
12677 `--name-prefix=foo' is used since it produces `#define yydebug
12678 foodebug'.
12679
12680 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
12681 (YYDPRINTF): New macro.
12682 Spread its use.
12683 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
12684 the bison options.
12685 Also test `--verbose', `--defines' and `--name-prefix'.
12686
12687 2000-10-02 Akim Demaille <akim@epita.fr>
12688
12689 Improve the readability of the produced parsers.
12690
12691 * src/bison.s1: Formatting changes.
12692 Improve the comment related to the `$' mark.
12693 (yydefault): Don't fall through to `yyresume': `goto' there.
12694 * src/output.c (output_parser): When the `$' is met, skip the end
12695 of its line.
12696 New variable, `number_of_dollar_signs', to check there's exactly
12697 one `$' in the parser skeleton.
12698
12699 2000-10-02 Akim Demaille <akim@epita.fr>
12700
12701 * lib/xstrdup.c: New file, from the fileutils.
12702 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
12703 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
12704 instead of strlen + xmalloc + strcpy.
12705 * src/symtab.c (copys): Remove, use xstrdup instead.
12706
12707 2000-10-02 Akim Demaille <akim@epita.fr>
12708
12709 * src/gram.h (associativity): New enum type which replaces the
12710 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
12711 `right_assoc', `left_assoc' and `non_assoc'.
12712 Adjust all dependencies.
12713 * src/reader.c: Formatting changes.
12714 (LTYPESTR): Don't define it, use it as a literal in
12715 `reader_output_yylsp'.
12716 * src/symtab.h (symbol_class): New enum type which replaces the
12717 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
12718 `sunknown', `stoken and `snterm'.
12719
12720 2000-10-02 Akim Demaille <akim@epita.fr>
12721
12722 * src/getargs.c (fixed_outfiles): Rename as...
12723 (yaccflag): for consistency and accuracy.
12724 Adjust dependencies.
12725
12726 2000-10-02 Akim Demaille <akim@epita.fr>
12727
12728 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
12729 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
12730 difficult and introduced a lot of core dump. It turns out that
12731 Bison used an implementation of `xmalloc' based on `calloc', and
12732 at various places it does depend upon the initialization to 0. I
12733 have not tried to isolate the pertinent places, and all the former
12734 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
12735 someone should address this issue.
12736
12737 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
12738 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
12739 files.
12740 Adjust dependencies.
12741 * src/warshall.h: New file.
12742 Propagate.
12743
12744 2000-10-02 Akim Demaille <akim@epita.fr>
12745
12746 Various anti-`extern in *.c' changes.
12747
12748 * src/system.h: Include `assert.h'.
12749
12750 2000-10-02 Akim Demaille <akim@epita.fr>
12751
12752 * src/state.h (nstates, final_state, first_state, first_shift)
12753 (first_reduction): Move their exportation from here...
12754 * src/LR0.h: to here.
12755 Adjust dependencies.
12756 * src/getargs.c (statisticsflag): New variable.
12757 Add support for `--statistics'.
12758 Adjust dependencies.
12759
12760 Remove a lot of now useless `extern' statements in most files.
12761
12762 2000-10-02 Akim Demaille <akim@epita.fr>
12763
12764 * src/LR0.h: New file.
12765 Propagate its use.
12766
12767 2000-10-02 Akim Demaille <akim@epita.fr>
12768
12769 * src/print.h: New file.
12770 Propagate its use.
12771 * src/print.c: Formatting and ordering changes.
12772 (verbose, terse): Replace with...
12773 (print_results): this new function.
12774 Adjust dependencies.
12775
12776 2000-10-02 Akim Demaille <akim@epita.fr>
12777
12778 * src/conflicts.c (conflict_report): New function.
12779 (conflict_log, verbose_conflict_log): Replace with...
12780 (print_conflicts): this function.
12781 Adjust dependencies.
12782 * src/conflicts.h: New file.
12783 Propagate its inclusion.
12784
12785 2000-10-02 Akim Demaille <akim@epita.fr>
12786
12787 * src/nullable.h: New file.
12788 Propagate its inclusion.
12789 * src/nullable.c: Formatting changes.
12790
12791 2000-10-02 Akim Demaille <akim@epita.fr>
12792
12793 * src/reduce.h: New file.
12794 Propagate its inclusion.
12795 * src/reduce.c: Topological sort and other formatting changes.
12796 (bool, TRUE, FALSE): Move their definition to...
12797 * src/system.h: here.
12798
12799 2000-10-02 Akim Demaille <akim@epita.fr>
12800
12801 * src/files.c: Formatting changes.
12802 (tryopen, tryclose, openfiles): Rename as...
12803 (xfopen, xfclose, open_files): this.
12804 (stringappend): static.
12805 * src/files.h: Complete the list of exported symbols.
12806 Propagate its use.
12807
12808 2000-10-02 Akim Demaille <akim@epita.fr>
12809
12810 * src/reader.h: New file.
12811 Propagate its use instead of tedious list of `extern' and
12812 prototypes.
12813 * src/reader.c: Formatting changes, topological sort,
12814 s/register//.
12815
12816 2000-10-02 Akim Demaille <akim@epita.fr>
12817
12818 * src/lex.h: Prototype `lex.c' exported functions.
12819 * src/reader.c: Adjust.
12820 * src/lex.c: Formatting changes.
12821 (safegetc): Rename as...
12822 (xgetc): this.
12823
12824 2000-10-02 Akim Demaille <akim@epita.fr>
12825
12826 * src/lalr.h: New file.
12827 Propagate its inclusion instead of prototypes and `extern'.
12828 * src/lalr.c: Formatting changes, topological sorting etc.
12829
12830 2000-10-02 Akim Demaille <akim@epita.fr>
12831
12832 * src/output.c (token_actions): Introduce a temporary array,
12833 YYDEFACT, that makes it possible for this function to use
12834 output_short_table.
12835
12836 2000-10-02 Akim Demaille <akim@epita.fr>
12837
12838 `user_toknums' is output as a `short[]' in `output.c', while it is
12839 defined as a `int[]' in `reader.c'. For consistency with the
12840 other output tables, `user_toknums' is now defined as a table of
12841 shorts.
12842
12843 * src/reader.c (user_toknums): Be a short table instead of an int
12844 table.
12845 Adjust dependencies.
12846
12847 Factor the short table outputs.
12848
12849 * src/output.c (output_short_table): New function.
12850 * src/output.c (output_gram, output_stos, output_rule_data)
12851 (output_base, output_table, output_check): Use it.
12852
12853 2000-10-02 Akim Demaille <akim@epita.fr>
12854
12855 * src/output.c (output): Topological sort of the functions, in
12856 order to get rid of the `static' prototypes.
12857 No longer use `register'.
12858 * src/output.h: New file.
12859 Propagate its inclusion in files explicitly prototyping functions
12860 from output.c.
12861
12862 2000-09-21 Akim Demaille <akim@epita.fr>
12863
12864 * src/atgeneral.m4: Update from Autoconf.
12865
12866 2000-09-21 Akim Demaille <akim@epita.fr>
12867
12868 * src/closure.h: New file.
12869 * src/closure.c: Formatting changes, topological sort over the
12870 functions, use of closure.h.
12871 (initialize_closure, finalize_closure): Rename as...
12872 (new_closure, free_closure): these. Adjust dependencies.
12873 * src/LR0.c: Formatting changes, topological sort, use of
12874 cloture.h.
12875 (initialize_states): Rename as...
12876 (new_states): this.
12877 * src/Makefile.am (noinst_HEADERS): Adjust.
12878
12879 2000-09-20 Akim Demaille <akim@epita.fr>
12880
12881 * src/acconfig.h: Don't protect config.h against multiple
12882 inclusion.
12883 Don't define PARAMS.
12884 * src/system.h: Define PARAMS.
12885 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
12886 purpose of config.h. system.h must not try to fix wrong
12887 definitions in config.h.
12888
12889 2000-09-20 Akim Demaille <akim@epita.fr>
12890
12891 * src/derives.h: New file.
12892 * src/main.c, src/derives.h: Use it.
12893 Formatting changes.
12894 * src/Makefile.am (noinst_HEADERS): Adjust.
12895
12896 2000-09-20 Akim Demaille <akim@epita.fr>
12897
12898 * tests/atgeneral.m4: Update from Autoconf.
12899 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
12900 (AT_CHECK_CALC): New macros.
12901 Use these macros to test bison with options `', `--raw',
12902 `--debug', `--yacc', `--yacc --debug'.
12903
12904 2000-09-19 Akim Demaille <akim@epita.fr>
12905
12906 * src/output.c: Formatting changes.
12907 * src/machine.h: Remove, leaving its contents in...
12908 * src/system.h: here.
12909 Include stdio.h.
12910 Adjust all dependencies on stdio.h and machine.h.
12911 * src/getargs.h: New file.
12912 Let all `extern' declarations about getargs.c be replaced with
12913 inclusion of `getargs.h'.
12914 * src/Makefile.am (noinst_HEADERS): Adjust.
12915
12916 * tests/calc.m4 (yyin): Be initialized in main, not on the global
12917 scope.
12918 (yyerror): Returns void, not int.
12919 * doc/bison.texinfo: Formatting changes.
12920
12921 2000-09-19 Akim Demaille <akim@epita.fr>
12922
12923 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
12924 portable.
12925
12926 2000-09-18 Akim Demaille <akim@epita.fr>
12927
12928 * configure.in: Append WARNING_CFLAGS to CFLAGS.
12929 * src/Makefile.am (INCLUDES): Don't.
12930 Be ready to fetch headers in lib/.
12931
12932 2000-09-18 Akim Demaille <akim@epita.fr>
12933
12934 * doc/bison.texinfo: Update the copyright.
12935 ANSIfy and GNUify the examples.
12936 Remove the old menu.
12937
12938 2000-09-18 Akim Demaille <akim@epita.fr>
12939
12940 First set of tests: use the `calc' example from the documentation.
12941
12942 * src/bison.s1 (yyparse): Condition the code using `yytname' which
12943 is defined only when YYDEBUG is.
12944 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
12945 * src/files.c (tryopen, tryclose): Formatting changes.
12946 Move to the top and be static.
12947 * src/reader.c (read_signed_integer): Likewise.
12948 * tests/calc.m4: New file.
12949 * Makefile.am, suite.m4: Adjust.
12950 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
12951
12952 2000-09-18 Akim Demaille <akim@epita.fr>
12953
12954 Add support for an Autotest test suite for Bison.
12955
12956 * m4/m4.m4, m4/atconfig.m4: New files.
12957 * m4/Makefile.am (EXTRA_DIST): Adjust.
12958 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
12959 files.
12960 * src/getargs.c: Display a more standard --version message.
12961 * src/reader.c (reader): Formatting changes.
12962 No longer depend upon VERSION_STRING.
12963 * configure.in: No longer use `dnl'.
12964 Set up the test suite and the new directory `tests/.
12965 (VERSION_STRING): Remove.
12966
12967 2000-04-14 Akim Demaille <akim@epita.fr>
12968
12969 * src/reader.c (copy_comment2): New function, same as former
12970 `copy_comment', but outputs into two FILE *.
12971 (copy_comment): Use it.
12972 (parse_union_decl): Use it.
12973 (get_type, parse_start_decl): Use the same `invalid' message.
12974 (parse_start_decl, parse_union_decl): Use the same `multiple'
12975 message.
12976 (parse_union_decl, copy_guard, copy_action): Use the same
12977 `unmatched' message.
12978 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
12979
12980 2000-03-31 Akim Demaille <akim@epita.fr>
12981
12982 * src/files.c (tryopen, tryclose): Move to the top.
12983 Be static.
12984
12985 2000-03-31 Akim Demaille <akim@epita.fr>
12986
12987 * src/main.c (main): Don't call `done', exit does it.
12988
12989 2000-03-31 Akim Demaille <akim@epita.fr>
12990
12991 * allocate.c: s/return (foo)/return foo/.
12992 * lalr.c: Likewise.
12993 * LR0.c: Likewise.
12994 * output.c: Likewise.
12995 * reader.c: Likewise.
12996 * symtab.c: Likewise.
12997 * vmsgetargs.c: Likewise.
12998
12999 2000-03-31 Akim Demaille <akim@epita.fr>
13000
13001 Clean up the error reporting functions.
13002
13003 * src/report.c: New file.
13004 * src/report.h: Likewise.
13005 * src/Makefile.am: Adjust.
13006 * m4/error.m4: New file.
13007 * m4/Makefile.am: Adjust.
13008 * configure.in (jm_PREREQ_ERROR): Call it.
13009 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
13010 Remove.
13011 (fatal, fatals): Remove. All callers use complain.c::fatal.
13012 (warn, warni, warns, warnss, warnss): Remove. All callers use
13013 complain.c::complain.
13014 (toomany): Remove, use fatal instead.
13015 * src/files.c (done): No argument, use complain_message_count.
13016 * src/main.c (main): Register `done' to `atexit'.
13017
13018 * src/getargs.c (usage): More `fputs', less `fprintf'.
13019
13020 2000-03-28 Akim Demaille <akim@epita.fr>
13021
13022 * lib/: New directory.
13023 * Makefile.am (SUBDIRS): Adjust.
13024 * configure.in: Adjust.
13025 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
13026 useless.
13027 * src/alloca.c: Moved to lib/.
13028 * src/getopt.c: Likewise.
13029 * src/getopt1.c: Likewise.
13030 * src/getopt.h: Likewise.
13031 * src/ansi2knr.c: Likewise.
13032 * src/ansi2knr.1: Likewise.
13033 * src/Makefile.am: Adjust.
13034 * lib/Makefile.am: New file.
13035
13036 2000-03-28 Akim Demaille <akim@epita.fr>
13037
13038 * src/getargs.c (usage): Refresh the help message.
13039
13040 2000-03-17 Akim Demaille <akim@epita.fr>
13041
13042 * src/getopt1.c: Updated from textutils 2.0e
13043 * src/getopt.c: Likewise.
13044 * src/getopt.h: Likewise.
13045
13046 2000-03-17 Akim Demaille <akim@epita.fr>
13047
13048 * src/Makefile.am (bison.simple): Fix the awk program: quote only
13049 the file name, not the whole `#line LINE FILE'.
13050
13051 2000-03-17 Akim Demaille <akim@epita.fr>
13052
13053 On syntax errors, report the token on which we choked.
13054
13055 * src/bison.s1 (yyparse): In the label yyerrlab, when
13056 YYERROR_VERBOSE, add yychar in msg.
13057
13058 2000-03-17 Akim Demaille <akim@epita.fr>
13059
13060 * src/reader.c (copy_at): New function.
13061 (copy_guard): Use it.
13062 (copy_action): Use it.
13063
13064 2000-03-17 Akim Demaille <akim@epita.fr>
13065
13066 Be kind to translators, save some useless translations.
13067
13068 * src/main.c (banner): New function.
13069 (fatal_banner): Use it.
13070 (warn_banner): Use it.
13071
13072 2000-03-17 Akim Demaille <akim@epita.fr>
13073
13074 * src/reader.c (copy_definition): Use copy_string and
13075 copy_comment. Removed now unused `match', `ended',
13076 `cplus_comment'.
13077 (copy_comment, copy_string): Moved, to be visible from
13078 copy_definition.
13079
13080 2000-03-17 Akim Demaille <akim@epita.fr>
13081
13082 * src/reader.c (copy_string): Declare `static inline'. No
13083 problems with inline, since it is checked by configure.
13084 (copy_comment): Likewise.
13085
13086 2000-03-17 Akim Demaille <akim@epita.fr>
13087
13088 * src/reader.c (packsymbols): Formatting changes.
13089
13090 2000-03-17 Akim Demaille <akim@epita.fr>
13091
13092 * src/reader.c (copy_comment): New function, factored out from:
13093 (copy_action): Use it. Removed now unused `match', `ended',
13094 `cplus_comment'.
13095 (copy_guard): Likewise.
13096
13097 2000-03-17 Akim Demaille <akim@epita.fr>
13098
13099 * src/reader.c (copy_string): New function, factored out from:
13100 (copy_action): Use it.
13101 (copy_guard): Likewise.
13102
13103 2000-03-17 Akim Demaille <akim@epita.fr>
13104
13105 Change the handling of @s so that they behave exactly like $s.
13106 There is now a pseudo variable @$ (readble and writable), location
13107 of the lhs of the rule (by default ranging from the location of
13108 the first symbol of the rhs, to the location of the last symbol,
13109 or, if the rhs is empty, YYLLOC).
13110
13111 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
13112 yyval.
13113 (yyparse): When providing a default semantic action, provide a
13114 default location action.
13115 (after the $): No longer change `*YYLSP', just stack YYLOC the
13116 same way you stack YYVAL.
13117 * src/reader.c (read_declarations): Use warns.
13118 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
13119 (copy_action, case '@'): Likewise.
13120 Use a standard error message, to save useless work from
13121 translators.
13122
13123 2000-03-17 Akim Demaille <akim@epita.fr>
13124
13125 * src/bison.s1: Formatting and cosmetics changes.
13126 * src/reader.c: Likewise.
13127 Update the Copyright notice.
13128
13129 2000-03-17 Akim Demaille <akim@epita.fr>
13130
13131 * src/bison.s1 (#line): All set to `#line' only, since the
13132 Makefile now handles them.
13133
13134 2000-03-16 Akim Demaille <akim@epita.fr>
13135
13136 * src/output.c (output_rule_data): Output the documentation of
13137 some of the tables.
13138 (Copyright notice): Update.
13139 Formatting changes.
13140
13141 2000-03-16 Akim Demaille <akim@epita.fr>
13142
13143 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
13144 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
13145 One `#if YYDEBUG' remains, since it uses variables which are
13146 defined only if `YYDEBUG != 0'.
13147
13148 2000-03-16 Akim Demaille <akim@epita.fr>
13149
13150 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
13151 and related variables so that the similarities are highlighted.
13152
13153 2000-03-16 Akim Demaille <akim@epita.fr>
13154
13155 * src/bison.s1: Properly indent CPP directives.
13156
13157 2000-03-16 Akim Demaille <akim@epita.fr>
13158
13159 * src/bison.s1: Properly indent the `alloca' CPP section.
13160
13161 2000-03-16 Akim Demaille <akim@epita.fr>
13162
13163 Do not hard code values of directories in `configure.in'.
13164 Update the `configure' tool chain.
13165
13166 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
13167 src/makefile.am.
13168 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
13169 (AC_OUTPUT): Add m4/Makefile.
13170 Bump to bison 1.28a, 1.29 has never been released.
13171 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
13172 handled via src/Makefile.am.
13173 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
13174 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
13175 autoheader.
13176 * Makefile.am (SUBDIRS): Add m4.
13177 (ACLOCAL_AM_FLAGS): New variable.
13178 (AUTOMAKE_OPTIONS): Add check-news.
13179 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
13180 the proper line number and file name.
13181 (DEFS): Propagate the location of bison library files and of the
13182 locale files.
13183 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
13184 builddir.
13185 * acinclude.m4: Remove, replaced by the directory m4.
13186 * m4/Makefile.am (EXTRA_DIST): New variable.
13187 * m4/gettext.m4: New file, from the fileutils.
13188 * m4/lcmessage.m4: Likewise
13189 * m4/progtest.m4: Likewise.
13190 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
13191
13192 2000-03-10 Akim Demaille <akim@epita.fr>
13193
13194 * src/closure.c:
13195 Formatting changes of various comments.
13196 Respect the GNU coding standards at various places.
13197 Don't use `_()' when no translation is needed.
13198
13199 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13200
13201 * src/files.c:
13202 OS/2 honors TMPDIR environment variable.
13203
13204 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13205
13206 * doc/bison.texinfo: Tweaked spelling and grammar.
13207 Updated ISBN.
13208 Removed reference to price of printed copy.
13209 Mention BISON_SIMPLE and BISON_HAIRY.
13210
13211 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13212
13213 * configure.in, NEWS:
13214 Bison 1.29 released.
13215
13216 1999-10-27 Jesse Thilo <jthilo@gnu.org>
13217
13218 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
13219 Added reference card.
13220
13221 1999-07-26 Jesse Thilo <jthilo@gnu.org>
13222
13223 * po/ru.po: Added Russian translation.
13224
13225 1999-07-26 Jesse Thilo <jthilo@gnu.org>
13226
13227 * configure.in: Added Russian translation.
13228
13229 1999-07-06 Jesse Thilo <jthilo@gnu.org>
13230
13231 * configure.in, NEWS, README:
13232 Released version 1.28.
13233
13234 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13235
13236 * src/system.h:
13237 Squashed redefinition warning on some systems.
13238
13239 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
13240 Have configure build version string instead of relying on ANSI string
13241 concatentation.
13242
13243 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13244
13245 * po/POTFILES.in: Got rid of version.c.
13246
13247 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13248
13249 * acconfig.h, configure.in:
13250 Have configure build version string instead of relying on ANSI string
13251 concatentation.
13252
13253 1999-06-08 Jesse Thilo <jthilo@gnu.org>
13254
13255 * doc/bison.1:
13256 Dropped mention of `+' for long-named options.
13257
13258 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13259
13260 * src/files.c: Added <unistd.h> for unlink().
13261
13262 * src/Makefile.am, src/system.h:
13263 I18n fixes.
13264
13265 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13266
13267 * README: Added a FAQ list.
13268
13269 * configure.in, acconfig.h:
13270 I18n fixes.
13271
13272 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13273
13274 * doc/FAQ, doc/Makefile.am:
13275 Added a FAQ list.
13276
13277 1999-05-19 Jesse Thilo <jthilo@gnu.org>
13278
13279 * src/alloc.h, src/symtab.h, src/version.c:
13280 Protected inclusion of "config.h" with HAVE_CONFIG_H.
13281
13282 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13283
13284 * src/.cvsignore, src/Makefile.am:
13285 Reorganized: sources in `src', documentation in `doc'.
13286
13287 * src/lex.c (literalchar):
13288 fixed the code for escaping double quotes (thanks
13289 Jonathan Czisny.)
13290
13291 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13292
13293 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
13294 Adjusted paths to reflect directory reorganization.
13295
13296 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13297
13298 * doc/.cvsignore, doc/Makefile.am:
13299 Reorganized: sources in `src', documentation in `doc'.
13300
13301 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13302
13303 * configure.in:
13304 Updated AC_INIT file to reflect directory reorganization.
13305
13306 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
13307 Reorganized: sources in `src', documentation in `doc'.
13308
13309 1999-04-13 Jesse Thilo <jthilo@gnu.org>
13310
13311 * src/allocate.c:
13312 Don't declare calloc() and realloc() if not necessary.
13313
13314 1999-04-13 Jesse Thilo <jthilo@gnu.org>
13315
13316 * configure.in, acconfig.h, acinclude.m4:
13317 Don't declare calloc() and realloc() if not necessary.
13318
13319 1999-03-23 Jesse Thilo <jthilo@gnu.org>
13320
13321 * po/.cvsignore: Added i18n support.
13322
13323 1999-03-23 Jesse Thilo <jthilo@gnu.org>
13324
13325 * acconfig.h, configure.in, Makefile.am:
13326 Added i18n support.
13327
13328 1999-03-22 Jesse Thilo <jthilo@gnu.org>
13329
13330 * src/bison.s1: Fixed #line numbers.
13331
13332 1999-03-15 Jesse Thilo <jthilo@gnu.org>
13333
13334 * po/es.po, po/fr.po, po/nl.po, po/de.po:
13335 Added PO files from Translation Project.
13336
13337 1999-03-03 Jesse Thilo <jthilo@gnu.org>
13338
13339 * Makefile.am:
13340 Added support for non-ANSI compilers (ansi2knr).
13341
13342 1999-02-16 Jesse Thilo <jthilo@gnu.org>
13343
13344 * configure.in: Bumped version number to 1.27.
13345
13346 * Makefile.am:
13347 Added `bison.simple' to list of files removed by `make distclean'.
13348
13349 1999-02-12 Jesse Thilo <jthilo@gnu.org>
13350
13351 * src/files.c, src/files.h:
13352 Defined locations of parser files in config.h instead of Makefile.
13353
13354 1999-02-12 Jesse Thilo <jthilo@gnu.org>
13355
13356 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
13357 Defined locations of parser files in config.h instead of Makefile.
13358
13359 1999-02-09 Jesse Thilo <jthilo@gnu.org>
13360
13361 * Makefile.am:
13362 Removed inappropriate use of $< macro.
13363
13364 1999-02-05 Jesse Thilo <jthilo@gnu.org>
13365
13366 * po/Makefile.in.in, po/POTFILES.in:
13367 Add `po' directory skeleton.
13368
13369 1999-01-27 Jesse Thilo <jthilo@gnu.org>
13370
13371 * README: Document help-bison list.
13372
13373 * configure.in: Add check for mkstemp().
13374
13375 1999-01-20 Jesse Thilo <jthilo@gnu.org>
13376
13377 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
13378 Hush a few compiler warnings.
13379
13380 * src/files.c:
13381 Add tryclose(), which verifies that fclose was successful.
13382 Hush a couple of compiler warnings.
13383
13384 1999-01-20 Jesse Thilo <jthilo@gnu.org>
13385
13386 * Makefile.am, OChangeLog:
13387 ChangeLog is now automatically generated. Include the old version as
13388 OChangeLog.
13389
13390 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13391
13392 * 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:
13393 Update FSF address.
13394
13395 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13396
13397 * doc/bison.texinfo: Fix formatting glitch.
13398
13399 * doc/bison.texinfo: Update FSF address.
13400
13401 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13402
13403 * acconfig.h: Update FSF address.
13404
13405 1999-01-08 Jesse Thilo <jthilo@gnu.org>
13406
13407 * src/system.h:
13408 Don't define PACKAGE here, since config.h defines it.
13409
13410 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13411
13412 * src/reader.c: Update copyright date.
13413
13414 * src/main.c:
13415 Ditch sprintf to statically-sized buffers in fatal/warn functions in
13416 favor of output directly to stderr (avoids buffer overruns).
13417
13418 * src/reader.c: Some checks for premature EOF.
13419
13420 * 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:
13421 Use prototypes if the compiler understands them.
13422
13423 * src/files.c: Honor TMPDIR on Unix hosts.
13424 Use prototypes if the compiler understands them.
13425
13426 * src/reader.c:
13427 Fix a couple of buffer overrun bugs.
13428 Use prototypes if the compiler understands them.
13429
13430 * src/system.h: Include unistd.h and ctype.h.
13431 Use #ifdef instead of #if for NLS symbols.
13432
13433 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13434
13435 * doc/bison.texinfo:
13436 Delete comment "consider using @set for edition number, etc..." since
13437 we now are doing so.
13438
13439 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13440
13441 * configure.in:
13442 Use prototypes if the compiler understands them.
13443
13444 * NEWS: Document 1.26 highlights.
13445
13446 * Makefile.am: Require Automake 1.3 or later.
13447
13448 * acconfig.h:
13449 Use prototypes if the compiler understands them.
13450
13451 1998-12-29 Jesse Thilo <jthilo@gnu.org>
13452
13453 * src/version.c:
13454 Use VERSION symbol from automake for version number.
13455
13456 1998-12-29 Jesse Thilo <jthilo@gnu.org>
13457
13458 * acconfig.h, configure.in, version.cin:
13459 Use VERSION symbol from automake for version number.
13460
13461 1998-11-28 Jesse Thilo <jthilo@gnu.org>
13462
13463 * Makefile.am:
13464 Distribute original version of simple parser (bison.s1), not built
13465 version (bison.simple).
13466
13467 1998-11-28 Jesse Thilo <jthilo@gnu.org>
13468
13469 * doc/bison.texinfo: Add info dir entry.
13470
13471 * doc/bison.texinfo:
13472 Let automake put version number into documentation.
13473
13474 1998-11-26 Jesse Thilo <jthilo@gnu.org>
13475
13476 * src/bison.cld, src/build.com, src/vmshlp.mar:
13477 Add non-RCS files from /gd/gnu/bison.
13478
13479 1998-11-26 Jesse Thilo <jthilo@gnu.org>
13480
13481 * doc/bison.1:
13482 Document the BISON_HAIRY and BISON_SIMPLE variables.
13483
13484 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13485
13486 * src/version.c: Build version.c automatically.
13487
13488 * src/reader.c:
13489 Fix token numbering (used to start at 258, not 257).
13490
13491 * src/system.h: Include config.h.
13492
13493 * src/getargs.c: Update bug report address.
13494
13495 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
13496 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
13497
13498 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13499
13500 * Makefile.am:
13501 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13502
13503 * configure.in, version.cin:
13504 Build version.c automatically.
13505
13506 * AUTHORS: Add AUTHORS file.
13507
13508 * README: Update bug report address.
13509
13510 * bison.simple:
13511 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13512
13513 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
13514 Add automake stuff.
13515
13516 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13517
13518 * doc/bison.texinfo: Clean up some formatting.
13519
13520 1998-05-05 Richard Stallman <rms@gnu.org>
13521
13522 * doc/bison.texinfo:
13523 Explain better why to make a pure parser.
13524
13525 1998-01-05 Richard Stallman <rms@gnu.org>
13526
13527 * src/files.c (openfiles):
13528 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
13529 find a temporary directory, if possible. Do not unlink files while
13530 they are open.
13531
13532 1997-08-25 Richard Stallman <rms@gnu.org>
13533
13534 * src/reader.c (stack_offset;):
13535 Change some warni to warns.
13536
13537 * src/lex.c (literalchar): Use warns, not warni.
13538
13539 1997-06-28 Richard Stallman <rms@gnu.org>
13540
13541 * src/bison.s1: Add a Bison version comment.
13542
13543 * src/main.c (fatal, warn, berror):
13544 Use program_name.
13545
13546 1997-06-28 Richard Stallman <rms@gnu.org>
13547
13548 * Makefile.in (bison_version): New variable.
13549 (dist): Use that variable.
13550 (bison.s1): Substitute the Bison version into bison.simple.
13551
13552 * bison.simple: Add a Bison version comment.
13553
13554 1997-06-18 Richard Stallman <rms@gnu.org>
13555
13556 * src/main.c (fatal, warn, berror):
13557 Make error messages standard.
13558 (toomany): Improve error message text.
13559
13560 * 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:
13561 new.h renamed to alloc.h.
13562
13563 1997-06-18 Richard Stallman <rms@gnu.org>
13564
13565 * Makefile.in: new.h renamed to alloc.h.
13566
13567 1997-05-24 Richard Stallman <rms@gnu.org>
13568
13569 * src/lex.c (literalchar):
13570 Fix the code for escaping \, " and '.
13571
13572 (lex): Avoid trouble when there are many chars
13573 to discard in a char literal with just several chars in it.
13574
13575 1997-05-17 Richard Stallman <rms@gnu.org>
13576
13577 * src/bison.s1:
13578 Use malloc, if using alloca is troublesome.
13579 (YYSTACK_USE_ALLOCA): New flag macro.
13580 Define it for some systems and compilers.
13581 (YYSTACK_ALLOC): New macro.
13582 (yyparse): Use YYSTACK_ALLOC to allocate stack.
13583 If it was malloc'd, free it.
13584
13585 1997-05-17 Richard Stallman <rms@gnu.org>
13586
13587 * bison.simple:
13588 Use malloc, if using alloca is troublesome.
13589 (YYSTACK_USE_ALLOCA): New flag macro.
13590 Define it for some systems and compilers.
13591 (YYSTACK_ALLOC): New macro.
13592 (yyparse): Use YYSTACK_ALLOC to allocate stack.
13593 If it was malloc'd, free it.
13594
13595 1997-04-23 Richard Stallman <rms@gnu.org>
13596
13597 * src/bison.s1:
13598 (alloca) [__hpux]: Always define as __builtin_alloca.
13599
13600 1997-04-23 Richard Stallman <rms@gnu.org>
13601
13602 * bison.simple:
13603 (alloca) [__hpux]: Always define as __builtin_alloca.
13604
13605 1997-04-22 Richard Stallman <rms@gnu.org>
13606
13607 * src/bison.s1:
13608 [__hpux]: Include alloca.h (right for HPUX 10)
13609 instead of declaring alloca (right for HPUX 9).
13610
13611 * src/bison.s1 (__yy_memcpy):
13612 Declare arg `count' as unsigned int.
13613 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
13614
13615 1997-04-22 Richard Stallman <rms@gnu.org>
13616
13617 * bison.simple:
13618 [__hpux]: Include alloca.h (right for HPUX 10)
13619 instead of declaring alloca (right for HPUX 9).
13620
13621 * bison.simple (__yy_memcpy):
13622 Declare arg `count' as unsigned int.
13623 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
13624
13625 1997-01-03 Richard Stallman <rms@gnu.org>
13626
13627 * src/allocate.c: [__STDC__ or _MSC_VER]:
13628 Declare calloc and realloc to return void *.
13629
13630 1997-01-02 Richard Stallman <rms@gnu.org>
13631
13632 * src/system.h:
13633 [_MSC_VER]: Include stdlib.h and process.h.
13634 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
13635
13636 * src/main.c (main): Return FAILURE as a value.
13637 (printable_version): Declare arg as int, not char.
13638
13639 1997-01-02 Richard Stallman <rms@gnu.org>
13640
13641 * Makefile.in (dist):
13642 Explicitly check for symlinks, and copy them.
13643
13644 1996-12-19 Richard Stallman <rms@gnu.org>
13645
13646 * src/files.c:
13647 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
13648
13649 1996-12-18 Paul Eggert <eggert@gnu.org>
13650
13651 * src/bison.s1 (yyparse):
13652 If __GNUC__ and YYPARSE_PARAM are both defined,
13653 declare yyparse to have a void * argument.
13654
13655 1996-12-18 Paul Eggert <eggert@gnu.org>
13656
13657 * bison.simple (yyparse):
13658 If __GNUC__ and YYPARSE_PARAM are both defined,
13659 declare yyparse to have a void * argument.
13660
13661 1996-12-17 Richard Stallman <rms@gnu.org>
13662
13663 * src/reduce.c (nbits): Add some casts.
13664
13665 1996-08-12 Richard Stallman <rms@gnu.org>
13666
13667 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
13668
13669 1996-08-12 Richard Stallman <rms@gnu.org>
13670
13671 * bison.simple: Test _MSDOS as well as _MSDOS_.
13672
13673 1996-07-31 Richard Stallman <rms@gnu.org>
13674
13675 * src/bison.s1:
13676 [__sun && __i386]: Include alloca.h.
13677
13678 1996-07-31 Richard Stallman <rms@gnu.org>
13679
13680 * bison.simple:
13681 [__sun && __i386]: Include alloca.h.
13682
13683 1996-07-30 Richard Stallman <rms@gnu.org>
13684
13685 * src/bison.s1: Comment change.
13686
13687 * src/bison.s1: Test _MSDOS_, not MSDOS.
13688
13689 1996-07-30 Richard Stallman <rms@gnu.org>
13690
13691 * bison.simple: Comment change.
13692
13693 * bison.simple: Test _MSDOS_, not MSDOS.
13694
13695 1996-06-01 Richard Stallman <rms@gnu.org>
13696
13697 * 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:
13698 Insert `_' macro around many string constants.
13699
13700 * src/main.c:
13701 Insert `_' macro around many string constants.
13702
13703 (main): Call setlocale, bindtextdomain and textdomain.
13704
13705 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
13706 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
13707 [ENABLE_NLS]: Include libintl.h.
13708 [ENABLE_NLS] (gettext): Define.
13709 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
13710 (N_, PACKAGE, LOCALEDIR): New macros.
13711
13712 1996-06-01 Richard Stallman <rms@gnu.org>
13713
13714 * POTFILES.in: New file.
13715
13716 * Makefile.in (allocate.o):
13717 Define target explicitly.
13718
13719 * Makefile.in (CFLAGS): Set to @CFLAGS@.
13720 (LDFLAGS): Set to @LDFLAGS@.
13721 (configure): Run autoconf only if preceding `cd' succeeds.
13722 (bison.s1): Redirect output to temporary file then move the
13723 temporary to the target, rather than redirecting directly to bison.s1.
13724 (clean): Remove config.status and config.log.
13725 (distclean): Don't remove config.status here.
13726
13727 1996-05-12 Richard Stallman <rms@gnu.org>
13728
13729 * src/bison.s1:
13730 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
13731
13732 1996-05-12 Richard Stallman <rms@gnu.org>
13733
13734 * bison.simple:
13735 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
13736
13737 1996-05-11 Richard Stallman <rms@gnu.org>
13738
13739 * src/bison.s1 (__yy_memcpy):
13740 Really reorder the args, as was supposedly done on Feb 14 1995.
13741 (yyparse): Calls changed accordingly.
13742
13743 1996-05-11 Richard Stallman <rms@gnu.org>
13744
13745 * Makefile.in (dist): Don't use $(srcdir).
13746
13747 * bison.simple (__yy_memcpy):
13748 Really reorder the args, as was supposedly done on Feb 14 1995.
13749 (yyparse): Calls changed accordingly.
13750
13751 1996-01-27 Richard Stallman <rms@gnu.org>
13752
13753 * src/output.c (output_rule_data):
13754 Test YYERROR_VERBOSE in the conditional
13755 around the definition of ttyname.
13756
13757 1995-12-29 Richard Stallman <rms@gnu.org>
13758
13759 * src/bison.s1:
13760 Fix line numbers in #line commands.
13761
13762 1995-12-29 Richard Stallman <rms@gnu.org>
13763
13764 * bison.simple:
13765 Fix line numbers in #line commands.
13766
13767 1995-12-27 Richard Stallman <rms@gnu.org>
13768
13769 * src/bison.s1 (YYPARSE_PARAM_DECL):
13770 In C++, make it always null.
13771 (YYPARSE_PARAM_ARG): New macro.
13772 (yyparse): Use YYPARSE_PARAM_ARG.
13773
13774 1995-12-27 Richard Stallman <rms@gnu.org>
13775
13776 * bison.simple (YYPARSE_PARAM_DECL):
13777 In C++, make it always null.
13778 (YYPARSE_PARAM_ARG): New macro.
13779 (yyparse): Use YYPARSE_PARAM_ARG.
13780
13781 1995-11-29 Richard Stallman <rms@gnu.org>
13782
13783 * doc/bison.texinfo:
13784 Describe literal string tokens, %raw, %no_lines, %token_table.
13785
13786 1995-11-29 Daniel Hagerty <hag@gnu.org>
13787
13788 * doc/bison.texinfo: Fixed update date
13789
13790 1995-10-16 Richard Stallman <rms@gnu.org>
13791
13792 * src/version.c: Version 1.25.
13793
13794 1995-10-16 Richard Stallman <rms@gnu.org>
13795
13796 * NEWS: *** empty log message ***
13797
13798 1995-10-16 Richard Stallman <rms@gnu.org>
13799
13800 * doc/bison.1, doc/bison.rnh:
13801 Add new options.
13802
13803 1995-10-15 Richard Stallman <rms@gnu.org>
13804
13805 * src/vmsgetargs.c, src/getargs.c:
13806 Added -n, -k, and -raw switches.
13807 (noparserflag, toknumflag, rawtoknumflag): New variables.
13808
13809 * src/symtab.h (SALIAS):
13810 New #define for adding aliases to %token.
13811 (struct bucket): Added `alias' field.
13812
13813 * src/reduce.c (reduce_grammar):
13814 Revise error message.
13815 (print_notices): Remove final `.' from error message.
13816
13817 * src/reader.c (reader_output_yylsp):
13818 New function.
13819 (readgram): Use `#if 0' around code that accepted %command
13820 inside grammar rules: The documentation doesn't allow it,
13821 and it will fail since the %command processors scan for the next %.
13822 (parse_token_decl): Extended the %token
13823 declaration to allow a multi-character symbol as an alias.
13824 (parse_thong_decl): New function.
13825 (read_declarations): Added %thong declarations.
13826 (read_declarations): Handle NOOP to deal with allowing
13827 % declarations as another means to specify the flags.
13828 (readgram): Allow %prec prior to semantics embedded in a rule.
13829 (skip_to_char, read_declarations, copy_definition)
13830 (parse_token_decl, parse_start_decl, parse_type_decl)
13831 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
13832 (get_type_name, copy_guard, copy_action, readgram)
13833 (get_type, packsymbols): Revised most error messages.
13834 Changed `fatal' to `warnxxx' to avoid aborting for error.
13835 Revised and use multiple warnxxx functions to avoid using VARARGS1.
13836 (read_declarations): Improve the error message for
13837 an invalid character. Do not abort.
13838 (read_declarations, copy_guard, copy_action): Use
13839 printable_version to avoid unprintable characters in printed output.
13840 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
13841 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
13842 Allow the type of a non-terminal can be given
13843 more than once, as long as all specifications give the same type.
13844
13845 * src/output.c:
13846 (output_headers, output_trailers, output, output_gram)
13847 (output_rule_data): Implement noparserflag variable.
13848 Implement toknumflag variable.
13849 (output): Call reader_output_yylsp to output LTYPESTR.
13850
13851 * src/main.c (main):
13852 If reader sees an error, don't process the grammar.
13853 (fatals): Updated to not use VARARGS1.
13854 (printable_version, int_to_string, warn, warni, warns, warnss)
13855 (warnsss): New error reporting functions. Avoid abort for error.
13856
13857 * src/lex.h:
13858 Added THONG and NOOP for alias processing.
13859 Added SETOPT for the new code that allows setting options with %flags.
13860
13861 * src/lex.c:
13862 Include getopt.h. Add some extern decls.
13863 (safegetc): New function to deal with EOF gracefully.
13864 (literalchar); new function to deal with reading \ escapes.
13865 (lex): Use literalchar.
13866 (lex): Implemented "..." tokens.
13867 (literalchar, lex, parse_percent_token): Made tokenbuffer
13868 always contain the token. This includes growing the token
13869 buffer while reading an integer.
13870 (parse_percent_token): Replaced if-else statement with percent_table.
13871 (parse_percent_token): Added % declarations as another
13872 way to specify the flags -n, -l, and -r. Also added hooks for
13873 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
13874 major changes to files.c.
13875 (lex) Retain in the incoming stream a character following
13876 an incorrect '/'.
13877 (skip_white_space, lex): Revised most error messages
13878 and changed fatal to warn to avoid aborting.
13879 (percent_table): Added %thong declarations.
13880
13881 * src/gram.h: Comment changes.
13882
13883 * src/files.c (openfiles, open_extra_files, done):
13884 Add faction flag
13885 and actfile file. Handle noparserflag. Both for -n switch.
13886
13887 * src/conflicts.c (resolve_sr_conflict):
13888 Remove use of alloca.
13889
13890 1995-06-01 Jim Meyering <meyering@gnu.org>
13891
13892 * doc/bison.texinfo: *** empty log message ***
13893
13894 1995-05-06 Richard Stallman <rms@gnu.org>
13895
13896 * src/bison.s1: Comment change.
13897
13898 1995-05-06 Richard Stallman <rms@gnu.org>
13899
13900 * bison.simple: Comment change.
13901
13902 1995-05-03 Richard Stallman <rms@gnu.org>
13903
13904 * src/version.c: Version now 1.24.
13905
13906 * src/bison.s1: Change distribution terms.
13907
13908 * src/version.c: Version now 1.23.
13909
13910 1995-05-03 Richard Stallman <rms@gnu.org>
13911
13912 * doc/bison.texinfo:
13913 Rewrite "Conditions for Using Bison".
13914 Update version to 1.24.
13915
13916 1995-05-03 Richard Stallman <rms@gnu.org>
13917
13918 * bison.simple: Change distribution terms.
13919
13920 1995-02-23 Richard Stallman <rms@gnu.org>
13921
13922 * src/files.c: Test __VMS_POSIX as well as VMS.
13923
13924 1995-02-14 Jim Meyering <meyering@gnu.org>
13925
13926 * src/bison.s1 (__yy_memcpy):
13927 Renamed from __yy_bcopy to avoid
13928 confusion. Reverse FROM and TO arguments to be consistent with
13929 those of memcpy.
13930
13931 1995-02-14 Jim Meyering <meyering@gnu.org>
13932
13933 * bison.simple (__yy_memcpy):
13934 Renamed from __yy_bcopy to avoid
13935 confusion. Reverse FROM and TO arguments to be consistent with
13936 those of memcpy.
13937
13938 1994-11-10 David J. MacKenzie <djm@gnu.org>
13939
13940 * NEWS: reformat
13941
13942 * NEWS: New file.
13943
13944 * Makefile.in (DISTFILES): Include NEWS.
13945
13946 * Makefile.in (DISTFILES):
13947 Include install-sh, not install.sh.
13948
13949 * configure.in: Update to Autoconf v2 macro names.
13950
13951 1994-10-05 David J. MacKenzie <djm@gnu.org>
13952
13953 * Makefile.in: fix typo
13954
13955 * Makefile.in (prefix, exec_prefix):
13956 Let configure set them.
13957
13958 1994-09-28 David J. MacKenzie <djm@gnu.org>
13959
13960 * Makefile.in: Set datadir to $(prefix)/share.
13961
13962 1994-09-15 Richard Stallman <rms@gnu.org>
13963
13964 * src/bison.s1:
13965 Update copyright notice and GPL version.
13966
13967 1994-09-15 Richard Stallman <rms@gnu.org>
13968
13969 * bison.simple:
13970 Update copyright notice and GPL version.
13971
13972 1994-07-12 Richard Stallman <rms@gnu.org>
13973
13974 * src/reduce.c, src/reader.c:
13975 entered into RCS
13976
13977 1994-05-05 David J. MacKenzie <djm@gnu.org>
13978
13979 * Makefile.in: entered into RCS
13980
13981 1994-03-26 Richard Stallman <rms@gnu.org>
13982
13983 * src/bison.s1: entered into RCS
13984
13985 1994-03-26 Richard Stallman <rms@gnu.org>
13986
13987 * bison.simple: entered into RCS
13988
13989 1994-03-25 Richard Stallman <rms@gnu.org>
13990
13991 * src/main.c: entered into RCS
13992
13993 1994-03-24 Richard Stallman <rms@gnu.org>
13994
13995 * src/conflicts.c: entered into RCS
13996
13997 1994-01-02 Richard Stallman <rms@gnu.org>
13998
13999 * Makefile.in: *** empty log message ***
14000
14001 1993-11-21 Richard Stallman <rms@gnu.org>
14002
14003 * src/bison.s1: *** empty log message ***
14004
14005 1993-11-21 Richard Stallman <rms@gnu.org>
14006
14007 * doc/bison.texinfo: entered into RCS
14008
14009 * doc/bison.texinfo: *** empty log message ***
14010
14011 1993-11-21 Richard Stallman <rms@gnu.org>
14012
14013 * bison.simple: *** empty log message ***
14014
14015 1993-10-25 David J. MacKenzie <djm@gnu.org>
14016
14017 * doc/bison.texinfo: *** empty log message ***
14018
14019 1993-10-19 Richard Stallman <rms@gnu.org>
14020
14021 * src/bison.s1: *** empty log message ***
14022
14023 1993-10-19 Richard Stallman <rms@gnu.org>
14024
14025 * bison.simple: *** empty log message ***
14026
14027 1993-10-14 Richard Stallman <rms@gnu.org>
14028
14029 * src/bison.s1: *** empty log message ***
14030
14031 1993-10-14 Richard Stallman <rms@gnu.org>
14032
14033 * bison.simple: *** empty log message ***
14034
14035 1993-09-14 David J. MacKenzie <djm@gnu.org>
14036
14037 * doc/bison.texinfo: *** empty log message ***
14038
14039 1993-09-13 Noah Friedman <friedman@gnu.org>
14040
14041 * Makefile.in: *** empty log message ***
14042
14043 1993-09-10 Richard Stallman <rms@gnu.org>
14044
14045 * src/conflicts.c: *** empty log message ***
14046
14047 * src/system.h: entered into RCS
14048
14049 1993-09-10 Richard Stallman <rms@gnu.org>
14050
14051 * doc/bison.1: entered into RCS
14052
14053 1993-09-06 Noah Friedman <friedman@gnu.org>
14054
14055 * src/version.c: entered into RCS
14056
14057 1993-09-06 Noah Friedman <friedman@gnu.org>
14058
14059 * Makefile.in: *** empty log message ***
14060
14061 1993-07-30 David J. MacKenzie <djm@gnu.org>
14062
14063 * Makefile.in: *** empty log message ***
14064
14065 1993-07-24 Richard Stallman <rms@gnu.org>
14066
14067 * src/bison.s1: *** empty log message ***
14068
14069 1993-07-24 Richard Stallman <rms@gnu.org>
14070
14071 * bison.simple: *** empty log message ***
14072
14073 1993-07-08 David J. MacKenzie <djm@gnu.org>
14074
14075 * Makefile.in: *** empty log message ***
14076
14077 1993-07-04 Richard Stallman <rms@gnu.org>
14078
14079 * src/bison.s1: *** empty log message ***
14080
14081 1993-07-04 Richard Stallman <rms@gnu.org>
14082
14083 * bison.simple: *** empty log message ***
14084
14085 1993-06-26 David J. MacKenzie <djm@gnu.org>
14086
14087 * src/getargs.c: entered into RCS
14088
14089 1993-06-26 David J. MacKenzie <djm@gnu.org>
14090
14091 * doc/bison.texinfo: *** empty log message ***
14092
14093 * doc/bison.1: New file.
14094
14095 1993-06-25 Richard Stallman <rms@gnu.org>
14096
14097 * src/getargs.c: New file.
14098
14099 1993-06-16 Richard Stallman <rms@gnu.org>
14100
14101 * src/bison.s1: *** empty log message ***
14102
14103 1993-06-16 Richard Stallman <rms@gnu.org>
14104
14105 * bison.simple: *** empty log message ***
14106
14107 1993-06-03 Richard Stallman <rms@gnu.org>
14108
14109 * src/bison.s1: New file.
14110
14111 1993-06-03 Richard Stallman <rms@gnu.org>
14112
14113 * doc/bison.texinfo: *** empty log message ***
14114
14115 1993-06-03 Richard Stallman <rms@gnu.org>
14116
14117 * bison.simple: New file.
14118
14119 1993-05-19 Richard Stallman <rms@gnu.org>
14120
14121 * doc/bison.texinfo: New file.
14122
14123 1993-05-07 Noah Friedman <friedman@gnu.org>
14124
14125 * Makefile.in: *** empty log message ***
14126
14127 1993-04-28 Noah Friedman <friedman@gnu.org>
14128
14129 * src/reader.c: *** empty log message ***
14130
14131 1993-04-23 Noah Friedman <friedman@gnu.org>
14132
14133 * src/alloc.h: entered into RCS
14134
14135 1993-04-20 David J. MacKenzie <djm@gnu.org>
14136
14137 * src/version.c: *** empty log message ***
14138
14139 * src/files.c, src/allocate.c:
14140 entered into RCS
14141
14142 * src/reader.c: *** empty log message ***
14143
14144 * src/lex.c: entered into RCS
14145
14146 * src/conflicts.c: New file.
14147
14148 * src/symtab.c: entered into RCS
14149
14150 * src/alloc.h: New file.
14151
14152 * src/LR0.c: entered into RCS
14153
14154 1993-04-18 Noah Friedman <friedman@gnu.org>
14155
14156 * src/reader.c: New file.
14157
14158 * src/version.c: *** empty log message ***
14159
14160 1993-04-18 Noah Friedman <friedman@gnu.org>
14161
14162 * Makefile.in: *** empty log message ***
14163
14164 1993-04-17 Noah Friedman <friedman@gnu.org>
14165
14166 * Makefile.in: *** empty log message ***
14167
14168 1993-04-15 Richard Stallman <rms@gnu.org>
14169
14170 * src/main.c, src/files.c:
14171 New file.
14172
14173 1993-04-15 Noah Friedman <friedman@gnu.org>
14174
14175 * configure.in: entered into RCS
14176
14177 * configure.in: *** empty log message ***
14178
14179 * configure.in: New file.
14180
14181 1993-04-14 Richard Stallman <rms@gnu.org>
14182
14183 * Makefile.in: New file.
14184
14185 1993-04-13 Richard Stallman <rms@gnu.org>
14186
14187 * src/version.c: New file.
14188
14189 1993-03-25 Richard Stallman <rms@gnu.org>
14190
14191 * src/output.c: entered into RCS
14192
14193 1992-09-25 Richard Stallman <rms@gnu.org>
14194
14195 * configure.bat: entered into RCS
14196
14197 1992-06-22 Richard Stallman <rms@gnu.org>
14198
14199 * src/vmsgetargs.c: entered into RCS
14200
14201 1992-06-22 Richard Stallman <rms@gnu.org>
14202
14203 * doc/bison.rnh: entered into RCS
14204
14205 1992-04-20 David J. MacKenzie <djm@gnu.org>
14206
14207 * README: entered into RCS
14208
14209 1992-01-22 Richard Stallman <rms@gnu.org>
14210
14211 * src/machine.h: entered into RCS
14212
14213 1991-12-21 Richard Stallman <rms@gnu.org>
14214
14215 * src/lalr.c, src/closure.c:
14216 entered into RCS
14217
14218 1991-12-20 Richard Stallman <rms@gnu.org>
14219
14220 * src/state.h: entered into RCS
14221
14222 1991-12-18 Richard Stallman <rms@gnu.org>
14223
14224 * src/print.c, src/nullable.c, src/derives.c:
14225 entered into RCS
14226
14227 1991-11-03 David J. MacKenzie <djm@gnu.org>
14228
14229 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
14230 entered into RCS
14231
14232 1988-09-09 Richard Stallman <rms@gnu.org>
14233
14234 * src/bison.hairy: entered into RCS
14235
14236 1987-12-16 Richard Stallman <rms@gnu.org>
14237
14238 * REFERENCES: entered into RCS
14239
14240
14241 -----
14242
14243 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
14244 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
14245 Foundation, Inc.
14246
14247 Copying and distribution of this file, with or without
14248 modification, are permitted provided the copyright notice and this
14249 notice are preserved.