]> git.saurik.com Git - bison.git/blob - ChangeLog
* data/c.m4 (b4_token_enums): New.
[bison.git] / ChangeLog
1 2005-09-16 Akim <akim@epita.fr>
2
3 * data/c.m4 (b4_token_enums): New.
4 (b4_token_defines): Rename as...
5 (b4_token_enums_defines): this.
6 (b4_token_defines): New, output only the #defines.
7 * data/yacc.c, data/glr.c: Adjust.
8 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
9 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
10 as default values.
11
12 2005-09-16 Akim Demaille <akim@epita.fr>
13
14 * data/lalr1.cc (yylex_): Remove, inline its code.
15 (yyreport_syntax_error_): Remove, replaced by...
16 (yysyntax_error_): this which returns a string and leaves to the
17 caller the call to the users' error function.
18 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
19 Move from members of the parser object...
20 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
21 to local variables of the parse function.
22
23 2005-09-16 Akim Demaille <akim@epita.fr>
24
25 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
26 since it's in Bison's name space.
27
28 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
29
30 * data/glr.c (yyresolveValue): Add default case to pacify
31 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
32
33 * NEWS: Document when yyparse started to return 2.
34 * doc/bison.texinfo (Parser Function): Document when yyparse
35 returns 2.
36
37 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
38 (b4_filename_type): Renamed back from b4_file_name_type. All uses
39 changed.
40 (class position): file_name -> filename (reverting). All uses changed.
41
42 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
43
44 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
45 do anything if $@ exists. This reverts part of the 2005-07-07
46 patch.
47
48 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
49
50 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
51 contains obsolete information and isn't worth distributing as a
52 separate file anyway.
53 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
54 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
55 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
56 (yyparse): Abort if user code uses longjmp to throw an unexpected
57 value.
58
59 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
60
61 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
62 Suggested by twlevo@xs4all.nl.
63
64 * data/glr.c (YYCHK1): Do not assume YYE is in range.
65 This avoids a diagnostic from gcc -Wswitch-enum.
66 Problem reported by twlevo@xs4all.nl.
67
68 * doc/bison.texinfo: Don't use "filename", as per GNU coding
69 standards. Use "file name" or "file" or "name", depending on
70 the context.
71 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
72 not to hack/foo.tab.c.
73 (Calc++ Top Level): 2nd arg of main is not const.
74 * data/glr.c: b4_filename -> b4_file_name.
75 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
76 All uses changed.
77 (class position): filename -> file_name. All uses changed.
78 * data/yacc.c: b4_filename -> b4_file_name.
79 * lib/bitset.h: filename -> file_name in local vars.
80 * lib/bitset_stats.c: Likewise.
81 * src/files.c: Likewise.
82 * src/scan-skel.l ("@output ".*\n): Likewise.
83 * src/files.c (file_name_split): Renamed from filename_split.
84 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
85
86 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
87
88 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
89 to accommodate latest gnulib.
90
91 * tests/glr-regression.at (Duplicate representation of merged trees):
92 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
93
94 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
95 needed.
96
97 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
98
99 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
100 All uses changed. Invoke user destructor after an error during a
101 split parse (trivial change from Joel E. Denny).
102
103 * tests/glr-regression.at
104 (User destructor after an error during a split parse): New test case.
105 Problem reported by Joel E. Denny in:
106 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
107
108 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
109
110 * README-cvs: Give URLs for recommended tools.
111 Mention Gzip version problem, and bootstrapping issues.
112 Remove troubleshooting section, as it's somewhat obsolete.
113
114 * bootstrap (no_cache): New var, to accommodate different wget
115 variants. Use it instead of '-C off'. Problem reported by
116 twlevo@xs4all.nl.
117
118 * data/glr.c (yydestroyStackItem): New function.
119 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
120 debugging information. Problem reported by Joel E. Denny.
121
122 2005-08-25 Akim Demaille <akim@epita.fr>
123
124 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
125
126 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
127
128 * data/glr.c (yyrecoverSyntaxError, yyreturn):
129 Don't invoke destructor on unresolved entries.
130 * tests/glr-regression.at
131 (User destructor for unresolved GLR semantic value): New test case.
132 Problem reported by Joel E. Denny in:
133 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
134
135 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
136
137 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
138 Add strnlen.c.
139 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
140 lib-prefix.m4, po.m4.
141
142 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
143 in yydestruct diagnostic, since it might not be an error.
144 Problem reported by Joel Denny near end of
145 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
146 * data/lalr1.cc (yyerturn): Likewise.
147 * data/yacc.c (yyreturn): Likewise.
148 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
149
150 * src/files.c: Remove obsolete FIXME comment.
151
152 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
153 with the other templates, and to fix bogus run-on messages such
154 as the one reported at the end of
155 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
156 All callers changed to avoid the newline.
157 (yyprocessOneStack): Output two lines rather than one, to accommodate
158 the above change. This changes the debug output format slightly.
159
160 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
161 reported by Joel E. Denny in
162 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
163 (trivial change).
164 * tests/glr-regression.at (Duplicate representation of merged trees):
165 New test, from Joel E. Denny in:
166 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
167 * THANKS: Add Joel E. Denny.
168
169 * configure.ac (AC_INIT): Bump to 2.0c.
170
171 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
172
173 * NEWS: Version 2.0b.
174
175 * Makefile.am (SUBDIRS): Put examples before tests, so that
176 "make check" doesn't finish with "All 1 tests passed".
177
178 * tests/regression.at (Token definitions): Don't rely on
179 AT_PARSER_CHECK for data that contains backslashes. It currently
180 uses 'echo', and 'echo' isn't portable if its argument contains
181 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
182 that the byte '\0xff' is not printable in the C locale; it is,
183 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
184 not printable, so use '\0x81' to test.
185
186 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
187 version of GCC, since the macro is used with non-GCC compilers.
188
189 Fix core dump reported by Pablo De Napoli in
190 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
191 * tests/regression.at (Invalid inputs with {}): New test.
192 * src/parse-gram.y (token_name): Translate type before using
193 it as an index.
194
195 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
196 the user's name space. All uses changed to __attribute__
197 ((__unused__)).
198 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
199 Add __attribute__ ((__noreturn__)).
200
201 * etc/clcommit: Remove. We weren't using it, and it failed
202 "make maintainer-distcheck".
203 * Makefile.maint: Merge from coreutils.
204 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
205 (syntax-check-rules): Change list of rules as described below.
206 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
207 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
208 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
209 (sc_trailing_space): New rules.
210 (sc_xalloc_h_in_src): Remove.
211 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
212 (sc_space_tab, sc_error_exit_success, sc_changelog):
213 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
214 (makefile-check, po-check, author_mark_check):
215 (makefile_path_separator_check, copyright-check):
216 Use grep -n, to make it easier to find violations.
217 Use CVS_LIST and CVS_LIST_EXCEPT.
218 (header_regexp, h_re): Remove.
219 (dd_c): New macro.
220 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
221 (my-distcheck): Use more-modern GCC flags.
222 (signatures, %.asc): Remove.
223 (rel-files, announcement): Remove signatures.
224 Restore old updating code, even though we don't use it, so
225 that we're the same as coreutils.
226 (alpha, beta, major): Depend on news-date-check.
227 Make the upload commands.
228
229 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
230 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
231 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
232 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
233 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
234 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
235 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
236 * tests/sets.at: Likewise.
237
238 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
239 we comment out the Autoconf version number.
240 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
241 it's error-prone and "make maintainer-distcheck" rejects it.
242
243 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
244 Indent calls to "error" to pacify "make maintainer-distcheck",
245 when the calls are not intended to be translated.
246 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
247
248 * src/Makefile.am (DEFS): Use +=, to pacify
249 "make maintainer-distcheck".
250 (bison_SOURCES): Add scan-skel.h.
251 (sc_tight_scope): New rule, from coreutils.
252
253 * src/files.c (src_extension, header_extension):
254 Now static, not extern.
255 * src/getargs.c (short_options): Likewise.
256 * src/muscle_tab.c (muscle_table): Likewise.
257 * src/parse-gram.y (current_class, current_type, current_prec):
258 Likewise.
259 * src/reader.c (grammar_end, previous_rule_end): Likewise.
260 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
261 * src/main.c (main): Cast bindtextdomain and textdomain calls to
262 void, to avoid warning when NLS is disabled.
263 * src/output.c: Include scan-skel.h.
264 (scan_skel): Remove decl, since scan-skel.h does this.
265 (output_skeleton):
266 Indent calls to "error" to pacify "make maintainer-distcheck".
267 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
268 * src/reader.h (gram_end, gram_lineno): New decls to pacify
269 "make maintainer-distcheck".
270 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
271 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
272 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
273 (skel_lex_destroy, scan_skel): Move these decls to...
274 * src/scan-skel.h: New file.
275 * src/uniqstr.c (uniqstr_assert):
276 Indent calls to "error" to pacify "make maintainer-distcheck".
277
278 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
279 not @VAR@.
280
281 * tests/torture.at: Revamp to avoid misuse of atoi that
282 "make maintainer-distcheck" complained about.
283
284 * examples/extexi (message): Don't print a message more than once,
285 and omit line-number decoration that makes Emacs compile think
286 that informative messages are worth worrying about.
287
288 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
289
290 * configure.ac: Update version number.
291
292 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
293 accidentally.
294 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
295 autogenerated by the maintainer.
296 * examples/calc++/.cvsignore: Add *.yy.
297
298 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
299 * lib/bitset_stats.c (bitset_stats_init): Likewise.
300 * lib/bitsetv.c (bitsetv_alloc): Likewise.
301
302 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
303
304 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
305 from maintainer-distcheck about casting the argument of 'free'.
306
307 * NEWS: Mention recent yytname changes.
308 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
309
310 * bootstrap: For translations that have not yet been upgraded to
311 the new runtime-po domain, prime the pump by extracting the
312 relevant strings from the obsolete translations. This code can be
313 removed once the bison-runtime domain has been translated by each
314 team.
315
316 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
317 now that token names are already quoted.
318
319 Fix problem reported by Anthony Heading.
320 * data/glr.c (YYTOKEN_TABLE): New macro.
321 (yytname): Define if YYTOKEN_TABLE.
322 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
323 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
324 (YYERROR_VERBOSE): Define the same way the other skeletons do.
325 * src/output.c (prepare_symbols): Output token_table_flag.
326
327 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
328
329 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
330 again if the first call fails.
331
332 * data/glr.c (yytnamerr): New function.
333 (yyreportSyntaxError): Use it to dequote most string literals.
334 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
335 with other skeletons. All uses changed.
336 (yytnameerr_): New function.
337 (yyreport_syntax_error): Use it to dequote most string literals.
338 * data/yacc.c (yytnamerr): New function.
339 (yyerrlab): Use it to decode most string literals.
340 * doc/bison.texinfo (Decl Summary, Calling Convention):
341 Clarify quoting convention of yytname.
342 * src/output.c (prepare_symbols): Quote all names. This undoes
343 the 2005-04-17 change, which is now accomplished (mostly) via
344 changes in the parsers as described above.
345 * tests/regression.at (Token definitions, Web2c Actions):
346 Undo most 2005-04-17 change here, too.
347
348 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
349
350 Fix more problems reported by twlevo@xs4all.nl.
351 * tests/cxx-type.at: Don't pipe output of ./types through sed to
352 remove trailing spaces. This loses the exit status of ./types,
353 and isn't needed since ./types shouldn't be emitting trailing
354 spaces.
355 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
356 as the stack isn't valid in that case.
357
358 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
359 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
360 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
361 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
362 is used.
363 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
364 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
365 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
366 Likewise.
367
368 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
369 overly-picky compilers that reject 'char *foo = "bar";'.
370
371 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
372 to FILE * parameter, not to stderr. This fixes a typo introduced
373 in the 2005-07-12 change.
374
375 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
376 warnings from GCC 4.
377
378 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
379 (yyglrShiftDefer, yysplitStack):
380 Remove unused parameters b4_pure_formals. All uses changed.
381 (yyglrShift): Remove unused parameters b4_user_formals.
382 All uses changed.
383 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
384
385 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
386
387 Destructor cleanups and regularization among the three skeletons.
388 * NEWS: Document the behavior changes.
389 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
390 stack before failing, as the cleanup code will do it for us now.
391 * data/lalr1.cc (yyerrlab): Likewise.
392 * data/glr.c (yyparse): Pop everything off the stack before
393 freeing it, so that destructors get called properly.
394 * data/lalr1.cc (yyreturn): Likewise.
395 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
396 This is more consistent.
397 * doc/bison.texinfo (Destructor Decl): Mention more reasons
398 why destructors might be called. 1.875 -> 2.1.
399 (Destructor Decl, Decl Summary, Table of Symbols):
400 Some English-language cleanups for %destructor.
401 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
402 Add output line for destructor of start symbol.
403 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
404 because of that same extra output line.
405
406 * NEWS: Document minor wording changes in diagnostics of
407 Bison-generated parsers.
408 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
409 Remove unused formals. All uses changed.
410 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
411 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
412 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
413 Rename yyoverflowab to yyexhaustedlab.
414 When memory exhaustion occurs during syntax-error reporting,
415 report it separately rather than in a single diagnostic; this
416 eases translation.
417 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
418 (Memory Exhausted): Renamed from Parser Stack Overflow.
419 Revamp wording slightly to prefer "memory exhaustion".
420 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
421
422 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
423
424 Add i18n support to the GLR skeleton. Partially fix the C++
425 skeleton; a C++ expert needs to finish this. Remove debugging
426 msgids; there's little point to having them translated, since they
427 can be understood only by someone who can read the
428 (English-language) source code.
429
430 Generate runtime-po/bison-runtime.pot automatically, so that we
431 don't have to worry about garbage getting in that file. We'll
432 make sure after the next official release that old msgids don't
433 get lost. See
434 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
435
436 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
437 Now auto-generated.
438 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
439 Fix typos in explanations of the runtime file.
440 * bootstrap: Change gettext keyword from YYI18N to YY_.
441 Use standard Makefile.in.in in runtime-po, since we'll arrange
442 for backward-compatible bison-runtime.po files in a different way.
443 * data/glr.c (YY_): New macro, from yacc.c.
444 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
445 Translate messages intended for users.
446 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
447 the wording in the other skeletons. We don't know that the memory
448 is virtual.
449 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
450 Use same method that yacc.c uses.
451 Don't translate debugging messages.
452 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
453 it doesn't work (yet), and requires C++ expertise to fix.
454 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
455 Move defn to a more logical place, to be consistent with other
456 skeletons.
457 Don't translate debugging messages.
458 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
459 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
460 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
461 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
462
463 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
464 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
465 void, not int.
466 * tests/glr-regression.at (Badly Collapsed GLR States):
467 Likewise.
468 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
469 yylex should return 0 at EOF rather than aborting.
470
471 Improve tests for stack overflow in GLR parser.
472 Problem reported by twlevo@xs4all.nl.
473 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
474 All uses removed.
475 (yyStackOverflow): Just longjmp, but with value 2 so that caller
476 can handle the problem.
477 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
478 (yyparse): New local variable yyresult to record the result.
479 Use result of setjmp to set it, rather than storing itinto
480 struct.
481 (yyDone): Remove label.
482 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
483 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
484 if YYABORT is used).
485 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
486 yyparse status; put status > 1 into diagnostic.
487 Check that status==2 works.
488 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
489 Use exit status 3 for failure to open (which shouldn't happen).
490
491 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
492
493 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
494 1 on syntax error; just let yyparse do its thing.
495 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
496 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
497 (Exploding the Stack Size with Alloca):
498 (Exploding the Stack Size with Malloc):
499 Expect exit status 2, not 1, since the parser is supposed to blow
500 its stack. Problem reported by twlevo@xs4all.nl.
501
502 * data/glr.c (yyparse): Don't assume that the initial calls
503 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
504 Print a stack-overflow message and fail instead.
505 Initialize the line-number information before creating the stack,
506 so that the stack-overflow message can report line zero safely.
507
508 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
509
510 Fix problems reported by twlevo@xs4all.nl.
511 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
512 (yyuserMerge): Provide a default case if b4_mergers is empty.
513 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
514 * tests/glr-regression.at
515 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
516 Add casts to pacify C++ compilers.
517 * tests/glr-regression.at (Improper merging of GLR delayed action
518 sets): Declare yylex before using it.
519 * tests/Makefile.am (maintainer-check-g++): Fix a stray
520 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
521 test for valgrind; valgrind is independent of g++.
522 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
523 for compatibility with POSIX 1003.1-2001 (if running coreutils).
524 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
525 Use a destructor, so that we can expand the stack. Change
526 YYSTYPE to char * so that we can free it. Cast result of malloc.
527
528 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
529
530 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
531 a valgrind failure. Problem reported by twlevo@xs4all.nl.
532
533 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
534
535 * PACKAGING: New file, suggested by Bruno Haible and taken from
536 similar wording in gettext's PACKAGING file.
537 * NEWS: Mention PACKAGING.
538 * Makefile.am (EXTRA_DIST): Add PACKAGING.
539
540 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
541
542 * NEWS: Document recent i18n improvements.
543 * bootstrap: Get runtime translations into runtime-po.
544 Create runtime-po files automatically, if possible.
545 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
546 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
547 does not infringe on the user's name space.
548 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
549 * doc/bison.texinfo (Internationalization): Revamp the English
550 and Texinfo syntax a bit, to try to make it clearer.
551 (Bison Options, Option Cross Key): Mention --print-localedir.
552 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
553 YYENABLE_NLS. Quote a bit more.
554 * runtime-po/.cvsignore: New file.
555 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
556 * runtime-po/Rules-quot: Remove; now created by bootstrap.
557 * runtime-po/quot.sed: Likewise.
558 * runtime-po/boldquot.sed: Likewise.
559 * runtime-po/en@quot.header: Likewise.
560 * runtime-po/en@boldquot.header: Likewise.
561 * runtime-po/insert-header.sin: Likewise.
562 * runtime-po/remove-potcdate.sin: Likewise.
563 * runtime-po/Makevars: Likewise.
564 * runtime-po/LINGUAS: Likewise.
565 * runtime-po/de.po: Likewise; we will rely on the translation project
566 to maintain this, so "bootstrap" should get it.
567 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
568 its value.
569 * src/main.c (main): Bind the bison-runtime domain, too.
570
571 2005-07-12 Bruno Haible <bruno@clisp.org>
572
573 * data/yacc.c: Include <libintl.h> when NLS is enabled.
574 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
575 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
576 * runtime-po: New directory.
577 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
578 $(DOMAIN).pot-update rule, so that old messages are never dropped.
579 * runtime-po/Rules-quot: New file, copied from po/.
580 * runtime-po/quot.sed: Likewise.
581 * runtime-po/boldquot.sed: Likewise.
582 * runtime-po/en@quot.header: Likewise.
583 * runtime-po/en@boldquot.header: Likewise.
584 * runtime-po/insert-header.sin: Likewise.
585 * runtime-po/remove-potcdate.sin: Likewise.
586 * runtime-po/Makevars: New file.
587 * runtime-po/POTFILES.in: New file.
588 * runtime-po/LINGUAS: New file.
589 * runtime-po/bison-runtime.pot: New file.
590 * runtime-po/de.po: New file.
591 * m4/bison.m4: New file.
592 * Makefile.am (SUBDIRS): Add runtime-po.
593 (aclocaldir, aclocal_DATA): New variables.
594 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
595 Define aclocaldir.
596 * src/getargs.c (usage): Document --print-localedir option.
597 (PRINT_LOCALEDIR_OPTION): New enum item.
598 (long_options): Add --print-localedir option.
599 (getargs): Handle --print-localedir option.
600 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
601 (Internationalization): New section.
602
603 2005-07-12 Akim Demaille <akim@epita.fr>
604
605 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
606 for consistency with the rest of the code.
607 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
608 Add separators.
609
610 2005-07-12 Akim Demaille <akim@epita.fr>
611
612 * src/parse-gram.y: Use %printer instead of YYPRINT.
613
614 2005-07-12 Akim Demaille <akim@epita.fr>
615
616 * src/symtab.h, src/symtab.c (symbol_print): New.
617 * src/symlist.h, src/symlist.c (symbol_list_print): New.
618 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
619
620 2005-07-12 Akim Demaille <akim@epita.fr>
621
622 * data/glr.c (b4_syncline): Fix (swap) the definitions of
623 b4_at_dollar and b4_dollar_dollar.
624
625 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
626
627 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
628 and Pennello's paper.
629
630 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
631
632 * data/yacc.c (yyparse): Undo previous patch. Instead,
633 set yylsp[0] and yyvsp[0] only if the initial action
634 sets yylloc and yylval, respectively.
635
636 * data/yacc.c (yyparse): In the initial action, set
637 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
638 This avoids the use of undefined variables if the initial
639 action does not set yylloc and/or yylval.
640
641 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
642
643 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
644 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
645 Remove from CVS. These files are automatically generated.
646 * examples/extexi: Clarify that this file is now part of Bison,
647 not GNU M4, and that it works with any POSIX-compatible Awk.
648 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
649 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
650 so that we also get calc++-parser.yy. Geneate it.
651 Use $(AWK), not gawk, since any conforming Awk will do.
652 Put comment before action, since older 'make' can't handle comment
653 in action.
654 $(BUILT_SOURCES): List all built sources, not just some of them.
655 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
656 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
657 $($(calc_sources_generated)): Remove unnecessary test for existence
658 of target. (This had a shell syntax error anyway; a stray "x".)
659 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
660 calc++-parser.yy.
661 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
662
663 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
664 implied by the other modules.
665
666 2005-07-06 Akim Demaille <akim@epita.fr>
667
668 Bind examples/calc++ to the package.
669 * examples/calc++/Makefile: Remove, replaced by...
670 * examples/calc++/Makefile.am: ... this new file.
671 * examples/calc++/test: Remove input.
672 * examples/calc++/compile: Remove.
673 * examples/Makefile.am: New.
674 * configure.ac, Makefile.am: Adjust.
675 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
676
677 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
678
679 * data/glr.c (yyFail): Drastically simplify; since the format argument
680 never had any % directives, we can simply pass it to yyerror.
681 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
682 be modified later, as that is the usual style in glr.c.
683 Problems reported by Paul Hilfinger.
684
685 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
686 and size overflow errors.
687 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
688 in case the user prolog sets feature-test macros like _GNU_SOURCE.
689 (YYSIZEMAX): New macro.
690 (yystpcpy): New function, taken from yacc.c.
691 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
692 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
693 so that we don't have to maintain their signatures.
694 (yyFail): Check for buffer overflow, by using vsnprintf rather
695 than vsprintf. Allocate a bigger buffer if possible.
696 Report an error if buffer allocation fails.
697 (yyStackOverflow): New function.
698 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
699 the initialization was successful. It might fail if storage was
700 exhausted.
701 (yyexpandGLRStack): Add more checks for storage allocation failure.
702 Use yyStackOverflow to report failures.
703 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
704 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
705 Don't assume stack number fits in int.
706 (yysplitStack): Check for storage allocation failure.
707 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
708 can print diagnostics on storage allocation failure. All callers
709 changed.
710 (yyresolveValue): Use yybool for boolean.
711 (yyreportSyntaxError): Check for size-calculation overflow.
712 This code is taken from yacc.c.
713 (yyparse): Check for storage allocation errors when allocating
714 the initial stack.
715
716 2005-07-05 Akim Demaille <akim@epita.fr>
717
718 Extract calc++ from the documentation.
719 * doc/bison.texinfo (Calc++): Add the extraction marks.
720 * examples/extexi: New, from the aborted GNU Programming 2E.
721 Separate the different paragraph of a file with empty lines.
722 * examples/Makefile: Use it to extract the whole calc++ example.
723
724 2005-06-24 Akim Demaille <akim@epita.fr>
725
726 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
727 class typedefs.
728
729 2005-06-22 Akim Demaille <akim@epita.fr>
730
731 * doc/bison.texinfo (C++ Language Interface): First stab.
732 (C++ Parsers): Remove.
733
734 2005-06-22 Akim Demaille <akim@epita.fr>
735
736 * data/lalr1.cc (yylex_): Honor %lex-param.
737
738 2005-06-22 Akim Demaille <akim@epita.fr>
739
740 Start a set of simple examples.
741 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
742 * examples/calc++/calc++-driver.hh,
743 * examples/calc++/calc++-parser.yy,
744 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
745 * examples/calc++/compile, examples/calc++/test: New.
746
747 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
748
749 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
750 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
751 which stems from the 2005-05-27 patch.
752
753 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
754
755 * data/glr.c: Modify treatment of unused parameters to permit use
756 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
757
758 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
759
760 Fix infringement on user name space reported by Janos Zoltan Szabo.
761 * data/yacc.c (yyparse): strlen -> yystrlen.
762
763 2005-05-30 Akim Demaille <akim@epita.fr>
764
765 * data/lalr1.cc (_): New.
766 Translate the various messages.
767
768 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
769
770 Fix infringement on user name space reported by Bruno Haible.
771 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
772 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
773 the user's name space.
774 (alloca): Include <stdlib.h> to get it, if it's not built in.
775 (YYMALLOC, YYFREE): Define only if needed.
776 (malloc, free): Declare, but only if needed, as this infringes on
777 the user name space.
778
779 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
780
781 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
782 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
783 with %d format.
784 * lib/ebitset.c (min, max): Undef before defining.
785 * lib/vbitset.c (min, max): Likewise.
786 * lib/subpipe.c (create_subpipe): Save local variables in case
787 vfork clobbers them.
788
789 2005-05-24 Bruno Haible <bruno@clisp.org>
790
791 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
792 error message syntax used by gcc-4.0.
793
794 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
795
796 * README: Mention m4 1.4.3. Remove obsolete advice about
797 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
798
799 * bootstrap: Remove workaround for problem I encountered with
800 gettext 0.14.1; it seems to be fixed now.
801
802 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
803
804 * NEWS: Version 2.0a.
805
806 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
807 the previous change.
808
809 Various maintainer cleanups.
810 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
811 conftest*, for benefit of CVS commands run at the same time as
812 "configure". Add build-aux, since "bootstrap" now creates it and
813 its subfiles.
814 * Makefile.cfg (move_if_change): Remove.
815 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
816 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
817 (po_repo, do-po-update, po-update, wget_files, get-targets):
818 (config.guess-url_prefix, config.sub-url_prefix):
819 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
820 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
821 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
822 Remove.
823 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
824 this is now the recommended name.
825 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
826 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
827 ylwrap. These files now go into build-aux.
828 * config/move-if-change: Remove.
829 * config/prev-version.txt: Bump from 1.75 to 2.0.
830
831 * bootstrap: Add stdio-safer, unistd-safer modules.
832 Remove m4/glibc2.m4 (introduced by latest gnulib, but
833 we don't need it).
834 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
835 fopen-safer.c, stdio-safer.h, unistd-safer.h.
836 * lib/subpipe.c: Include "unistd-safer.h".
837 (create_subpipe): Make sure all the newly-created
838 file descriptors are > 2, so that diagnostics don't
839 get sent down them (which might cause Bison to hang, in theory).
840 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
841 * src/files.c (xfopen): Use fopen_safer, not fopen.
842
843 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
844 yesterday's yacc.c fix.
845
846 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
847
848 * data/glr.c, data/lalr1.cc: Update copyright date.
849
850 Fix a destructor bug reported by Wolfgang Spraul in
851 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
852 * data/yacc.c (yyabortlab): Don't call destructor, and
853 don't set yychar to EMPTY.
854 (yyoverflowlab): Don't call destructor.
855 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
856 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
857 since we no longer output the message "discarding lookahead token
858 end of input ()".
859
860 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
861
862 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
863 fix a small glitch in debugging output.
864 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
865 after YY_SYMBOL_PRINT where needed.
866
867 (struct yyGLRState): Add some comments.
868 (struct yySemanticOption): Add some comments.
869 (union yyGLRStackItem): Add comment.
870
871 (yymergeOptionSets): Correct this to properly perform the union,
872 avoiding infinite reported by Michael Rosien.
873 Update comment.
874
875 * tests/glr-regression.at: Add test for GLR merging error reported
876 by M. Rosien.
877
878 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
879
880 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
881 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
882 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
883 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
884 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
885 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
886 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
887 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
888 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
889 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
890 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
891 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
892 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
893 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
894 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
895 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
896 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
897 src/derives.h, src/files.c, src/files.h, src/getargs.c,
898 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
899 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
900 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
901 src/output.h, src/parse-gram.c, src/parse-gram.h,
902 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
903 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
904 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
905 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
906 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
907 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
908 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
909 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
910 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
911 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
912 tests/reduce.at, tests/regression.at, tests/sets.at,
913 tests/synclines.at, tests/testsuite.at, tests/torture.at:
914 Update FSF postal mail address.
915
916 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
917
918 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
919 Problem reported by Ralf Menzel.
920
921 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
922
923 * tests/actions.at: Test that stack overflow invokes destructors.
924 From Marcus Holland-Moritz.
925 * data/yacc.c (yyerrlab): Move the code that destroys the stack
926 from here....
927 (yyreturn): to here. That way, destructors are called properly
928 even if the stack overflows, or the user calls YYACCEPT or
929 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
930 (yyoverflowlab): Destroy the lookahead.
931
932 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
933
934 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
935
936 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
937
938 * NEWS: Bison-generated C parsers no longer quote literal strings
939 associated with tokens.
940 * src/output.c (prepare_symbols): Don't escape strings,
941 since users don't want to see C escapes.
942 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
943 in diagnostics.
944 * tests/input.at (Torturing the Scanner): Likewise.
945 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
946
947 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
948
949 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
950 the data size is known to be too small and we can't increase it.
951 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
952
953 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
954
955 * src/parse-gram.y: Include quotearg.h.
956 (string_as_id): Quote $1 before using it as a key, since the
957 lexer no longer quotes it for us.
958 (string_content): Don't strip quotes, since lexer no longer
959 quotes it for us.
960 * src/scan-gram.l: Include quotearg.h.
961 ("\""): Omit quote.
962 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
963 a key, since the rest of the lexer doesn't quote it.
964 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
965 * tests/regression.at (Token definitions): Check for backslashes
966 in token strings.
967
968 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
969 (YYSIZE_T): Define to unsigned long int when using an older compiler.
970 (yyparse): Revamp code to generate long syntax error message, to
971 make it easier to translate, and to avoid problems with arithmetic
972 overflow. Change "virtual memory" to "memory" in diagnostic, since
973 we don't know whether the memory is virtual.
974
975 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
976
977 * NEWS: Bison-generated C parsers now use the _ macro to
978 translate strings.
979 * data/yacc.c (_) [!defined _]: New macro.
980 All English strings wrapped inside this macro.
981 * doc/bison.texinfo (Bison Parser): Document _.
982 * po/POTFILES.in: Include src/parse-gram.c, since it now
983 includes translateable strings that parse-gram.y doesn't.
984
985 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
986
987 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
988 reverting the 2004-10-11 change to this function.
989 (symbol_check_alias_consistency): Don't call symbol_type_set
990 if the type name is already correct.
991 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
992
993 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
994
995 * tests/regression.at (Token definitions): Don't use a token named
996 c, as that generates a "#define c ..." that runs afoul of buggy
997 stdlib.h that uses the identifier c as a member of struct
998 drand48_data. Problem reported by Horst Wente.
999
1000 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
1001
1002 * bootstrap: Change translation URL from
1003 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
1004 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
1005 redirection glitches. Problem reported by twlevo@xs4all.nl.
1006
1007 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
1008
1009 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
1010 after operands; POSIX says this isn't portable for the c99 command.
1011
1012 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
1013
1014 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
1015 immediately if a data overrun has occurred; this may help us track
1016 down what may be a spurious failure on MacOS.
1017
1018 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
1019
1020 Respond to problems reported by twlevo@xs4all.nl.
1021
1022 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
1023
1024 * src/vcg.h: Comment fix.
1025 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
1026 (G_CMAX): Change to -1 instead of INT_MAX.
1027
1028 * data/yacc.c (yyparse): Omit spaces before #line.
1029
1030 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
1031
1032 * src/tables.c (state_number_to_vector_number): Put it inside an
1033 "#if 0", since it's not currently used. Problem reported by
1034 Roland McGrath.
1035
1036 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
1037
1038 * src/output.c (escaped_output): Renamed from
1039 escaped_file_name_output, since we now use it for symbol tags as
1040 well. All uses changed.
1041 (symbol_destructors_output, symbol_printers_output):
1042 Escape symbol tags too.
1043 Problem reported by Matyas Forstner in
1044 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
1045
1046 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
1047 not needed.
1048 * src/output.c (user_actions_output, token_definitions_output,
1049 symbol_destructors_output, symbol_printers_output): Likewise.
1050 * src/reader.c (prologue_augment): Likewise.
1051 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
1052
1053 * src/vcg.c (output_edge): Don't quote linestyle arg.
1054 Problem reported by twlevo@xs4all.nl.
1055
1056 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
1057
1058 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
1059 example, reported by Derek M Jones. Also, make the example even
1060 more outrageous, to better illustrate how bad the problem is.
1061
1062 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
1063
1064 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
1065 putsym. Typo reported by Sebastian Piping.
1066
1067 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
1068
1069 * doc/bison.texinfo (Language and Grammar): some -> same
1070 (Epilogue): int he -> in the
1071 Typos reported by Sebastian Piping via Justin Pence.
1072
1073 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
1074
1075 * tests/glr-regression.at (Improper handling of embedded actions
1076 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
1077 embedded actions and $-N in GLR parsers", work around an Autoconf bug
1078 with dollar signs in test names.
1079 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
1080 for a similar reason.
1081
1082 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
1083
1084 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
1085 wants to redefine G_VIEW.
1086
1087 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
1088
1089 * src/vcg.c (get_view_str): Remove case for normal_view.
1090 Problem reported by twlevo@xs4all.nl.
1091
1092 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
1093
1094 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
1095 Problem reported by twlevo@xs4all.nl.
1096
1097 * doc/bison.texinfo: Change @dircategory from "GNU programming
1098 tools" to "Software development". Requested by Richard Stallman
1099 via Karl Berry.
1100
1101 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
1102
1103 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
1104 Problem reported by twlevo@xs4all.nl.
1105
1106 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
1107
1108 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
1109 keyword; it's not needed with modern compilers, and it doesn't
1110 affect correctness with older compilers. Suggested by
1111 twlevo@xs4all.nl.
1112
1113 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
1114
1115 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
1116 gcc -Wswitch-default.
1117 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1118 * data/yacc.c (yyparse): Likewise.
1119
1120 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
1121
1122 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
1123 already. Let config.h define any nonstandard values.
1124
1125 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
1126
1127 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
1128 for the benefit of slower hosts. Problem reported by
1129 Nelson H. F. Beebe.
1130
1131 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
1132
1133 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
1134 being defined and not used.
1135 * data/lalr1.cc (yyparse): Likewise.
1136 Use "if (false)" rather than "if (0)".
1137
1138 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
1139
1140 * TODO: Mention that we should allow NUL bytes in tokens.
1141
1142 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
1143
1144 * src/scan-skel.l (<<EOF>>): Don't close standard output.
1145 Problem reported by Hans Aberg.
1146
1147 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
1148
1149 * src/getargs.c (version): Happy new year; update overall
1150 program copyright date from 2004 to 2005.
1151
1152 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
1153 Problem reported by Hans Aberg.
1154 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
1155 (Output file names.): Add a test for the case when standard output
1156 is closed.
1157
1158 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
1159
1160 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
1161 to fix an oversight in the Bison 2.0 manual.
1162
1163 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
1164
1165 * NEWS: Version 2.0. Reformat the existing news items since
1166 1.875, so that related items are grouped together.
1167 * configure.ac (AC_INIT): Bump version to 2.0.
1168 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
1169
1170 * tests/torture.at (Exploding the Stack Size with Alloca): Set
1171 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
1172 otherwise, we're not testing alloca. Unfortunately there's no
1173 simple way to consult HAVE_ALLOCA here.
1174
1175 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
1176 for yymsg, too.
1177
1178 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
1179 hand. This avoids a warning about comparing int to size_t when
1180 GCC warnings are enabled.
1181
1182 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
1183
1184 * NEWS: Bison-generated parsers no longer default to using the
1185 alloca function (when available) to extend the parser stack, due
1186 to widespread problems in unchecked stack-overflow detection.
1187 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
1188 responsibility to set it to a positive value. This lets the user
1189 specify a value that is not a preprocessor constant.
1190 * data/yacc.c (YYMAXDEPTH): Likewise.
1191 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
1192 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
1193 to be a compile-time constant. However, explain the constraints on it.
1194 Also, explain the constraints on YYINITDEPTH.
1195 (Table of Symbols): Explain that alloca is no longer the default.
1196 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
1197 to 1.
1198
1199 * doc/bison.texinfo (Location Default Action): Mention that n must
1200 be zero when k is zero. Suggested by Frank Heckenbach.
1201
1202 2004-12-22 Akim Demaille <akim@epita.fr>
1203
1204 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
1205 (parser::state_type, parser::semantic_type, parser::location_type):
1206 Private, not public.
1207 (parser::parse): Return ints, not bool.
1208 Returning a bool introduces a problem: 0 corresponds to false, and
1209 it seems weird to return false on success. Returning true changes
1210 the conventions for yyparse.
1211 Alternatively we could return void and send an exception.
1212 There is no clear consensus (yet?).
1213 (state_stack, semantic_stack, location_stack): Rename as...
1214 (state_stack_type, semantic_stack_type, location_stack_type): these.
1215 Private, not public.
1216 * tests/c++.at: New.
1217 * tests/testsuite.at, tests/Makefile.am: Adjust.
1218
1219 2004-12-21 Akim Demaille <akim@epita.fr>
1220
1221 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
1222
1223 2004-12-21 Akim Demaille <akim@epita.fr>
1224
1225 Don't impose std::string for filenames.
1226
1227 * data/lalr1.cc (b4_filename_type): New.
1228 (position::filename): Use it.
1229 (parser.hh): Move the inclusion of stack.hh and location.hh below
1230 the user code, so that needed headers for the filename type can be
1231 included first.
1232 Forward declare them before the user code.
1233 * tests/Makefile.am (check-local, installcheck-local): Pass
1234 TESTSUITEFLAGS to the TESTSUITE.
1235
1236 2004-12-20 Akim Demaille <akim@epita.fr>
1237
1238 Use more STL like names: my_class instead of MyClass.
1239
1240 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
1241 (SemanticStack, SemanticType, StateStack, StateType)
1242 (TokenNumberType, Stack, Slice, Traits, Parser::location)
1243 (Parser::value): Rename as...
1244 (location_stack, location_type, rhs_number_type, semantic_stack)
1245 (semantic_type, state_stack, state_type, token_number_type, stack)
1246 (slice, traits, parser::yylloc, parser::yylval): these.
1247
1248 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
1249
1250 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
1251
1252 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
1253 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
1254
1255 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
1256
1257 Remove uses of 'short int' and 'unsigned short int'. This raises
1258 some arbitrary limits. It uses more memory but nowadays that's
1259 not much of an issue.
1260
1261 This change does not affect the generated parsers; that's a different
1262 task, as some users will want to conserve memory there.
1263
1264 Ideally we should use size_t to represent all object counts, and
1265 something like ptrdiff_t to represent signed differences of object
1266 counts; but that will require more code-cleanup than I have the
1267 time to do right now.
1268
1269 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
1270 Use size_t, not int or short int, to count objects.
1271 * src/closure.c (nritemset, closure): Likewise.
1272 * src/closure.h (nritemset, closure): Likewise.
1273 * src/nullable.c (nullable_compute): Likewise.
1274 * src/print.c (print_core): Likewise.
1275 * src/print_graph.c (print_core): Likewise.
1276 * src/state.c (state_compare, state_hash): Likewise.
1277 * src/state.h (struct state): Likewise.
1278 * src/tables.c (default_goto, goto_actions): Likewise.
1279
1280 * src/gram.h (rule_number, rule): Use int, not short int.
1281 * src/output.c (prepare_rules): Likewise.
1282 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
1283 errs, reductions): Likewise.
1284 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
1285 Likewise.
1286 * src/tables.c (vector_number, tally, action_number,
1287 ACTION_NUMBER_MINIMUM): Likewise.
1288 * src/output.c (muscle_insert_short_int_table): Remove.
1289
1290 2004-12-17 Akim Demaille <akim@epita.fr>
1291
1292 * data/lalr1.cc: Extensive Doxygenation.
1293 (error_): Rename as...
1294 (error): this, since it is visible to the user.
1295 Adjust callers.
1296 (Parser::message): Now an automatic variable from...
1297 (Parser::yyreport_syntax_error_): here.
1298 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
1299 Parser::error.
1300 * tests/input.at: Escape $.
1301
1302 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
1303
1304 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
1305 Parenthesize rhs to avoid obscure problems with mistakes like
1306 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
1307 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1308 b4_rhs_location): Likewise.
1309 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1310 b4_rhs_location): Likewise.
1311
1312 2004-12-16 Akim Demaille <akim@epita.fr>
1313
1314 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
1315 yacc.c: be sure to stay within yycheck_.
1316 * tests/actions.at: Re-enable C++ tests.
1317
1318 2004-12-16 Akim Demaille <akim@epita.fr>
1319
1320 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
1321 real.
1322
1323 2004-12-16 Akim Demaille <akim@epita.fr>
1324
1325 Use #define to handle the %name-prefix.
1326
1327 * data/glr.c, data/yacc.c: Comment changes.
1328 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
1329 so that one can refer to yylex in the parser file, and have it
1330 renamed, as is the case with other skeletons.
1331
1332 2004-12-16 Akim Demaille <akim@epita.fr>
1333
1334 Move lalr1.cc internals into yy*.
1335
1336 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
1337 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
1338 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
1339 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
1340 (empty_, final_, terror_, errcode_, ntokens_)
1341 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
1342 (looka_, ilooka_, error_range_, nerrs_):
1343 Rename as...
1344 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
1345 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
1346 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
1347 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
1348 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
1349 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
1350 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
1351 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
1352 these.
1353
1354 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
1355
1356 Fix some problems reported by twlevo at xs4all.
1357 * src/symtab.c (symbol_new): Report an error if the input grammar
1358 contains too many symbols. This is better than calling abort() later.
1359 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
1360 (struct node, struct graph):
1361 Rename member expand to stretch. All uses changed.
1362 (struct graph): Remove member layoutalgorithm. All uses removed.
1363 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
1364 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
1365 All uses changed.
1366 (N_STRETCH): Rename from N_EXPAND. All uses changed.
1367
1368 2004-12-15 Akim Demaille <akim@epita.fr>
1369
1370 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
1371 Add more Doxygen comments.
1372 (symprint_, stack_print_, reduce_print_, destruct_, pop)
1373 (report_syntax_error_, translate_): Rename as...
1374 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
1375 (yypop_, yyreport_syntax_error_, yytranslate_): this.
1376
1377 2004-12-15 Akim Demaille <akim@epita.fr>
1378
1379 * data/lalr1.cc (lex_): Rename as...
1380 (yylex_): this.
1381 Move the trace here.
1382 Take the %name-prefix into account.
1383 Reported by Alexandre Duret-Lutz.
1384
1385 2004-12-15 Akim Demaille <akim@epita.fr>
1386
1387 Simplify the C++ parser constructor.
1388
1389 * data/lalr1.cc (debug_): Rename as...
1390 (yydebug_): so that the parser's internals are always in the yy*
1391 pseudo namespace.
1392 Adjust uses.
1393 (b4_parse_param_decl): Remove the leading comma as it is now only
1394 called as unique argument list.
1395 (Parser::Parser): Remove the constructor accepting a location and
1396 an initial debugging level.
1397 Remove from the other ctor the argument for the debugging level.
1398 (debug_level_type, debug_level, set_debug_level): New.
1399
1400 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
1401 constructor calls.
1402
1403 2004-12-15 Akim Demaille <akim@epita.fr>
1404
1405 Remove b4_root related material: failure experiment
1406 (which goal was to allow to derive from a class).
1407
1408 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
1409 definitions and uses.
1410
1411 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
1412
1413 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
1414 not 2, since it's not portable to subtract 1 from the start of an
1415 array. The new item 0 is never set or used. All uses changed.
1416
1417 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
1418 the default definition of YYLLOC_DEFAULT. Problem reported
1419 by Frank Heckenbach.
1420
1421 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
1422
1423 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
1424 the normal case and one for the error case. Just use the
1425 first one uniformly. Problem reported by Frank Heckenbach.
1426 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
1427 use exactly the same macro in both places.
1428 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
1429 so that the normal-case YYRHSLOC works for the error case too.
1430 All uses changed.
1431 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
1432 (YYLLOC_DEFAULT): Use the same macro as glr.c.
1433 * doc/bison.texinfo (Location Default Action): Don't claim that
1434 we have an array of locations. Use the same macro for both glr
1435 and lalr parsers. Mention YYRHSLOC. Mention what happens when
1436 the index is 0.
1437
1438 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1439
1440 * HACKING: Update email addresses to send announcements to.
1441
1442 * configure.ac (AC_INIT): Bump version to 1.875f.
1443
1444 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1445
1446 * NEWS: Version 1.875e.
1447 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
1448
1449 * src/scan-skel.l: Include "complain.h", for "fatal".
1450
1451 * src/relation.h (relation_print, relation_digraph):
1452 Relation sizes are of type relation_node, not size_t (this is
1453 merely a doc fix, since the two types are equivalent).
1454 (relation_transpose): Relation sizes are of type relation_node,
1455 not int.
1456 * src/relation.c: Likewise.
1457 (top, infinity): Now of type relation_node, not int.
1458 (traverse, relation_transpose): Use relation_node, not int.
1459
1460 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
1461 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
1462 (yyparse): Remove unused local introduced in 2004-10-25 patch.
1463
1464 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
1465 specifying whether the test should be skipped. Use it tp
1466 specify that the [%defines %skeleton "lalr1.cc"] tests currently
1467 fail on some hosts, and should be skipped.
1468
1469 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
1470
1471 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
1472 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
1473 unless otherwise specified below.
1474
1475 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
1476 to allocate kernel_base, kernel_items, kernel_size, since
1477 they needn't be initialized to 0.
1478 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
1479 * src/closure.c (new_closure): Likewise, for itemset.
1480 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
1481 * src/lalr.c (set_goto_map): Likewise, for temp_map.
1482 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
1483 (build_relations): Likewise for edge, states1, includes.
1484 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
1485 * src/reader.c (packgram): Likewise, for ritem, rules.
1486 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
1487 * src/relation.c (relation_digraph): Likewise for VERTICES.
1488 (relation_transpose): Likewise for new_R, end_R.
1489 * src/symtab.c (symbols_token_translations_init): Likewise for
1490 token_translations.
1491 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
1492 (token_actions): Likewise for yydefact, actrow, conflrow,
1493 conflict_list.
1494 (save_column): Likewise for froms[symno], tos[symno].
1495 (goto_actions): Likewise for state_count.
1496 (pack_table): Likewise for base, pos, check.
1497 (tables_generate): Likewise for width.
1498
1499 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
1500 for initial core. Just have a separate core, so we needn't worry
1501 about whether kernel_size and kernel_base are initialized.
1502
1503 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
1504 kernel_size, kernel_items): Remove unnecessary initialization.
1505 * src/conflicts.c (conflicts): Likewise.
1506 * src/derives.c (derives): Likewise.
1507 * src/muscle_tablc (muscle_insert): Likewise.
1508 * src/relation.c (relation_digraph): Likewise.
1509 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
1510 conflrow, conflict_table, conflict_list, table, check):
1511 Likewise.
1512
1513 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
1514 This is because all callers pass unsigned int.
1515 * src/closure.h (new_closure): Likewise.
1516
1517 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
1518 (build_relations): Initialize includes[i] in all cases.
1519 * src/reader.c (packgram): Always initialize rules[ruleno].prec
1520 and rules[ruleno].precsym. Initialize members in order.
1521 * src/relation.c (relation_transpose): Always initialize new_R[i]
1522 and end_R[i].
1523 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
1524
1525 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
1526 conflict_list[0] was always 0, but now it isn't initialized.
1527
1528 * src/table.c (table_grow): When conflict_table grew, the grown
1529 area wasn't cleared. Fix this.
1530
1531 * lib/.cvsignore: Add strdup.c, strdup.h.
1532 * m4/.cvsignore: Add strdup.m4.
1533
1534 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
1535
1536 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
1537 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
1538 GOTO_NUMBER_MAXIMUM, since we occasionally compute
1539 ngotos + 1 without checking for overflow.
1540 (build_relations): Use END_NODE, not -1, to denote end of edges.
1541 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
1542 build_relations): Use goto_number, not int, for goto numbers.
1543 * src/tables.c (save_column, default_goto): Likewise.
1544
1545 2004-11-23 Akim Demaille <akim@epita.fr>
1546
1547 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
1548 of #defining from yystype.
1549 Don't typedef yystype, C++ does not need it.
1550 This lets it possible to forward declare it as union.
1551
1552 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
1553
1554 * bootstrap (gnulib_modules): Add extensions.
1555 Problem reported by Jim Meyering.
1556
1557 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
1558
1559 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
1560 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
1561 src/system.h, src/tables.c: XFREE -> free, to accommodate
1562 recent change to gnulib xalloc.h.
1563 Problem reported by Jim Meyering.
1564
1565 2004-11-17 Akim Demaille <akim@epita.fr>
1566
1567 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
1568
1569 2004-10-28 Akim Demaille <akim@epita.fr>,
1570 Alexandre Duret-Lutz <adl@gnu.org>
1571
1572 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
1573 changes.
1574 (YYCDEBUG): Adjust.
1575 Use it instead of cdebug_.
1576 (Parser::debug_stream, Parser::set_debug_stream): New.
1577 (Parser::symprint_): Define cdebug_ for temporary backward
1578 compatibility.
1579 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
1580 debug_stream ().
1581
1582 2004-11-17 Akim Demaille <akim@epita.fr>
1583
1584 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
1585 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
1586 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
1587 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1588
1589 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
1590
1591 * data/glr.c (yyloc_default): Remove; not used.
1592 Problem reported by Frank Heckenbach.
1593
1594 2004-10-25 Akim Demaille <akim@epita.fr>
1595
1596 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
1597 Introduce another definition to address simple location arrays.
1598 (yyGLRStack): New member: yyerror_range.
1599 (yyrecoverSyntaxError, yyparse): Update it.
1600 (yyrecoverSyntaxError): Use it when shifting the error token to
1601 have an accurate range, equivalent to the one computed by both
1602 yacc.c and lalr1.cc.
1603 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
1604 that column numbers start at column 0, as per GNU Coding
1605 Standards, the others tests, and the doc.
1606 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
1607 Adjust to the above change (first column is 0).
1608 And adjust the location of the "<error>", now covering the whole
1609 line.
1610
1611 2004-10-22 Akim Demaille <akim@epita.fr>
1612 and Paul Eggert <eggert@cs.ucla.edu>
1613
1614 Remove some arbitrary limits on goto numbers and relations.
1615 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
1616 initial values, since they're never used.
1617 (set_goto_map): ngotos is now unsigned, so test for overflow
1618 by seeing whether it wraps around to zero.
1619 * src/lalr.h (goto_number): Now size_t, not short int.
1620 (GOTO_NUMBER_MAXIMUM): Remove.
1621 * src/relation.c (relation_print, traverse, relation_transpose):
1622 Check for END_NODE rather than looking at sign.
1623 * src/relation.h (END_NODE): New macro.
1624 (relation_node): Now size_t, not short int.
1625
1626 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
1627
1628 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
1629 keyword, not an identifier. Problem reported by Baron Schwartz in
1630 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
1631
1632 2004-10-11 Akim Demaille <akim@epita.fr>
1633
1634 * src/symtab.c (symbol_check_alias_consistency): Also check
1635 type names, destructors, and printers.
1636 Reported by Alexandre Duret-Lutz.
1637 Recode the handling of associativity and precedence in terms
1638 of symbol_precedence_set.
1639 Accept no redeclaration at all, not even equal to the previous
1640 value.
1641 (redeclaration): New.
1642 Use it to factor redeclaration complaints.
1643 (symbol_make_alias): Don't set the type of the alias, let
1644 symbol_check_alias_consistency do it as for other features.
1645 * src/symtab.h (symbol): Add new member prec_location, and
1646 type_location.
1647 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
1648 * tests/input.at (Incompatible Aliases): New.
1649
1650 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
1651
1652 .cvsignore fixes to accommodate gnulib changes,
1653 and the practice of naming build directories "_build".
1654 * .cvsignore: Add "_*". Sort.
1655 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
1656 * m4/.cvsignore: Add "*_gl.m4".
1657
1658 2004-10-06 Akim Demaille <akim@epita.fr>
1659
1660 * src/parse-gram.y (add_param): Fix the truncation of trailing
1661 spaces.
1662
1663 2004-10-05 Akim Demaille <akim@epita.fr>
1664
1665 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
1666 whether the reducion was empty or not. This leaves room to
1667 improve the use of YYLLOC_DEFAULT in such a case.
1668 lalr1.cc is still experimental, so changing this is acceptable.
1669 And finally, there are probably not many users who changed the
1670 handling of locations in GLR, so changing is admissible too.
1671
1672 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
1673 empty reduction, set @$ to an empty location ending the previously
1674 stacked symbol.
1675 Adjust uses to make sure the code is triggered on empty
1676 reductions.
1677 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
1678 expected output: empty reductions have empty locations.
1679
1680 2004-09-29 Akim Demaille <akim@epita.fr>
1681
1682 * data/lalr1.cc: Move towards a more standard C++ coding style
1683 for templates: Class < T > -> Class<T>.
1684
1685 2004-09-29 Akim Demaille <akim@epita.fr>
1686
1687 * data/lalr1.cc: Reinstall the former ctor, for sake of
1688 compatibility, but warn it will be removed.
1689 Move towards a more standard C++ coding style (i.e., type *var ->
1690 type* var).
1691
1692 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
1693
1694 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
1695 since it's less likely to work if NULs are involved in the future.
1696
1697 2004-09-27 Akim Demaille <akim@epita.fr>
1698
1699 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
1700
1701 2004-09-27 Akim Demaille <akim@epita.fr>
1702
1703 * data/lalr1.cc (b4_parse_param_decl_1): New.
1704 (b4_parse_param_decl): Use it to have different names between attribute
1705 and argument names.
1706 (b4_cc_constructor_call): Likewise.
1707
1708 2004-09-24 Akim Demaille <akim@epita.fr>
1709
1710 * src/parse-gram.y (add_param): Strip the leading and trailing
1711 blanks from a formal argument declaration.
1712 (YY_LOCATION_PRINT): New.
1713
1714 2004-09-24 Akim Demaille <akim@epita.fr>
1715
1716 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
1717 after the location.
1718
1719 2004-09-24 Akim Demaille <akim@epita.fr>
1720
1721 * doc/bison.texinfo (Table of Symbols): Sort.
1722
1723 2004-09-21 Akim Demaille <akim@epita.fr>
1724
1725 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
1726 the useless parentheses.
1727 Suggested by Paul Eggert.
1728
1729 2004-09-20 Akim Demaille <akim@epita.fr>
1730
1731 Let the initial-action act on the look-ahead, and use it for the
1732 "initial push" (corresponding to an hypothetical beginning-of-file).
1733 And let lalr1.cc honor %initial-action.
1734
1735 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
1736 example.
1737 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
1738 (Parser::Parser): Remove the ctor that used to initialize it.
1739 (Parser::parse): Like in the other skeletons, issue the "starting
1740 parse" message before any action.
1741 Honor %initial-action.
1742 Initialize the stacks with the lookahead.
1743 * data/yacc.c: Let $$ and @$ in %initial-action designate the
1744 look-ahead.
1745 Push them in the stacks.
1746 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
1747
1748 2004-09-20 Akim Demaille <akim@epita.fr>
1749
1750 * doc/bison.texinfo (Initial Action Decl): New.
1751
1752 2004-09-20 Akim Demaille <akim@epita.fr>
1753
1754 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
1755 clearer criterion to define it.
1756 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
1757 When reducing on an empty RHS, use the latest stacked location as
1758 location.
1759 yylloc is not always available.
1760 * data/glr.c: Likewise.
1761 Also, honor initial-actions.
1762
1763 2004-09-20 Akim Demaille <akim@epita.fr>
1764
1765 * data/yacc.c (YY_LOCATION_PRINT): New.
1766 Define when we know YYLTYPE's structure, i.e., when the default
1767 YYLLOC_DEFAULT is used.
1768 * data/c.m4 (b4_yysymprint_generate): Use it.
1769 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
1770 value of the result.
1771 (error_start_): Replace with...
1772 (error_range_): this location array.
1773 This allows to replace code relying on the implementation of
1774 locations by portable code.
1775 * data/yacc.c (yylerrsp): Replace with...
1776 (yyerror_range): this.
1777 Every time a token is popped, update yyerror_range[0], to have an
1778 accurate location for the error token.
1779 * data/glr.c (YY_LOCATION_PRINT): New.
1780 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
1781 deference a pointer.
1782 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
1783 report the location in %printers.
1784
1785 * src/scan-skel.l: Instead of abort, report error messages to ease
1786 understanding skeleton scanning failures.
1787
1788 2004-09-16 Akim Demaille <akim@epita.fr>
1789
1790 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
1791 (iterator, const_iterator): these, to be more in the C++ spirit.
1792 Also, return reverse iterators so that when displaying the stack
1793 we display its bottom first.
1794 (Parser::stack_print_, Parser::reduce_print_): Match the messages
1795 from yacc.c.
1796 We should probably use vector here though.
1797
1798 2004-09-16 Akim Demaille <akim@epita.fr>
1799
1800 Have more complete shift traces.
1801
1802 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
1803 to report Shifts instead of ad hoc YYDPRINTF invocations,
1804 including for the error token.
1805 * data/lalr1.cc (symprint_): Output the location.
1806 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
1807 output the location within the %printer.
1808 Activate GLR tests, at least to make sure they compile properly.
1809 They still don't pass though.
1810 * tests/calc.at: Adjust expect verbose output, since now "Entering
1811 state..." is on a different line than the "Shifting" message.
1812
1813 2004-09-08 Akim Demaille <akim@epita.fr>
1814
1815 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
1816 Bison directive from the Bison file to the invocation of this
1817 macro, so that these directives are passed to
1818 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
1819 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
1820 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
1821 the extra Bison directives instead of the whole series.
1822 Change the grammar so that there are recoverable errors, and
1823 unrecoverable errors. Now we can have the parser give up before
1824 consuming the whole input. As a result we now can observe that
1825 the lookahead is freed when needed.
1826 Change the parser source to parse argv[1] instead of a hard coded
1827 string.
1828 Simplify yylex, and give a value and location to EOF.
1829 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
1830 passed directives already coded in the file.
1831 Add some tests to check the location of "error".
1832 For some tests, the C++ parser is correct, and not yacc.c.
1833 For other tests, they provide different, but unsatisfying, values,
1834 so keep the C++ value so that at least one parser is "correct"
1835 according to the test suite.
1836 (Actions after errors): Remove, this is subsumed by the
1837 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
1838
1839 2004-09-06 Akim Demaille <akim@epita.fr>
1840
1841 * data/lalr1.cc: Adjust the indentation of the labels.
1842 (Parser::pop): New.
1843 Use it.
1844
1845 2004-09-06 Akim Demaille <akim@epita.fr>
1846
1847 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
1848 argument, an informative message.
1849 Call YY_SYMBOL_PRINT.
1850 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
1851 * data/lalr1.cc (destruct_): Likewise.
1852 In addition, no longer depend on b4_yysymprint_generate and
1853 b4_yydestruct_generate to generate these functions, do it "by
1854 hand".
1855
1856 2004-09-03 Akim Demaille <akim@epita.fr>
1857
1858 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
1859 invoked, yydestruct the lookahead.
1860 * tests/calc.at (Calculator $1): Update the expected lengths of
1861 traces: there is an added line for the discarded lookahead.
1862 * doc/bison.texinfo (Destructor Decl): Some rewording.
1863 Define "discarded" symbols.
1864
1865 2004-09-02 Akim Demaille <akim@epita.fr>
1866
1867 * data/lalr1.cc (translate_, destruct_): No reason to be static.
1868
1869 2004-09-02 Akim Demaille <akim@epita.fr>
1870
1871 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
1872 (YYDSYMPRINTF): Rename as...
1873 (YY_SYMBOL_PRINT): this.
1874 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
1875 two.
1876 Use it instead of direct symprint_ calls.
1877 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
1878 one.
1879
1880 2004-09-02 Akim Demaille <akim@epita.fr>
1881
1882 * data/lalr1.cc (b4_yysymprint_generate): New.
1883 (symprint_): New member function, defined when YYDEBUG.
1884 Use it consistently instead of token/nterm debugging output by
1885 hand.
1886 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
1887 %printer calls to use cdebug_ when using lalr1.cc.
1888
1889 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
1890
1891 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
1892 with #ifdef YYDEBUG.
1893
1894 2004-08-26 Akim Demaille <akim@epita.fr>
1895
1896 * doc/bison.texinfo (Implementing Loops): Rename as...
1897 (Implementing Gotos/Loops): this.
1898
1899 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
1900
1901 Adjust to latest gnulib.
1902 * bootstrap (gnulib_modules): Add xalloc-die.
1903 Set LC_ALL=C so that file names sort consistently.
1904 Prefer the gnulib copies of gettext.m4, glibc21.m4,
1905 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
1906 uintmax_t.m4, ulonglong.m4.
1907 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
1908 po.m4 since we are now using _gl.m4 instead.
1909
1910 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
1911
1912 * src/scan-action.l: Remove. Scanning of semantic actions is
1913 handled in scan-gram.l.
1914
1915 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
1916
1917 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
1918
1919 * src/location.h (struct): The file member is a uniqstr.
1920 (equal_boundaries): Use UNIQSTR_EQ for comparison.
1921
1922 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
1923
1924 Fix bug with non-%union parsers that have printers or destructors,
1925 which led to a Bison core dump. Reported by Peter Fales in
1926 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
1927
1928 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
1929 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
1930 not to our own type.
1931 * src/output.c (symbol_destructors_output, symbol_printers_output):
1932 Don't assume %union.
1933 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
1934 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
1935 UNION-FLAG. All callers changed.
1936 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
1937 Use type char, not unsigned int, when declaring an array of char;
1938 this lets us remove a cast.
1939 (Printers and Destructors): Add non-%union test cases.
1940
1941 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
1942
1943 * doc/bison.texinfo: Minor editorial changes, mostly to the new
1944 GLR writeups. E.g., avoid frenchspacing and the future tense,
1945 change "lookahead" to "look-ahead", and change "wrt" to "with
1946 respect to".
1947
1948 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1949
1950 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
1951 New sections, split off from the GLR Parsers section. Put the new
1952 Simple GLR Parser near the start of the GLR section, for clarity.
1953 Rewrite connective text.
1954
1955 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
1956
1957 * doc/bison.texinfo (Simple GLR Parsers): New section.
1958
1959 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
1960
1961 * NEWS, TODO, doc/bison.texinfo:
1962 Use "look-ahead" instead of "lookahead", to be consistent.
1963 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
1964 while we're fixing "look-ahead".
1965 * src/conflicts.c (shift_set): Renamed from shiftset.
1966 (look_ahead_set): Renamed from lookaheadset.
1967 * src/print.c: Likewise.
1968 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
1969 name for "lookahead".
1970 (report_types, usage): Likewise.
1971 * src/getargs.h (report_look_ahead_tokens): Renamed from
1972 report_lookaheads.
1973 * src/lalr.c (compute_look_ahead_tokens): Renamed from
1974 compute_lookaheads.
1975 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
1976 (look_ahead_tokens_print): Renamed from lookaheads_print.
1977 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
1978 state_rule_lookaheads_print.
1979 * src/state.h: Likewise.
1980 (reductions.look_ahead_tokens): Renamed from lookaheads.
1981 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
1982 AT_DATA_LOOKAHEADS_GRAMMAR.
1983
1984 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
1985
1986 * README: Update location of patched M4 distribution.
1987
1988 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
1989
1990 Don't assume the C++ compiler takes the same arguments as the C compiler
1991 (trivial change).
1992 * configure.ac (O0CXXFLAGS): New var.
1993 * tests/atlocal.in (CXXFLAGS): Use it.
1994
1995 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
1996
1997 Fix some "make check" problems with C++ reported by
1998 Albert Chin-A-Young for Tru64 C++ in this thread:
1999 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
2000
2001 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
2002 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2003 Output to a .cc file for C++, not to a .c file.
2004 * tests/calc.at (AT_CHECK_CALC): Likewise.
2005 * tests/regression.at (AT_CHECK_DANCER): Likewise.
2006 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
2007
2008 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
2009
2010 * tests/calc.at, tests/actions.at: Workaround for SGI
2011 C++ compiler. (trivial change)
2012
2013 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
2014
2015 Spent a few hours checking out which prerequisite versions the
2016 current sources actually require. I went all the way back to
2017 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
2018 a seemingly endless set of combinations of versions more recent
2019 than that. The bottom line is that the current sources require
2020 fairly recent versions of the build tools, and it'll be some work
2021 to change this.
2022 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
2023 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
2024 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
2025 Add comments explaining why those particular versions are
2026 currently needed.
2027
2028 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
2029 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
2030 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
2031
2032 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
2033 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
2034
2035 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
2036
2037 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
2038 0.11.5. Suggested by Bruno Haible.
2039 * bootstrap: Remove gettext version checking.
2040
2041 * doc/bison.texinfo (Decl Summary): Also mention that %union
2042 can depend on prerequisite types. Problem reported by Tim
2043 Van Holder.
2044
2045 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
2046
2047 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
2048 * README-alpha: Don't tell people not to package this.
2049
2050 * bootstrap: Don't assume $(...) works; use `...` instead.
2051 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
2052 gettext better.
2053
2054 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
2055 put into the -d output file, and mention what to do if YYSTYPE is
2056 defined as a macro.
2057
2058 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
2059
2060 Undo change made earlier today: it caused autopoint to not bring
2061 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
2062 autopoint's.
2063
2064 * bootstrap: Check that gettext version matches what's in
2065 configure.ac. Warn users to ignore robots.txt ERROR 404.
2066 * bootstrap: Undo today's earlier change (logged below).
2067 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
2068
2069 The gettext version checking is causing more trouble than it's
2070 curing; remove it. Problem reported by Paul Hilfinger.
2071
2072 * bootstrap: Issue a warning that one can expect a message
2073 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
2074 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
2075
2076 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
2077
2078 Ensure that the C++ compiler used for testing actually works on a
2079 simple test program; if not, skip the C++-related tests. Problem
2080 reported by Vin Shelton in:
2081 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
2082
2083 * m4/cxx.m4: New file.
2084 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
2085 * tests/atlocal.in (BISON_CXX_WORKS): Add.
2086 * tests/local.at (AT_COMPILE_CXX): Use it.
2087
2088 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2089
2090 * data/glr.c (yylloc): Output this macro even if locations are not
2091 being generated, as the GLR parser needs it even in that case.
2092 Problem reported by Troy A. Johnson
2093 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
2094
2095 * configure.ac (AC_INIT): Update to 1.875e.
2096
2097 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
2098
2099 * NEWS: Version 1.875d.
2100 * configure.ac (AC_INIT): Likewise.
2101 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
2102
2103 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
2104 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
2105 lalr1.cc runs afoul of the first, and the last two are no longer
2106 supported by GCC 3.4.0.
2107 * README: Mention GNU m4 1.4 or later; mention m4 patches.
2108 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
2109
2110 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
2111
2112 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
2113 unsigned int, for compatibility with latest gnulib hash module.
2114 * src/state.c (state_hash, state_hasher): Likewise.
2115 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
2116 * src/uniqstr.c (hash_uniqstr): Likewise.
2117
2118 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
2119
2120 * NEWS: Unescaped newlines are no longer allowed in char & strings.
2121
2122 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
2123 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
2124 character and string literals.
2125 (unexpected_end): New function.
2126 (unexpected_eof): Use it.
2127 (unexpected_newline): New function.
2128 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
2129 actions.
2130
2131 * NEWS: Document %expect-rr.
2132
2133 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
2134 Fix typo by replacing $1 with $option.
2135 Remove more 'intl'-related files.
2136 Don't DEFUN AM_INTL_SUBDIR twice.
2137
2138 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
2139 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
2140 strtoul.c.
2141 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
2142 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
2143 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
2144 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
2145 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
2146 * src/.cvsignore: Add *.output.
2147
2148 * src/parse-gram.y: Put copyright notice inside %{ %} so it
2149 gets copied to the output file.
2150
2151 2004-04-28 Paul Eggert <eggert@twinsun.com>
2152
2153 Get files from the gnulib and po repositories, instead of relying
2154 on them being in our CVS. Upgrade to latest versions of gnulib
2155 and Automake.
2156
2157 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
2158 * bootstrap: Bootstrap from gnulib and po repositories.
2159 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
2160 * README-cvs: Document these changes. Remove version numbers from
2161 mentions of build tools, since they change so often. Mention Flex.
2162
2163 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
2164 (gl_USE_SYSTEM_EXTENSIONS): Add.
2165 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
2166 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
2167 does this for us.
2168 (AC_ISC_POSIX): Remove; we no longer support this
2169 ancient OS, as it gets in the way of latest Autoconf & gnulib.
2170 (AC_HEADER_STDC): Remove: we now assume C89 or better.
2171 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
2172 Do not check for C89 headers, except for locale.h which is used
2173 by the Yacc library and must port to K&R hosts.
2174 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
2175 Do not check for C89 functions, except for setlocale which is
2176 used by the Yacc library.
2177 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
2178 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
2179 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
2180 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
2181 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
2182 AM_GNU_GETTEXT): Remove; now done by:
2183 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
2184 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
2185 for us.
2186
2187 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
2188 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
2189 Define to empty, as gnulib.mk will do the rest for us.
2190 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
2191 for us.
2192 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
2193 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
2194
2195 * src/files.c: Include gnulib's xstrndup.h.
2196
2197 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
2198 (REALLOC): Use xnrealloc, for likewise.
2199 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
2200 (strnlen, memrchr): Remove decls; functions no longer used.
2201 Include <stpcpy.h>.
2202
2203 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
2204 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2205 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
2206 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
2207 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
2208 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
2209 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
2210 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
2211 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
2212 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
2213 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
2214 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
2215 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
2216 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
2217 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
2218 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
2219 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
2220 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
2221 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
2222 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
2223 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
2224 Remove, as these files are now generated automatically
2225 by bootstrap or automake.
2226
2227 * po/ChangeLog: Remove: all but one entry was a duplicate
2228 of this file, and I moved that 2000-11-02 entry here.
2229
2230 * config/.cvsignore: Add Makefile, depcomp, install-sh.
2231 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
2232 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
2233 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
2234 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
2235 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
2236 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
2237 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
2238 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
2239 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
2240 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
2241 xstrndup.h.
2242 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
2243 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
2244 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
2245 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
2246 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
2247 * src/.cvsignore: Remove *_.c.
2248
2249
2250 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
2251 support it. (The latest stable gzip doesn't.)
2252
2253 2004-04-27 Paul Eggert <eggert@twinsun.com>
2254
2255 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
2256 case, as stos_ is now used by destructors due to the 2004-02-09
2257 change.
2258
2259 Remove more K&R C support.
2260 * lib/libiberty.y (PARAMS): Remove. All uses removed.
2261 * lib/subpipe.c (errno): Remove decl.
2262 Include <stdlib.h> unconditionally.
2263 (EXIT_FAILURE): Remove macro.
2264 * src/complain.c (vfprintf, strerror): Remove.
2265 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
2266 unconditionally.
2267 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
2268 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
2269 (strchr, strspn, memchr): Remove decls.
2270 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
2271 unconditionally. Do not declare perror.
2272 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
2273 unconditionally.
2274
2275 * src/complain.c (_): Remove useless defn, as system.h defines this.
2276
2277 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
2278 with latest obstack.h.
2279 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
2280 to procedure types, as obstack.h now does that for us.
2281 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
2282
2283 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
2284 so that this include file can stand alone.
2285 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
2286 does this now. Include subpipe.h first after config.h, to
2287 test whether it can stand alone.
2288
2289 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
2290 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
2291 unused declaration.
2292
2293 * tests/synclines.at (%union synch line): Put a dummy member in
2294 the union, because empty unions aren't allowed in C. Caught
2295 by GCC 3.4.0.
2296
2297 2004-04-13 Jim Meyering <jim@meyering.net>
2298
2299 * src/conflicts.c (conflicts_print): Correct format string typo:
2300 use `%%' to produce literal `%'. (trivial change)
2301
2302 2004-03-30 Paul Eggert <eggert@twinsun.com>
2303
2304 * src/getargs.c (version): Update copyright year to 2004.
2305
2306 * data/c.m4 (b4_int_type): Use 'short int' rather than
2307 'short', and similarly for 'long', 'unsigned', etc.
2308 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
2309 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
2310 yy_yypstack, yydumpstack): Likewise.
2311 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
2312 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
2313 Likewise.
2314 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
2315 yy_stack_print, yyparse): Likewise.
2316 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
2317 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
2318 * lib/bitset.c (bitset_print): Likewise.
2319 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
2320 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2321 * lib/bitsetv.c (bitsetv_dump): Likewise.
2322 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
2323 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
2324 Likewise.
2325 * src/LR0.c (allocate_itemsets): Likewise.
2326 * src/gram.h (rule_number, rule): Likewise.
2327 * src/lalr.h (goto_number): Likewise.
2328 * src/nullable.c (nullable_compute): Likewise.
2329 * src/output.c (prepare_rules): Likewise.
2330 * src/relation.c (relation_print, relation_digraph): Likewise.
2331 * src/relation.h (relation_node): Likewise.
2332 * src/state.h (state_number, transitions, errs, reductions,
2333 struct state): Likewise.
2334 * src/symtab.h (symbol_number, struct symbol): Likewise.
2335 * src/tables.c (vector_number, tally, action_number,
2336 default_goto, goto_actions): Likewise.
2337 * tests/existing.at (GNU Cim Grammar): Likewise.
2338 * tests/regression.at (Web2c Actions): Likewise.
2339
2340 * src/output.c (muscle_insert_short_int_table): Renamed from
2341 muscle_insert_short_table. All uses changed.
2342
2343 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2344
2345 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
2346 (declaration): Replace expected_conflicts with expected_sr_conflicts.
2347 Add %expect-rr rule.
2348
2349 * src/scan-gram.l: Recognize %expect-rr.
2350
2351 * src/conflicts.h (expected_sr_conflicts): Rename from
2352 expected_conflicts.
2353 (expected_rr_conflicts): Declare.
2354
2355 * src/conflicts.c (expected_sr_conflicts): Rename from
2356 expected_conflicts.
2357 (expected_rr_conflicts): Define.
2358 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
2359 for GLR parsers.
2360 Use expected_sr_conflicts in place of expected_conflicts.
2361 Warn if expected_rr_conflicts used in non-GLR parser.
2362
2363 * doc/bison.texinfo: Add documentation for %expect-rr.
2364
2365 2004-03-08 Paul Eggert <eggert@gnu.org>
2366
2367 Add support for hex token numbers. Suggested by Odd Arild Olsen in
2368 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
2369
2370 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
2371 in lalr1.cc.
2372 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
2373 * src/scan-gram.l (scan_integer): New function.
2374 ({int}): Use it.
2375 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
2376 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
2377 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
2378 Say "long int", not "long", for uniformity with GNU style.
2379
2380 2004-02-25 Paul Eggert <eggert@twinsun.com>
2381
2382 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
2383 compilers. This fixes a problem with Intel's C++ compiler being
2384 chatty, reported by Guido Trentalancia in
2385 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
2386
2387 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
2388
2389 Support %destructor and merge error locations in lalr1.cc.
2390
2391 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
2392 (Parser::stos_): Define unconditionally.
2393 (Parser::destruct_): New method. Generate its body with
2394 b4_yydestruct_generate.
2395 (Parser::error_start_): New attribute.
2396 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
2397 token which are discarded.
2398 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
2399 error_start_ when erroneous token are discarded.
2400 (Parser::parse) <yyerrlab1>: Compute the location of the error
2401 token so that it covers all the discarded tokens.
2402 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
2403 it can be called with `%skeleton "lalr1.cc"', and do that.
2404
2405 2004-02-02 Paul Eggert <eggert@twinsun.com>
2406
2407 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
2408 $(top_srcdir)/lib and ../lib. This fixes a bug reported
2409 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
2410 There's no need to mention top_builddir since Automake does that
2411 for us.
2412 (INCLUDES): Remove, as Automake says it's obsolescent.
2413 Contents migrated into AM_CPPFLAGS as described above.
2414 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
2415
2416 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2417
2418 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
2419 (yyreportSyntaxError): Handle case where lookahead token is
2420 YYEMPTY.
2421
2422 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2423
2424 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
2425 resulting parsers are compilable with C++.
2426
2427 2003-12-23 Paul Eggert <eggert@twinsun.com>
2428
2429 * config/depcomp, config/install-sh: Sync with Automake 1.8.
2430 * src/output.c (output_skeleton): Rename local var.
2431 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
2432 Bison tokens, as this runs afoul of the 2003-10-07 change that
2433 disallowed NUL bytes in character constants or string literals.
2434
2435 * tests/local.at: Require Autoconf 2.59's Autotest.
2436 * tests/testsuite.at: Don't include local.at, since we now assume
2437 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
2438 including it.
2439 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
2440 multiple inclusion warnings.
2441
2442 2003-12-02 Akim Demaille <akim@epita.fr>
2443
2444 * doc/bison.texinfo (How Can I Reset the Parser): More about start
2445 conditions.
2446 From Bruno Haible.
2447
2448 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
2449
2450 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
2451
2452 2003-10-07 Paul Eggert <eggert@twinsun.com>
2453
2454 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
2455 if testsuite doesn't exist.
2456
2457 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
2458 literals, unfortunately.
2459 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
2460 Complain about NUL bytes in character constants or string literals.
2461
2462 2003-10-05 Paul Eggert <eggert@twinsun.com>
2463
2464 * NEWS: Don't document %no-default-prec, as it's still
2465 too experimental.
2466 * doc/bison.texinfo: Document %no-default-prec only if
2467 the defaultprec flag is set. Normally it's not.
2468
2469 2003-10-04 Paul Eggert <eggert@twinsun.com>
2470
2471 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
2472 non-modifiable lvalue, instead of a modifiable one.
2473 * doc/bison.texinfo (Actions): Document that $$ can
2474 be assigned to. Do not claim that $$ and $N are
2475 array element references: user code should not rely on this.
2476
2477 2003-10-01 Paul Eggert <eggert@twinsun.com>
2478
2479 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
2480 (grammar_declaration): Use it.
2481 * src/scan-gram.l: New token %no-default-prec.
2482 * tests/conflicts.at: Revamp tests to use %no-default-prec.
2483 * NEWS, doc/bison.texinfo: Document the above.
2484
2485 2003-10-01 Akim Demaille <akim@epita.fr>
2486
2487 VCG no longer supports long_straight_phase.
2488
2489 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
2490 * src/print_graph.c (print_graph): Adjust.
2491
2492 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
2493 and Paul Eggert <eggert@twinsun.com>
2494
2495 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
2496 Table of Symbols): Document %default-prec.
2497 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
2498 (grammar_declaration): Set default_prec on %default-prec.
2499 * src/scan-gram.l (%default-prec): New token.
2500 * src/reader.h (default_prec): New flag.
2501 * src/reader.c: Likewise.
2502 (packgram): Handle it.
2503 * tests/conflicts.at (%default-prec without %prec,
2504 %default-prec with %prec, %default-prec 1): New tests.
2505
2506 2003-09-30 Paul Eggert <eggert@twinsun.com>
2507
2508 * tests/testsuite.at: Include local.at, not input.at, fixing
2509 a typo in the 2003-08-25 patch.
2510
2511 2003-08-27 Akim Demaille <akim@epita.fr>
2512
2513 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
2514 GCC warnings.
2515
2516 2003-08-26 Akim Demaille <akim@epita.fr>
2517
2518 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
2519 "<\#" to avoid magic from Gnus when posting parts of this script.
2520
2521 2003-08-26 Akim Demaille <akim@epita.fr>
2522
2523 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
2524 (Parser::parse): here.
2525 Adjust: nerrs and errstatus is now replaced by...
2526 (Parser::nerrs_, Parser::errstatus_): New.
2527
2528 2003-08-25 Akim Demaille <akim@epita.fr>
2529
2530 * config/announce-gen, Makefile.cfg: New.
2531 * Makefile.am: Adjust.
2532 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
2533 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
2534
2535 2003-08-25 Akim Demaille <akim@epita.fr>
2536
2537 When reducing initial empty rules, Bison parser read an initial
2538 location that is not defined. This results in garbage, and that
2539 affects Bison's own parser. Therefore we need (i) to extend Bison
2540 to support a means to initialize this location, and (ii) to use
2541 this CVS Bison to fix CVS Bison's parser.
2542
2543 * src/reader.h, reader.c (epilogue_augment): Remove, replace
2544 with...
2545 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
2546 * src/parse-gram.y: Adjust.
2547 (%initial-action): New.
2548 (%error-verbose): Since we require CVS Bison, there is no reason
2549 not to use it.
2550 * src/scan-gram.l: Adjust.
2551 * src/Makefile.am (YACC): New, to make sure we use our own parser.
2552 * data/yacc.c (yyparse): Use b4_initial_action.
2553
2554 2003-08-25 Akim Demaille <akim@epita.fr>
2555
2556 * doc/bison.texinfo: Don't promote stdout for error messages.
2557
2558 2003-08-25 Akim Demaille <akim@epita.fr>
2559
2560 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
2561 From Alexandre Duret-Lutz.
2562
2563 2003-08-25 Akim Demaille <akim@epita.fr>
2564
2565 Version 1.875c.
2566
2567 2003-08-25 Akim Demaille <akim@epita.fr>
2568
2569 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
2570 Use them.
2571
2572 2003-08-25 Akim Demaille <akim@epita.fr>
2573
2574 * data/lalr1.cc (Parser::reduce_print_): New.
2575 Use it.
2576
2577 2003-08-25 Akim Demaille <akim@epita.fr>
2578
2579 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
2580 error recovery loops. This patch is based on
2581 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
2582 Also, augment the similarity between lalr1.cc and yacc.c.
2583 Note: the locations of error recovery rules are not correct yet.
2584
2585 * data/lalr1.cc: Comment changes to augment the similarity between
2586 lalr1.cc and yacc.c.
2587 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
2588 (yyerrlab1): Remove, but where it used to be (now the bottom part of
2589 yyerrlab), when hitting EOF, pop the whole stack here instead of
2590 merely falling thru the default error handling mechanism.
2591 (yyerrorlab): New label, with the old contents of YYERROR,
2592 plus the following change: pop the stack of rhs corresponding
2593 to the production that invoked YYERROR. That is how Yacc
2594 behaves (required by POSIX).
2595 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
2596 fail.
2597
2598 2003-08-25 Akim Demaille <akim@epita.fr>
2599
2600 Tune local.at so that people can "autom4te -l autotest calc.at -o
2601 calc" for instance, to extract a sub test suite.
2602
2603 * tests/testsuite.at: Move the initialization, Autotest version
2604 requirement, and AT_TESTED invocation into...
2605 * tests/local.at: here.
2606 * tests/testsuite.at: Include it for compatibility with Autoconf
2607 2.57.
2608 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
2609 be ignore.
2610
2611 2003-08-04 Paul Eggert <eggert@twinsun.com>
2612
2613 Rework code slightly to avoid gcc -Wtraditional warnings.
2614 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
2615 The returned value is now stored in *YY0. All callers changed.
2616 * src/output.c (merge_output): Adjust to the above change.
2617
2618 2003-07-26 Paul Eggert <eggert@twinsun.com>
2619
2620 * data/glr.c (YYASSERT): New macro.
2621 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
2622 yyresolveStates, yyprocessOneStack):
2623 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
2624 Derived from a suggestion by Frank Heckenbach.
2625
2626 2003-07-25 Paul Eggert <eggert@twinsun.com>
2627
2628 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
2629 for portability to K&R C (after ansi2knr, presumably). See
2630 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
2631 by Frank Heckenbach, though I have omitted the structure-initialization
2632 part of his glr-knr.diff patch since I recall that the Portable
2633 C Compiler didn't require that change.
2634
2635 Let the user specify how to allocate and free memory.
2636 Derived from a suggestion by Frank Heckenbach in
2637 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
2638 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
2639 All uses of free, malloc, realloc changed to use these macros,
2640 and unnecessary casts removed.
2641 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
2642
2643 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
2644
2645 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
2646 use s.empty() rather than s == "" to test for empty string; see
2647 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
2648 (trivial change)
2649
2650 2003-06-25 Akim Demaille <akim@epita.fr>
2651
2652 * config/depcomp, config/install-sh: Update from masters.
2653
2654 2003-06-20 Paul Eggert <eggert@twinsun.com>
2655
2656 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
2657 and return properly parenthesized result.
2658 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
2659 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
2660 Remove unnecessary parentheses from uses.
2661 * doc/bison.texinfo (Location Default Action): Describe the
2662 conventions for parentheses.
2663
2664 2003-06-19 Paul Eggert <eggert@twinsun.com>
2665
2666 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
2667 yyreportTree): Do not assume that size_t is the same width as int,
2668 when printing sizes. Print sizes using an unsigned format.
2669 Problem reported by Frank Heckenbach in
2670 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
2671
2672 Port to Forte Developer 7 C compiler.
2673 * data/glr.c (struct YYLTYPE): If locations are not being used,
2674 declare a single dummy member, as empty structs do not conform
2675 to the C standard.
2676 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
2677 the Forte Developer 7 C compiler complains that end-of-loop
2678 code is not reached.
2679
2680 2003-06-17 Paul Eggert <eggert@twinsun.com>
2681
2682 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
2683 avoid warnings from picky compilers about redefinition of PARAMS.
2684
2685 2003-06-17 Paul Eggert <eggert@twinsun.com>
2686
2687 Version 1.875b.
2688
2689 * NEWS: Document 1.875b.
2690
2691 * lib/bbitset.h: Do not include config.h; that's the includer's job.
2692 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
2693 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
2694 Don't use 'index' in comments, as it's a builtin fn on some hosts.
2695 * lib/bitset_stats.c: Include gettext.h unconditionally, as
2696 per recent gettext manual's suggestion.
2697 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
2698 Use prototypes, not old-style definitions.
2699 * lib/lbitset.c (lbitset_unused_clear): Likewise.
2700 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
2701 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
2702 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
2703 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
2704 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
2705 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
2706 vbitset_or_and_cmp, vbitset_copy): Likewise.
2707
2708 * lib/libiberty.h: Do not include config.h; that's the includer's job.
2709 Do not include <stdlib.h>.
2710 (PARAMS): Define unconditionally for C89.
2711 (ATTRIBUTE_NORETURN): Remove.
2712 (ATTRIBUTE_UNUSED): Define unconditionally.
2713
2714 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
2715 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
2716 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
2717 * lib/vbitset.c, lib/vbitset.h: New files.
2718 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2719 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
2720 from libbitset.
2721
2722 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
2723 `How Can I Reset @code{yyparse}', since texinfo does not allow
2724 arbitrary @ in node names.
2725
2726 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
2727 shouldn't be needed according to the gettext 0.12.1 documentation
2728 but which seem to be needed anyway: codeset.m4 glibc21.m4
2729 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
2730 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
2731 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
2732
2733 * lib/.cvsignore: Add stdbool.h.
2734 * m4/.cvsignore: Add nls.m4, po.m4.
2735
2736 Upgrade to CVS gnulib.
2737 * stdbool_.h: File renamed from stdbool.h.in.
2738 * configure.ac (AM_STDBOOL_H): Invoke this instead of
2739 AC_HEADER_STDBOOL.
2740 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
2741 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
2742 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
2743 (MOSTLYCLEANFILES): New var.
2744 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
2745 (stdbool.h): New rule.
2746 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
2747 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
2748 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
2749 m4/quote.m4: Upgrade to today's gnulib.
2750
2751 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
2752 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
2753 the tests right now.
2754 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
2755 yyerror are declared before use; C99 requires this.
2756
2757 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2758
2759 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
2760 first.
2761 (yyrecoverSyntaxError): Correct the logic for setting and testing
2762 yyerrState.
2763 Correct comment on handling EOF.
2764 Allow states with only a default reduction, rather than failing
2765 (I can't quite reconstruct why these were not allowed before).
2766
2767 Fixes to avoid problem that $-N rules in GLR parsers can cause
2768 buffer overruns, corrupting state.
2769
2770 * src/output.c (prepare_rules): Output max_left_semantic_context
2771 definition.
2772 * src/reader.h (max_left_semantic_context): New variable declaration.
2773 * src/scan-gram.l (max_left_semantic_context): Define.
2774 (handle_action_dollar): Update max_left_semantic_context.
2775 * data/glr.c (YYMAXLEFT): New definition.
2776 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
2777 (yyresolveAction): Ditto.
2778
2779 Fixes to problems with location handling in GLR parsers reported by
2780 Frank Heckenbach (2003/06/05).
2781
2782 * data/glr.c (YYLTYPE): Make trivial if locations not used.
2783 (YYRHSLOC): Add parentheses, and define only if locations used.
2784 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
2785 locations not used.
2786 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
2787 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
2788
2789 * tests/cxx-type.at: Exercise location information; update tests
2790 to differentiate output with and without locations.
2791 Remove forward declarations of yylex and yyerror---caused errors
2792 because default YYLTYPE not yet defined.
2793 Change semantic actions to compute strings, rather than printing
2794 them directly (to test proper passing of semantics values). Change
2795 output to prefix notation and update test data and expected results.
2796 (yylex): Track locations.
2797 (stmtMerge): Return value rather than printing, and include arguments
2798 in value.
2799
2800 2003-06-03 Paul Eggert <eggert@twinsun.com>
2801
2802 Avoid warnings generated by GCC 2.95.4 when Bison is
2803 configured with --enable-gcc-warnings.
2804 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
2805 yy::]b4_parser_class_name[::translate_,
2806 yy::Stack::operator[] (unsigned),
2807 yy::Stack::operator[] (unsigned) const,
2808 yy::Slice::operator[] (unsigned),
2809 yy::Slice::operator[] (unsigned) const):
2810 Rename local vars to avoid warnings.
2811 * tests/glr-regression.at (Improper handling of embedded actions
2812 and $-N in GLR parsers): Remove unused local variable from yylex.
2813 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
2814 (void) as arg when not pure, since we now assume C89 when building
2815 Bison. Pacify GCC by using parameter.
2816
2817 2003-06-02 Paul Eggert <eggert@twinsun.com>
2818
2819 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
2820 yy::Location::lines, yy::Location::columns): Rename arguments
2821 to avoid shadowing; this removes a warning generated by GCC 3.3.
2822
2823 2003-06-01 Paul Eggert <eggert@twinsun.com>
2824
2825 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
2826 to g++, as GCC 3.3 complains if you do it.
2827 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
2828 everything that WARNING_CFLAGS has, except omit warnings
2829 not suitable for C++.
2830 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
2831 * tests/atlocal.in (CXXFLAGS): New var.
2832 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
2833
2834 Fix a GLR parser bug I reported in February; see
2835 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
2836 The problem was that GLR parsers did not conform to the C standard,
2837 because actions like { $1 = $2 + $3; } expanded to expressions
2838 that invoked YYFILL in separate subexpressions, and YYFILL assigned
2839 to a local variable. The C standard says that expressions
2840 like (var = f ()) + (var = f ()) have undefined behavior.
2841 Another problem was that GCC sometimes issues warnings that
2842 yyfill and its parameters are unused.
2843
2844 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
2845 as possibly unused.
2846 (yyfill): New function.
2847 (YYFILL): Use it.
2848 (yyuserAction): Change type of yynormal to bool, so that it matches
2849 the new yyfill signature. Mark it as possibly unused.
2850
2851
2852 Follow up on a bug I reported in February, where a Bison-generated
2853 parser can loop. Provide a test case and a fix for yacc.c. I
2854 don't have a fix for lalr1.cc or for glr.c, unfortunately.
2855 The original bug report is in:
2856 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
2857
2858 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
2859 macro's size was becoming unwieldy.
2860 (yyerrlab): Do not discard an empty lookahead symbol, as this
2861 might destroy garbage.
2862 (yyerrorlab): New label, with the old contents of YYERROR,
2863 plus the following change: pop the stack of rhs corresponding
2864 to the production that invoked YYERROR. That is how Yacc
2865 behaves, and POSIX requires this behavior.
2866 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
2867 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
2868 Define 'alarm' to do nothing if unistd.h is not available.
2869 Add a new rule "exp: '-' error;" to test the above change to
2870 data/yacc.c. Use 'alarm' to abort any test taking longer than
2871 10 seconds, as it's probably looping.
2872 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
2873 Also, the new yacc.c generates two fewer diagnostics for an
2874 existing test.
2875
2876 2003-05-24 Paul Eggert <eggert@twinsun.com>
2877
2878 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
2879 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
2880 This fixes a problem reported by John Bowman when the Compaq/HP
2881 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
2882 -ansi -Wall -gall).
2883 * data/yacc.c (union yyalloc): Likewise.
2884 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
2885
2886 Switch from 'int' to 'bool' where that makes sense.
2887
2888 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
2889 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
2890 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
2891 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
2892 Return or accept bool, not int. All callers changed.
2893 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
2894 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
2895 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
2896 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
2897 bitset_or_and_cmp_): Likewise.
2898 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
2899 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
2900 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
2901 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
2902 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
2903 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
2904 bitset_stats_or_and_cmp): Likewise.
2905 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
2906 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
2907 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
2908 ebitset_xor_cmp): Likewise.
2909 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
2910 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
2911 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
2912 lbitset_xor_cmp): Likewise.
2913 * lib/bbitset.h: Include <stdbool.h>.
2914 (struct bitset_vtable): The following members now return bool, not
2915 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
2916 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
2917 or_and_cmp).
2918 * src/conflicts.c (count_rr_conflicts): Likewise.
2919 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
2920 All uses changed.
2921 * lib/ebitset.c (ebitset_obstack_init): Likewise.
2922 * lib/lbitset.c (lbitset_obstack_init): Likewise.
2923 * src/getargs.c (debug_flag, defines_flag, locations_flag,
2924 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
2925 graph_flag): Likewise.
2926 * src/getargs.h (debug_flag, defines_flag, locations_flag,
2927 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
2928 graph_flag): Likewise.
2929 * src/output.c (error_verbose): Likewise.
2930 * src/output.h (error_verbose): Likewise.
2931 * src/reader.c (start_flag, typed): Likewise.
2932 * src/reader.h (typed): Likewise.
2933 * src/getargs.c (LOCATIONS_OPTION): New constant.
2934 (long_options, getargs): Use it.
2935 * src/lalr.c (build_relations): Use bool, not int.
2936 * src/nullable.c (nullable_compute): Likewise.
2937 * src/print.c (print_reductions): Likewise.
2938 * src/tables.c (action_row, pack_vector): Likewise.
2939 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
2940 * src/output.c (prepare): Use it.
2941 * src/output.c (token_definitions_output,
2942 symbol_destructors_output, symbol_destructors_output): Use string,
2943 not boolean integer, to keep track of whether to output separator.
2944 * src/print_graph.c (print_core): Likewise.
2945 * src/state.c (state_rule_lookaheads_print): Likewise.
2946
2947 * config/install-sh: Sync from automake 1.7.5.
2948
2949 2003-05-14 Paul Eggert <eggert@twinsun.com>
2950
2951 * src/parse-gram.y (rules_or_grammar_declaration): Require a
2952 semicolon after a grammar declaration, in the interest of possible
2953 future changes to the Bison input language.
2954 Do not allow a stray semicolon at the start of the grammar.
2955 (rhses.1): Allow one or more semicolons after any rule, including
2956 just before "|" as required by POSIX.
2957 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
2958 grammar.
2959
2960 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
2961
2962 %parse-param support for lalr1.cc.
2963
2964 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
2965 b4_cc_constructor_calls, b4_cc_constructor_call,
2966 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
2967 definitions.
2968 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
2969 parse-param arguments.
2970 (yy::b4_parser_class_name): Declare instance variables to
2971 hold parse-param arguments.
2972 * tests/calc.at: s/value/semantic_value/ because value clashes
2973 with a member of yy::b4_parser_class_name. Adjust C++ code
2974 to handle %parse-param. Enable %parse-param test in C++.
2975
2976 2003-05-12 Paul Eggert <eggert@twinsun.com>
2977
2978 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
2979 English a bit. Fix fclose typo. Change "const char" to "char
2980 const", and use ANSI C rather than K&R for "main". Suggest
2981 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
2982 and suggest yy_switch_to_buffer.
2983
2984 2003-05-05 Paul Eggert <eggert@twinsun.com>
2985
2986 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
2987 C89. This avoids a diagnostic on compilers that define __STDC__
2988 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
2989 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
2990
2991 2003-05-03 Paul Eggert <eggert@twinsun.com>
2992
2993 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
2994 Do not overrun array bounds.
2995 This should fix a bug reported today by Olatunji Oluwabukunmi in
2996 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
2997
2998 2003-04-29 Akim Demaille <akim@epita.fr>
2999
3000 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
3001 * src/getargs.c, src/getargs.h: here, as bool, not int.
3002 (nondeterministic_parser): New.
3003 * src/parse-gram.y, src/scan-gram.l: Support
3004 %nondeterministic-parser.
3005 * src/output.c (prepare): Use nondeterministic_parser instead
3006 of glr_parser where appropriate.
3007 * src/tables.c (conflict_row, action_row, save_row)
3008 (token_actions, token_actions, pack_vector): Ditto.
3009
3010 2003-04-29 Akim Demaille <akim@epita.fr>
3011
3012 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
3013
3014 2003-04-29 Akim Demaille <akim@epita.fr>
3015
3016 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
3017 with %pure-parser and %locations to exercise the patch from Yakov
3018 Markovitch below.
3019
3020 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
3021
3022 * data/yacc.c: (b4_lex_param): Corrected for the case where
3023 %lex-param is provided and %pure-parser isn't.
3024
3025 2003-04-27 Paul Eggert <eggert@twinsun.com>
3026
3027 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
3028 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
3029 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
3030 if it is not defined.
3031 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
3032
3033 2003-04-26 Paul Eggert <eggert@twinsun.com>
3034
3035 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
3036 Declare to be of type suitable for the ninf value itself, not of
3037 type suitable for the corresponding table, since the latter might
3038 be unsigned but the ninf value might be negative. This fixes a
3039 bug reported by Alexandre Duret-Lutz in
3040 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3041
3042 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
3043 invokes it. We shouldn't invoke it twice because it will attempt
3044 to put error.o in the archive twice. This fixes a glitch reported
3045 by Martin Mokrejs in
3046 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
3047
3048 2003-04-21 Paul Eggert <eggert@twinsun.com>
3049
3050 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
3051 to gnulib.
3052
3053 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
3054
3055 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
3056 Fix obvious typo that results in uncompilable GLR parsers
3057 when both %pure-parser and %locations are used. (trivial change)
3058
3059 2003-04-17 Paul Eggert <eggert@twinsun.com>
3060
3061 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
3062 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
3063 Do not insert the expected token via unput, as this runs afoul
3064 of a POSIX-compatibility bug in flex 2.5.31.
3065 All uses changed to BEGIN the parent state,
3066 since we no longer insert the expected token via unput.
3067 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
3068 that is no longer emitted after the above change.
3069
3070 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
3071 the first one. This change is from Paul Hilfinger, and it fixes
3072 regression reported by Werner Lemberg in
3073 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
3074
3075 (resolve_sr_conflict): Don't invoke state_errs_set
3076 unless one or more tokens have been explicitly made errors.
3077 Otherwise, the above change causes Bison to abort.
3078
3079 * tests/existing.at (GNU pic Grammar): New test case, taken from
3080 Lemberg's email.
3081
3082 2003-03-31 Akim Demaille <akim@epita.fr>
3083
3084 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
3085
3086 2003-03-31 Akim Demaille <akim@epita.fr>
3087
3088 * src/output.c (prepare_symbols): Avoid trailing spaces in the
3089 output.
3090
3091 2003-03-31 Akim Demaille <akim@epita.fr>
3092
3093 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
3094 From Paul Hilfinger.
3095
3096 2003-03-29 Akim Demaille <akim@epita.fr>
3097
3098 * m4/error.m4: Do not put under dynamic conditions some code which
3099 expansion is under static control.
3100
3101 2003-03-29 Akim Demaille <akim@epita.fr>
3102
3103 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
3104
3105 2003-03-29 Akim Demaille <akim@epita.fr>
3106
3107 * doc/bison.texinfo (Strings are Destroyed): New.
3108
3109 2003-03-13 Paul Eggert <eggert@twinsun.com>
3110
3111 * .cvsignore: Add configure.lineno.
3112 * src/.cvsignore: Add yacc.
3113 * tests/.cvsignore: Add testsuite.log.
3114 * doc/fdl.texi: Sync with latest FSF version.
3115
3116 2003-03-12 Paul Eggert <eggert@twinsun.com>
3117
3118 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
3119 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
3120 cursor, instead of leaving it undefined. This fixes a bug
3121 reported by Tim Van Holder in
3122 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
3123 * tests/input.at (Torturing the Scanner): Test the scanner on
3124 an empty input file, which was Tim Van Holder's test case.
3125
3126 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
3127 <sys/resource.h> can be included, include sys/time.h and
3128 sys/times.h first, if available. This works around the SunOS
3129 4.1.4 porting bug reported by Bruce Becker in
3130 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
3131
3132 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
3133 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
3134 AC_HEADER_SYS_WAIT.
3135
3136 Merge changes from gnulib. This was prompted because the CVS
3137 snapshot didn't build on Solaris 7 due to strnlen problems.
3138
3139 These changes need to be merged back into gnulib:
3140 * lib/hash.c: Include <stdbool.h> unconditionally.
3141 * m4/onceonly.m4 (m4_quote): New macro.
3142 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
3143 Quote AC_FOREACH variable-expansions properly.
3144 The 2003-01-03 obstack.h change also needs merging.
3145 {end of changes requiring merging}
3146
3147 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
3148 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
3149 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
3150 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
3151 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
3152 New files, imported from gnulib.
3153 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
3154 above.
3155
3156 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
3157 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
3158 gnulib sources.
3159
3160 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
3161 Add.
3162 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
3163 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
3164 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
3165 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
3166 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
3167 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
3168 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
3169 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
3170 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
3171 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
3172 (jm_PREREQ_ARGMATCH): Remove.
3173 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
3174 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
3175
3176 * src/system.h: Include <stdbool.h> unconditionally.
3177
3178 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
3179 assuming at least C89 in the bitset code for some time now.
3180
3181 2003-03-03 Akim Demaille <akim@epita.fr>
3182
3183 * ro.po: New.
3184
3185 2003-03-02 Akim Demaille <akim@epita.fr>
3186
3187 * doc/bison.texinfo (Table of Symbols): Reactivate the
3188 documentation for %lex-param, and %parse-param.
3189
3190 2003-03-02 Akim Demaille <akim@epita.fr>
3191
3192 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
3193 generate verbose error messages.
3194 Use the number of tokens as an upper bound in yytname, as it
3195 cannot be a non terminal.
3196
3197 2003-03-02 Akim Demaille <akim@epita.fr>
3198
3199 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
3200 message.
3201
3202 2003-03-02 Akim Demaille <akim@epita.fr>
3203
3204 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
3205 Use them to exercise yycheck overrun.
3206 Based on Andrew Suffield's grammar.
3207
3208 2003-03-02 Akim Demaille <akim@epita.fr>
3209
3210 Create tests/local.at for Bison generic testing macros.
3211
3212 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
3213 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
3214 This new file.
3215 * tests/calc.at (AT_CHECK_CALC): Adjust.
3216 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
3217 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
3218 * tests/local.at: here.
3219 (AT_COMPILE_CXX): Tags the tests using it as c++.
3220 Ignore the test if CXX is not functional.
3221
3222 2003-03-01 Paul Eggert <eggert@twinsun.com>
3223
3224 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
3225 not loc->end, since loc->end might contain garbage and this leads
3226 to undefined behavior on some platforms.
3227 (id_loc, token_start): Use (IF_LINTed) initial values that do not
3228 depend on *loc, so that the reader doesn't give the the false
3229 impression that *loc is initialized.
3230 (<INITIAL>"%%"): Do not bother setting code_start, since its value
3231 does not survive the return.
3232
3233 2003-03-01 Akim Demaille <akim@epita.fr>
3234
3235 * src/scan-gram.l (code_start): Always initialize it when entering
3236 into yylex, as SC_EPILOGUE is activated *before* the corresponding
3237 yylex invocation. An alternative would be making it static, but
3238 then it starts with the second %%'s beginning, instead of its end.
3239
3240 2003-02-28 Paul Eggert <eggert@twinsun.com>
3241
3242 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
3243 around a UnixWare 7.1.1 porting bug reported by John Hughes in
3244 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
3245
3246 2003-02-26 Paul Eggert <eggert@twinsun.com>
3247
3248 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
3249 Remove Sequent/Pyramid discussion (nobody uses them any more).
3250 Merge VMS and MS-DOS discussion; these ports may well be dead
3251 but let's keep mentioning them for now. Put <> around email
3252 addresses. Add copyright notice.
3253
3254 2003-02-24 Paul Eggert <eggert@twinsun.com>
3255
3256 * data/glr.c (yy_reduce_print): yylineno -> yylno,
3257 to avoid collision with flex use of yylineno.
3258 Problem reported by Bruce Lilly in
3259 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
3260 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3261 * data/yacc.c (yy_reduce_print): Likewise.
3262
3263 * config/depcomp: Sync with Automake 1.7.3.
3264
3265 2003-02-21 Akim Demaille <akim@epita.fr>
3266
3267 * data/lalr1.cc: Use temporary variables instead of casts to
3268 change integer types.
3269 Suggested by Paul Eggert.
3270
3271 2003-02-21 Akim Demaille <akim@epita.fr>
3272
3273 * doc/bison.texinfo: Use "location" consistently to refer to @n,
3274 to avoid confusions with lalr1.cc's notion of Position.
3275 Suggested by Paul Eggert.
3276
3277 2003-02-20 Akim Demaille <akim@epita.fr>
3278
3279 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
3280 before initial_columns.
3281 (location.hh): Use consistent variable names when defining the
3282 operator<<.
3283 Use "last" so that we subtract from Positions, not from unsigned.
3284
3285 2003-02-20 Akim Demaille <akim@epita.fr>
3286
3287 * data/lalr1.cc (position.hh): New subfile, including the extended
3288 and Doxygen'ed documentation of class Position.
3289 (location.hh): Use it.
3290 Document a` la Doxygen.
3291 With the help of Benoit Perrot.
3292
3293 2003-02-20 Akim Demaille <akim@epita.fr>
3294
3295 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
3296 AT_YACC_IF.
3297 Redefine AT_YYERROR_SEES_LOC_IF using it.
3298 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
3299 not defined.
3300 Don't use the location in yy::Parser::error_ and
3301 yy::Parser::print_ when not %locations.
3302 Activate more lalr1.cc tests.
3303
3304 2003-02-19 Akim Demaille <akim@epita.fr>
3305
3306 * data/lalr1.cc: When displaying a line number, be sure to make it
3307 an int.
3308
3309 2003-02-19 Akim Demaille <akim@epita.fr>
3310
3311 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
3312 Remove, useless.
3313 (YYABORT, YYACCEPT, YYERROR): New.
3314 * tests/calc.at: Renable the lalr1.cc test.
3315
3316 2003-02-19 Akim Demaille <akim@epita.fr>
3317
3318 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
3319 error recovery, mixing with/without pops and discarding of the
3320 lookahead.
3321 Exercise YYERROR.
3322 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
3323
3324 2003-02-17 Paul Eggert <eggert@twinsun.com>
3325
3326 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
3327 * tests/testsuite.at (AT_COMPILE): Use them.
3328 This fixes the testsuite problem reported by Robert Lentz in
3329 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
3330
3331 2003-02-12 Paul Eggert <eggert@twinsun.com>
3332
3333 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
3334 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
3335 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
3336 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
3337 Check for malloc failure, for consistency with yacc.c.
3338 (yytname_size): Remove, for consistency with yacc.c.
3339
3340 The bug still remains in data/lalr1.cc, as I didn't have time
3341 to fix it there.
3342
3343 2003-02-06 Akim Demaille <akim@epita.fr>
3344
3345 * configure.ac (GXX): Rename as...
3346 (CXX): this, to keep the original Autoconf semantics.
3347 Require 2.57.
3348 * data/lalr1.cc: Fix b4_copyright invocations.
3349 If YYDEBUG is not defined, don't depend upon name_ being defined.
3350 (location.hh): Include string and iostream.
3351 (Position::filename): New member.
3352 (Position::Position ()): New.
3353 (operator<< (Position)): New.
3354 (operator- (Position, int)): New.
3355 (Location::first, Location::last): Rename as...
3356 (Location::begin, Location::end): these, to mock the conventional
3357 iterator names.
3358 (operator<< (Location)): New.
3359 * tests/atlocal.in (CXX): New.
3360 * tests/testsuite.at (AT_COMPILE_CXX): New.
3361 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
3362 locations in a more synthetic way.
3363 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
3364 lalr1.cc is used.
3365 Adjust the C locations to match those from Emacs: first column is
3366 column 0.
3367 Change all the expected results.
3368 Conform to the GCS: simplify the locations when applicable.
3369 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
3370 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
3371 these CPP macros with the m4 macros new defined by...
3372 (AT_CHECK_PUSHDEFS): this, i.e.:
3373 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
3374 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
3375 New macros.
3376 (AT_CHECK_POPDEFS): Undefine them.
3377 (AT_CHECK_CALC_LALR1_CC): New.
3378 Use it for the first lalr1.cc test.
3379
3380 2003-02-04 Akim Demaille <akim@epita.fr>
3381
3382 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
3383 Location as is defined.
3384
3385 2003-02-04 Akim Demaille <akim@epita.fr>
3386
3387 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
3388 name_ being defined.
3389
3390 2003-02-03 Paul Eggert <eggert@twinsun.com>
3391
3392 * src/gram.h (start_symbol): Remove unused decl.
3393
3394 Use more-consistent naming conventions for local vars.
3395
3396 * src/derives.c (derives_compute): Change type of local var from
3397 int to rule_number.
3398 * src/gram.c (grammar_rules_partial_print): Likewise.
3399 * src/print.c (print_core): Likewise.
3400 * src/reduce.c (reduce_grammar_tables): Likewise.
3401
3402 * src/gram.c (grammar_dump): Change name of item_number *
3403 local var from r to rp.
3404 * src/nullable.c (nullable_compute): Likewise.
3405
3406 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
3407
3408 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
3409 for symbol or symbol_number var.
3410 * src/reader.c (grammar_start_symbol_set): Likewise.
3411 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
3412 Likewise.
3413 * src/state.c (transitions_to): Likewise.
3414 * src/state.h: Likewise.
3415 * src/tables.c (symbol_number_to_vector_number): Likewise.
3416
3417 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
3418 char * var.
3419
3420 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
3421 var.
3422
3423 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
3424 var.
3425
3426 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
3427 Use str, not s, for char * var. Use ch, not c, for character var.
3428 Use size for size var.
3429
3430 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
3431 char * var.
3432 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
3433 uniqstr var.
3434 * src/uniqstr.h: Likewise.
3435
3436 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
3437 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
3438 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
3439 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
3440 param to have same name as that of enum, so that we don't use
3441 "s" to stand for a non-state.
3442
3443 2003-02-02 Akim Demaille <akim@epita.fr>
3444
3445 * src/scan-skel.l: Scan more than one inert character per yylex
3446 invocation.
3447
3448 2003-02-01 Paul Eggert <eggert@twinsun.com>
3449
3450 Version 1.875a.
3451
3452 * po/LINGUAS: Add ms.
3453
3454 2003-01-30 Akim Demaille <akim@epita.fr>
3455
3456 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
3457
3458 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3459
3460 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
3461 of $1.
3462
3463 Changes in response to error report by S. Eken: GLR mode does not
3464 handle negative $ indices or $ indices in embedded rules correctly.
3465 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
3466
3467 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
3468 (b4_rhs_location): Ditto.
3469 (yyfill): New function to copy from stack tree into array
3470 incrementally.
3471 (yyuserAction): Modify to allow incremental move of semantic values
3472 to rhs array when in GLR mode.
3473 Define YYFILL to use in user-defined actions to fill semantic array
3474 as needed.
3475 Remove dummy use of yystack, as there is now a guaranteed use.
3476 (yydoAction): Modify to allow incremental move of semantic values
3477 to rhs array when in GLR mode.
3478 (yyresolveAction): Ditto.
3479 (yyglrShiftDefer): Update comment.
3480 (yyresolveStates): Use X == NULL for pointers, not !X.
3481 (yyglrReduce): Ditto.
3482 (yydoAction): Ditto
3483
3484 * tests/glr-regr1.at: Rename to ...
3485 * tests/glr-regression.at: Add new regression test for the problems
3486 described above (adapted from S. Eken).
3487 Update copyright notice.
3488 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
3489 * tests/Makefile.am: Ditto.
3490
3491 2003-01-28 Paul Eggert <eggert@twinsun.com>
3492
3493 * data/lalr1.cc: Do not use @output_header_name@ unless
3494 b4_defines_flag is set. This fixes two bugs reported by
3495 Tim Van Holder in
3496 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
3497 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
3498
3499 2003-01-21 Paul Eggert <eggert@twinsun.com>
3500
3501 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
3502 we don't need to worry about yyerrlab1 being reported as an
3503 "unused label" by non-GCC C compilers. The downside is that if
3504 locations are used then a couple of statements are duplicated each
3505 time YYERROR is invoked, but the upside is that the warnings
3506 should vanish.
3507 (yyerrlab1): Move code to YERROR.
3508 (yyerrlab2): Remove. Change uses back to yyerrlab1.
3509 This reverts some of the 2002-12-27 change.
3510
3511 2003-01-17 Paul Eggert <eggert@twinsun.com>
3512
3513 * src/output.c (symbol_printers_output): Fix typo that led
3514 to core dump. Problem reported by Antonio Rus in
3515 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
3516
3517 2003-01-13 Akim Demaille <akim@epita.fr>,
3518 Quoc Peyrot <chojin@lrde.epita.fr>,
3519 Robert Anisko <anisko_r@lrde.epita.fr>
3520
3521 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
3522 when the stacks contain one element, as the loop would otherwise
3523 free the last state, and then use the top state (the one we just
3524 popped). This means that the initial elements will not be freed
3525 explicitly, as is the case in yacc.c; it is not a problem, as
3526 these elements have fake values.
3527
3528 2003-01-11 Paul Eggert <eggert@twinsun.com>
3529
3530 * NEWS: %expect-violations are now just warnings, reverting
3531 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
3532 bootstrapping problem reported by Matthias Klose; see
3533 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
3534 * src/conflicts.c (conflicts_print): Likewise.
3535 * tests/conflicts.at (%expect not enough, %expect too much,
3536 %expect with reduce conflicts): Likewise.
3537 * doc/bison.texinfo (Expect Decl): Document this. Also mention
3538 that the warning is enabled if the number of conflicts changes
3539 (not necessarily increases).
3540
3541 * src/getargs.c (version): Update copyright year.
3542
3543 2003-01-09 Akim Demaille <akim@epita.fr>
3544
3545 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
3546
3547 2003-01-08 Paul Eggert <eggert@twinsun.com>
3548
3549 * Makefile.maint (WGETFLAGS):
3550 New macro, containing "-C off" to disable proxy caches.
3551 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
3552 (rel-check): Use $(WGET) instead of wget.
3553
3554 2003-01-06 Paul Eggert <eggert@twinsun.com>
3555
3556 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
3557 the GLR paper of Scott, Johnstone and Hussain.
3558
3559 2003-01-04 Paul Eggert <eggert@twinsun.com>
3560
3561 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
3562 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
3563 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
3564 (EXTRA_LIBRARIES): New var, for liby.a.
3565 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
3566 (EXTRA_SCRIPTS): New var, for yacc.
3567
3568 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
3569 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
3570 Problem reported by Nelson H. F. Beebe.
3571
3572 2003-01-03 Paul Eggert <eggert@twinsun.com>
3573
3574 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
3575 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
3576 when compiling Bison 1.875's `bitset bset = obstack_alloc
3577 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
3578
3579 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
3580 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
3581 grow to a huge size with typical invocation.
3582
3583 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
3584 Use the pattern recommended by Autoconf 2.57, except also protect
3585 against double-definition.
3586 * src/system.h: Likewise.
3587 Portability issues reported by Nelson H. F. Beebe.
3588
3589 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
3590 All uses changed. Provide a definition in both C and C++.
3591 (yytrue, yyfalse): Define even if defined (__cplusplus).
3592
3593 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
3594 Reported by Nelson H. F. Beebe.
3595
3596 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
3597
3598 2003-01-02 Paul Eggert <eggert@twinsun.com>
3599
3600 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
3601 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
3602 Bug reported by Nelson H. F. Beebe.
3603
3604 2003-01-01 Paul Eggert <eggert@twinsun.com>
3605
3606 * Version 1.875.
3607
3608 2002-12-30 Paul Eggert <eggert@twinsun.com>
3609
3610 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
3611 Moved here from...
3612 (<INITIAL>","): Here. This causes stray "," to be treated
3613 more uniformly.
3614
3615 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
3616 last brace in braced code when not in Yacc mode, for compatibility
3617 with Bison 1.35. This resurrects the 2001-12-15 patch to
3618 src/reader.c.
3619
3620 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
3621 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
3622
3623 2002-12-28 Paul Eggert <eggert@twinsun.com>
3624
3625 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
3626 that of SYM's type. This fixes Debian bug 168069, reported by
3627 Thomas Olsson.
3628
3629 2002-12-28 Paul Eggert <eggert@twinsun.com>
3630
3631 Version 1.75f.
3632
3633 Switch back to the Yacc style of conflict reports, undoing some
3634 of the 2002-07-30 change.
3635 * doc/bison.texinfo (Understanding): Use Yacc style for
3636 conflict reports. Also, use new way of locating rules.
3637 * src/conflicts.c (conflict_report):
3638 Renamed from conflict_report_yacc, removing the old
3639 'conflict_report'. Translate the entire conflict report at once,
3640 so that we don't assume that "," has the same interpretation in
3641 all languages.
3642 (conflicts_output): Use Yacc-style conflict report for each state,
3643 instead of our more-complicated style.
3644 (conflicts_print): Use Yacc-style conflict report, except print
3645 the input file name when not emulating Yacc.
3646 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
3647 Conflicted Reduction, %expect not enough, %expect too much,
3648 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
3649 * tests/existing.at (GNU Cim Grammar): Likewise.
3650 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
3651
3652 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
3653 fatal): Don't invoke fflush; it's not needed and it might even be
3654 harmful for stdout, as stdout might not be open.
3655 * src/reduce.c (reduce_print): Likewise.
3656
3657 2002-12-27 Paul Eggert <eggert@twinsun.com>
3658
3659 Fix a bug where error locations were not being recorded correctly.
3660 This problem was originally reported by Paul Hilfinger in
3661 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
3662
3663 * data/yacc.c (yyparse): New local var yylerrsp, to record the
3664 top of the location stack's error locations.
3665 (yyerrlab): Set it. When discarding a token, push its location
3666 onto yylerrsp so that we don't lose track of the error's end.
3667 (yyerrlab1): Now is only the target of YYERROR, so that we can
3668 properly record the location of the action that failed. For GCC
3669 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
3670 GCC warning about yyerrlab1 being unused if YYERROR is unused.
3671 (yyerrlab2): New label, which yyerrlab now falls through to.
3672 Compute the error's location by applying YYLLOC_DEFAULT to
3673 the locations of all the symbols that went into the error.
3674 * doc/bison.texinfo (Location Default Action): Mention that
3675 YYLLOC_DEFAULT is also invoked for syntax errors.
3676 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3677 Error locations include the locations of all the tokens that were
3678 discarded, not just the last token.
3679
3680 2002-12-26 Paul Eggert <eggert@twinsun.com>
3681
3682 * src/files.c: Include quote.h.
3683 (compute_output_file_names): Warn if we detect conflicting
3684 outputs to the same file. This should catch the misunderstanding
3685 exemplified by Debian Bug 165349, reported by Bruce Stephens..
3686
3687 * src/conflicts.c (conflicts_print): If the user specifies
3688 "%expect N", report an error if there are any reduce/reduce
3689 conflicts. This is what the manual says should happen.
3690 This fixes Debian bug 130890, reported by Anthony DeRobertis.
3691 * tests/conflicts.at (%expect with reduce conflicts): New test.
3692
3693 Don't use m4_include on relative file names, as it doesn't work as
3694 desired if there happens to be a file with that name under ".".
3695
3696 * m4sugar/version.m4: Remove; it was included but it wasn't used.
3697 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
3698 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
3699 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
3700 * src/output.c (output_skeleton): Use full path names when
3701 specifying a file to include; don't rely on include path, as
3702 it's unreliable when the working file contains a file with
3703 that name.
3704
3705 2002-12-25 Paul Eggert <eggert@twinsun.com>
3706
3707 Remove obsolete references to bison.simple and bison.hairy.
3708 Problem mentioned by Aubin Mahe in
3709 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
3710 * data/glr.c: Comment fix.
3711 * doc/bison.1: Remove references. Also, mention "yacc".
3712
3713 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
3714 with -g option.
3715
3716 * src/parse-gram.y (declaration): Use enum "report_states" rather
3717 than its numeric value 1.
3718
3719 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
3720 opening a new one. This fixes Debian bug 165349, reported by
3721 Bruce Stephens.
3722
3723 2002-12-24 Paul Eggert <eggert@twinsun.com>
3724
3725 Version 1.75e.
3726
3727 * Makefile.maint (cvs-update): Don't assume that the shell
3728 supports $(...), as Solaris sh doesn't.
3729
3730 * src/parse-gram.y (lloc_default): Remove test for empty
3731 nonterminals at the end, since it didn't change the result.
3732
3733 2002-12-24 Paul Eggert <eggert@twinsun.com>
3734
3735 If the user does not define YYSTYPE as a macro, Bison now declares it
3736 using typedef instead of defining it as a macro. POSIX requires this.
3737 For consistency, YYLTYPE is also declared instead of defined.
3738
3739 %union directives can now have a tag before the `{', e.g., the
3740 directive `%union foo {...}' now generates the C code
3741 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
3742 The default union tag is `YYSTYPE', for compatibility with Solaris 9
3743 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
3744 instead of `yyltype'.
3745
3746 `yystype' and `yyltype' are now obsolescent macros instead of being
3747 typedefs or tags; they are no longer documented and will be
3748 withdrawn in a future release.
3749
3750 * data/glr.c (b4_location_type): Remove.
3751 (YYSTYPE): Renamed from yystype.
3752 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
3753 (struct YYLTYPE): Renamed from struct yyltype.
3754 (YYLTYPE): Renamed from yyltype.
3755 (yyltype, yystype): New (and obsolescent) macros,
3756 for backward compatibility.
3757 * data/yacc.c: Likewise.
3758
3759 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
3760 does not specify a union tag. This is for compatibility with
3761 Solaris 9 yacc.
3762
3763 * src/parse-gram.y (add_param): 2nd arg is now char * not char
3764 const *, since it is now modified by stripping surrounding { }.
3765 (current_braced_code): Remove.
3766 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
3767 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
3768 trailing " {...}". Now of type <chars>.
3769 (grammar_declaration): Adjust to bundled tokens.
3770 (code_content): Remove; stripping is now done by add_param.
3771 (print_token_value): Print contents of bundled tokens.
3772 (token_name): New function.
3773
3774 * src/reader.h (braced_code, current_braced_code): Remove.
3775 (token_name): New decl.
3776
3777 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
3778 token_type, not braced_code code_kind. All uses changed.
3779 (SC_PRE_CODE): New state, for scanning after a keyword that
3780 has (or usually has) an immediately-following braced code.
3781 (token_type): New local var, to keep track of which token type
3782 to return when scanning braced code.
3783 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
3784 <INITIAL>"%parse-param", <INITIAL>"%printer",
3785 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
3786 instead of returning a token type immediately.
3787 (<INITIAL>"{"): Set token type.
3788 (<SC_BRACED_CODE>"}"): Use it.
3789 (handle_action_dollar, handle_action_at): Now returns bool
3790 indicating success. Fail if ! current_rule; this prevents a core dump.
3791 (handle_symbol_code_dollar, handle_symbol_code_at):
3792 Remove; merge body into caller.
3793 (handle_dollar, handle_at): Complain in invalid contexts.
3794
3795 * NEWS, doc/bison.texinfo: Document the above.
3796 * NEWS: Fix years and program names in copyright notice.
3797
3798 2002-12-17 Paul Eggert <eggert@twinsun.com>
3799
3800 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
3801 Reporting, Table of Symbols): Omit mentions of %lex-param and
3802 %parse-param from the documentation for now.
3803
3804 2002-12-15 Paul Eggert <eggert@twinsun.com>
3805
3806 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
3807 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
3808 lookahead symbol, and which sets yychar in parser actions) and it
3809 disagreed with the Bison documentation. Bug
3810 reported by Andrew Walrond.
3811
3812 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
3813 as the caller now does that.
3814 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
3815 (YYEMPTY): Parenthesize right hand side, since others use it.
3816 (yyparse): Don't assume that our generated code is the only code
3817 that sets yychar.
3818
3819 2002-12-13 Paul Eggert <eggert@twinsun.com>
3820
3821 Version 1.75d.
3822
3823 POSIX requires a "yacc" command.
3824 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
3825 (MOSTLYCLEANFILES): Add yacc.
3826 (yacc): New rule.
3827 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
3828 as an alias for bison y.
3829
3830 * po/LINGUAS: Add da.
3831
3832 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
3833 problem with latest <getopt.h>.
3834 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
3835
3836 * doc/fdl.texi: Upgrade to 1.2.
3837 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
3838 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
3839 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
3840 gnulib.
3841 * config/install-sh: Sync with autotools.
3842
3843 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
3844 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
3845 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
3846 locations are requested.
3847 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
3848 locations are requested.
3849
3850 2002-12-12 Paul Eggert <eggert@twinsun.com>
3851
3852 Remove unportable casts and storage allocation tricks.
3853 While we're at it, remove almost all casts, since they
3854 usually aren't needed and are a sign of trouble.
3855
3856 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
3857
3858 * src/derives.c (derives_compute): Do not subtract NTOKENS from
3859 the pointer DSET returned by malloc; this isn't portable.
3860 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
3861 Similarly for DERIVES.
3862 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
3863 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
3864 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
3865
3866 * src/derives.c (derives_compute): Do not bother invoking
3867 int_of_rule_number, since rule numbers are integers.
3868
3869 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
3870 rather than XMALLOC (char, N).
3871
3872 * src/files.c (filename_split): Rewrite to avoid cast.
3873
3874 * src/gram.h (symbol_number_as_item_number,
3875 item_number_as_symbol_number, rule_number_as_item_number,
3876 item_number_as_rule_number):
3877 Now inline functions rather than macros, to avoid casts.
3878 * src/state.h (state_number_as_int): Likewise.
3879 * src/tables.c (state_number_to_vector_number,
3880 symbol_number_to_vector_number): Likewise.
3881
3882 * src/gram.h (int_of_rule_number): Remove; no longer used.
3883
3884 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
3885 since the resulting storage is always stored into.
3886
3887 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
3888 where it's needed.
3889
3890 * src/muscle_tab.c (muscle_m4_output):
3891 Now inline. Return bool, not int.
3892 * src/state.c (state_compare): Likewise.
3893 * src/symtab.c (symbol_check_defined,
3894 symbol_check_alias_consistency, symbol_pack, symbol_translation,
3895 hash_compare_symbol, hash_symbol):
3896 Likewise.
3897 * src/uniqstr.c (uniqstr_print): Likewise.
3898 * src/muscle_tab.c (muscle_m4_output_processor):
3899 New function, to avoid casts.
3900 * src/state.c (state_comparator, stage_hasher): Likewise.
3901 * src/symtab.c (symbol_check_defined_processor,
3902 symbol_check_alias_consistency_processor, symbol_pack_processor,
3903 symbol_translation_processor, hash_symbol_comparator,
3904 hash_symbol_hasher): Likewise.
3905 * src/uniqstr.c (uniqstr_print_processor): Likewise.
3906 * src/muscle_tab.c (muscles_m4_output):
3907 Use new functions instead of casting old functions unportably.
3908 * src/state.c (state_hash_new): Likewise.
3909 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
3910 symbols_token_translations_init):
3911 Likewise.
3912 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
3913
3914 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
3915 var instead of casting to long, to avoid casts.
3916 (prepare_states): Use MALLOC rather than alloca, so that we don't
3917 have to worry about alloca.
3918 * src/state.c (state_hash_lookup): Likewise.
3919
3920 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
3921 local var instead of casting to unsigned char, to avoid casts.
3922
3923 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
3924 STATE_ALLOC): Remove.
3925 (transitions_new, errs_new, reductions_new, state_new): Use malloc
3926 rather than calloc, and use offsetof to avoid allocating slightly
3927 too much storage.
3928 (state_new): Initialize all members.
3929
3930 * src/state.c (state_hash): Use unsigned accumulator, not signed.
3931
3932 * src/symtab.c (symbol_free): Remove; unused.
3933 (symbol_get): Remove cast in lhs of assignment.
3934 (symbols_do): Now static. Accept generic arguments, not
3935 hashing-related ones.
3936
3937 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
3938 (symbol_processor): Remove.
3939 (symbols_do): Remove decl; now static.
3940
3941 * src/system.h (alloca): Remove; decl no longer needed.
3942 (<stddef.h>): Include, for offsetof.
3943 (<inttypes.>, <stdint.h>): Include if available.
3944 (uintptr_t): New type, if system lacks it.
3945 (CALLOC, MALLOC, REALLOC): New macros.
3946 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
3947 new macros.
3948
3949 * src/tables.c (table_size): Now int, to pacify GCC.
3950 (table_grow, table_ninf_remap): Use signed table size.
3951 (save_row): Don't bother initializing locals when not needed.
3952 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
3953 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
3954
3955 * src/vcg.h: Correct misspellings.
3956
3957 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
3958
3959
3960 * src/getargs.c (getargs): Don't assume EOF == -1.
3961
3962 2002-12-09 Paul Eggert <eggert@twinsun.com>
3963
3964 Change identifier spellings to avoid collisions with names
3965 that are reserved by POSIX.
3966
3967 Don't use names ending in _t, since POSIX reserves them.
3968 For consistency, remove _e and _s endings -- they're weren't
3969 needed to remove ambiguity. All uses changed.
3970 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
3971 turn was just renamed from struniq_t.
3972 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
3973 which in turn was just renamed from struniq_processor_t.
3974 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
3975 in turn was renamed from hash_compare_struniq_t.
3976 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
3977 (state_list): Renamed from state_list_t.
3978 * src/assoc.h (assoc): Renamed from assoc_t.
3979 * src/conflicts.c (enum conflict_resolution): Renamed from
3980 enum conflict_resolution_e.
3981 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
3982 (rule_list): Renamed from rule_list_t.
3983 * src/getargs.h (enum trace): Renamed from enum trace_e.
3984 (enum report): Renamed from enum report_e.
3985 * src/gram.h (item_number): Renamed from item_number_t.
3986 (rule_number): Renamed from rule_number_t.
3987 (struct rule_s): Remove the "rule_s" part; not used.
3988 (rule): Renamed from rule_t.
3989 (rule_filter): Renamed from rule_filter_t.
3990 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
3991 (goto_list): Renamed from goto_list_t.
3992 * src/lalr.h (goto_number): Renamed from goto_number_t.
3993 * src/location.h (location): Renamed from location_t.
3994 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
3995 and moved here from:
3996 * src/muscle_tab.h (muscle_entry_t): here.
3997 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
3998 (rule_list): Renamed from rule_list_t.
3999 * src/print_graph.c (static_graph): Renamed from graph.
4000 * src/reader.h (braced_code): Renamed from braced_code_t.
4001 Remove brace_code_e tag.
4002 * src/relation.h (relation_node): Renamed from relation_node_t.
4003 (relation_nodes): Renamed from relation_nodes_t.
4004 (relation): Renamed from relation_t.
4005 * src/state.h (state_number): Renamed from state_number_t.
4006 (struct state): Renamed from struct state_s.
4007 (state): Renamed from state_t.
4008 (transitions): Renamed from transitions_t. Unused (and
4009 misspelled) transtion_s tag removed.
4010 (errs): Renamed from errs_t. Unused errs_s tag removed.
4011 (reductions): Renamed from reductions_t. Unused tag
4012 reductions_s removed.
4013 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
4014 (struct symbol_list): Renamed from struct symbol_list_s.
4015 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
4016 (struct symbol): Renamed from struct symbol_s.
4017 (symbol): Renamed from symbol_t.
4018 * src/tables.c (vector_number): Renamed from vector_number_t.
4019 (action_number): Renamed from action_t.
4020 * src/tables.h (base_number): Renamed from base_t.
4021 * src/vcg.h (enum color): Renamed from enum color_e.
4022 (enum textmode): Renamed from enum textmode_e.
4023 (enum shape): Renamed from enum shape_e.
4024 (struct colorentry): Renamed from struct colorentry_s.
4025 (struct classname): Renamed from struct classname_s.
4026 (struct infoname): Renamed from struct infoname_s.
4027 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
4028 (enum decision): Renamed from enum decision_e.
4029 (enum orientation): Renamed from enum orientation_e.
4030 (enum alignment): Renamed from enum alignment_e.
4031 (enum arrow_mode): Renamed from enum arrow_mode_e.
4032 (enum crossing_type): Renamed from enum crossing_type_e.
4033 (enum view): Renamed from enum view_e.
4034 (struct node): Renamed from struct node_s.
4035 (node): Renamed from node_t.
4036 (enum linestyle): Renamed from enum linestyle_e.
4037 (enum arrowstyle): Renamed from enum arrowstyle_e.
4038 (struct edge): Renamed from struct edge.
4039 (edge): Renamed from edge_t.
4040 (struct graph): Renamed from struct graph_s.
4041 (graph): Renamed from graph_t.
4042 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
4043 Rename value_t -> value.
4044 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
4045 value_t_as_yystype -> value_as_yystype.
4046
4047 Don't include <errno.h> in the mainstream code, since it
4048 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
4049 * lib/get-errno.c, lib/get-errno.h: New files.
4050 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
4051 get-errno.c.
4052 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
4053 * src/output.c (output_skeleton): Likewise.
4054 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
4055 instead of errno.
4056 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
4057 Likewise.
4058 (handle_action_dollar, handle_action_at): Likewise.
4059 * src/system.h: Do not include <errno.h>.
4060 (TAB_EXT): Renamed from EXT_TAB.
4061 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
4062
4063 Avoid str[a-z]*, since <string.h> reserves that name space.
4064 Change all instances of "struniq" in names to "uniqstr", and
4065 likewise for "STRUNIQ" and "UNIQSTR".
4066 * src/uniqstr.c: Renamed from src/struniq.c.
4067 * src/uniqstr.h: Renamed from src/struniq.h.
4068 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
4069 * src/files.c (strsuffix): Remove; unused.
4070 (concat2): Renamed from stringappend. Now static.
4071 * src/files.h (strsuffix, stringappend): Remove; unused.
4072 * src/parse-gram.y (<chars>): Renamed from <string>.
4073 (<uniqstr>): Renamed from <struniq>.
4074 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
4075 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
4076 (struct graph_s.expand): Renamed from struct graph_s.stretch.
4077 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
4078 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
4079 (N_EXPAND): Renamed from N_STRETCH.
4080
4081 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
4082 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
4083 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
4084 Remove; unused.
4085 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
4086 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
4087 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
4088 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
4089 (BASE_MAXIMUM): Renamed from BASE_MAX.
4090 (BASE_MINIMUM): Renamed from BASE_MIN.
4091 (ACTION_MAX): Remove; unused.
4092 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
4093 Unnecessary casts removed from above defines.
4094
4095
4096 Fix misspelling in names.
4097 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
4098 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
4099 G_NODE_ALIGNEMENT.
4100
4101
4102 * lib/timevar.c (timevar_report): Renamed from time_report,
4103 for consistency with other names.
4104 * lib/timevar.h (timevar_report): New decl.
4105 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
4106
4107
4108 Sort include-file uses.
4109
4110 Reorder all include files under src to be in the order "system.h".
4111 then the ../lib include files in angle brackets (alphabetized),
4112 then the . include files in double-quotes (alphabetized). Fix
4113 dependency breakages encountered in this process, as follows:
4114 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
4115 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
4116 * src/state.h: Include "symtab.h".
4117
4118 2002-12-08 Paul Eggert <eggert@twinsun.com>
4119
4120 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
4121 since this causes problems when __file__ contains character
4122 sequences like "@" that are treated specially by src/scan-skel.l.
4123 Instead, just use the file's basename. This fixes the bug
4124 reported by Martin Mokrejs in
4125 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
4126
4127 2002-12-06 Paul Eggert <eggert@twinsun.com>
4128
4129 Add support for rules that do not have trailing semicolons, as
4130 POSIX requires. Improve the quality of locations in Bison
4131 diagnostics.
4132
4133 * src/location.c: Include <quotearg.h>.
4134 (empty_location): Now const.
4135 (location_print): New function. Follow the recommendation of the
4136 GNU Coding Standards for locations that span file boundaries.
4137 * src/location.h: Do not include <quotearg.h>; no longer needed.
4138 (boundary): New type.
4139 (location_t): Use it. This allows locations to span file boundaries.
4140 All member uses changed: file -> start.file or end.file (as needed),
4141 first_line -> start.line, first_column -> start.column,
4142 last_line -> end.line, last_column -> end.column.
4143 (equal_boundaries): New function.
4144 (LOCATION_RESET, LOCATION_STEP): Remove.
4145 (LOCATION_PRINT): Remove. All callers changed to use location_print.
4146 (empty_location): Now const.
4147 (location_print): New decl.
4148 * src/parse-gram.y (lloc_default): New function, which handles
4149 empty locations more accurately.
4150 (YYLLOC_DEFAULT): Use it.
4151 (%token COLON): Remove.
4152 (%token ID_COLON): New token.
4153 (rules): Use it.
4154 (declarations, rules): Remove trailing semicolon.
4155 (declaration, rules_or_grammar_declaration):
4156 Allow empty (";") declaration.
4157 (symbol_def): Remove empty actions; no longer needed.
4158 (rules_or_grammar_declaration): Remove trailing semicolon.
4159 (semi_colon.opt): Remove.
4160 * src/reader.h: Include location.h.
4161 (scanner_cursor): New decl.
4162 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
4163 rolling our own.
4164 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
4165 of *loc.
4166 (STEP): Remove. No longer needed, now that adjust_location does
4167 the work. All uses removed.
4168 (scanner_cursor): New var.
4169 (adjust_location): Renamed from extend_location. It now sets
4170 *loc and adjusts the scanner cursor. All uses changed.
4171 Don't bother testing for CR.
4172 (handle_syncline): Remove location arg; now updates scanner cursor.
4173 All callers changed.
4174 (unexpected_end_of_file): Now accepts start boundary of token or
4175 comment, not location. All callers changed. Update scanner cursor,
4176 not the location.
4177 (SC_AFTER_IDENTIFIER): New state.
4178 (context_state): Renamed from c_context. All uses changed.
4179 (id_loc, code_start, token_start): New local vars.
4180 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
4181 processing of Yacc white space and equivalents here.
4182 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
4183 instead of returning ID immediately, since we need to search for
4184 a subsequent colon.
4185 (<INITIAL>"'", "\""): Save token_start.
4186 (<INITIAL>"%{", "{", "%%"): Save code_start.
4187 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
4188 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
4189 BEGIN context_state at end, not INITIAL.
4190 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
4191 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
4192 Return correct token start.
4193 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
4194 the start of a character, string or multiline comment is found.
4195 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
4196 Reduction): Adjust reported locations to match the more-precise
4197 results now expected.
4198 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
4199 * tests/reduce.at (Useless Rules, Reduced Automaton,
4200 Underivable Rules): Likewise.
4201 * tests/regression.at (Invalid inputs): No longer `expecting ";"
4202 or "|"' now that so many other tokens are allowed by the new grammar.
4203
4204 * src/complain.h (current_file): Remove duplicate decl;
4205 current_file is now owned by files.h.
4206 * src/complain.c, src/scan-gram.l: Include files.h.
4207
4208 2002-12-06 Paul Eggert <eggert@twinsun.com>
4209
4210 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
4211 promotes to int; it might be unsigned int.
4212 * data/yacc.c (yy_reduce_print): Likewise.
4213
4214 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
4215 be #defined in the prologue, not in the Bison declarations.
4216 This fixes Debian Bug 102878, reported by Shaul Karl.
4217
4218 2002-12-02 Paul Eggert <eggert@twinsun.com>
4219
4220 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
4221 * lib/strtoul.c: New file, from gnulib.
4222 This fixes a porting bug reported by Peter Klein in
4223 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
4224
4225 2002-11-30 Paul Eggert <eggert@twinsun.com>
4226
4227 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
4228 and put only a forward declaration in the prologue. This is for
4229 consistency with the other scanner helper functions.
4230
4231 Type clashes now generate warnings, not errors, since it
4232 appears that POSIX may allow some grammars with type clashes.
4233 * src/reader.c (grammar_current_rule_check): Warn about
4234 type clashes instead of complaining.
4235 * tests/input.at (Type Clashes): Expect warnings, not complaints.
4236
4237 Add Yacc library, since POSIX requires it.
4238 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
4239 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
4240 * lib/main.c, lib/yyerror.c: New files.
4241
4242 gram_error can be static; it need not be extern.
4243 * src/reader.h (gram_error): Remove decl.
4244 * src/parse-gram.y (gram_error): Now static. Add static decl.
4245 (print_token_value): Omit parameter names from forward decl,
4246 for consistency.
4247
4248 2002-11-29 Paul Eggert <eggert@twinsun.com>
4249
4250 * doc/bison.texinfo: Emphasize that yylex and yyerror must
4251 be declared before being used. E.g., one should typically
4252 declare them in the prologue. Use GNU coding style in examples.
4253 Put "const" consistently after the type it modifies. Mention
4254 that C99 supports "inline". Mention that yyerror traditionally
4255 returns "int".
4256
4257 %parse-param and %lex-param now take just one argument, the
4258 declaration; the argument name is deduced from the declaration.
4259
4260 * doc/bison.texinfo (Parser Function, Pure Calling, Error
4261 Reporting, Table of Symbols): Document this.
4262 * src/parse-gram.y (add_param): New function.
4263 (COMMA): Remove.
4264 (declaration): Implement new rule for %parse-param and %lex-param.
4265 * src/scan-gram.l: "," now elicits a warning, rather than being
4266 a token; this is more compatible with byacc.
4267 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
4268
4269 2002-11-27 Paul Eggert <eggert@twinsun.com>
4270
4271 Rename identifiers to avoid real and potential collisions.
4272
4273 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
4274 to avoid collision with lex macro described by Bruce Lilly in
4275 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
4276 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4277 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
4278 * src/parse-gram.y (print_token_value): Renamed from yyprint.
4279 All uses changed.
4280 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
4281 The name "yycontrol" violates the name space rules, and this stuff
4282 wasn't being used anyway.
4283 (input): Remove action; this stuff wasn't being used.
4284 (gram_error): Rename local variable yylloc -> loc.
4285 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
4286 (YY_DECL): Don't use "yy" at start of local variables.
4287 All uses changed, e.g., yylloc -> loc.
4288 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
4289 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
4290 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
4291 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
4292
4293 * src/parse-gram.y (gram_error): loc is now const *.
4294 * src/reader.h (gram_error): Likewise.
4295
4296 2002-11-24 Paul Eggert <eggert@twinsun.com>
4297
4298 Version 1.75c.
4299
4300 * tests/actions.at (Actions after errors): Use an output format
4301 more similar to that of the Printers and Destructors test.
4302 Test the position of the ';' token too.
4303 (Printers and Destructors): Likewise.
4304 (Printers and Destructors: %glr-parser): Remove for now, to avoid
4305 unnecessarily alarming people when the test fails.
4306
4307 * data/yacc.c (yyerrlab1): Move this label down, so that the
4308 parser does not discard the lookahead token if the user code
4309 invokes YYERROR. This change is required for POSIX conformance.
4310
4311 * lib/error.c: Sync with gnulib.
4312
4313 2002-11-22 Paul Eggert <eggert@twinsun.com>
4314
4315 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
4316 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
4317 * lib/xmalloc.c: Likewise.
4318
4319 2002-11-20 Paul Eggert <eggert@twinsun.com>
4320
4321 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
4322
4323 2002-11-20 Paul Eggert <eggert@twinsun.com>
4324
4325 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
4326 should use `if (! x) abort ();' rather than `assert (x);', and
4327 anyway it's one less thing to worry about configuring.
4328
4329 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
4330 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
4331 and replace all instances of assert with abort.
4332 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
4333 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
4334
4335 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
4336 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
4337 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
4338 hash_find_entry, hash_rehash, hash_insert): Likewise.
4339 * src/conflicts.c (resolve_sr_conflict): Likewise.
4340 * src/lalr.c (set_goto_map, map_goto): Likewise.
4341 * src/nullable.c (nullable_compute): Likewise.
4342 * src/output.c (prepare_rules, token_definitions_output): Likewise.
4343 * src/reader.c (packgram, reader): Likewise.
4344 * src/state.c (state_new, state_free, state_transitions_set,
4345 state_reduction_find): Likewise.
4346 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
4347 symbol_pack): Likewise.
4348 * src/tables.c (conflict_row, pack_vector): Likewise.
4349 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
4350 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
4351 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
4352 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
4353
4354 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
4355 (ARGMATCH_CONSTRAINT): New macro.
4356 (ARGMATCH_ASSERT): Use it.
4357
4358 * src/system.h (verify): New macro.
4359 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
4360 rather than assert.
4361 * src/tables.c (tables_generate): Likewise.
4362
4363 * src/struniq.c (struniq_assert): Now returns void, and aborts
4364 if the assertion is false.
4365 (struniq_assert_p): Remove.
4366 * src/struniq.h: Likewise.
4367
4368 2002-11-18 Paul Eggert <eggert@twinsun.com>
4369
4370 * data/glr.c (yygetLRActions): Replace `yyindex' with
4371 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
4372 This fixes the regression with Sun ONE Studio 7 cc that I reported in
4373 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
4374
4375 2002-11-18 Akim Demaille <akim@epita.fr>
4376
4377 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
4378 space.
4379 From Tim Van Holder.
4380
4381 2002-11-17 Paul Eggert <eggert@twinsun.com>
4382
4383 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
4384 to "SyntaxError" for consistency with my 2002-11-15 change.
4385
4386 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
4387 not define to {}, since this breaks the common use of `YYDPRINTF
4388 ((...));' if a single statement is desired (e.g. before `else').
4389 Work around GCC warnings by surrounding corresponding calls with
4390 {} if needed.
4391 (yyhasResolvedValue): Remove unused function.
4392 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
4393 loop body.
4394 (yyreportSyntaxError): Renamed from yyreportParseError.
4395 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
4396 All uses changed.
4397 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
4398 extern when possible. Remove unused initializations.
4399
4400 2002-11-16 Akim Demaille <akim@epita.fr>
4401
4402 Augment the similarity between GLR and LALR traces.
4403
4404 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
4405 (YY_REDUCE_PRINT): New.
4406 (yyparse): Use them.
4407 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
4408 YYDPRINT here.
4409 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
4410 state reached after the reduction/recovery, since...
4411 (yyparse, yyprocessOneStack): Report the state we are entering in.
4412
4413 2002-11-16 Akim Demaille <akim@epita.fr>
4414
4415 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
4416 Add support for --trace=skeleton.
4417 * src/scan-skel.l: %option debug.
4418 Scan strings of non-@ or \n instead of character by character.
4419 (scan_skel): Handle trace_skeleton.
4420 (QPUTS): New.
4421 (@output_parser_name@, @output_header_name@): ``Restore'' their
4422 support (used to be M4 macros).
4423 * data/yacc.c: Quote larger chunks, a la glr.c.
4424 * data/lalr1.cc: Likewise.
4425 The header guards are no longer available, so use some other
4426 string than `YYLSP_NEEDED'.
4427
4428 2002-11-16 Akim Demaille <akim@epita.fr>
4429
4430 Make the ``Printers and Destructors'' test more verbose, taking
4431 `yacc.c''s behavior as (possibly wrong) reference.
4432
4433 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
4434 instead of fprint on stdout.
4435 Set and report the last_line of the symbols.
4436 Consistently display values and locations.
4437
4438 2002-11-16 Paul Eggert <eggert@twinsun.com>
4439
4440 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
4441
4442 2002-11-15 Paul Eggert <eggert@twinsun.com>
4443
4444 * tests/actions.at (Actions after errors): New test case.
4445
4446 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
4447 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
4448 tests/action.at, tests/calc.at, tests/conflicts.at,
4449 tests/cxx-type.at, tests/regression.at:
4450 "parse error" -> "syntax error" for POSIX compatibility.
4451 "parsing stack overflow..." -> "parser stack overflow" so
4452 that code matches Bison documentation.
4453
4454 2002-11-15 Akim Demaille <akim@epita.fr>
4455
4456 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
4457 take two BRACED_CODE, not two string_content.
4458 Free the scanner's obstack when we are done.
4459 (code_content): New.
4460 * tests/calc.at: Adjust.
4461 * doc/bison.texinfo: Adjust.
4462 Also, make sure to include the `,' for these declarations.
4463
4464 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
4465
4466 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
4467 definition; avoids potential autoreconf problems.
4468
4469 2002-11-15 Akim Demaille <akim@epita.fr>
4470
4471 Always check the value returned by yyparse.
4472
4473 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
4474 returned by yyparse.
4475 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
4476 Adjust calls.
4477 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
4478 returned by yyparse.
4479
4480 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4481
4482 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
4483 on input.at test.
4484
4485 2002-11-14 Paul Eggert <eggert@twinsun.com>
4486
4487 * src/output.c (output_skeleton): Call xfopen instead of
4488 duplicating xfopen's body.
4489
4490 Fix bugs reported by Nelson H. F. Beebe in
4491 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
4492
4493 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
4494 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
4495 Group compiler. Instead, use "$CC -E bar.c". Include the .h
4496 file twice in the grammar, as an extra check.
4497
4498 * tests/input.at (Torturing the Scanner): Surround the
4499 backslash-newline tests with "#if 0", to make it less likely that
4500 we'll run into compiler bugs. Bring back solitary \ inside
4501 comment, but add a closing comment to work around HP C bug. Don't
4502 test backslash-newline in C character constant.
4503
4504 2002-11-14 Akim Demaille <akim@epita.fr>
4505
4506 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
4507 status of the compiler.
4508 Calling `exit 1' is no longer needed.
4509 Reported by Nelson H. F. Beebe.
4510
4511 2002-11-14 Akim Demaille <akim@epita.fr>
4512
4513 * tests/atlocal.in (CPPFLAGS): We have config.h.
4514 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
4515 New.
4516 * tests/actions.at, tests/calc.at, tests/conflicts.at,
4517 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
4518 * tests/regression.at, tests/torture.at: Use them for all the
4519 grammars that are to be compiled.
4520 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
4521 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
4522 * doc/bison.texinfo (GLR Parsers): Document `inline'.
4523
4524 2002-11-14 Akim Demaille <akim@epita.fr>
4525
4526 * doc/bison.texinfo: Various formatting changes (alignments in
4527 samples, additional @group/@end group, GCS in samples.
4528 Use @deffn instead of simple @table to define the directives,
4529 macros, variables etc.
4530
4531 2002-11-13 Paul Eggert <eggert@twinsun.com>
4532
4533 Fix some bugs reported by Albert Chin-A-Young in
4534 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
4535
4536 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
4537 -o c"; the HP C compiler chatters during compilation.
4538 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
4539 * tests/headers.at (export YYLTYPE): Likewise.
4540
4541 * tests/input.at (Torturing the Scanner): Remove lines containing
4542 solitary backslashes, as they tickle a bug in the HP C compiler.
4543
4544 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
4545 comments, since they're not portable. Use GNU coding style.
4546
4547 2002-11-13 Akim Demaille <akim@epita.fr>
4548
4549 * data/yacc.c: Leave bigger chunks of quoted text.
4550 (YYDSYMPRINTF): New.
4551 Use it to report symbol activities.
4552 * data/glr.c (YYDSYMPRINTF): New.
4553 Use it.
4554
4555 2002-11-12 Paul Eggert <eggert@twinsun.com>
4556
4557 Version 1.75b.
4558
4559 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
4560 (yyglrReduce): Return yyok, not 0.
4561 This should avoid the enumerated-type warnings reported
4562 by Nelson H. F. Beebe in
4563 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
4564
4565 * lib/bbitset.h (BITSET_INLINE): Remove.
4566 * lib/bitset.h [! BITSET_INLINE]: Remove.
4567 (bitset_set, bitset_reset, bitset_test): Rename local vars
4568 to avoid shadowing warnings by GCC.
4569
4570 * data/glr.c (inline): Remove #define. It's the user's
4571 responsibility to #define it away, just like 'const'.
4572 This fixes one of the bugs reported by Nelson H. F. Beebe in
4573 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
4574
4575 * Makefile.maint (po-check): Scan .l and .y files instead of the
4576 .c and the .h files that they generate. This fixes the bug
4577 reported by Tim Van Holder in:
4578 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
4579 Look for N_ as well as for _. Try to avoid matching #define for
4580 N_ and _.
4581 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
4582 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
4583 * src/scan-gram.l: Revamp regular expressions so that " and '
4584 do not confuse xgettext.
4585
4586 * src/struniq.h (struniq_new): Do not declare the return type
4587 to be 'const'; this violates the C standard.
4588 * src/struniq.c (struniq_new): Likewise.
4589
4590 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
4591
4592 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
4593 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
4594 linker.
4595
4596 2002-11-12 Akim Demaille <akim@epita.fr>
4597
4598 * Makefile.maint: Sync with Autoconf:
4599 (local_updates): New.
4600
4601 2002-11-12 Akim Demaille <akim@epita.fr>
4602
4603 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
4604
4605 2002-11-12 Akim Demaille <akim@epita.fr>
4606
4607 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
4608 locations.
4609
4610 2002-11-12 Akim Demaille <akim@epita.fr>
4611
4612 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
4613 not yyvalue.
4614
4615 2002-11-12 Akim Demaille <akim@epita.fr>
4616
4617 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
4618 Use it to test the GLR parser.
4619
4620 2002-11-12 Akim Demaille <akim@epita.fr>
4621
4622 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
4623 defines it.
4624 * data/glr.c (yystos): New.
4625 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
4626 (YYDSYMPRINT): New.
4627 (yyval): Don't define it, it is handled via M4.
4628 (yyrecoverParseError): Free verbosely the discarded symbols.
4629 * data/yacc.c (yysymprint): Remove, rather...
4630 (b4_yysymprint_generate): invoke.
4631 * data/c.m4 (b4_yysymprint_generate): New.
4632 Accept pointers as arguments, as opposed to the version from
4633 yacc.c.
4634 (b4_yydestruct_generate): Likewise.
4635 * tests/cations.at (Printers and Destructors): Use Bison directives
4636 instead of CPP macros.
4637 Don't rely on internal details.
4638
4639 2002-11-12 Akim Demaille <akim@epita.fr>
4640
4641 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
4642 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
4643 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
4644 it against YYEMPTY and so forth), work on yytoken (i.e., set
4645 it to YYEMPTY etc.).
4646 (yydestruct): Replace with a b4_yydestruct_generate invocation.
4647 (b4_symbol_actions): Remove.
4648 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
4649 for 0, end-of-input.
4650
4651 2002-11-12 Akim Demaille <akim@epita.fr>
4652
4653 * doc/bison.texinfo (Destructor Decl): New.
4654
4655 2002-11-12 Akim Demaille <akim@epita.fr>
4656
4657 * src/tables.c (tables_generate): Use free for pointers that
4658 cannot be NULL, not XFREE.
4659 (pack_vector): Use assert, not fatal, for bound violations.
4660 * src/state.c (state_new): Likewise.
4661 * src/reader.c (reader): Likewise.
4662 * src/lalr.c (set_goto_map): Likewise.
4663 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
4664 the file name.
4665
4666 2002-11-12 Akim Demaille <akim@epita.fr>
4667
4668 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
4669 Restore.
4670 * src/scan-gram.l (last_string): Is global to the file, not to
4671 yylex.
4672 * src/parse-gram.y (input): Don't append the epilogue here,
4673 (epilogue.opt): do it here, and free the scanner's obstack.
4674 * src/reader.c (epilogue_set): Rename as...
4675 (epilogue_augment): this.
4676 * data/c.m4 (b4_epilogue): Defaults to empty.
4677
4678 2002-11-12 Akim Demaille <akim@epita.fr>
4679
4680 * src/getargs.c (long_options): Remove duplicates.
4681 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
4682 Remove.
4683 * doc/bison.rnh: Remove.
4684 * doc/bison.texinfo (VMS Invocation): Remove.
4685
4686 2002-11-12 Akim Demaille <akim@epita.fr>
4687
4688 * src/struniq.h, src/struniq.c (struniq_t): Is const.
4689 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
4690
4691 Use struniq for symbols.
4692
4693 * src/symtab.h (symbol_t): The tag member is a struniq.
4694 (symbol_type_set): Adjust.
4695 * src/symtab.c (symbol_new): Takes a struniq.
4696 (symbol_free): Don't free the tag member.
4697 (hash_compare_symbol_t, hash_symbol_t): Rename as...
4698 (hash_compare_symbol, hash_symbol): these.
4699 Use the fact that tags as struniqs.
4700 (symbol_get): Use struniq_new.
4701 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
4702 Returns a strniq.
4703 * src/reader.h (merger_list, grammar_currentmerge_set): The name
4704 and type members are struniqs.
4705 * src/reader.c (get_merge_function)
4706 (grammar_current_rule_merge_set): Adjust.
4707 (TYPE, current_type): Are struniq.
4708
4709 Use struniq for file names.
4710
4711 * src/files.h, src/files.c (infile): Split into...
4712 (grammar_file, current_file): these.
4713 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
4714 * src/reduce.c (reduce_print): Likewise.
4715 * src/getargs.c (getargs): Likewise.
4716 * src/complain.h, src/complain.c: Likewise.
4717 * src/main.c (main): Call struniqs_new early enough to use it for
4718 file names.
4719 Don't free the input file name.
4720
4721 2002-11-12 Akim Demaille <akim@epita.fr>
4722
4723 * src/symtab.c (symbol_free): Remove dead deactivated code:
4724 type_name are properly removed.
4725 Don't use XFREE to free items that cannot be NULL.
4726 * src/struniq.h, src/struniq.c: New.
4727 * src/main.c (main): Initialize/free struniqs.
4728 * src/parse-gram.y (%union): Add astruniq member.
4729 (yyprint): Adjust.
4730 * src/scan-gram.l (<{tag}>): Return a struniq.
4731 Free the obstack bit that used to store it.
4732 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
4733
4734 2002-11-11 Paul Eggert <eggert@twinsun.com>
4735
4736 Revamp to fix many (but not all) of the C- and M4-related quoting
4737 problems. Among other things, this fixes the Bison bug reported
4738 by Jan Hubicka when processing the Bash grammar; see:
4739 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
4740
4741 Use new @ escapes consistently. Represent brackets with @{ and @}
4742 rather than @<:@ and @:>@, since this works a bit better with dumb
4743 editors like vi. Represent @ with @@, since @ is now consistently
4744 an escape. Use @oline@ and @ofile@ rather than __oline__ and
4745 __ofile__, to avoid unexpected expansions. Similarly, use @output
4746 rather than #output.
4747
4748 * data/c.m4 (b4_copyright): Omit file name from comment, since
4749 the file name could contain "*/".
4750 (b4_synclines_flag): Don't quote the 2nd argument; it should already
4751 be quoted. All uses changed.
4752
4753 * data/glr.c: Use new @ escapes consistently.
4754 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
4755 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
4756 Remove, since they couldn't handle arbitrary characters in file
4757 names.
4758 * data/lalr1.cc: Likewise.
4759 * data/yacc.c: Likewise.
4760
4761 * src/files.c (output_infix): Remove; all uses removed.
4762 * src/files.h: Likewise.
4763
4764 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
4765 mishandled funny characters in file names, and anyway it isn't
4766 needed any more.
4767 * data/yacc.c: Likewise.
4768 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
4769
4770 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
4771 * data/yacc.c: Likewise.
4772
4773 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
4774 strings now.
4775 (muscle_init): Quote filename as a C string.
4776 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
4777 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
4778 * src/output.c (escaped_file_name_output): New function.
4779 (prepare_symbols): Quote tokens for M4.
4780 (prepare): Don't insert output_infix, output_prefix,
4781 output_parser_name, output_header_name; this is now down by scan-skel.
4782 Insert skeleton as a C string.
4783
4784 * src/output.c (user_actions_output, symbol_destructors_output,
4785 symbol_printers_output): Quote filenames for C and M4.
4786 * src/reader.c (prologue_augment, epilogue_set): Likewise.
4787
4788 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
4789 escapes other than \\ and \'; this simplifies the code.
4790 (<SC_STRING>): Likewise, for \\ and \".
4791 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
4792 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
4793 Use new escapes @{ and @} for [ and ].
4794
4795 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
4796 them with auto vars.
4797 Switch to new escape scheme, where @ is the escape character uniformly.
4798 Abort if a stray escape character is found. Avoid unbounded input
4799 buffer when parsing non-escaped text.
4800
4801 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
4802 __oline__, #output, $@, and @{ do not have unintended meanings.
4803
4804 2002-11-09 Paul Eggert <eggert@twinsun.com>
4805
4806 Fix the test failure due to GCC warnings described in
4807 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
4808 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
4809 evaluate to 0 if it's impossible for NINF to be in the respective
4810 table.
4811 (yygetLRActions, yyrecoverParseError): Use them.
4812
4813 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
4814 counted in the token inserted at end of file. Now takes
4815 location_t *, not location_t, so that the location can be
4816 adjusted. All uses changed.
4817
4818 * tests/regression.at (Invalid inputs): Adjust wording in
4819 diagnostic to match the new behavior.
4820
4821 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
4822 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
4823 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
4824 abort ();'. This reduces the runtime of the "Many lookaheads"
4825 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
4826 GCC 3.2.
4827
4828 2002-11-07 Paul Eggert <eggert@twinsun.com>
4829
4830 * src/parse-gram.y (CHARACTER): Remove unused token.
4831 All uses removed.
4832
4833 * src/scan-gram.l: Remove stack option. We no longer use the
4834 stack, since the stack was never deeper than 1; instead, use the
4835 new auto var c_context to record the stacked value.
4836
4837 Remove nounput option. At an unexpected end of file, we now unput
4838 the minimal input necessary to end cleanly; this simplifies the
4839 code.
4840
4841 Avoid unbounded token sizes where this is easy.
4842
4843 (unexpected_end_of_file): New function.
4844 Use it to systematize the error message on unexpected EOF.
4845 (last-string): Now auto, not static.
4846 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
4847 (scanner_last_string_free): Remove; not used.
4848 (percent_percent_count): Move decl to just before use.
4849 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
4850 not the (never otherwised-used) CHARACTER.
4851
4852 2002-11-07 Akim Demaille <akim@epita.fr>
4853
4854 Let yyerror always receive the msg as last argument, so that
4855 yyerror can be variadic.
4856
4857 * data/yacc.c (b4_yyerror_args): New.
4858 Use it when calling yyerror.
4859 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
4860 Use it when calling yyerror.
4861 * doc/bison.texinfo (Error Reporting): Adjust.
4862 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
4863 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
4864
4865 2002-11-06 Akim Demaille <akim@epita.fr>
4866
4867 #line should have quoted strings.
4868 Ideally, this should be done by m4_quotearg.
4869
4870 * src/scan-skel.l: Include quotearg.h.
4871 Quote __ofile__.
4872 * src/output.c (symbol_printers_output)
4873 (symbol_destructors_output): Quote the file name.
4874
4875 2002-11-06 Akim Demaille <akim@epita.fr>
4876
4877 * tests/regression.at (Invalid inputs): Adjust to the recent
4878 messages.
4879
4880 2002-11-06 Akim Demaille <akim@epita.fr>
4881
4882 Restore --no-lines.
4883 Reported by Jim Kent.
4884
4885 * data/c.m4 (b4_syncline): New.
4886 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
4887 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
4888 * src/output.c (user_actions_output): Likewise.
4889 (prepare): Define 'b4_synclines_flag'.
4890 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
4891
4892 2002-11-06 Akim Demaille <akim@epita.fr>
4893
4894 * src/main.c (main): Free `infile'.
4895 * src/scan-gram.l (handle_syncline): New.
4896 Recognize `#line'.
4897 * src/output.c (user_actions_output, symbol_destructors_output)
4898 (symbol_printers_output): Use the location's file name, not
4899 infile.
4900 * src/reader.c (prologue_augment, epilogue_set): Likewise.
4901
4902 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4903
4904 * src/tables.c (matching_state): Don't allow states to match if
4905 either has GLR conflict entries.
4906
4907 2002-11-05 Paul Eggert <eggert@twinsun.com>
4908
4909 * src/scan-gram.l: Use more accurate diagnostics, e.g.
4910 "integer out of range" rather than "invalid value".
4911 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
4912 accordingly.
4913
4914 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
4915 Also, remove one static variable in the scanner.
4916
4917 * src/scan-gram.l (braces_level): Now auto, not static.
4918 Initialize to zero if the compiler is being picky.
4919 (INITIAL): Clear braces_level instead of incrementing it.
4920 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
4921 as POSIX 1003.1-2001 requires.
4922 * src/system.h (IF_LINT): New macro, taken from coreutils.
4923 * configure.ac: Define "lint" if --enable-gcc-warnings.
4924
4925 2002-11-05 Akim Demaille <akim@epita.fr>
4926
4927 * src/scan-gram.l: When it starts with `%', complain about the
4928 whole directive, not just that `invalid character: %'.
4929
4930 2002-11-04 Akim Demaille <akim@epita.fr>
4931
4932 * Makefile.maint: Update from Autoconf.
4933 (update, cvs-update, po-update, do-po-update): New.
4934
4935 2002-11-04 Akim Demaille <akim@epita.fr>
4936
4937 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
4938 and yyerror.
4939 Have yyerror `use' its arguments.
4940 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
4941 returns true when location & yacc & pure & parse-param.
4942 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
4943
4944 2002-11-04 Akim Demaille <akim@epita.fr>
4945
4946 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
4947 clashes.
4948 * src/scan-gram.l: Use [\'] instead of ['] to pacify
4949 font-lock-mode.
4950 Use complain_at.
4951 Use quote, not quote_n since LOCATION_PRINT no longer uses the
4952 slot 0.
4953
4954 2002-11-03 Paul Eggert <eggert@twinsun.com>
4955
4956 * src/reader.c (get_merge_function, grammar_current_rule_check):
4957 Use consistent diagnostics for reporting type name clashes.
4958 Quote the types with <>, for consistency with Yacc.
4959 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
4960
4961 2002-11-03 Akim Demaille <akim@epita.fr>
4962
4963 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
4964 New.
4965 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
4966 (b4_parse_param): Remove.
4967 Use b4_identification.
4968 Propagate b4_pure_args where needed to pass them to yyerror.
4969 * data/glr.m4 (b4_parse_param): Remove.
4970 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
4971 (b4_lpure_formals): New.
4972 Use b4_identification.
4973 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
4974 b4_user_formals and b4_user_args.
4975 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
4976 (yyreportAmbiguity): When using a pure parser, also need
4977 the location, and the parse-params.
4978 Adjust callers.
4979 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
4980 When using a pure parser, also need the parse-params.
4981 Adjust callers.
4982 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
4983 (%pure-parser + %parse-param) LALR and GLR parsers.
4984 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
4985 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
4986 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
4987 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
4988 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
4989 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
4990 * doc/bison.texinfo: Untabify the whole file.
4991 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
4992 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
4993 (Error Reporting): Adjust to these new directives.
4994 Document %error-verbose, deprecate YYERROR_VERBOSE.
4995
4996 2002-11-03 Akim Demaille <akim@epita.fr>
4997
4998 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
4999 AT_CHECK_CALC_GLR invocations to use % directives, instead of
5000 command line options.
5001 * tests/cxx-type.at: Formatting changes.
5002
5003 2002-11-03 Paul Eggert <eggert@twinsun.com>
5004
5005 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
5006 to count columns correctly, and to check for invalid inputs.
5007
5008 Use mbsnwidth to count columns correctly. Account for tabs, too.
5009 Include mbswidth.h.
5010 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
5011 (extend_location): New function.
5012 (YY_LINES): Remove.
5013
5014 Handle CRLF in C code rather than in Lex code.
5015 (YY_INPUT): New macro.
5016 (no_cr_read): New function.
5017
5018 Scan UCNs, even though we don't fully handle them yet.
5019 (convert_ucn_to_byte): New function.
5020
5021 Handle backslash-newline correctly in C code.
5022 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
5023 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
5024 all uses changed.
5025 (tag, splice): New EREs. Do not allow NUL or newline in tags.
5026 Use {splice} wherever C allows backslash-newline.
5027 YY_STEP after space, newline, vertical-tab.
5028 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
5029
5030 (letter, id): Don't assume ASCII; e.g., spell out a-z.
5031
5032 ({int}, handle_action_dollar, handle_action_at): Check for integer
5033 overflow.
5034
5035 (YY_STEP): Omit trailing semicolon, so that it's more like C.
5036
5037 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
5038 as well as \000. Check for UCHAR_MAX, not 255.
5039 Allow \x with an arbitrary positive number of digits, as in C.
5040 Check for overflow here.
5041 Allow \? and UCNs, for compatibility with C.
5042
5043 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
5044 with quote slot used by complain_at.
5045
5046 * tests/input.at: Add tests for backslash-newline, m4 quotes
5047 in symbols, long literals, and funny escapes in strings.
5048
5049 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
5050 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
5051 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
5052 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
5053 * m4/mbswidth.m4: New file, from GNU coreutils.
5054
5055 * doc/bison.texinfo (Grammar Outline): Document // comments.
5056 (Symbols): Document that trigraphs have no special meaning in Bison,
5057 nor is backslash-newline allowed.
5058 (Actions): Document that trigraphs have no special meaning.
5059
5060 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
5061 no longer used.
5062
5063 2002-11-02 Paul Eggert <eggert@twinsun.com>
5064
5065 * src/reader.c: Don't include quote.h; not needed.
5066 (get_merge_function): Reword warning to be consistent with
5067 type clash diagnostic in grammar_current_rule_check.
5068
5069 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
5070 bug in trigraph handling.
5071
5072 * src/output.c (prepare_symbols): When printing token names,
5073 escape "[" as "@<:@" and likewise for "]".
5074
5075 * src/system.h (errno): Remove declaration, as we are now
5076 assuming C89 or better, and C89 guarantees errno.
5077
5078 2002-10-30 Paul Eggert <eggert@twinsun.com>
5079
5080 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
5081 Check for close failures.
5082 * src/files.h (xfclose): Return void, not int, since it always
5083 returned zero.
5084 * src/files.c (xfclose): Likewise. Report I/O error if ferror
5085 indicates one.
5086 * src/output.c (output_skeleton): Use xfclose rather than fclose
5087 and ferror. xfclose now checks ferror.
5088
5089 * data/glr.c (YYLEFTMOST_STATE): Remove.
5090 (yyreportTree): Use a stack-based leftmost state. This avoids
5091 our continuing battles with bogus warnings about initializers.
5092
5093 2002-10-30 Akim Demaille <akim@epita.fr>
5094
5095 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
5096 #if.
5097
5098 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
5099
5100 * tests/glr-regr1.at: New test for reported regressions.
5101 * tests/testsuite.at: Add glr-regr1.at test.
5102 * tests/Makefile.am: Add glr-regr1.at test.
5103
5104 2002-10-24 Paul Eggert <eggert@twinsun.com>
5105
5106 Version 1.75a.
5107
5108 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
5109 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
5110 we use malloc. Don't assume 'A' through 'Z' are contiguous.
5111 Don't assume strdup exists; POSIX says its an XSI extension.
5112 Check for buffer overflow on input.
5113
5114 2002-10-24 Akim Demaille <akim@epita.fr>
5115
5116 * src/output.c (output_skeleton): Don't disable M4sugar comments
5117 too soon: it results in comments being expanded.
5118 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
5119 first output.
5120
5121 2002-10-24 Akim Demaille <akim@epita.fr>
5122
5123 * data/yacc.c (m4_int_type): New.
5124 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
5125 char' as only yacc.c wants K&R portability.
5126 * data/glr.c (yysigned_char): Remove.
5127 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
5128 Reported by Quoc Peyrot.
5129
5130 2002-10-23 Paul Eggert <eggert@twinsun.com>
5131
5132 * src/main.c (main): With --trace=time, report times even if a
5133 non-fatal error occurs. Formerly, the times were reported in some
5134 such cases but not in others.
5135 * src/reader.c (reader): Just return if a complaint has been issued,
5136 instead of exiting, so that 'main' can report times.
5137
5138 2002-10-22 Akim Demaille <akim@epita.fr>
5139
5140 * src/system.h: Include sys/types.
5141 Reported by Bert Deknuydt.
5142
5143 2002-10-23 Paul Eggert <eggert@twinsun.com>
5144
5145 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
5146 Suggested by Art Haas.
5147
5148 2002-10-22 Paul Eggert <eggert@twinsun.com>
5149
5150 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
5151 decl; not needed any more.
5152 * src/main.c (main): Use return to exit, undoing yesterday's change.
5153 The last OS that we could find where this wouldn't work is
5154 SunOS 3.5, and that's too old to worry about now.
5155
5156 * data/glr.c (struct yyltype): Define members even when not
5157 doing locations. This is more consistent with yacc.c, and it
5158 works around the following bug reports:
5159 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
5160 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
5161
5162 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
5163 @acronym consistently. Standardize on "Yacc" instead of "YACC",
5164 "Algol" instead of "ALGOL". Give a bit more history about BNF.
5165
5166 2002-10-22 Akim Demaille <akim@epita.fr>
5167
5168 * data/README: New.
5169
5170 2002-10-21 Paul Eggert <eggert@twinsun.com>
5171
5172 Be consistent about 'bool'; the old code used an enum in one
5173 module and an int in another, and this violates the C standard.
5174 * m4/stdbool.m4: New file, from coreutils 4.5.3.
5175 * configure.ac (AC_HEADER_STDBOOL): Add.
5176 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
5177 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
5178 * src/symtab.c (hash_compare_symbol_t): Likewise.
5179 * src/system.h (bool, false, true): Use a definition consistent
5180 with ../lib/hash.c. All uses changed.
5181
5182 * src/complain.c (warning_issued): Renamed from warn_message_count,
5183 so that we needn't worry about integer overflow (!).
5184 Now of type bool. All uses changed.
5185 (complaint_issued): Renamed from complain_message_count; likewise.
5186
5187 * src/main.c (main): Use exit to exit with failure.
5188
5189 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
5190 rather than 1 and 0.
5191 * src/main.c (main): Likewise.
5192 * src/getargs.c (getargs): Likewise.
5193 * src/reader.c (reader): Likewise.
5194
5195 * src/getarg.c (getargs): Remove duplicate code for
5196 "Try `bison --help'".
5197
5198 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
5199 What was that "2" for?
5200
5201 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
5202 * src/getargs.c (usage): Likewise.
5203
5204 * src/getargs.c (getargs): When there are too few operands, report
5205 the last one. When there are too many, report the first extra
5206 one. This is how diffutils does it.
5207
5208 2002-10-20 Paul Eggert <eggert@twinsun.com>
5209
5210 Remove K&R vestiges.
5211 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
5212 * src/complain.c (VA_START): Remove. Assume prototypes.
5213 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
5214 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
5215 fatal): Assume prototypes.
5216 * src/complain.h: Assume prototypes.
5217 * src/system.h (PARAMS): Remove.
5218 Include <limits.h> unconditionally, since it's guaranteeed even
5219 for a freestanding C89 compiler.
5220 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
5221 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
5222
5223 2002-10-20 Akim Demaille <akim@epita.fr>
5224
5225 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
5226 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
5227 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
5228 (yyresolveStates, yyresolveAction, yyresolveStack)
5229 (yyprocessOneStack): Use them.
5230 (yy_reduce_print): New.
5231 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
5232
5233 2002-10-20 Akim Demaille <akim@epita.fr>
5234
5235 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
5236 arguments and output `void'.
5237 (b4_c_function): Rename as...
5238 (b4_c_function_def): this.
5239 (b4_c_function_decl, b4_c_ansi_function_def)
5240 (b4_c_ansi_function_decl): New.
5241 Change the interpretation of the arguments: before `int, foo', now
5242 `int foo, foo'.
5243 * data/yacc.c (yyparse): Prototype and define thanks to these.
5244 Adjust b4_c_function_def uses.
5245 * data/glr.c (yyparse): Likewise, but ANSI only.
5246
5247 2002-10-20 Akim Demaille <akim@epita.fr>
5248
5249 * src/output.c (prepare): Move the definition of `tokens_number',
5250 `nterms_number', `undef_token_number', `user_token_number_max'
5251 to...
5252 (prepare_tokens): Here.
5253 (prepare_tokens): Rename as...
5254 (prepare_symbols): this.
5255 (prepare): Move the definition of `rules_number' to...
5256 (prepare_rules): here.
5257 (prepare): Move the definition of `last', `final_state_number',
5258 `states_number' to...
5259 (prepare_states): here.
5260 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
5261
5262 2002-10-20 Akim Demaille <akim@epita.fr>
5263
5264 * src/tables.h, src/tables.c, src/output.c: Comment changes.
5265
5266 2002-10-20 Akim Demaille <akim@epita.fr>
5267
5268 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
5269 * data/c.m4: here.
5270
5271 2002-10-20 Akim Demaille <akim@epita.fr>
5272
5273 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
5274 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
5275 `pair'.
5276 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
5277 `name' to...
5278 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
5279 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
5280 These.
5281
5282 2002-10-19 Paul Eggert <eggert@twinsun.com>
5283
5284 Do not create a temporary file, as that involves security and
5285 cleanup headaches. Instead, use a pair of pipes.
5286 Derived from a suggestion by Florian Krohm.
5287 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
5288 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
5289 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
5290 (BISON_PREREQ_SUBPIPE): Add.
5291 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
5292 Add subpipe.h, subpipe.c.
5293 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
5294 * po/POTFILES.in: Add lib/subpipe.c.
5295 * src/output.c: Include "subpipe.h".
5296 (m4_invoke): Remove decl.
5297 (scan_skel): New decl.
5298 (output_skeleton): Use pipe rather than temporary file for m4 input.
5299 Check that m4sugar.m4 is readable, to avoid deadlock.
5300 Check for pipe I/O error.
5301 * src/scan-skel.l (readpipe): Remove decl.
5302 (scan_skel): New function, to be used in place of m4_invoke.
5303 Read from stream rather than file.
5304
5305 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
5306 float, as this generates a warning on Solaris 8 + GCC 3.2 with
5307 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
5308 this generates a more-accurate value anyway.
5309
5310 * lib/timevar.c (timervar_accumulate): Rename locals to
5311 avoid confusion with similarly-named more-global.
5312 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
5313
5314 * src/output.c (prepare): Use xstrdup to convert char const *
5315 to char *, to avoid GCC warning.
5316
5317 2002-10-19 Akim Demaille <akim@epita.fr>
5318
5319 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
5320 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
5321 Use them to have `calc.y' ready for %pure-parser.
5322 * data/yacc.c (YYLEX): Pass a yylex return type to
5323 b4_c_function_call.
5324
5325 2002-10-19 Akim Demaille <akim@epita.fr>
5326
5327 Prototype support of %lex-param and %parse-param.
5328
5329 * src/parse-gram.y: Add the definition of the %lex-param and
5330 %parse-param tokens, plus their rules.
5331 Drop the `_' version of %glr-parser.
5332 Add the "," token.
5333 * src/scan-gram.l (INITIAL): Scan them.
5334 * src/muscle_tab.c: Comment changes.
5335 (muscle_insert, muscle_find): Rename `pair' as `probe'.
5336 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
5337 (muscle_entry_s): The `value' member is no longer const.
5338 Adjust all dependencies.
5339 * src/muscle_tab.c (muscle_init): Adjust: use
5340 MUSCLE_INSERT_STRING.
5341 Initialize the obstack earlier.
5342 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
5343 (muscle_pair_list_grow): New.
5344 * data/c.m4 (b4_c_function_call, b4_c_args): New.
5345 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
5346 * tests/calc.at: Use %locations, not --locations.
5347 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
5348
5349 2002-10-19 Akim Demaille <akim@epita.fr>
5350
5351 * src/getargs.c (usage): Take status as argument and exit
5352 accordingly.
5353 Report the traditional `Try ... --help' message when status != 0.
5354 (usage, version): Don't take a FILE * as arg, it is pointless.
5355 (getargs): When there is an incorrect number of arguments, make it
5356 an error, and report it GNUlically thanks to `usage ()'.
5357
5358 2002-10-18 Paul Eggert <eggert@twinsun.com>
5359
5360 * data/glr.c (yyreportParseError): Don't assume that sprintf
5361 yields the length of the printed string, as this is not true
5362 on SunOS 4.1.4. Reported by Peter Klein.
5363
5364 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
5365 * tests/conflicts.at (%nonassoc and eof): Likewise.
5366 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
5367
5368 2002-10-17 Akim Demaille <akim@epita.fr>
5369
5370 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
5371 * src/getargs.c (trace_types, trace_args): Adjust.
5372 * src/reader.c (grammar_current_rule_prec_set)
5373 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
5374 Standardize error messages.
5375 And s/@prec/%prec/!
5376 (reader): Use trace_flag to enable scanner/parser debugging,
5377 instead of an adhoc scheme.
5378 * src/scan-gram.l: Remove trailing debugging code.
5379
5380 2002-10-16 Paul Eggert <eggert@twinsun.com>
5381
5382 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
5383 MUSCLE_TAB_H.
5384
5385 * NEWS: Officially drop support for building Bison with K&R C,
5386 since it didn't work anyway and it's not worth worrying about.
5387 * Makefile.maint (wget_files): Remove ansi2knr.c.
5388 (ansi2knr.c-url_prefix): Remove.
5389 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
5390 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5391 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5392
5393 2002-10-15 Paul Eggert <eggert@twinsun.com>
5394
5395 Stop using the "enum_" trick for K&R-style function definitions;
5396 it confused me, and I was the author! Instead, assume that people
5397 who want to use K&R C compilers (when using these modules in GCC,
5398 perhaps?) will run ansi2knr.
5399
5400 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
5401 All uses of "enum_" changed to "enum ".
5402 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
5403 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
5404
5405 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
5406 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
5407 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
5408 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
5409 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
5410 abitset_not, abitset_ones, abitset_or, abitset_or_and,
5411 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
5412 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
5413 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
5414 Use function prototypes; this removes the need for declaring
5415 static functions simply to provide their prototypes.
5416 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
5417 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
5418 bitset_count_, bitset_create, bitset_dump, bitset_first,
5419 bitset_free, bitset_init, bitset_last, bitset_next,
5420 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
5421 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
5422 bitset_print, bitset_release_memory, bitset_toggle_,
5423 bitset_type_choose, bitset_type_get, bitset_type_name_get,
5424 debug_bitset): Likewise.
5425 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
5426 * lib/bitset_stats.c (bitset_log_histogram_print,
5427 bitset_percent_histogram_print, bitset_stats_and,
5428 bitset_stats_and_cmp, bitset_stats_and_or,
5429 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
5430 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
5431 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
5432 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
5433 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
5434 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
5435 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
5436 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
5437 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
5438 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
5439 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
5440 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
5441 bitset_stats_zero): Likewise.
5442 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
5443 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
5444 bitsetv_dump, debug_bitsetv): Likewise.
5445 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
5446 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
5447 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
5448 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
5449 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
5450 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
5451 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
5452 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
5453 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
5454 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
5455 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
5456 Likewise.
5457 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
5458 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
5459 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
5460 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
5461 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
5462 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
5463 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
5464 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
5465 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
5466 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
5467 lbitset_xor_cmp, lbitset_zero): Likewise.
5468
5469 2002-10-14 Akim Demaille <akim@epita.fr>
5470
5471 Version 1.75.
5472
5473 2002-10-14 Akim Demaille <akim@epita.fr>
5474
5475 * tests/Makefile.am (maintainer-check-posix): New.
5476
5477 2002-10-14 Akim Demaille <akim@epita.fr>
5478
5479 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
5480 member.
5481
5482 2002-10-14 Akim Demaille <akim@epita.fr>
5483
5484 * src/tables.c (table_ninf_remap): base -> tab.
5485 Reported by Matt Rosing.
5486
5487 2002-10-14 Paul Eggert <eggert@twinsun.com>
5488
5489 * tests/action.at, tests/calc.at, tests/conflicts.at,
5490 tests/cxx-type.at, tests/headers.at, tests/input.at,
5491 tests/regression.at, tests/synclines.at, tests/torture.at:
5492 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
5493 so that the tests still work even if POSIXLY_CORRECT is set.
5494 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
5495
5496 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
5497 for portability to K&R hosts. Fix typo: signed char is guaranteed
5498 only to 127, not to 128.
5499 * data/glr.c (yysigned_char): New type.
5500 * data/yacc.c (yysigned_char): Likewise.
5501 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
5502
5503 2002-10-13 Paul Eggert <eggert@twinsun.com>
5504
5505 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
5506 true due to limited range of data type" warning from GCC.
5507
5508 * data/c.m4 (b4_token_defines): Protect against double-inclusion
5509 by wrapping enum yytokentype's definition inside #ifndef
5510 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
5511
5512 2002-10-13 Akim Demaille <akim@epita.fr>
5513
5514 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
5515 Un yy- yyrhs to avoid the name clash with the global YYRHS.
5516
5517 2002-10-13 Akim Demaille <akim@epita.fr>
5518
5519 * Makefile.maint: Update from Autoconf 2.54.
5520 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
5521
5522 2002-10-13 Akim Demaille <akim@epita.fr>
5523
5524 * src/print.c (print_state): Separate the list of solved conflicts
5525 from the other items.
5526 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
5527
5528 2002-10-13 Akim Demaille <akim@epita.fr>
5529
5530 Let nondeterministic skeletons be usable with deterministic
5531 tables.
5532
5533 With the patch, GAWK compiled by GCC without -O2 passes its test
5534 suite using a GLR parser driven by LALR tables. It fails with -O2
5535 because `struct stat' gives two different answers on my machine:
5536 88 (definition of an auto var) and later 96 (memset on this var).
5537 Hence the stack is badly corrumpted. The headers inclusion is to
5538 blame: if I move the awk.h inclusion before GLR's system header
5539 inclusion, the two struct stat have the same size.
5540
5541 * src/tables.c (pack_table): Always create conflict_table.
5542 (token_actions): Always create conflict_list.
5543 * data/glr.c (YYFLAG): Remove, unused.
5544
5545 2002-10-13 Akim Demaille <akim@epita.fr>
5546
5547 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
5548 (O0FLAGS): New.
5549 (VALGRIND, GXX): New.
5550 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
5551 * tests/bison.in: Run $PREBISON a pre-command.
5552 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
5553 (maintainer-check-g++): New.
5554 * Makefile.am (maintainer-check): New.
5555
5556 2002-10-13 Akim Demaille <akim@epita.fr>
5557
5558 * data/glr.c: Formatting changes.
5559 Tweak some trace messages to match yacc.c's.
5560
5561 2002-10-13 Akim Demaille <akim@epita.fr>
5562
5563 GLR parsers sometimes raise parse errors instead of performing the
5564 default reduction.
5565 Reported by Charles-Henry de Boysson.
5566
5567 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
5568 check the length of the traces when %glr.
5569 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
5570 GLR's traces.
5571 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
5572 Test GLR parsers.
5573 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
5574 (yyltype): Remove the yy prefix from the member names.
5575 (yytable): Complete its comment.
5576 (yygetLRActions): Map error action number from YYTABLE from
5577 YYTABLE_NINF to 0.
5578 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
5579 (which was a bug: it should have been YYTABEL_NINF, and yet it was
5580 not satisfying as we could compare an YYACTION computed from
5581 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
5582 only value for error actions.
5583 (yyreportParseError): In verbose parse error messages, don't issue
5584 `error' in the list of expected tokens.
5585 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
5586 next action to perform to match glr.c's decoding.
5587 (yytable): Complete its comment.
5588
5589 2002-10-13 Paul Eggert <eggert@twinsun.com>
5590
5591 Fix problem reported by Henrik Grubbstroem in
5592 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
5593 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
5594 because the Bison parser reads the second action before reducing
5595 the first one.
5596 * src/scan-gram.l (rule_length): New static var.
5597 Use it to keep track of the rule length in the scanner, since
5598 we can't expect the parser to be in lock-step sync with the scanner.
5599 (handle_action_dollar, handle_action_at): Use this var.
5600 * tests/actions.at (Exotic Dollars): Test for the problem.
5601
5602 2002-10-12 Paul Eggert <eggert@twinsun.com>
5603
5604 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
5605 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
5606 Include <sys/time.h> when checking for clock_t and struct tms.
5607 Use same include order as source.
5608 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
5609 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
5610
5611 * lib/timevar.c: Update copyright date and clarify comments.
5612 (get_time) [IN_GCC]: Keep the GCC version for reference.
5613
5614 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
5615 GCC version as of today, then merge Bison's changes.
5616 Change "GCC" to "Bison" in copyright notice. timevar.def's
5617 author is Akim, so change that too.
5618
5619 * src/reader.c (grammar_current_rule_check):
5620 Don't worry about the default action if $$ is untyped.
5621 Prevents bogus warnings reported by Jim Gifford in
5622 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
5623
5624 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
5625 * data/glr.c, data/lalr1.cc, data/yacc.c:
5626 Output token definitions before the first part of user declarations.
5627 Fixes compatibility problem reported by Jim Gifford for kbd in
5628 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
5629
5630 2002-10-11 Paul Eggert <eggert@twinsun.com>
5631
5632 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
5633 (yyparse): here. This undoes some of the 2002-07-25 change.
5634 Compatibility problem reported by Ralf S. Engelschall with
5635 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
5636
5637 2002-10-11 Akim Demaille <akim@epita.fr>
5638
5639 * tests/regression.at Characters Escapes): New.
5640 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
5641 characters.
5642 Reported by Jan Nieuwenhuizen.
5643
5644 2002-10-11 Akim Demaille <akim@epita.fr>
5645
5646 * po/id.po: New.
5647
5648 2002-10-10 Paul Eggert <eggert@twinsun.com>
5649
5650 Portability fixes for bitsets; this also avoids several GCC
5651 warnings.
5652
5653 * lib/abitset.c: Include <stddef.h>, for offsetof.
5654 * lib/lbitset.c: Likewise.
5655
5656 * lib/abitset.c (abitset_bytes): Return a size that is aligned
5657 properly for vectors of objects. Do not assume that adding a
5658 header size to a multiple of a word size yields a value that is
5659 properly aligned for the whole union.
5660 * lib/bitsetv.c (bitsetv_alloc): Likewise.
5661
5662 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
5663 unique names for structures.
5664 * lib/ebitset.c (ebitset_bytes): Likewise.
5665 * lib/lbitset.c (lbitset_bytes): Likewise.
5666
5667 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
5668 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
5669 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
5670 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
5671 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
5672 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
5673 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
5674 to improve the type-checking that GCC can do.
5675 * lib/bitset.c (bitset_op4_cmp): Likewise.
5676 * lib/bitset_stats.c (bitset_stats_count,
5677 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
5678 bitset_stats_copy, bitset_stats_disjoint_p,
5679 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
5680 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
5681 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
5682 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
5683 bitset_stats_and_or_cmp, bitset_stats_andn_or,
5684 bitset_stats_andn_or_cmp, bitset_stats_or_and,
5685 bitset_stats_or_and_cmp): Likewise.
5686 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
5687 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
5688 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
5689 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
5690
5691 * lib/abitset.h: Include bitset.h, not bbitset.h.
5692 * lib/ebitset.h: Likewise.
5693 * lib/lbitset.h: Likewise.
5694
5695 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
5696 All instances of parameters of type enum bitset_opts are now of
5697 type enum_bitset_opts, to conform to the C Standard, and similarly
5698 for enum_bitset_type.
5699 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
5700 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
5701
5702 Do not use "struct bitset_struct" to mean different things in
5703 different modules. Not only is this confusing, it violates
5704 the C Standard, which requires that structure types in different
5705 modules must be compatible if one is to be passed to the other.
5706 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
5707 All instances of "struct bitset_struct *" replaced with "bitset".
5708 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
5709 (union bitset_union, struct abitset_struct, struct ebitset_struct,
5710 struct lbitset_struct, struct bitset_stats_struct): New types.
5711 All uses of struct bitset_struct changed to union bitset_union,
5712 etc.
5713 * lib/abitset.c (struct abitset_struct, abitset,
5714 struct bitset_struct): Remove.
5715 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
5716 struct bitset_struct): Remove.
5717 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
5718 bitset_struct): Remove.
5719 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
5720 Likewise.
5721
5722 Do not call a function of type T using a call that assumes the
5723 function is of a different type U. Standard C requires that a
5724 function must be called with a type that is compatible with its
5725 definition.
5726 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
5727 New decls.
5728 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
5729 New functions.
5730 * lib/ebitset.c (PFV): Remove.
5731 * lib/lbitset.c (PFV): Likewise.
5732 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
5733 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
5734 decls.
5735 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
5736 (ebitset_vtable): Use them.
5737 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
5738 lbitset_xor): New functions.
5739 (lbitset_vtable): Use them.
5740
5741 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
5742 Declare.
5743
5744 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
5745 GCC warning.
5746 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
5747 Use offsetof, for simplicity.
5748
5749 2002-10-06 Paul Eggert <eggert@twinsun.com>
5750
5751 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
5752 the same width as int. This reapplies a hunk of the 2002-08-12 patch
5753 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
5754 which was inadvertently undone by the 2002-09-30 patch.
5755 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
5756 the same width as int.
5757
5758 2002-10-04 Paul Eggert <eggert@twinsun.com>
5759
5760 Version 1.50.
5761
5762 * configure.ac (AC_INIT), NEWS: Increment version number.
5763
5764 * doc/bison.texinfo: Minor spelling, grammar, and white space
5765 fixes.
5766 (Symbols): Mention that any negative value returned from yylex
5767 signifies end-of-input. Warn about negative chars. Mention
5768 the portable Standard C character set.
5769
5770 The GNU coding standard says CFLAGS and YFLAGS are reserved
5771 for the installer to set.
5772 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
5773 * src/Makefile.am (AM_CFLAGS): Likewise.
5774 (AM_YFLAGS): Renamed from YFLAGS.
5775
5776 Fix some MAX and MIN problems.
5777 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
5778 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
5779 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
5780 * src/reader.c (reader): Use it.
5781
5782 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
5783 POSIX 1003.1-2001 has removed fgrep.
5784
5785 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5786
5787 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
5788 interpreted as signed.
5789 * lib/ebitset.c (ebitset_list): Fix bug.
5790
5791 2002-10-01 Paul Eggert <eggert@twinsun.com>
5792
5793 More fixes for 64-bit hosts and large bitsets.
5794
5795 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
5796 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
5797 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
5798 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
5799 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
5800 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
5801 bitset_count_): Likewise.
5802 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
5803 bitset_first, bitset_last): Likewise.
5804 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
5805 bitset_stats_list_reverse, bitset_stats_size,
5806 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
5807 Likewise.
5808 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5809 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
5810 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
5811 bitsetv_reflexive_transitive_closure): Likewise.
5812 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
5813 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
5814 Likewise.
5815 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
5816 Likewise.
5817
5818 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
5819 Use size_t, not unsigned int, to count bytes.
5820 * lib/abitset.h (abitset_bytes): Likewise.
5821 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
5822 Likewise.
5823 * lib/bitset.h (bitset_bytes): Likewise.
5824 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
5825 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
5826 * lib/bitsetv.c (bitsetv_alloc): Likewise.
5827 * lib/ebitset.c (ebitset_bytes): Likewise.
5828 * lib/ebitset.h (ebitset_bytes): Likewise.
5829 * lib/lbitset.c (lbitset_bytes): Likewise.
5830 * lib/lbitset.h (lbitset_bytes): Likewise.
5831
5832 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
5833 abitset_subset_p, abitset_disjoint_p, abitset_and,
5834 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
5835 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
5836 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
5837 abitset_or_and, abitset_or_and_cmp):
5838 Use bitset_windex instead of unsigned int.
5839 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
5840 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
5841 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
5842 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
5843 Likewise.
5844 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
5845
5846 * lib/bitset.c (bitset_print):
5847 Use proper printf formats for widths of integer types.
5848 * lib/bitset_stats.c (bitset_percent_histogram_print,
5849 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
5850 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5851 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
5852 * lib/lbitset.c (lbitset_bytes): Likewise.
5853
5854 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
5855 BITSET_SIZE_MAX): New macros.
5856 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
5857 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
5858 to BITSET_WINDEX_MAX.
5859
5860 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
5861 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
5862 since we now return the bitset_bindex type (not int).
5863
5864 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
5865 when computing sizes.
5866 * lib/ebitset.c (ebitset_elts_grow): Likewise.
5867
5868 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
5869 and avoid cast to unsigned.
5870
5871 2002-09-30 Akim Demaille <akim@epita.fr>
5872
5873 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
5874 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
5875 Updates from Michael Hayes.
5876
5877 2002-09-30 Art Haas <ahaas@neosoft.com>
5878
5879 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
5880 invocations.
5881 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
5882 defined.
5883
5884 2002-09-27 Akim Demaille <akim@epita.fr>
5885
5886 Version 1.49c.
5887
5888 2002-09-27 Akim Demaille <akim@epita.fr>
5889
5890 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
5891 (Because of AC_LIBSOURCE).
5892
5893 2002-09-27 Akim Demaille <akim@epita.fr>
5894
5895 Playing with Autoscan.
5896
5897 * configure.ac: Remove the old LIBOBJ tweaks.
5898 (AC_REPLACE_FUNCS): Add strrchr and strtol.
5899 * lib/strrchr.c: New.
5900 * lib/strtol.c: New, from the Coreutils 4.5.1.
5901
5902 2002-09-27 Akim Demaille <akim@epita.fr>
5903
5904 Playing with Autoscan.
5905
5906 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
5907 * lib/Makefile.am (libbison_a_SOURCES): No longer include
5908 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
5909 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
5910 Coreutils 4.5.1.
5911
5912 2002-09-24 Akim Demaille <akim@epita.fr>
5913
5914 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
5915 (Frequently Asked Questions, Parser Stack Overflow): New.
5916
5917 2002-09-13 Akim Demaille <akim@epita.fr>
5918
5919 Playing with autoscan.
5920
5921 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
5922 * src/files.c (skeleton_find): Remove, unused.
5923 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
5924 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
5925
5926 2002-09-13 Akim Demaille <akim@epita.fr>
5927
5928 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
5929 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
5930
5931 2002-09-13 Akim Demaille <akim@epita.fr>
5932
5933 * configure.ac: Require 2.54.
5934 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
5935 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
5936 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
5937 Remove, provided by Autoconf macros.
5938
5939 2002-09-12 Akim Demaille <akim@epita.fr>
5940
5941 * m4/prereq.m4: Update, from Coreutils 4.5.1.
5942
5943 2002-09-12 Akim Demaille <akim@epita.fr>
5944
5945 * m4/prereq.m4: Update, from Fileutils 4.1.5.
5946 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
5947 Reported by Martin Mokrejs.
5948
5949 2002-09-10 Akim Demaille <akim@epita.fr>
5950
5951 * src/parse-gram.y: Associate a human readable string to each
5952 token type.
5953 * tests/regression.at (Invalid inputs): Adjust.
5954
5955 2002-09-10 Gary V. Vaughan <gary@gnu.org>
5956
5957 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
5958 with an Autoconf-2.5x style configure.ac.
5959
5960 2002-09-06 Paul Eggert <eggert@twinsun.com>
5961
5962 * doc/bison.texinfo (Conditions): Make explicit that the GPL
5963 exception applies only to yacc.c. This is a modification of a
5964 patch originally suggested by Akim Demaille.
5965
5966 2002-09-06 Akim Demaille <akim@epita.fr>
5967
5968 * data/c.m4 (b4_copyright): Move the GPL exception comment from
5969 here to...
5970 * data/yacc.c: here.
5971
5972 * data/lalr1.cc (struct yyltype): Don't define it, since we use
5973 LocationType.
5974 (b4_ltype): Default to yy::Location from location.hh.
5975
5976 2002-09-04 Jim Meyering <jim@meyering.net>
5977
5978 * data/yacc.c: Guard the declaration of yytoknum also with
5979 `#ifdef YYPRINT', so it is declared only when used.
5980
5981 2002-09-04 Akim Demaille <akim@epita.fr>
5982
5983 * configure.in: Rename as...
5984 * configure.ac: this.
5985 Bump to 1.49c.
5986
5987 2002-09-04 Akim Demaille <akim@epita.fr>
5988
5989 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
5990 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
5991 translate maintainer only messages.
5992
5993 2002-08-12 Paul Eggert <eggert@twinsun.com>
5994
5995 Version 1.49b.
5996
5997 * Makefile.am (SUBDIRS): Remove intl.
5998 (DISTCLEANFILES): Remove.
5999 * NEWS: Mention that GNU M4 is now required. Clarify what is
6000 meant by "larger grammars". Mention the pt_BR translation.
6001 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
6002 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
6003 Bump version from 0.11.2 to 0.11.5.
6004 (BISON_PREREQ_STAGE): Remove.
6005 (AM_GNU_GETTEXT): Use external gettext.
6006 (AC_OUTPUT): Remove intl/Makefile.
6007
6008 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
6009
6010 * data/glr.c: Include string.h, for strlen.
6011 (yyreportParseError): Use size_t for yysize.
6012 (yy_yypstack): No longer nested inside yypstates, as nested
6013 functions are not portable. Do not assume size_t is the
6014 same width as int.
6015 (yypstates): Do not assume that ptrdiff_t is the same width
6016 as int, and similarly for yyposn and YYINDEX.
6017
6018 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
6019
6020 * lib/Makefile.am (INCLUDES): Do not include from the intl
6021 directory, which has been removed.
6022 * src/Makefile.am (INCLUDES): Likewise.
6023
6024 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
6025 (bitsets_sources, additional_bitsets_sources, timevars_sources):
6026 New vars.
6027
6028 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
6029 * tests/Makefile.am (EXTRA_DIST): Likewise.
6030
6031 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
6032 Do not assume that bitset_windex is the same width as unsigned.
6033
6034 * lib/abitset.c (abitset_unused_clear): Do not assume that
6035 bitset_word is the same width as int.
6036 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
6037 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
6038 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
6039 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
6040 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
6041
6042 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
6043 portability to one's complement hosts!).
6044 * lib/ebitset.c (ebitset_op1): Likewise.
6045 * lib/lbitset.c (lbitset_op1): Likewise.
6046
6047 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
6048 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
6049 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
6050 Sync with fileutils.
6051 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
6052 lib/gettext.h: Sync with diffutils.
6053
6054 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
6055 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
6056
6057 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
6058 PROTOTYPES to check for prototypes, and "defined __STDC__" to
6059 check for void *.
6060
6061 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
6062 size_t; the old version tried to do this but casted improperly.
6063 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
6064 (bitset_test): Now returns int, not unsigned long.
6065
6066 * lib/bitset_stats.c: Include "gettext.h".
6067 (_): New macro.
6068 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
6069 name locals "index", as it generates unnecessary warnings on some
6070 hosts that have an "index" function.
6071
6072 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
6073 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
6074 they need translation.
6075 * src/LR0.c (state_list_append, new_itemsets, get_state,
6076 append_states, generate_states): Likewise.
6077 * src/assoc.c (assoc_to_string): Likewise.
6078 * src/closure.c (print_closure, set_firsts, closure): Likewise.
6079 * src/gram.c (grammar_dump): Likewise.
6080 * src/injections.c (injections_compute): Likewise.
6081 * src/lalr.c (lookaheads_print): Likewise.
6082 * src/relation.c (relation_transpose): Likewise.
6083 * src/scan-gram.l: Likewise.
6084 * src/tables.c (table_grow, pack_vector): Likewise.
6085
6086 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
6087 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
6088 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
6089 * m4/mbstate_t.m4: Sync with fileutils.
6090 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
6091
6092 * po/LINGUAS: Add pt_BR.
6093 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
6094 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
6095 lib/timevar.c.
6096 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
6097 manual recommends.
6098 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
6099
6100 * src/complain.c (strerror_r): Remove decl; not needed.
6101 (strerror): Use same pattern as ../lib/error.c.
6102
6103 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
6104
6105 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
6106
6107 * src/main.c (main): Cast result of bindtextdomain and textdomain
6108 to void, to avoid a GCC warning when --disable-nls is in effect.
6109
6110 * src/scan-gram.l: Use strings rather than escapes when possible,
6111 to minimize the number of warnings from xgettext.
6112 (handle_action_dollar, handle_action_at): Don't use isdigit,
6113 as it mishandles negative chars and it may not work as expected
6114 outside the C locale.
6115
6116 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
6117 this is a GCC extension and is not portable to other compilers.
6118
6119 * src/system.h (alloca): Use same pattern as ../lib/error.c.
6120 Do not include <ctype.h>; no longer needed.
6121 Do not include <malloc.h>; no longer needed (and generates
6122 warnings on OpenBSD 3.0).
6123
6124 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
6125 it's not portable.
6126
6127 * tests/regression.at: Do not use 'cc -c input.c -o input';
6128 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
6129
6130 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
6131 exit status as failure, not just exit status 1. Sun C exits
6132 with status 2 sometimes.
6133
6134 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
6135 Use it for the two large tests.
6136
6137 2002-08-02 Akim Demaille <akim@epita.fr>
6138
6139 * src/conflicts.c (conflicts_output): Don't output rules never
6140 reduced here, since anyway that computation doesn't work.
6141 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
6142 (rule_useless_p, rule_never_reduced_p): New.
6143 (grammar_rules_partial_print): Use a filter instead of a range.
6144 Display the title only if needed.
6145 (grammar_rules_print): Adjust.
6146 (grammar_rules_never_reduced_report): New.
6147 * src/tables.c (action_row): Move the computation of rules never
6148 reduced to...
6149 (token_actions): here.
6150 * src/main.c (main): Make the parser before making the report, so
6151 that rules never reduced are computed.
6152 Call grammar_rules_never_reduced_report.
6153 * src/print.c (print_results): Report rules never reduced.
6154 * tests/conflicts.at, tests/reduce.at: Adjust.
6155
6156 2002-08-01 Akim Demaille <akim@epita.fr>
6157
6158 Instead of attaching lookaheads and duplicating the rules being
6159 reduced by a state, attach the lookaheads to the reductions.
6160
6161 * src/state.h (state_t): Remove the `lookaheads',
6162 `lookaheads_rule' member.
6163 (reductions_t): Add a `lookaheads' member.
6164 Use a regular array for the `rules'.
6165 * src/state.c (reductions_new): Initialize the lookaheads member
6166 to 0.
6167 (state_rule_lookaheads_print): Adjust.
6168 * src/state.h, src/state.c (state_reductions_find): New.
6169 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
6170 (count_rr_conflicts): Adjust.
6171 * src/lalr.c (LArule): Remove.
6172 (add_lookback_edge): Adjust.
6173 (state_lookaheads_count): New.
6174 (states_lookaheads_initialize): Merge into...
6175 (initialize_LA): this.
6176 (lalr_free): Adjust.
6177 * src/main.c (main): Don't free nullable and derives too early: it
6178 is used by --verbose.
6179 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
6180
6181 2002-08-01 Akim Demaille <akim@epita.fr>
6182
6183 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
6184 `rule_number_t**'.
6185 (set_derives, free_derives): Rename as...
6186 (derives_compute, derives_free): this.
6187 Adjust all dependencies.
6188 * src/nullable.c (set_nullable, free_nullable): Rename as...
6189 (nullable_compute, nullable_free): these.
6190 (rule_list_t): Store rule_t *, not rule_number_t.
6191 * src/state.c (state_rule_lookaheads_print): Directly compare rule
6192 pointers, instead of their numbers.
6193 * src/main.c (main): Call nullable_free, and derives_free earlier,
6194 as they were lo longer used.
6195
6196 2002-08-01 Akim Demaille <akim@epita.fr>
6197
6198 * lib/timevar.c (get_time): Include children time.
6199 * src/lalr.h (LA, LArule): Don't export them: used with the
6200 state_t.
6201 * src/lalr.c (LA, LArule): Static.
6202 * src/lalr.h, src/lalr.c (lalr_free): New.
6203 * src/main.c (main): Call it.
6204 * src/tables.c (pack_vector): Check whether loc is >= to the
6205 table_size, not >.
6206 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
6207 (tables_generate): do it, since that's also it which allocates
6208 them.
6209 Don't free LA and LArule, main does.
6210
6211 2002-07-31 Akim Demaille <akim@epita.fr>
6212
6213 Separate parser tables computation and output.
6214
6215 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
6216 (conflict_list, conflict_list_cnt, table, check, table_ninf)
6217 (yydefgoto, yydefact, high): Move to...
6218 * src/tables.h, src/tables.c: here.
6219 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6220 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6221 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
6222 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
6223 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
6224 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
6225 (action_row, save_row, token_actions, save_column, default_goto)
6226 (goto_actions, sort_actions, matching_state, pack_vector)
6227 (table_ninf_remap, pack_table, prepare_actions): Move to...
6228 * src/tables.c: here.
6229 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
6230 * src/output.c (token_actions, output_base, output_conflicts)
6231 (output_check): Merge into...
6232 (prepare_actions): this.
6233 (actions_output): Rename as...
6234 (user_actions_output): this.
6235 * src/main.c (main): Call tables_generate and tables_free.
6236
6237 2002-07-31 Akim Demaille <akim@epita.fr>
6238
6239 Steal GCC's --time-report support.
6240
6241 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
6242 stolen/adjusted from GCC.
6243 * m4/stage.m4: Remove time related checks.
6244 * m4/timevar.m4: New.
6245 * configure.in: Adjust.
6246 * src/system.h: Adjust to using timevar.h.
6247 * src/getargs.h, src/getargs.c: Support trace_time for
6248 --trace=time.
6249 * src/main.c (stage): Remove.
6250 (main): Replace `stage' invocations with timevar calls.
6251 * src/output.c: Insert pertinent timevar calls.
6252
6253 2002-07-31 Akim Demaille <akim@epita.fr>
6254
6255 Let --trace have arguments.
6256
6257 * src/getargs.h (enum trace_e): New.
6258 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
6259 (long_options, short_options): --trace/-T takes an optional
6260 argument.
6261 Change all the uses of trace_flag to reflect the new flags.
6262 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
6263
6264 Strengthen `stage' portability.
6265
6266 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
6267 * configure.in: Use it.
6268 Don't check for malloc.h and sys/times.h.
6269 * src/system.h: Include them when appropriate.
6270 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
6271 times and struct tms are available.
6272
6273 2002-07-30 Akim Demaille <akim@epita.fr>
6274
6275 In verbose parse error message, don't report `error' as an
6276 expected token.
6277 * tests/actions.at (Printers and Destructors): Adjust.
6278 * tests/calc.at (Calculator $1): Adjust.
6279 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
6280 error message, do not report the parser accepts the error token in
6281 that state.
6282
6283 2002-07-30 Akim Demaille <akim@epita.fr>
6284
6285 Normalize conflict related messages.
6286
6287 * src/complain.h, src/complain.c (warn, complain): New.
6288 * src/conflicts.c (conflicts_print): Use them.
6289 (conflict_report_yacc): New, extracted from...
6290 (conflicts_print): here.
6291 * tests/conflicts.at, tests/existing.at: Adjust.
6292
6293 2002-07-30 Akim Demaille <akim@epita.fr>
6294
6295 Report rules which are never reduced by the parser: those hidden
6296 by conflicts.
6297
6298 * src/LR0.c (save_reductions): Don't make the final state too
6299 different: save its reduction (accept) instead of having a state
6300 without any action (no shift or goto, no reduce).
6301 Note: the final state is now a ``regular'' state, i.e., the
6302 parsers now contain `reduce 0' as default reduction.
6303 Nevertheless, since they decide to `accept' when yystate =
6304 final_state, they still will not reduce rule 0.
6305 * src/print.c (print_actions, print_reduction): Adjust.
6306 * src/output.c (action_row): Track reduced rules.
6307 (token_actions): Report rules never reduced.
6308 * tests/conflicts.at, tests/regression.at: Adjust.
6309
6310 2002-07-30 Akim Demaille <akim@epita.fr>
6311
6312 `stage' was accidently included in a previous patch.
6313 Initiate its autoconfiscation.
6314
6315 * configure.in: Look for malloc.h and sys/times.h.
6316 * src/main.c (stage): Adjust.
6317 Report only when trace_flag.
6318
6319 2002-07-29 Akim Demaille <akim@epita.fr>
6320
6321 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
6322 state_number_t.
6323 (errs_t): symbol_t*, not symbol_number_t.
6324 (reductions_t): rule_t*, not rule_number_t.
6325 (FOR_EACH_SHIFT): New.
6326 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
6327 * src/print.c, src/print_graph.c: Adjust.
6328
6329 2002-07-29 Akim Demaille <akim@epita.fr>
6330
6331 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
6332
6333 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
6334 (endtoken, accept): these.
6335 * src/reader.c (reader): Set endtoken's default tag to "$end".
6336 Set undeftoken's tag to "$undefined" instead of "$undefined.".
6337 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
6338 Adjust.
6339
6340 2002-07-29 Akim Demaille <akim@epita.fr>
6341
6342 * src/reduce.c (reduce_grammar): When the language is empty,
6343 complain about the start symbol, not the axiom.
6344 Use its location.
6345 * tests/reduce.at (Empty Language): New.
6346
6347 2002-07-26 Akim Demaille <akim@epita.fr>
6348
6349 * src/reader.h, src/reader.c (gram_error): ... can't get
6350 yycontrol without making too strong assumptions on the parser
6351 itself.
6352 * src/output.c (prepare_tokens): Use the real 0th value of
6353 token_translations instead of `0'.
6354 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
6355 visible here.
6356 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
6357 for the time being: %locations ought to provide it to yyerror.
6358
6359 2002-07-25 Akim Demaille <akim@epita.fr>
6360
6361 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
6362 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
6363 * tests/regression.at (Web2c Actions): Adjust.
6364
6365 2002-07-25 Akim Demaille <akim@epita.fr>
6366
6367 Stop storing rules from 1 to nrules + 1.
6368
6369 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
6370 * src/nullable.c, src/output.c, src/print.c, src/reader.c
6371 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
6372 Iterate from 0 to nrules.
6373 Use rule_number_as_item_number and item_number_as_rule_number.
6374 Adjust to `derive' now containing possibly 0.
6375 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
6376 Handle the `- 1' part in rule numbers from/to item numbers.
6377 * src/conflicts.c (log_resolution): Fix the message which reversed
6378 shift and reduce.
6379 * src/output.c (action_row): Initialize default_rule to -1.
6380 (token_actions): Adjust.
6381 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
6382 expected output.
6383 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
6384
6385 2002-07-25 Akim Demaille <akim@epita.fr>
6386
6387 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
6388 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
6389 (b4_c_knr_arg_decl): New.
6390 * data/yacc.c: Use it to define yysymprint, yydestruct, and
6391 yyreport_parse_error.
6392
6393 2002-07-25 Akim Demaille <akim@epita.fr>
6394
6395 * data/yacc.c (yyreport_parse_error): New, extracted from...
6396 (yyparse): here.
6397 (yydestruct, yysymprint): Move above yyparse.
6398 Be K&R compliant.
6399
6400 2002-07-25 Akim Demaille <akim@epita.fr>
6401
6402 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
6403 replace...
6404 (b4_sint_type, b4_uint_type): these.
6405 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
6406 * tests/regression.at (Web2c Actions): Adjust.
6407
6408 2002-07-25 Akim Demaille <akim@epita.fr>
6409
6410 * src/gram.h (TIEM_NUMBER_MAX): New.
6411 (item_number_of_rule_number, rule_number_of_item_number): Rename
6412 as...
6413 (rule_number_as_item_number, item_number_as_rule_number): these.
6414 Adjust dependencies.
6415 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6416 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6417 (symbol_number_to_vector_number): New.
6418 (order): Of vector_number_t* type.
6419 (base_t, BASE_MAX, BASE_MIN): New.
6420 (froms, tos, width, pos, check): Of base_t type.
6421 (action_number_t, ACTION_MIN, ACTION_MAX): New.
6422 (actrow): Of action_number_t type.
6423 (conflrow): Of unsigned int type.
6424 (table_ninf, base_ninf): New.
6425 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
6426 (muscle_insert_int_table, muscle_insert_base_table)
6427 (muscle_insert_rule_number_table): New.
6428 (prepare_tokens): Output `toknum' as int_table.
6429 (action_row): Returns a rule_number_t.
6430 Use ACTION_MIN, not SHRT_MIN.
6431 (token_actions): yydefact is rule_number_t*.
6432 (table_ninf_remap): New.
6433 (pack_table): Use it for `base' and `table'.
6434 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
6435 replaced with...
6436 (YYPACT_NINF, YYTABLE_NINF): these.
6437 (yypact, yytable): Compute their types instead of hard-coded
6438 `short'.
6439 * tests/regression.at (Web2c Actions): Adjust.
6440
6441 2002-07-19 Akim Demaille <akim@epita.fr>
6442
6443 * src/scan-gram.l (id): Can start with an underscore.
6444
6445 2002-07-16 Akim Demaille <akim@epita.fr>
6446
6447 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
6448 Adjust all former `associativity' dependencies.
6449 * src/symtab.c (symbol_new): Default associativity is `undef', not
6450 `right'.
6451 (symbol_check_alias_consistence): Adjust.
6452
6453 2002-07-09 Akim Demaille <akim@epita.fr>
6454
6455 * doc/bison.texinfo: Properly set the ``header'' part.
6456 Use @dircategory ``GNU programming tools'' as per Texinfo's
6457 documentation.
6458 Use @copying.
6459
6460 2002-07-09 Akim Demaille <akim@epita.fr>
6461
6462 * lib/quotearg.h: Protect against multiple inclusions.
6463 * src/location.h (location_t): Add a `file' member.
6464 (LOCATION_RESET, LOCATION_PRINT): Adjust.
6465 * src/complain.c (warn_at, complain_at, fatal_at): Drop
6466 `error_one_per_line' support.
6467
6468 2002-07-09 Akim Demaille <akim@epita.fr>
6469
6470 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
6471 * src/reader.c (lineno): Remove.
6472 Adjust all dependencies.
6473 (get_merge_function): Take a location and use complain_at.
6474 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
6475 * tests/regression.at (Invalid inputs, Mixing %token styles):
6476 Adjust.
6477
6478 2002-07-09 Akim Demaille <akim@epita.fr>
6479
6480 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
6481 recovery rule, and forbid extensions when --yacc.
6482 (gram_error): Use complain_at.
6483 * src/reader.c (reader): Exit if there were parse errors.
6484
6485 2002-07-09 Akim Demaille <akim@epita.fr>
6486
6487 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
6488 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
6489 Reported by R Blake <blakers@mac.com>.
6490
6491 2002-07-09 Akim Demaille <akim@epita.fr>
6492
6493 * data/yacc.c: Output the copyright notive in the header.
6494
6495 2002-07-03 Akim Demaille <akim@epita.fr>
6496
6497 * src/output.c (froms, tos): Are state_number_t.
6498 (save_column): sp, sp1, and sp2 are state_number_t.
6499 (prepare): Rename `final' as `final_state_number', `nnts' as
6500 `nterms_number', `nrules' as `rules_number', `nstates' as
6501 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
6502 unused.
6503 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
6504 * data/lalr1.cc (nsym_): Remove, unused.
6505
6506 2002-07-03 Akim Demaille <akim@epita.fr>
6507
6508 * src/lalr.h, src/lalr.c (goto_number_t): New.
6509 * src/lalr.c (goto_list_t): New.
6510 Propagate them.
6511 * src/nullable.c (rule_list_t): New.
6512 Propagate.
6513 * src/types.h: Remove.
6514
6515 2002-07-03 Akim Demaille <akim@epita.fr>
6516
6517 * src/closure.c (print_fderives): Use rule_rhs_print.
6518 * src/derives.c (print_derives): Use rule_rhs_print.
6519 (rule_list_t): New, replaces `shorts'.
6520 (set_derives): Add comments.
6521 * tests/sets.at (Nullable, Firsts): Adjust.
6522
6523 2002-07-03 Akim Demaille <akim@epita.fr>
6524
6525 * src/output.c (prepare_actions): Free `tally' and `width'.
6526 (prepare_actions): Allocate and free `order'.
6527 * src/symtab.c (symbols_free): Free `symbols'.
6528 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
6529 * src/output.c (m4_invoke): Move to...
6530 * src/scan-skel.l: here.
6531 (<<EOF>>): Close yyout, and free its name.
6532
6533 2002-07-03 Akim Demaille <akim@epita.fr>
6534
6535 Fix some memory leaks, and fix a bug: state 0 was examined twice.
6536
6537 * src/LR0.c (new_state): Merge into...
6538 (state_list_append): this.
6539 (new_states): Merge into...
6540 (generate_states): here.
6541 (set_states): Don't ensure a proper `errs' state member here, do it...
6542 * src/conflicts.c (conflicts_solve): here.
6543 * src/state.h, src/state.c: Comment changes.
6544 (state_t): Rename member `shifts' as `transitions'.
6545 Adjust all dependencies.
6546 (errs_new): For consistency, also take the values as argument.
6547 (errs_dup): Remove.
6548 (state_errs_set): New.
6549 (state_reductions_set, state_transitions_set): Assert that no
6550 previous value was assigned.
6551 (state_free): New.
6552 (states_free): Use it.
6553 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
6554 temporary storage: use `errs' and `nerrs' as elsewhere.
6555 (set_conflicts): Allocate and free this `errs'.
6556
6557 2002-07-02 Akim Demaille <akim@epita.fr>
6558
6559 * lib/libiberty.h: New.
6560 * lib: Update the bitset implementation from upstream.
6561 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
6562 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
6563 * src/main.c: Adjust bitset stats calls.
6564
6565 2002-07-01 Paul Eggert <eggert@twinsun.com>
6566
6567 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
6568 char, so that negative chars don't collide with $.
6569
6570 2002-06-30 Akim Demaille <akim@epita.fr>
6571
6572 Have the GLR tests be `warning' checked, and fix the warnings.
6573
6574 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
6575 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
6576 (yyremoveDeletes): `yyi' and `yyj' are size_t.
6577 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
6578 (yyaddDeferredAction): static.
6579 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
6580 (yyreportParseError): yyprefix is const.
6581 yytokenp is used only when verbose.
6582 (yy__GNUC__): Replace with __GNUC__.
6583 (yypdumpstack): yyi is size_t.
6584 (yypreference): Un-yy local variables and arguments, to avoid
6585 clashes with `yyr1'. Anyway, we are not in the user name space.
6586 (yytname_size): be an int, as is compared with ints.
6587 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
6588 Use them.
6589 * tests/cxx-gram.at: Use quotation to protect $1.
6590 Use AT_COMPILE to enable warnings hunts.
6591 Prototype yylex and yyerror.
6592 `Use' argc.
6593 Include `string.h', not `strings.h'.
6594 Produce and prototype stmtMerge only when used.
6595 yylex takes a location.
6596
6597 2002-06-30 Akim Demaille <akim@epita.fr>
6598
6599 We spend a lot of time in quotearg, in particular when --verbose.
6600
6601 * src/symtab.c (symbol_get): Store a quoted version of the key.
6602 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
6603 Adjust all callers.
6604
6605 2002-06-30 Akim Demaille <akim@epita.fr>
6606
6607 * src/state.h (reductions_t): Rename member `nreds' as num.
6608 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
6609 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
6610
6611 2002-06-30 Akim Demaille <akim@epita.fr>
6612
6613 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
6614 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
6615 (shifts_to): Rename as...
6616 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
6617 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
6618 (TRANSITION_IS_DISABLED, transitions_to): these.
6619
6620 2002-06-30 Akim Demaille <akim@epita.fr>
6621
6622 * src/print.c (print_shifts, print_gotos): Merge into...
6623 (print_transitions): this.
6624 (print_transitions, print_errs, print_reductions): Align the
6625 lookaheads columns.
6626 (print_core, print_transitions, print_errs, print_state,
6627 print_grammar): Output empty lines separator before, not after.
6628 (state_default_rule_compute): Rename as...
6629 (state_default_rule): this.
6630 * tests/conflicts.at (Defaulted Conflicted Reduction),
6631 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
6632 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
6633
6634 2002-06-30 Akim Demaille <akim@epita.fr>
6635
6636 Display items as we display rules.
6637
6638 * src/gram.h, src/gram.c (rule_lhs_print): New.
6639 * src/gram.c (grammar_rules_partial_print): Use it.
6640 * src/print.c (print_core): Likewise.
6641 * tests/conflicts.at (Defaulted Conflicted Reduction),
6642 (Unresolved SR Conflicts): Adjust.
6643 (Unresolved SR Conflicts): Adjust and rename as...
6644 (Resolved SR Conflicts): this, as was meant.
6645 * tests/regression.at (Web2c Report): Adjust.
6646
6647 2002-06-30 Akim Demaille <akim@epita.fr>
6648
6649 * src/print.c (state_default_rule_compute): New, extracted from...
6650 (print_reductions): here.
6651 Pessimize, but clarify the code.
6652 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
6653
6654 2002-06-30 Akim Demaille <akim@epita.fr>
6655
6656 * src/output.c (action_row): Let default_rule be always a rule
6657 number.
6658
6659 2002-06-30 Akim Demaille <akim@epita.fr>
6660
6661 * src/closure.c (print_firsts, print_fderives, closure):
6662 Use BITSET_EXECUTE.
6663 * src/lalr.c (lookaheads_print): Likewise.
6664 * src/state.c (state_rule_lookaheads_print): Likewise.
6665 * src/print_graph.c (print_core): Likewise.
6666 * src/print.c (print_reductions): Likewise.
6667 * src/output.c (action_row): Likewise.
6668 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
6669
6670 2002-06-30 Akim Demaille <akim@epita.fr>
6671
6672 * src/print_graph.c: Use report_flag.
6673
6674 2002-06-30 Akim Demaille <akim@epita.fr>
6675
6676 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
6677 to...
6678 * src/relation.h, src/relation.c (traverse, relation_digraph)
6679 (relation_print, relation_transpose): New.
6680
6681 2002-06-30 Akim Demaille <akim@epita.fr>
6682
6683 * src/state.h, src/state.c (shifts_to): New.
6684 * src/lalr.c (build_relations): Use it.
6685
6686 2002-06-30 Akim Demaille <akim@epita.fr>
6687
6688 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
6689 (item_number_of_rule_number, rule_number_of_item_number): New.
6690 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
6691 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
6692 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
6693 Propagate their use.
6694 Much remains to be done, in particular wrt `shorts' from types.h.
6695
6696 2002-06-30 Akim Demaille <akim@epita.fr>
6697
6698 * src/symtab.c (symbol_new): Initialize the `printer' member.
6699
6700 2002-06-30 Akim Demaille <akim@epita.fr>
6701
6702 * src/LR0.c (save_reductions): Remove, replaced by...
6703 * src/state.h, src/state.c (state_reductions_set): New.
6704 (reductions, errs): Rename as...
6705 (reductions_t, errs_t): these.
6706 Adjust all dependencies.
6707
6708 2002-06-30 Akim Demaille <akim@epita.fr>
6709
6710 * src/LR0.c (state_list_t, state_list_append): New.
6711 (first_state, last_state): Now symbol_list_t.
6712 (this_state): Remove.
6713 (new_itemsets, append_states, save_reductions): Take a state_t as
6714 argument.
6715 (set_states, generate_states): Adjust.
6716 (save_shifts): Remove, replaced by...
6717 * src/state.h, src/state.c (state_shifts_set): New.
6718 (shifts): Rename as...
6719 (shifts_t): this.
6720 Adjust all dependencies.
6721 * src/state.h (state_t): Remove the `next' member.
6722
6723 2002-06-30 Akim Demaille <akim@epita.fr>
6724
6725 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
6726 escaped in slot 0.
6727
6728 2002-06-30 Akim Demaille <akim@epita.fr>
6729
6730 Use hash.h for the state hash table.
6731
6732 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
6733 (allocate_storage): Use state_hash_new.
6734 (free_storage): Use state_hash_free.
6735 (new_state, get_state): Adjust.
6736 * src/lalr.h, src/lalr.c (states): Move to...
6737 * src/states.h (state_t): Remove the `link' member, no longer
6738 used.
6739 * src/states.h, src/states.c: here.
6740 (state_hash_new, state_hash_free, state_hash_lookup)
6741 (state_hash_insert, states_free): New.
6742 * src/states.c (state_table, state_compare, state_hash): New.
6743 * src/output.c (output_actions): Do not free states now, since we
6744 still need to know the final_state number in `prepare', called
6745 afterwards. Do it...
6746 * src/main.c (main): here: call states_free after `output'.
6747
6748 2002-06-30 Akim Demaille <akim@epita.fr>
6749
6750 * src/state.h, src/state.c (state_new): New, extracted from...
6751 * src/LR0.c (new_state): here.
6752 * src/state.h (STATE_ALLOC): Move to...
6753 * src/state.c: here.
6754 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
6755 * src/state.h, src/state.c: here.
6756
6757 2002-06-30 Akim Demaille <akim@epita.fr>
6758
6759 * src/reader.c (gensym): Rename as...
6760 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
6761 (getsym): Rename as...
6762 (symbol_get): this.
6763
6764 2002-06-30 Akim Demaille <akim@epita.fr>
6765
6766 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
6767 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
6768 * src/output.c, src/print.c, src/print_graph.c: Propagate.
6769 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
6770
6771 2002-06-30 Akim Demaille <akim@epita.fr>
6772
6773 Make the test suite pass with warnings checked.
6774
6775 * tests/actions.at (Printers and Destructors): Improve.
6776 Avoid unsigned vs. signed issues.
6777 * tests/calc.at: Don't exercise the scanner here, do it...
6778 * tests/input.at (Torturing the Scanner): here.
6779
6780 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6781
6782 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
6783 reorganize first lines parallel to yacc.c.
6784
6785 2002-06-28 Akim Demaille <akim@epita.fr>
6786
6787 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
6788 (b4_token_enum, b4_token_defines): New, factored from...
6789 * data/lalr1.cc, data/yacc.c, glr.c: here.
6790
6791 2002-06-28 Akim Demaille <akim@epita.fr>
6792
6793 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
6794 unused variables.
6795 * src/output.c (merger_output): static.
6796
6797 2002-06-28 Akim Demaille <akim@epita.fr>
6798
6799 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
6800 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
6801 pacify GCC.
6802 * src/output.c (save_row): Initialize all the variables to pacify GCC.
6803
6804 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6805
6806 Accumulated changelog for new GLR parsing features.
6807
6808 * src/conflicts.c (count_total_conflicts): Change name to
6809 conflicts_total_count.
6810 * src/conflicts.h: Ditto.
6811 * src/output.c (token_actions): Use the new name.
6812 (output_conflicts): Change conflp => conflict_list_heads, and
6813 confl => conflict_list for better readability.
6814 * data/glr.c: Use the new names.
6815 * NEWS: Add self to GLR announcement.
6816
6817 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
6818
6819 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
6820 Akim Demaille.
6821
6822 * data/bison.glr: Change name to glr.c
6823 * data/glr.c: Renamed from bison.glr.
6824 * data/Makefile.am: Add glr.c
6825
6826 * src/getargs.c:
6827
6828 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
6829 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
6830
6831 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6832
6833 * data/bison.glr: Be sure to restore the
6834 current #line when returning to the skeleton contents after having
6835 exposed the input file's #line.
6836
6837 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6838
6839 * data/bison.glr: Bring up to date with changes to bison.simple.
6840
6841 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6842
6843 * data/bison.glr: Correct definitions that use b4_prefix.
6844 Various reformatting.
6845 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
6846 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
6847 yytokenp argument; now part of stack.
6848 (yychar): Define to behave as documented.
6849 (yyclearin): Ditto.
6850
6851 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6852
6853 * src/reader.h: Add declaration for free_merger_functions.
6854
6855 * src/reader.c (merge_functions): New variable.
6856 (get_merge_function): New function.
6857 (free_merger_functions): New function.
6858 (readgram): Check for %prec that is not followed by a symbol.
6859 Handle %dprec and %merge declarations.
6860 (packgram): Initialize dprec and merger fields in rules array.
6861
6862 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
6863 conflict_list_cnt, conflict_list_free): New variables.
6864 (table_grow): Also grow conflict_table.
6865 (prepare_rules): Output dprec and merger tables.
6866 (conflict_row): New function.
6867 (action_row): Output conflict lists for GLR parser. Don't use
6868 default reduction in conflicted states for GLR parser so that there
6869 are spaces for the conflict lists.
6870 (save_row): Also save conflict information.
6871 (token_actions): Allocate conflict list.
6872 (merger_output): New function.
6873 (pack_vector): Pack conflict table, too.
6874 (output_conflicts): New function to output yyconflp and yyconfl.
6875 (output_check): Allocate conflict_tos.
6876 (output_actions): Output conflict tables, also.
6877 (output_skeleton): Output b4_mergers definition.
6878 (prepare): Output b4_max_rhs_length definition.
6879 Use 'bison.glr' as default skeleton for GLR parsers.
6880
6881 * src/gram.c (glr_parser): New flag.
6882 (grammar_free): Call free_merger_functions.
6883
6884 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
6885 all pairs of conflicting reductions, rather than just all tokens
6886 causing conflicts. Needed to size conflict tables.
6887 (conflicts_output): Modify call to count_rr_conflicts for new
6888 interface.
6889 (conflicts_print): Ditto.
6890 (count_total_conflicts): New function.
6891
6892 * src/reader.h (merger_list): New type.
6893 (merge_functions): New variable.
6894
6895 * src/lex.h (tok_dprec, tok_merge): New token types.
6896
6897 * src/gram.h (rule_s): Add dprec and merger fields.
6898 (glr_parser): New flag.
6899
6900 * src/conflicts.h (count_total_conflicts): New function.
6901
6902 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
6903
6904 * doc/bison.texinfo (Generalized LR Parsing): New section.
6905 (GLR Parsers): New section.
6906 (Language and Grammar): Mention GLR parsing.
6907 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
6908 Correct typo ("tge" -> "the").
6909
6910 * data/bison.glr: New skeleton for GLR parsing.
6911
6912 * tests/cxx-gram.at: New tests for GLR parsing.
6913
6914 * tests/testsuite.at: Include cxx-gram.at.
6915
6916 * tests/Makefile.am: Add cxx-gram.at.
6917
6918 * src/parse-gram.y:
6919
6920 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
6921
6922 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
6923
6924 2002-06-27 Akim Demaille <akim@epita.fr>
6925
6926 * src/options.h, src/options.c: Remove.
6927 * src/getargs.c (short_options, long_options): New.
6928
6929 2002-06-27 Akim Demaille <akim@epita.fr>
6930
6931 * data/bison.simple, data/bison.c++: Rename as...
6932 * data/yacc.c, data/lalr1.cc: these.
6933 * doc/bison.texinfo (Environment Variables): Remove.
6934
6935 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
6936
6937 * src/getargs.c (report_argmatch): Initialize strtok().
6938
6939 2002-06-20 Akim Demaille <akim@epita.fr>
6940
6941 * data/bison.simple (b4_symbol_actions): New, replaces...
6942 (b4_symbol_destructor, b4_symbol_printer): these.
6943 (yysymprint): Be sure to call YYPRINT only for tokens, and using
6944 user token numbers.
6945
6946 2002-06-20 Akim Demaille <akim@epita.fr>
6947
6948 * data/bison.simple (yydestructor): Rename as...
6949 (yydestruct): this.
6950
6951 2002-06-20 Akim Demaille <akim@epita.fr>
6952
6953 * src/symtab.h, src/symtab.c (symbol_type_set)
6954 (symbol_destructor_set, symbol_precedence_set): The location is
6955 the last argument.
6956 Adjust all callers.
6957
6958 2002-06-20 Akim Demaille <akim@epita.fr>
6959
6960 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
6961 internals.
6962 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
6963 Takes a location.
6964 * src/symtab.h, src/symtab.c (symbol_class_set)
6965 (symbol_user_token_number_set): Likewise.
6966 Adjust all callers.
6967 Promote complain_at.
6968 * tests/input.at (Type Clashes): Adjust.
6969
6970 2002-06-20 Akim Demaille <akim@epita.fr>
6971
6972 * data/bison.simple (YYLEX): Fix the declaration when
6973 %pure-parser.
6974
6975 2002-06-20 Akim Demaille <akim@epita.fr>
6976
6977 * data/bison.simple (yysymprint): Don't print the token number,
6978 just its name.
6979 * tests/actions.at (Destructors): Rename as...
6980 (Printers and Destructors): this.
6981 Also exercise %printer.
6982
6983 2002-06-20 Akim Demaille <akim@epita.fr>
6984
6985 * data/bison.simple (YYDSYMPRINT): New.
6986 Use it to remove many of the #if YYDEBUG/if (yydebug).
6987
6988 2002-06-20 Akim Demaille <akim@epita.fr>
6989
6990 * src/symtab.h, src/symtab.c (symbol_t): printer and
6991 printer_location are new members.
6992 (symbol_printer_set): New.
6993 * src/parse-gram.y (PERCENT_PRINTER): New token.
6994 Handle its associated rule.
6995 * src/scan-gram.l: Adjust.
6996 (handle_destructor_at, handle_destructor_dollar): Rename as...
6997 (handle_symbol_code_at, handle_symbol_code_dollar): these.
6998 * src/output.c (symbol_printers_output): New.
6999 (output_skeleton): Call it.
7000 * data/bison.simple (yysymprint): New. Cannot be named yyprint
7001 since there are already many grammar files with a user `yyprint'.
7002 Replace the calls to YYPRINT to calls to yysymprint.
7003 * tests/calc.at: Adjust.
7004 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
7005 taking advantage of parser very internal details (stack size!).
7006
7007 2002-06-20 Akim Demaille <akim@epita.fr>
7008
7009 * src/scan-gram.l: Complete the scanner with the missing patterns
7010 to pacify Flex.
7011 Use `quote' and `symbol_tag_get' where appropriate.
7012
7013 2002-06-19 Akim Demaille <akim@epita.fr>
7014
7015 * tests/actions.at (Destructors): Augment to test locations.
7016 * data/bison.simple (yydestructor): Pass it the current location
7017 if locations are enabled.
7018 Prototype only when __STDC__ or C++.
7019 Change the argument names to move into the yy name space: there is
7020 user code here.
7021
7022 2002-06-19 Akim Demaille <akim@epita.fr>
7023
7024 * data/bison.simple (b4_pure_if): New.
7025 Use it instead of #ifdef YYPURE.
7026
7027 2002-06-19 Akim Demaille <akim@epita.fr>
7028
7029 * data/bison.simple (b4_location_if): New.
7030 Use it instead of #ifdef YYLSP_NEEDED.
7031
7032 2002-06-19 Akim Demaille <akim@epita.fr>
7033
7034 Prepare @$ in %destructor, but currently don't bind it in the
7035 skeleton, as %location use is not cleaned up yet.
7036
7037 * src/scan-gram.l (handle_dollar, handle_destructor_at)
7038 (handle_action_at): New.
7039 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
7040 a braced_code_t and a location as additional arguments.
7041 (handle_destructor_dollar): Instead of requiring `b4_eval', just
7042 unquote one when outputting `b4_dollar_dollar'.
7043 Adjust callers.
7044 * data/bison.simple (b4_eval): Remove.
7045 (b4_symbol_destructor): Adjust.
7046 * tests/input.at (Invalid @n): Adjust.
7047
7048 2002-06-19 Zack Weinberg <zack@codesourcery.com>
7049
7050 * doc/bison.texinfo: Document ability to have multiple
7051 prologue sections.
7052
7053 2002-06-18 Akim Demaille <akim@epita.fr>
7054
7055 * src/files.c (compute_base_names): When computing the output file
7056 names from the input file name, strip the directory part.
7057
7058 2002-06-18 Akim Demaille <akim@epita.fr>
7059
7060 * data/bison.simple.new: Comment changes.
7061 Reported by Andreas Schwab.
7062
7063 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
7064
7065 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
7066 there are no `label `yyoverflowlab' defined but not used' warnings
7067 when yyoverflow is defined.
7068
7069 2002-06-18 Akim Demaille <akim@epita.fr>
7070
7071 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
7072 new member.
7073 (symbol_destructor_set): Adjust.
7074 * src/output.c (symbol_destructors_output): Output the destructor
7075 locations.
7076 Output the symbol name.
7077 * data/bison.simple (b4_symbol_destructor): Adjust.
7078
7079 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
7080 and Akim Demaille <akim@epita.fr>
7081
7082 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
7083 what's left on the stack when the error recovery hits EOF.
7084 * tests/actions.at (Destructors): Complete to exercise this case.
7085
7086 2002-06-17 Akim Demaille <akim@epita.fr>
7087
7088 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
7089 arguments is really empty, not only equal to `[]'.
7090 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
7091 member.
7092 (symbol_destructor_set): New.
7093 * src/output.c (symbol_destructors_output): New.
7094 * src/reader.h (brace_code_t, current_braced_code): New.
7095 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
7096 (handle_dollar): Rename as...
7097 (handle_action_dollar): this.
7098 (handle_destructor_dollar): New.
7099 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
7100 (grammar_declaration): Use it.
7101 * data/bison.simple (yystos): Is always defined.
7102 (yydestructor): New.
7103 * tests/actions.at (Destructors): New.
7104 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
7105
7106 2002-06-17 Akim Demaille <akim@epita.fr>
7107
7108 * src/symlist.h, src/symlist.c (symbol_list_length): New.
7109 * src/scan-gram.l (handle_dollar, handle_at): Compute the
7110 rule_length only when needed.
7111 * src/output.c (actions_output, token_definitions_output): Output
7112 the full M4 block.
7113 * src/symtab.c: Don't access directly to the symbol tag, use
7114 symbol_tag_get.
7115 * src/parse-gram.y: Use symbol_list_free.
7116
7117 2002-06-17 Akim Demaille <akim@epita.fr>
7118
7119 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
7120 (symbol_list_prepend, get_type_name): Move to...
7121 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
7122 (symbol_list_prepend, symbol_list_n_type_name_get): here.
7123 Adjust all callers.
7124 (symbol_list_free): New.
7125 * src/scan-gram.l (handle_dollar): Takes a location.
7126 * tests/input.at (Invalid $n): Adjust.
7127
7128 2002-06-17 Akim Demaille <akim@epita.fr>
7129
7130 * src/reader.h, src/reader.c (symbol_list_new): Export it.
7131 (symbol_list_prepend): New.
7132 * src/parse-gram.y (%union): `list' is a new member.
7133 (symbols.1): New, replaces...
7134 (terms_to_prec.1, nterms_to_type.1): these.
7135 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
7136 Take a location as additional argument.
7137 Adjust all callers.
7138
7139 2002-06-15 Akim Demaille <akim@epita.fr>
7140
7141 * src/parse-gram.y: Move %token in the declaration section so that
7142 we don't depend upon CVS Bison.
7143
7144 2002-06-15 Akim Demaille <akim@epita.fr>
7145
7146 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
7147 * src/print.c (print_core): Use it.
7148
7149 2002-06-15 Akim Demaille <akim@epita.fr>
7150
7151 * src/conflicts.c (log_resolution): Accept the rule involved in
7152 the sr conflicts instead of the lookahead number that points to
7153 that rule.
7154 (flush_reduce): Accept the current lookahead vector as argument,
7155 instead of the index in LA.
7156 (resolve_sr_conflict): Accept the current number of lookahead
7157 bitset to consider for the STATE, instead of the index in LA.
7158 (set_conflicts): Adjust.
7159 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
7160
7161 2002-06-15 Akim Demaille <akim@epita.fr>
7162
7163 * src/state.h (state_t): Replace the `lookaheadsp' member, a
7164 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
7165 Adjust all dependencies.
7166 * src/lalr.c (initialize_lookaheads): Split into...
7167 (states_lookaheads_count, states_lookaheads_initialize): these.
7168 (lalr): Adjust.
7169
7170 2002-06-15 Akim Demaille <akim@epita.fr>
7171
7172 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
7173 out of...
7174 (grammar_rules_print): here.
7175 * src/reduce.c (reduce_output): Use it.
7176 * tests/reduce.at (Useless Rules, Reduced Automaton)
7177 (Underivable Rules): Adjust.
7178
7179 2002-06-15 Akim Demaille <akim@epita.fr>
7180
7181 Copy BYacc's nice way to report the grammar.
7182
7183 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
7184 New.
7185 Don't print the rules' location, it is confusing and useless.
7186 (rule_print): Use grammar_rhs_print.
7187 * src/print.c (print_grammar): Use grammar_rules_print.
7188
7189 2002-06-15 Akim Demaille <akim@epita.fr>
7190
7191 Complete and rationalize `useless thing' warnings.
7192
7193 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
7194 (symbol_tag_print): New.
7195 Use them everywhere in place of accessing directly the tag member.
7196 * src/gram.h, src/gram.c (rule_print): New.
7197 Use it where a rule used to be printed `by hand'.
7198 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
7199 (reduce_grammar_tables): Report the useless rules.
7200 (reduce_print): Useless things are a warning, not an error.
7201 Report it as such.
7202 * tests/reduce.at (Useless Nonterminals, Useless Rules):
7203 (Reduced Automaton, Underivable Rules): Adjust.
7204 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
7205 * tests/conflicts.at (Unresolved SR Conflicts)
7206 (Solved SR Conflicts): Adjust.
7207
7208 2002-06-15 Akim Demaille <akim@epita.fr>
7209
7210 Let symbols have a location.
7211
7212 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
7213 (getsym): Adjust.
7214 Adjust all callers.
7215 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
7216 Use location_t, not int.
7217 * src/symtab.c (symbol_check_defined): Take advantage of the
7218 location.
7219 * tests/regression.at (Invalid inputs): Adjust.
7220
7221 2002-06-15 Akim Demaille <akim@epita.fr>
7222
7223 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
7224 (input): Don't try to initialize yylloc here, do it in the
7225 scanner.
7226 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
7227 * src/gram.h (rule_t): Change line and action_line into location
7228 and action_location, of location_t type.
7229 Adjust all dependencies.
7230 * src/location.h, src/location.c (empty_location): New.
7231 * src/reader.h, src/reader.c (grammar_start_symbol_set)
7232 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
7233 (grammar_current_rule_symbol_append)
7234 (grammar_current_rule_action_append): Expect a location as argument.
7235 * src/reader.c (grammar_midrule_action): Adjust to attach an
7236 action's location as dummy symbol location.
7237 * src/symtab.h, src/symtab.c (startsymbol_location): New.
7238 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
7239 the line numbers.
7240
7241 2002-06-14 Akim Demaille <akim@epita.fr>
7242
7243 Grammar declarations may be found in the grammar section.
7244
7245 * src/parse-gram.y (rules_or_grammar_declaration): New.
7246 (declarations): Each declaration may end with a semicolon, not
7247 just...
7248 (grammar_declaration): `"%union"'.
7249 (grammar): Branch to rules_or_grammar_declaration.
7250
7251 2002-06-14 Akim Demaille <akim@epita.fr>
7252
7253 * src/main.c (main): Invoke scanner_free.
7254
7255 2002-06-14 Akim Demaille <akim@epita.fr>
7256
7257 * src/output.c (m4_invoke): Extracted from...
7258 (output_skeleton): here.
7259 Free tempfile.
7260
7261 2002-06-14 Akim Demaille <akim@epita.fr>
7262
7263 * src/parse-gram.y (directives, directive, gram)
7264 (grammar_directives, precedence_directives, precedence_directive):
7265 Rename as...
7266 (declarations, declaration, grammar, grammar_declaration)
7267 (precedence_declaration, precedence_declarator): these.
7268 (symbol_declaration): New.
7269
7270 2002-06-14 Akim Demaille <akim@epita.fr>
7271
7272 * src/files.c (action_obstack): Remove, unused.
7273 (output_obstack): Remove it, and all its dependencies, as it is no
7274 longer needed.
7275 * src/reader.c (epilogue_set): Build the epilogue in the
7276 muscle_obstack.
7277 * src/output.h, src/output.c (muscle_obstack): Move to...
7278 * src/muscle_tab.h, src/muscle_tab.h: here.
7279 (muscle_init): Initialize muscle_obstack.
7280 (muscle_free): New.
7281 * src/main.c (main): Call it.
7282
7283 2002-06-14 Akim Demaille <akim@epita.fr>
7284
7285 * src/location.h: New, extracted from...
7286 * src/reader.h: here.
7287 * src/Makefile.am (noinst_HEADERS): Merge into
7288 (bison_SOURCES): this.
7289 Add location.h.
7290 * src/parse-gram.y: Use location_t instead of Bison's.
7291 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
7292 Use location_t instead of ints.
7293
7294 2002-06-14 Akim Demaille <akim@epita.fr>
7295
7296 * data/bison.simple, data/bison.c++: Be sure to restore the
7297 current #line when returning to the skeleton contents after having
7298 exposed the input file's #line.
7299
7300 2002-06-12 Akim Demaille <akim@epita.fr>
7301
7302 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
7303 eager.
7304 * tests/actions.at (Exotic Dollars): New.
7305
7306 2002-06-12 Akim Demaille <akim@epita.fr>
7307
7308 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
7309 ['"/] too eagerly.
7310 * tests/input.at (Torturing the Scanner): New.
7311
7312 2002-06-11 Akim Demaille <akim@epita.fr>
7313
7314 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
7315 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
7316 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
7317 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
7318 * src/reader.c (reader): Use it.
7319
7320 2002-06-11 Akim Demaille <akim@epita.fr>
7321
7322 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
7323 Adjust all callers.
7324 (scanner_last_string_free): New.
7325
7326 2002-06-11 Akim Demaille <akim@epita.fr>
7327
7328 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
7329 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
7330 (last_string, YY_OBS_FREE): New.
7331 Use them when returning an ID.
7332
7333 2002-06-11 Akim Demaille <akim@epita.fr>
7334
7335 Have Bison grammars parsed by a Bison grammar.
7336
7337 * src/reader.c, src/reader.h (prologue_augment): New.
7338 * src/reader.c (copy_definition): Remove.
7339
7340 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
7341 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
7342 (grammar_current_rule_prec_set, grammar_current_rule_check)
7343 (grammar_current_rule_symbol_append)
7344 (grammar_current_rule_action_append): Export.
7345 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
7346 (symbol_list_action_append): Remove.
7347 Hook the routines from reader.
7348 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
7349 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
7350
7351 * src/reader.c (read_declarations): Remove, unused.
7352
7353 * src/parse-gram.y: Handle the epilogue.
7354 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
7355 (grammar_start_symbol_set): this.
7356 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
7357 * src/reader.c (readgram): Remove, unused.
7358 (reader): Adjust to insert eoftoken and axiom where appropriate.
7359
7360 * src/reader.c (copy_dollar): Replace with...
7361 * src/scan-gram.h (handle_dollar): this.
7362 * src/parse-gram.y: Remove `%thong'.
7363
7364 * src/reader.c (copy_at): Replace with...
7365 * src/scan-gram.h (handle_at): this.
7366
7367 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
7368 New.
7369
7370 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
7371 time being.
7372
7373 * src/reader.h, src/reader.c (grammar_rule_end): New.
7374
7375 * src/parse.y (current_type, current_class): New.
7376 Implement `%nterm', `%token' support.
7377 Merge `%term' into `%token'.
7378 (string_as_id): New.
7379 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
7380 type name.
7381
7382 * src/parse-gram.y: Be sure to handle properly the beginning of
7383 rules.
7384
7385 * src/parse-gram.y: Handle %type.
7386 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
7387
7388 * src/parse-gram.y: More directives support.
7389 * src/options.c: No longer handle source directives.
7390
7391 * src/parse-gram.y: Fix %output.
7392
7393 * src/parse-gram.y: Handle %union.
7394 Use the prologue locations.
7395 * src/reader.c (parse_union_decl): Remove.
7396
7397 * src/reader.h, src/reader.c (epilogue_set): New.
7398 * src/parse-gram.y: Use it.
7399
7400 * data/bison.simple, data/bison.c++: b4_stype is now either not
7401 defined, then default to int, or to the contents of %union,
7402 without `union' itself.
7403 Adjust.
7404 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
7405
7406 * src/output.c (actions_output): Don't output braces, as they are
7407 already handled by the scanner.
7408
7409 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
7410 characters to themselves.
7411
7412 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
7413 that the epilogue has a proper #line.
7414
7415 * src/parse-gram.y: Handle precedence/associativity.
7416
7417 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
7418 a terminal.
7419 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
7420 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
7421 at all to define terminals that cannot be emitted.
7422
7423 * src/scan-gram.l: Escape M4 characters.
7424
7425 * src/scan-gram.l: Working properly with escapes in user
7426 strings/characters.
7427
7428 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
7429 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
7430 grammar.
7431 Use more modest sizes, as for the time being the parser does not
7432 release memory, and therefore the process swallows a huge amount
7433 of memory.
7434
7435 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
7436 stricter %token grammar.
7437
7438 * src/symtab.h (associativity): Add `undef_assoc'.
7439 (symbol_precedence_set): Do nothing when passed an undef_assoc.
7440 * src/symtab.c (symbol_check_alias_consistence): Adjust.
7441
7442 * tests/regression.at (Invalid %directive): Remove, as it is now
7443 meaningless.
7444 (Invalid inputs): Adjust to the new error messages.
7445 (Token definitions): The new grammar doesn't allow too many
7446 eccentricities.
7447
7448 * src/lex.h, src/lex.c: Remove.
7449 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
7450 (copy_character, copy_string2, copy_string, copy_identifier)
7451 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
7452 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
7453 (parse_action): Remove.
7454 * po/POTFILES.in: Adjust.
7455
7456 2002-06-11 Akim Demaille <akim@epita.fr>
7457
7458 * src/reader.c (parse_action): Don't store directly into the
7459 rule's action member: return the action as a string.
7460 Don't require `rule_length' as an argument: compute it.
7461 (grammar_current_rule_symbol_append)
7462 (grammar_current_rule_action_append): New, eved out from
7463 (readgram): here.
7464 Remove `action_flag', `rulelength', unused now.
7465
7466 2002-06-11 Akim Demaille <akim@epita.fr>
7467
7468 * src/reader.c (grammar_current_rule_prec_set).
7469 (grammar_current_rule_check): New, eved out from...
7470 (readgram): here.
7471 Remove `xaction', `first_rhs': useless.
7472 * tests/input.at (Type clashes): New.
7473 * tests/existing.at (GNU Cim Grammar): Adjust.
7474
7475 2002-06-11 Akim Demaille <akim@epita.fr>
7476
7477 * src/reader.c (grammar_midrule_action): New, Eved out from
7478 (readgram): here.
7479
7480 2002-06-11 Akim Demaille <akim@epita.fr>
7481
7482 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
7483 New.
7484 (readgram): Use them as replacement of inlined code, crule and
7485 crule1.
7486
7487 2002-06-11 Akim Demaille <akim@epita.fr>
7488
7489 * src/reader.c (grammar_end, grammar_symbol_append): New.
7490 (readgram): Use them.
7491 Make the use of `p' as local as possible.
7492
7493 2002-06-10 Akim Demaille <akim@epita.fr>
7494
7495 GCJ's parser requires the tokens to be defined before the prologue.
7496
7497 * data/bison.simple: Output the token definition before the user's
7498 prologue.
7499 * tests/regression.at (Braces parsing, Duplicate string)
7500 (Mixing %token styles): Check the output from bison.
7501 (Early token definitions): New.
7502
7503 2002-06-10 Akim Demaille <akim@epita.fr>
7504
7505 * src/symtab.c (symbol_user_token_number_set): Don't complain when
7506 assigning twice the same user number to a token, so that we can
7507 use it in...
7508 * src/lex.c (lex): here.
7509 Also use `symbol_class_set' instead of hand written code.
7510 * src/reader.c (parse_assoc_decl): Likewise.
7511
7512 2002-06-10 Akim Demaille <akim@epita.fr>
7513
7514 * src/symtab.c, src/symtab.c (symbol_class_set)
7515 (symbol_user_token_number_set): New.
7516 * src/reader.c (parse_token_decl): Use them.
7517 Use a switch instead of ifs.
7518 Use a single argument.
7519
7520 2002-06-10 Akim Demaille <akim@epita.fr>
7521
7522 Remove `%thong' support as it is undocumented, unused, duplicates
7523 `%token's job, and creates useless e-mail traffic with people who
7524 want to know what it is, why it is undocumented, unused, and
7525 duplicates `%token's job.
7526
7527 * src/reader.c (parse_thong_decl): Remove.
7528 * src/options.c (option_table): Remove "thong".
7529 * src/lex.h (tok_thong): Remove.
7530
7531 2002-06-10 Akim Demaille <akim@epita.fr>
7532
7533 * src/symtab.c, src/symtab.c (symbol_type_set)
7534 (symbol_precedence_set): New.
7535 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
7536 (value_components_used): Remove, unused.
7537
7538 2002-06-09 Akim Demaille <akim@epita.fr>
7539
7540 Move symbols handling code out of the reader.
7541
7542 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
7543 (axiom): Move to...
7544 * src/symtab.h, src/symtab.c: here.
7545
7546 * src/gram.c (start_symbol): Remove: use startsymbol->number.
7547 * src/reader.c (startval): Rename as...
7548 * src/symtab.h, src/symtab.c (startsymbol): this.
7549 * src/reader.c: Adjust.
7550
7551 * src/reader.c (symbol_check_defined, symbol_make_alias)
7552 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
7553 (token_translations_init)
7554 Move to...
7555 * src/symtab.c: here.
7556 * src/reader.c (packsymbols): Move to...
7557 * src/symtab.h, src/symtab.c (symbols_pack): here.
7558 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
7559 argument.
7560
7561 2002-06-03 Akim Demaille <akim@epita.fr>
7562
7563 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
7564 then statements.
7565
7566 2002-06-03 Akim Demaille <akim@epita.fr>
7567
7568 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
7569 structs with non literals.
7570 * src/scan-skel.l: never-interactive.
7571 * src/conflicts.c (enum conflict_resolution_e): No trailing
7572 comma.
7573 * src/getargs.c (usage): Split long literal strings.
7574 Reported by Hans Aberg.
7575
7576 2002-05-28 Akim Demaille <akim@epita.fr>
7577
7578 * data/bison.c++: Use C++ ostreams.
7579 (cdebug_): New member.
7580
7581 2002-05-28 Akim Demaille <akim@epita.fr>
7582
7583 * src/output.c (output_skeleton): Be sure to allocate enough room
7584 for `/' _and_ for `\0' in full_skeleton.
7585
7586 2002-05-28 Akim Demaille <akim@epita.fr>
7587
7588 * data/bison.c++: Catch up with bison.simple:
7589 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7590 and Paul Eggert <eggert@twinsun.com>: `error' handing.
7591 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
7592 and popping traces.
7593
7594 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7595
7596 * src/output.c (output_skeleton): Put an explicit path in front of
7597 the skeleton file name, rather than relying on the -I directory,
7598 to partially alleviate effects of having a skeleton file lying around
7599 in the current directory.
7600
7601 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7602
7603 * src/conflicts.c (log_resolution): Correct typo:
7604 obstack_printf should be obstack_fgrow1.
7605
7606 2002-05-26 Akim Demaille <akim@epita.fr>
7607
7608 * src/state.h (state_t): `solved_conflicts' is a new member.
7609 * src/LR0.c (new_state): Set it to 0.
7610 * src/conflicts.h, src/conflicts.c (print_conflicts)
7611 (free_conflicts, solve_conflicts): Rename as...
7612 (conflicts_print, conflicts_free, conflicts_solve): these.
7613 Adjust callers.
7614 * src/conflicts.c (enum conflict_resolution_e)
7615 (solved_conflicts_obstack): New, used by...
7616 (log_resolution): this.
7617 Adjust to attach the conflict resolution to each state.
7618 Complete the description with the precedence/associativity
7619 information.
7620 (resolve_sr_conflict): Adjust.
7621 * src/print.c (print_state): Output its solved_conflicts.
7622 * tests/conflicts.at (Unresolved SR Conflicts)
7623 (Solved SR Conflicts): Exercise --report=all.
7624
7625 2002-05-26 Akim Demaille <akim@epita.fr>
7626
7627 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
7628 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
7629 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
7630 (token_number_t, item_number_as_token_number)
7631 (token_number_as_item_number, muscle_insert_token_number_table):
7632 Rename as...
7633 (symbol_number_t, item_number_as_symbol_number)
7634 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
7635 these, since it is more appropriate.
7636
7637 2002-05-26 Akim Demaille <akim@epita.fr>
7638
7639 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
7640 `Error:' lines.
7641 * data/bison.simple (yystos) [YYDEBUG]: New.
7642 (yyparse) [YYDEBUG]: Display the symbols which are popped during
7643 error recovery.
7644 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
7645
7646 2002-05-25 Akim Demaille <akim@epita.fr>
7647
7648 * doc/bison.texinfo (Debugging): Split into...
7649 (Tracing): this new section, its former contents, and...
7650 (Understanding): this new section.
7651 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
7652 by...
7653 (report_flag): this.
7654 Adjust all dependencies.
7655 (report_args, report_types, report_argmatch): New.
7656 (usage, getargs): Report/support -r, --report.
7657 * src/options.h
7658 (struct option_table_struct): Rename as..,
7659 (struct option_table_s): this.
7660 Rename the `set_flag' member to `flag' to match with getopt_long's
7661 struct.
7662 * src/options.c (option_table): Split verbose into an entry for
7663 %verbose, and another for --verbose.
7664 Support --report/-r, so remove -r from the obsolete --raw.
7665 * src/print.c: Attach full item sets and lookaheads reports to
7666 report_flag instead of trace_flag.
7667 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
7668
7669 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7670 and Paul Eggert <eggert@twinsun.com>
7671
7672 * data/bison.simple (yyparse): Correct error handling to conform to
7673 POSIX and yacc. Specifically, after syntax error is discovered,
7674 do not reduce further before shifting the error token.
7675 Clean up the code a bit by removing the labels yyerrdefault,
7676 yyerrhandle, yyerrpop.
7677 * NEWS: Document the above.
7678
7679 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7680
7681 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
7682 type; it isn't always big enough, since it doesn't necessarily
7683 include non-terminals.
7684 (yytranslate): Expand definition of yy_token_number_type, so that
7685 the latter can be removed.
7686 (yy_token_number_type): Remove, only one use.
7687 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
7688 don't use TokenNumberType as element type.
7689
7690 * tests/regression.at: Modify expected output to agree with change
7691 to yyr1 and yytranslate.
7692
7693 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
7694
7695 * src/reader.c (parse_action): Use copy_character instead of
7696 obstack_1grow.
7697
7698 2002-05-13 Akim Demaille <akim@epita.fr>
7699
7700 * tests/regression.at (Token definitions): Prototype yylex and
7701 yyerror.
7702
7703 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7704
7705 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
7706 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
7707 32-bit arithmetic.
7708 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
7709
7710 2002-05-07 Akim Demaille <akim@epita.fr>
7711
7712 * tests/synclines.at: Be sure to prototype yylex and yyerror to
7713 avoid GCC warnings.
7714
7715 2002-05-07 Akim Demaille <akim@epita.fr>
7716
7717 Kill GCC warnings.
7718
7719 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
7720 over the RHS of each rule.
7721 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
7722 * src/state.h (state_t): Member `nitems' is unsigned short.
7723 * src/LR0.c (get_state): Adjust.
7724 * src/reader.c (packgram): Likewise.
7725 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
7726 `Type'.
7727 (muscle_insert_int_table): Remove, unused.
7728 (prepare_rules): Remove `max'.
7729
7730 2002-05-06 Akim Demaille <akim@epita.fr>
7731
7732 * src/closure.c (print_firsts): Display of the symbol tags.
7733 (bitmatrix_print): Move to...
7734 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
7735 here.
7736 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
7737
7738 2002-05-06 Akim Demaille <akim@epita.fr>
7739
7740 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
7741 hash_do_for_each.
7742
7743 2002-05-06 Akim Demaille <akim@epita.fr>
7744
7745 * src/LR0.c (new_state, get_state): Instead of using the global
7746 `kernel_size' and `kernel_base', have two new arguments:
7747 `core_size' and `core'.
7748 Adjust callers.
7749
7750 2002-05-06 Akim Demaille <akim@epita.fr>
7751
7752 * src/reader.c (packgram): No longer end `ritem' with a 0
7753 sentinel: it is not used.
7754
7755 2002-05-05 Akim Demaille <akim@epita.fr>
7756
7757 New experimental feature: display the lookaheads in the report and
7758 graph.
7759
7760 * src/print (print_core): When --trace-flag, display the rules
7761 lookaheads.
7762 * src/print_graph.c (print_core): Likewise.
7763 Swap the arguments.
7764 Adjust caller.
7765
7766 2002-05-05 Akim Demaille <akim@epita.fr>
7767
7768 * tests/torture.at (Many lookaheads): New test.
7769
7770 2002-05-05 Akim Demaille <akim@epita.fr>
7771
7772 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
7773 (GENERATE_MUSCLE_INSERT_TABLE): this.
7774 (output_int_table, output_unsigned_int_table, output_short_table)
7775 (output_token_number_table, output_item_number_table): Replace with...
7776 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
7777 (muscle_insert_short_table, muscle_insert_token_number_table)
7778 (muscle_insert_item_number_table): these.
7779 Adjust all callers.
7780 (prepare_tokens): Don't free `translations', since...
7781 * src/reader.h, src/reader.c (grammar_free): do it.
7782 Move to...
7783 * src/gram.h, src/gram.c (grammar_free): here.
7784 * data/bison.simple, data/bison.c++: b4_token_number_max is now
7785 b4_translate_max.
7786
7787 2002-05-05 Akim Demaille <akim@epita.fr>
7788
7789 * src/output.c (output_unsigned_int_table): New.
7790 (prepare_rules): `i' is unsigned.
7791 `prhs', `rline', `r2' are unsigned int.
7792 Rename muscle `rhs_number_max' as `rhs_max'.
7793 Output muscles `prhs_max', `rline_max', and `r2_max'.
7794 Free rline and r1.
7795 * data/bison.simple, data/bison.c++: Adjust to use these muscles
7796 to compute types instead of constant types.
7797 * tests/regression.at (Web2c Actions): Adjust.
7798
7799 2002-05-04 Akim Demaille <akim@epita.fr>
7800
7801 * src/symtab.h (SALIAS, SUNDEF): Rename as...
7802 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
7803 Adjust dependencies.
7804 * src/output.c (token_definitions_output): Be sure not to output a
7805 `#define 'a'' when fed with `%token 'a' "a"'.
7806 * tests/regression.at (Token definitions): New.
7807
7808 2002-05-03 Paul Eggert <eggert@twinsun.com>
7809
7810 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
7811 for K&R C.
7812
7813 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
7814
7815 * Makefile.am (SUBDIRS): Remove intl.
7816 (EXTRA_DIST): Add config/config.rpath.
7817
7818 2002-05-03 Akim Demaille <akim@epita.fr>
7819
7820 * data/bison.simple (m4_if): Don't output empty enums.
7821 And actually, output valid enum definitions :(.
7822
7823 2002-05-03 Akim Demaille <akim@epita.fr>
7824
7825 * configure.bat: Remove, completely obsolete.
7826 * Makefile.am (EXTRA_DIST): Adjust.
7827 Don't distribute config.rpath...
7828 * config/Makefile.am (EXTRA_DIST): Do it.
7829
7830 2002-05-03 Akim Demaille <akim@epita.fr>
7831
7832 * configure.in (GETTEXT_VERSION): New.
7833 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
7834
7835 2002-05-03 Akim Demaille <akim@epita.fr>
7836
7837 * data/bison.simple (b4_token_enum): New.
7838 (b4_token_defines): Use it to output tokens both as #define and
7839 enums.
7840 Suggested by Paul Eggert.
7841 * src/output.c (token_definitions_output): Don't output spurious
7842 white spaces.
7843
7844 2002-05-03 Akim Demaille <akim@epita.fr>
7845
7846 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
7847
7848 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
7849
7850 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
7851 Update the stack class, give a try to deque as the default container.
7852
7853 2002-05-02 Akim Demaille <akim@epita.fr>
7854
7855 * data/bison.simple (yyparse): Do not implement @$ = @1.
7856 (YYLLOC_DEFAULT): Adjust to do it.
7857 * doc/bison.texinfo (Location Default Action): Fix.
7858
7859 2002-05-02 Akim Demaille <akim@epita.fr>
7860
7861 * src/reader.c (parse_braces): Merge into...
7862 (parse_action): this.
7863
7864 2002-05-02 Akim Demaille <akim@epita.fr>
7865
7866 * configure.in (ALL_LINGUAS): Remove.
7867 * po/LINGUAS, hr.po: New.
7868
7869 2002-05-02 Akim Demaille <akim@epita.fr>
7870
7871 Remove the so called hairy (semantic) parsers.
7872
7873 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
7874 * src/gram.h, src/gram.c (semantic_parser): Remove.
7875 (rule_t): Remove the guard and guard_line members.
7876 * src/lex.h (token_t): remove tok_guard.
7877 * src/options.c (option_table): Remove %guard and %semantic_parser
7878 support.
7879 * src/output.c, src/output.h (guards_output): Remove.
7880 (prepare): Adjust.
7881 (token_definitions_output): Don't output the `T'
7882 tokens (???).
7883 (output_skeleton): Don't output the guards.
7884 * src/files.c, src/files.c (attrsfile): Remove.
7885 * src/reader.c (symbol_list): Remove the guard and guard_line
7886 members.
7887 Adjust dependencies.
7888 (parse_guard): Remove.
7889 * data/bison.hairy: Remove.
7890 * doc/bison.texinfo (Environment Variables): Remove occurrences of
7891 BISON_HAIRY.
7892
7893 2002-05-02 Akim Demaille <akim@epita.fr>
7894
7895 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
7896 (parse_guard): Rename the formal argument `stack_offset' as
7897 `rule_length', which is more readable.
7898 Adjust callers.
7899 (copy_at, copy_dollar): Instead of outputting the hard coded
7900 values of $$, $n and so forth, output invocation to b4_lhs_value,
7901 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
7902 Note: this patch partially drops `semantic-parser' support: it
7903 always does `rule_length - n', where semantic parsers ought to
7904 always use `-n'.
7905 * data/bison.simple, data/bison.c++ (b4_lhs_value)
7906 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
7907
7908 2002-05-02 Akim Demaille <akim@epita.fr>
7909
7910 * configure.in (AC_INIT): Bump to 1.49b.
7911 (AM_INIT_AUTOMAKE): Short invocation.
7912
7913 2002-05-02 Akim Demaille <akim@epita.fr>
7914
7915 Version 1.49a.
7916
7917 2002-05-01 Akim Demaille <akim@epita.fr>
7918
7919 * src/skeleton.h: Remove.
7920
7921 2002-05-01 Akim Demaille <akim@epita.fr>
7922
7923 * src/skeleton.h: Fix the #endif.
7924 Reported by Magnus Fromreide.
7925
7926 2002-04-26 Paul Eggert <eggert@twinsun.com>
7927
7928 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
7929 Define if we define YYSTYPE and YYLTYPE, respectively.
7930 (YYCOPY): Fix [] quoting problem in the non-GCC case.
7931
7932 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
7933
7934 * src/scan-skel.l: Postprocess quadrigraphs.
7935
7936 * src/reader.c (copy_character): New function, used to output
7937 single characters while replacing `[' and `]' with quadrigraphs, to
7938 avoid troubles with M4 quotes.
7939 (copy_comment): Output characters with copy_character.
7940 (read_additionnal_code): Likewise.
7941 (copy_string2): Likewise.
7942 (copy_definition): Likewise.
7943
7944 * tests/calc.at: Exercise M4 quoting.
7945
7946 2002-04-25 Akim Demaille <akim@epita.fr>
7947
7948 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
7949 between `!' and the command.
7950 Reported by Paul Eggert.
7951
7952 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
7953
7954 * tests/calc.at: Exercise prologue splitting.
7955
7956 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
7957 `b4_post_prologue' instead of `b4_prologue'.
7958
7959 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
7960 muscles.
7961 (output): Free pre_prologue_obstack and post_prologue_obstack.
7962 * src/files.h, src/files.c (attrs_obstack): Remove.
7963 (pre_prologue_obstack, post_prologue_obstack): New.
7964 * src/reader.c (copy_definition): Add a parameter to specify the
7965 obstack to fill, instead of using attrs_obstack unconditionally.
7966 (read_declarations): Pass pre_prologue_obstack to copy_definition if
7967 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
7968
7969 2002-04-23 Paul Eggert <eggert@twinsun.com>
7970
7971 * data/bison.simple: Remove unnecessary commentary and white
7972 space differences from 1_29-branch.
7973 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
7974
7975 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
7976 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
7977 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
7978 constructors or destructors.
7979
7980 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
7981
7982 2002-04-23 Akim Demaille <akim@epita.fr>
7983
7984 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
7985 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
7986 location with columns.
7987 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
7988 All reported by Paul Eggert.
7989
7990 2002-04-22 Akim Demaille <akim@epita.fr>
7991
7992 * src/reduce.c (dump_grammar): Move to...
7993 * src/gram.h, src/gram.c (grammar_dump): here.
7994 Be sure to separate long item numbers.
7995 Don't read the members of a rule's prec if its nil.
7996
7997 2002-04-22 Akim Demaille <akim@epita.fr>
7998
7999 * src/output.c (table_size, table_grow): New.
8000 (MAXTABLE): Remove, replace uses with table_size.
8001 (pack_vector): Instead of dying when the table is too big, grow it.
8002
8003 2002-04-22 Akim Demaille <akim@epita.fr>
8004
8005 * data/bison.simple (yyr1): Its type is that of a token number.
8006 * data/bison.c++ (r1_): Likewise.
8007 * tests/regression.at (Web2c Actions): Adjust.
8008
8009 2002-04-22 Akim Demaille <akim@epita.fr>
8010
8011 * src/reader.c (token_translations_init): 256 is now the default
8012 value for the error token, i.e., it will be assigned another
8013 number if the user assigned 256 to one of her tokens.
8014 (reader): Don't force 256 to error.
8015 * doc/bison.texinfo (Symbols): Adjust.
8016 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
8017 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
8018 etc. instead of 10, 20, 30 (which was used to `jump' over error
8019 (256) and undefined (2)).
8020
8021 2002-04-22 Akim Demaille <akim@epita.fr>
8022
8023 Propagate more token_number_t.
8024
8025 * src/gram.h (token_number_as_item_number)
8026 (item_number_as_token_number): New.
8027 * src/output.c (GENERATE_OUTPUT_TABLE): New.
8028 Use it to create output_item_number_table and
8029 output_token_number_table.
8030 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
8031 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
8032 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
8033 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
8034
8035 2002-04-22 Akim Demaille <akim@epita.fr>
8036
8037 * src/output.h, src/output.c (get_lines_number): Remove.
8038
8039 2002-04-19 Akim Demaille <akim@epita.fr>
8040
8041 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
8042 as Lex/Flex'.
8043 (Debugging): More details about enabling the debugging features.
8044 (Table of Symbols): Describe $$, $n, @$, and @n.
8045 Suggested by Tim Josling.
8046
8047 2002-04-19 Akim Demaille <akim@epita.fr>
8048
8049 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
8050
8051 2002-04-10 Akim Demaille <akim@epita.fr>
8052
8053 * src/system.h: Rely on HAVE_LIMITS_H.
8054 Suggested by Paul Eggert.
8055
8056 2002-04-09 Akim Demaille <akim@epita.fr>
8057
8058 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
8059 full stderr, and strip it according to the bison options, instead
8060 of composing the error message from different bits.
8061 This makes it easier to check for several error messages.
8062 Adjust all the invocations.
8063 Add an invocation exercising the error token.
8064 Add an invocation demonstrating a stupid error message.
8065 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
8066 Adjust the tests.
8067 Error message are for stderr, not stdout.
8068
8069 2002-04-09 Akim Demaille <akim@epita.fr>
8070
8071 * src/gram.h, src/gram.c (error_token_number): Remove, use
8072 errtoken->number.
8073 * src/reader.c (reader): Don't specify the user token number (2)
8074 for $undefined, as it uselessly prevents using it.
8075 * src/gram.h (token_number_t): Move to...
8076 * src/symtab.h: here.
8077 (state_t.number): Is a token_number_t.
8078 * src/print.c, src/reader.c: Use undeftoken->number instead of
8079 hard coded 2.
8080 (Even though this 2 is not the same as above: the number of the
8081 undeftoken remains being 2, it is its user token number which
8082 might not be 2).
8083 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
8084 `user_token_number_max'.
8085 Output `undef_token_number'.
8086 * data/bison.simple, data/bison.c++: Use them.
8087 Be sure to map invalid yylex return values to
8088 `undef_token_number'. This saves us from gratuitous SEGV.
8089
8090 * tests/conflicts.at (Solved SR Conflicts)
8091 (Unresolved SR Conflicts): Adjust.
8092 * tests/regression.at (Web2c Actions): Adjust.
8093
8094 2002-04-08 Akim Demaille <akim@epita.fr>
8095
8096 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
8097 Adding #line.
8098 Remove the duplicate `typedefs'.
8099 (RhsNumberType): Fix the declaration and various other typos.
8100 Use __ofile__.
8101 * data/bison.simple: Use __ofile__.
8102 * src/scan-skel.l: Handle __ofile__.
8103
8104 2002-04-08 Akim Demaille <akim@epita.fr>
8105
8106 * src/gram.h (item_number_t): New, the type of item numbers in
8107 RITEM. Note that it must be able to code symbol numbers as
8108 positive number, and the negation of rule numbers as negative
8109 numbers.
8110 Adjust all dependencies (pretty many).
8111 * src/reduce.c (rule): Remove this `short *' pointer: use
8112 item_number_t.
8113 * src/system.h (MINSHORT, MAXSHORT): Remove.
8114 Include `limits.h'.
8115 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
8116 (shortcpy): Remove.
8117 (MAXTABLE): Move to...
8118 * src/output.c (MAXTABLE): here.
8119 (prepare_rules): Use output_int_table to output rhs.
8120 * data/bison.simple, data/bison.c++: Adjust.
8121 * tests/torture.at (Big triangle): Move the limit from 254 to
8122 500.
8123 * tests/regression.at (Web2c Actions): Ajust.
8124
8125 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
8126 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
8127 passes, but produces negative #line number, once fixed, GCC is
8128 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
8129 C), it passes.
8130 * src/state.h (state_h): Code input lines on ints, not shorts.
8131
8132 2002-04-08 Akim Demaille <akim@epita.fr>
8133
8134 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
8135 and then the grammar.
8136
8137 2002-04-08 Akim Demaille <akim@epita.fr>
8138
8139 * src/system.h: No longer using strndup.
8140
8141 2002-04-07 Akim Demaille <akim@epita.fr>
8142
8143 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
8144 * src/output.c (output_table_data): Return the longest number.
8145 (prepare_tokens): Output `token_number_max').
8146 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
8147 New.
8148 Use them to define yy_token_number_type/TokenNumberType.
8149 Use this type for yytranslate.
8150 * tests/torture.at (Big triangle): Push the limit from 124 to
8151 253.
8152 * tests/regression.at (Web2c Actions): Adjust.
8153
8154 2002-04-07 Akim Demaille <akim@epita.fr>
8155
8156 * tests/torture.at (Big triangle): New.
8157 (GNU AWK Grammar, GNU Cim Grammar): Move to...
8158 * tests/existing.at: here.
8159
8160 2002-04-07 Akim Demaille <akim@epita.fr>
8161
8162 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
8163 nritems.
8164 Adjust dependencies.
8165
8166 2002-04-07 Akim Demaille <akim@epita.fr>
8167
8168 * src/reader.c: Normalize increments to prefix form.
8169
8170 2002-04-07 Akim Demaille <akim@epita.fr>
8171
8172 * src/reader.c, symtab.c: Remove debugging code.
8173
8174 2002-04-07 Akim Demaille <akim@epita.fr>
8175
8176 Rename all the `bucket's as `symbol_t'.
8177
8178 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
8179 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
8180 * src/symtab.c, src/symtab.h (bucket): Rename as...
8181 (symbol_t): this.
8182 (symbol_list_new, bucket_check_defined, bucket_make_alias)
8183 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
8184 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8185 (buckets_new, buckets_free, buckets_do): Rename as...
8186 (symbol_list_new, symbol_check_defined, symbol_make_alias)
8187 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
8188 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
8189 (symbols_new, symbols_free, symbols_do): these.
8190
8191 2002-04-07 Akim Demaille <akim@epita.fr>
8192
8193 Use lib/hash for the symbol table.
8194
8195 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
8196 EOF.
8197 * src/lex.c (lex): Set the `number' member of new terminals.
8198 * src/reader.c (bucket_check_defined, bucket_make_alias)
8199 (bucket_check_alias_consistence, bucket_translation): New.
8200 (reader, grammar_free, readgram, token_translations_init)
8201 (packsymbols): Adjust.
8202 (reader): Number the predefined tokens.
8203 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
8204 for predefined tokens.
8205 * src/symtab.h (bucket): Remove all the hash table related
8206 members.
8207 * src/symtab.c (symtab): Replace by...
8208 (bucket_table): this.
8209 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8210 (buckets_new, buckets_do): New.
8211
8212 2002-04-07 Akim Demaille <akim@epita.fr>
8213
8214 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
8215 (start_symbol, max_user_token_number, semantic_parser)
8216 (error_token_number): Initialize.
8217 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
8218 Initialize.
8219 (reader): Don't.
8220 (errtoken, eoftoken, undeftoken, axiom): Extern.
8221
8222 2002-04-07 Akim Demaille <akim@epita.fr>
8223
8224 * src/gram.h (rule_s): prec and precsym are now pointers
8225 to the bucket giving the priority/associativity.
8226 Member `associativity' removed: useless.
8227 * src/reduce.c, src/conflicts.c: Adjust.
8228
8229 2002-04-07 Akim Demaille <akim@epita.fr>
8230
8231 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
8232 Properly escape the symbols' TAG when outputting them.
8233
8234 2002-04-07 Akim Demaille <akim@epita.fr>
8235
8236 * src/lalr.h (LA): Is a bitsetv, not bitset*.
8237
8238 2002-04-07 Akim Demaille <akim@epita.fr>
8239
8240 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
8241 (LArule): this, which is an array to rule_t*.
8242 * src/print.c, src/conflicts.c: Adjust.
8243
8244 2002-04-07 Akim Demaille <akim@epita.fr>
8245
8246 * src/gram.h (rule_t): Rename `number' as `user_number'.
8247 `number' is a new member.
8248 Adjust dependencies.
8249 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
8250
8251 2002-04-07 Akim Demaille <akim@epita.fr>
8252
8253 As a result of the previous patch, it is no longer needed
8254 to reorder ritem itself.
8255
8256 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
8257
8258 2002-04-07 Akim Demaille <akim@epita.fr>
8259
8260 Be sure never to walk through RITEMS, but use only data related to
8261 the rules themselves. RITEMS should be banished.
8262
8263 * src/output.c (output_token_translations): Rename as...
8264 (prepare_tokens): this.
8265 In addition to `translate', prepare the muscles `tname' and
8266 `toknum', which were handled by...
8267 (output_rule_data): this.
8268 Remove, and move the remainder of its outputs into...
8269 (prepare_rules): this new routines, which also merges content from
8270 (output_gram): this.
8271 (prepare_rules): Be sure never to walk through RITEMS.
8272 (output_stos): Rename as...
8273 (prepare_stos): this.
8274 (output): Always invoke prepare_states, after all, just don't use it
8275 in the output if you don't need it.
8276
8277 2002-04-07 Akim Demaille <akim@epita.fr>
8278
8279 * src/LR0.c (new_state): Display `nstates' as the name of the
8280 newly created state.
8281 Adjust to initialize first_state and last_state if needed.
8282 Be sure to distinguish the initial from the final state.
8283 (new_states): Create the itemset of the initial state, and use
8284 new_state.
8285 * src/closure.c (closure): Now that the initial state has its
8286 items properly set, there is no need for a special case when
8287 creating `ruleset'.
8288
8289 As a result, now the rule 0, reducing to $axiom, is visible in the
8290 outputs. Adjust the test suite.
8291
8292 * tests/conflicts.at (Solved SR Conflicts)
8293 (Unresolved SR Conflicts): Adjust.
8294 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
8295 * tests/conflicts.at (S/R in initial): New.
8296
8297 2002-04-07 Akim Demaille <akim@epita.fr>
8298
8299 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
8300 the RHS of the rules.
8301 * src/output.c (output_gram): Likewise.
8302
8303 2002-04-07 Akim Demaille <akim@epita.fr>
8304
8305 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
8306 bucket.
8307 Adjust all dependencies.
8308 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
8309 `number' of the buckets too.
8310 * src/gram.h: Include `symtab.h'.
8311 (associativity): Move to...
8312 * src/symtab.h: here.
8313 No longer include `gram.h'.
8314
8315 2002-04-07 Akim Demaille <akim@epita.fr>
8316
8317 * src/gram.h, src/gram.c (rules_rhs_length): New.
8318 (ritem_longest_rhs): Use it.
8319 * src/gram.h (rule_t): `number' is a new member.
8320 * src/reader.c (packgram): Set it.
8321 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
8322 the end of `rules', and count them out of `nrules'.
8323 (reduce_output, dump_grammar): Adjust.
8324 * src/print.c (print_grammar): It is no longer needed to check for
8325 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
8326 * tests/reduce.at (Reduced Automaton): New test.
8327
8328 2002-04-07 Akim Demaille <akim@epita.fr>
8329
8330 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
8331 lacking `+ 1' to nrules, Bison reported as useless a token if it
8332 was used solely to set the precedence of the last rule...
8333
8334 2002-04-07 Akim Demaille <akim@epita.fr>
8335
8336 * data/bison.c++, data/bison.simple: Don't output the current file
8337 name in #line, to avoid useless diffs between two identical
8338 outputs under different names.
8339
8340 2002-04-07 Akim Demaille <akim@epita.fr>
8341
8342 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
8343 Normalize loops to using `< nrules + 1', not `<= nrules'.
8344
8345 2002-04-07 Akim Demaille <akim@epita.fr>
8346
8347 * TODO: Update.
8348
8349 2002-04-07 Akim Demaille <akim@epita.fr>
8350
8351 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
8352 bucket.value as bucket.number.
8353
8354 2002-04-07 Akim Demaille <akim@epita.fr>
8355
8356 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
8357 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
8358 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
8359 RHS, instead of being an index in RITEMS.
8360
8361 2002-04-04 Paul Eggert <eggert@twinsun.com>
8362
8363 * doc/bison.texinfo: Update copyright date.
8364 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
8365 (Symbols): Warn about running Bison in one character set,
8366 but compiling and/or running in an incompatible one.
8367 Warn about character code 256, too.
8368
8369 2002-04-03 Paul Eggert <eggert@twinsun.com>
8370
8371 * src/bison.data (YYSTACK_ALLOC): Depend on whether
8372 YYERROR_VERBOSE is nonzero, not whether it is defined.
8373
8374 Merge changes from bison-1_29-branch.
8375
8376 2002-03-20 Paul Eggert <eggert@twinsun.com>
8377
8378 Merge fixes from Debian bison_1.34-1.diff.
8379
8380 * configure.in (AC_PREREQ): 2.53.
8381
8382 2002-03-20 Akim Demaille <akim@epita.fr>
8383
8384 * src/conflicts.c (log_resolution): Argument `resolution' is const.
8385
8386 2002-03-19 Paul Eggert <eggert@twinsun.com>
8387
8388 * src/bison.simple (YYCOPY): New macro.
8389 (YYSTACK_RELOCATE): Use it.
8390 Remove Type arg; no longer needed. All callers changed.
8391 (yymemcpy): Remove; no longer needed.
8392
8393 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
8394 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8395
8396 2002-03-19 Akim Demaille <akim@epita.fr>
8397
8398 Test and fix the #line outputs.
8399
8400 * tests/atlocal.at (GCC): New.
8401 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
8402 (Prologue synch line, %union synch line, Postprologue synch line)
8403 (Action synch line, Epilogue synch line): New tests.
8404 * src/reader.c (parse_union_decl): Define the muscle stype_line.
8405 * data/bison.simple, data/bison.c++: Use it.
8406
8407 2002-03-19 Akim Demaille <akim@epita.fr>
8408
8409 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
8410 (Solved SR Conflicts, %expect not enough, %expect right)
8411 (%expect too much): Move to...
8412 * tests/conflicts.at: this new file.
8413
8414 2002-03-19 Akim Demaille <akim@epita.fr>
8415
8416 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8417 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
8418 that we can move to enums for instance.
8419 * src/output.c (token_definitions_output): Output a list of
8420 `token-name, token-number' instead of the #define.
8421 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
8422
8423 2002-03-14 Akim Demaille <akim@epita.fr>
8424
8425 Use Gettext 0.11.1.
8426
8427 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
8428
8429 * data/bison.c++: Make the user able to add members to the generated
8430 parser by subclassing.
8431
8432 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
8433
8434 * src/reader.c (read_additionnal_code): `c' should be an integer, not
8435 a character.
8436 Reported by Nicolas Tisserand and Nicolas Burrus.
8437
8438 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8439
8440 * src/reader.c: Warn about lacking semi-colons, do not complain.
8441
8442 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8443
8444 * data/bison.c++: Remove a debug line.
8445
8446 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8447
8448 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
8449 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
8450 provide a default implementation.
8451
8452 2002-03-04 Akim Demaille <akim@epita.fr>
8453
8454 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
8455 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
8456 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
8457 * tests/semantic.at (Parsing Guards): Similarly.
8458 * src/reader.at (readgram): Complain if the last rule is not ended
8459 with a semi-colon.
8460
8461 2002-03-04 Akim Demaille <akim@epita.fr>
8462
8463 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
8464 * src/closure.c: here.
8465 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
8466 RTC.
8467 * src/warshall.h, src/warshall.c: Remove.
8468 * tests/sets.at (Broken Closure): Adjust.
8469
8470 2002-03-04 Akim Demaille <akim@epita.fr>
8471
8472 * src/output.c (output_skeleton): tempdir is const.
8473 bytes_read is unused.
8474
8475 2002-03-04 Akim Demaille <akim@epita.fr>
8476
8477 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
8478 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
8479 Update.
8480 From Michael Hayes.
8481
8482 2002-03-04 Akim Demaille <akim@epita.fr>
8483
8484 * src/closure.c (closure): `r' is unused.
8485
8486 2002-03-04 Akim Demaille <akim@epita.fr>
8487
8488 * tests/sets.at (Broken Closure): Add the ending `;'.
8489 * src/reader.at (readgram): Complain if a rule is not ended with a
8490 semi-colon.
8491
8492 2002-03-04 Akim Demaille <akim@epita.fr>
8493
8494 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
8495 (count_sr_conflicts): Use bitset_count.
8496 * src/reduce.c (inaccessable_symbols): Ditto.
8497 (bits_size): Remove.
8498 * src/warshall.h, src/warshall.c: Convert to bitsetv.
8499
8500 2002-03-04 Akim Demaille <akim@epita.fr>
8501
8502 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
8503 * src/reduce.c: Remove the `bitset_zero's following the
8504 `bitset_create's, as now it is performed by the latter.
8505
8506 2002-03-04 Akim Demaille <akim@epita.fr>
8507
8508 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
8509 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
8510 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
8511 latest sources from Michael.
8512
8513 2002-03-04 Akim Demaille <akim@epita.fr>
8514
8515 * src/output.c (output): Don't free the grammar.
8516 * src/reader.c (grammar_free): New.
8517 * src/main.c (main): Call it and don't free symtab here.
8518
8519 2002-03-04 Akim Demaille <akim@epita.fr>
8520
8521 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
8522 before returning.
8523 Reported by Benoit Perrot.
8524
8525 2002-03-04 Akim Demaille <akim@epita.fr>
8526
8527 Use bitset operations when possible, not loops over bits.
8528
8529 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
8530 bitset_or.
8531 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
8532 * src/reduce.c (useless_nonterminals): Formatting changes.
8533 * src/warshall.c (TC): Use bitset_or.
8534
8535 2002-03-04 Akim Demaille <akim@epita.fr>
8536
8537 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
8538 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
8539 Ditto.
8540
8541 2002-03-04 Akim Demaille <akim@epita.fr>
8542
8543 * src/lalr.c (F): Now a bitset*.
8544 Adjust all dependencies.
8545
8546 2002-03-04 Akim Demaille <akim@epita.fr>
8547
8548 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
8549 Adjust all dependencies.
8550
8551 2002-03-04 Akim Demaille <akim@epita.fr>
8552
8553 * src/L0.c, src/LR0.h (nstates): Be size_t.
8554 Adjust comparisons (signed vs unsigned).
8555 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
8556 bitset*.
8557 Adjust all dependencies.
8558
8559 2002-03-04 Akim Demaille <akim@epita.fr>
8560
8561 * src/closure.c (firsts): Now, also a bitset.
8562 Adjust all dependencies.
8563 (varsetsize): Remove, now unused.
8564 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
8565
8566 2002-03-04 Akim Demaille <akim@epita.fr>
8567
8568 * src/print.c: Convert to use bitset.h, not hand coded iterations
8569 over ints.
8570
8571 2002-03-04 Akim Demaille <akim@epita.fr>
8572
8573 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
8574
8575 2002-03-04 Akim Demaille <akim@epita.fr>
8576
8577 * src/closure.c (ruleset): Be a bitset.
8578 (rulesetsize): Remove.
8579
8580 2002-03-04 Akim Demaille <akim@epita.fr>
8581
8582 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
8583 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
8584 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
8585 * src/closure.c (fderives): Be an array of bitsets.
8586
8587 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
8588
8589 * data/bison.c++: Merge the two generated headers. Insert a copyright
8590 notice in each output file.
8591
8592 2002-02-28 Akim Demaille <akim@epita.fr>
8593
8594 * data/bison.c++: Copy the prologue of bison.simple to fetch
8595 useful M4 definitions, such as b4_header_guard.
8596
8597 2002-02-25 Akim Demaille <akim@epita.fr>
8598
8599 * src/getargs.c (version): Give the name of the authors, and use a
8600 translator friendly scheme for the bgr
8601 copyright notice.
8602
8603 2002-02-25 Akim Demaille <akim@epita.fr>
8604
8605 * src/output.c (header_output): Remove, now handled completely via
8606 M4.
8607
8608 2002-02-25 Akim Demaille <akim@epita.fr>
8609
8610 * m4/m4.m4: New, from CVS Autoconf.
8611 * configure.in: Invoke it.
8612 * src/output.c (output_skeleton): Use its result instead of the
8613 hard coded name.
8614
8615 2002-02-25 Akim Demaille <akim@epita.fr>
8616
8617 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
8618 Fileutils 4.1.5.
8619 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
8620 * src/output.c (output_skeleton): Use mkstemp to create a real
8621 temporary file.
8622 Move the filling of `skeleton' and its muscle to...
8623 (prepare): here.
8624 (output): Move the definition of the prologue muscle to...
8625 (prepare): here.
8626 * src/system.h (DEFAULT_TMPDIR): New.
8627
8628 2002-02-14 Paul Eggert <eggert@twinsun.com>
8629
8630 Remove the support for C++ namespace cleanliness; it was
8631 causing more problems than it was curing, since it didn't work
8632 properly on some nonstandard C++ compilers. This can wait
8633 for a proper C++ parser.
8634
8635 * NEWS: Document this.
8636 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
8637 of C++, as it's treated like C now.
8638 * src/bison.simple (YYSTD): Remove.
8639 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
8640 Treat C++ just like Standard C instead of trying to support
8641 namespace cleanliness.
8642
8643 2002-02-14 Akim Demaille <akim@epita.fr>
8644
8645 * tests/regression.at (else): Adjust to Andreas' change.
8646
8647 2002-02-14 Akim Demaille <akim@epita.fr>
8648
8649 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
8650
8651 2002-02-13 Andreas Schwab <schwab@suse.de>
8652
8653 * src/output.c (output_rule_data): Don't output NULL, it might
8654 not be defined yet.
8655
8656 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
8657
8658 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
8659 (Copyright notice): Update.
8660
8661 2002-02-11 Akim Demaille <akim@epita.fr>
8662
8663 * tests/regression.at (%nonassoc and eof): Don't include
8664 nonportable headers.
8665
8666 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
8667
8668 * data/bison.c++: Correct error recovery. Make the user able to
8669 initialize the starting location.
8670
8671 2002-02-07 Akim Demaille <akim@epita.fr>
8672
8673 * tests/input.at: New.
8674
8675 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8676
8677 * data/bison.c++: Replace some direct m4 expansions by constants. Be
8678 more consistent when naming methods and variables. Put preprocessor
8679 directives around tables only needed for debugging.
8680
8681 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8682
8683 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
8684 C++ parsers.
8685 (yy::b4_name::parse): Use print_.
8686
8687 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8688
8689 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
8690
8691 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8692
8693 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
8694 C++ parsers.
8695 (yy::b4_name::parse): Build verbose error messages, and use error_.
8696
8697 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
8698
8699 * data/bison.c++: Fix m4 quoting in comments.
8700
8701 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
8702
8703 * data/bison.c++: Adjust the parser code. Fix some muscles that were
8704 not expanded by m4.
8705
8706 2002-02-05 Akim Demaille <akim@epita.fr>
8707
8708 * data/bison.c++: Adjust to the M4 back end.
8709 More is certainly needed.
8710
8711 2002-02-05 Akim Demaille <akim@epita.fr>
8712
8713 Give a try to M4 as a back end.
8714
8715 * lib/readpipe.c: New, from wdiff.
8716 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
8717 BISON_HAIRY.
8718 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
8719 specific values. Now it is m4 that performs the lookup.
8720 * src/parse-skel.y: Remove.
8721 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
8722 * src/output.c (actions_output, guards_output)
8723 (token_definitions_output): No longer keeps track of the output
8724 line number, hence remove the second argument.
8725 (guards_output): Check against the guard member of a rule, not the
8726 action member.
8727 Adjust callers.
8728 (output_skeleton): Don't look for the skeleton location, let m4 do
8729 that.
8730 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
8731 file will be used.
8732 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
8733 (prepare): Given that for the time being changesyntax is not
8734 usable in M4, rename the muscles using `-' to `_'.
8735 Define `defines_flag', `output_parser_name' and `output_header_name'.
8736 * src/output.h (actions_output, guards_output)
8737 (token_definitions_output): Adjust prototypes.
8738 * src/scan-skel.l: Instead of scanning the skeletons, it now
8739 processes the output of m4: `__oline__' and `#output'.
8740 * data/bison.simple: Adjust to be used by M4(sugar).
8741 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
8742 to date.
8743 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
8744 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
8745 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
8746 shamelessly stolen from CVS Autoconf.
8747
8748 2002-02-05 Akim Demaille <akim@epita.fr>
8749
8750 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
8751 * configure.in: Check for the declarations of free and malloc.
8752 * src/muscle_tab.c: Adjust.
8753
8754 2002-02-05 Akim Demaille <akim@epita.fr>
8755
8756 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
8757 which have no values.
8758
8759 2002-02-05 Akim Demaille <akim@epita.fr>
8760
8761 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
8762 * data/: here.
8763
8764 2002-01-29 Paul Eggert <eggert@twinsun.com>
8765
8766 * src/bison.simple (YYSIZE_T): Do not define merely because
8767 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
8768 On some platforms, <alloca.h> does not declare YYSTD (size_t).
8769
8770 2002-01-27 Akim Demaille <akim@epita.fr>
8771
8772 Fix `%nonassoc and eof'.
8773
8774 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
8775 which were not properly copied! Replace
8776 memcpy (res->errs, src->errs, src->nerrs);
8777 with
8778 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
8779 !!!
8780 * tests/regression.at (%nonassoc and eof): Adjust to newest
8781 Autotest: `.' is not in the PATH.
8782
8783 2002-01-27 Akim Demaille <akim@epita.fr>
8784
8785 * tests/sets.at (AT_EXTRACT_SETS): New.
8786 (Nullable): Use it.
8787 (Firsts): New.
8788
8789 2002-01-26 Akim Demaille <akim@epita.fr>
8790
8791 * tests/actions.at, tests/calc.at, tests/headers.at,
8792 * tests/torture.at: Adjust to the newest Autotest which no longer
8793 forces `.' in the PATH.
8794
8795 2002-01-25 Akim Demaille <akim@epita.fr>
8796
8797 * tests/regression.at (%nonassoc and eof): New.
8798 Suggested by Robert Anisko.
8799
8800 2002-01-24 Akim Demaille <akim@epita.fr>
8801
8802 Bison dumps core when trying to complain about broken input files.
8803 Reported by Cris van Pelt.
8804
8805 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
8806 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
8807 into...
8808 (Invalid inputs): Strengthen: exercise parse_percent_token.
8809
8810 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
8811
8812 * src/Makefile.am: Add bison.c++.
8813 * src/bison.c++: New skeleton.
8814
8815 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
8816
8817 * po/it.po: New.
8818
8819 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
8820
8821 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
8822
8823 2002-01-20 Marc Autret <marc@gnu.org>
8824
8825 * src/files.c (compute_output_file_names): Fix
8826
8827 2002-01-20 Marc Autret <marc@gnu.org>
8828
8829 * tests/output.at: New test.
8830 * src/files.c (compute_base_names): Don't map extensions when
8831 the YACC flag is set, use defaults.
8832 Reported by Evgeny Stambulchik.
8833
8834 2002-01-20 Marc Autret <marc@gnu.org>
8835
8836 * src/system.h: Need to define __attribute__ away for non-GCC
8837 compilers as well (i.e. the vendor C compiler).
8838 Suggested by Albert Chin-A-Young.
8839
8840 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
8841
8842 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
8843 canonical definition.
8844 * src/system.h: Use the canonical definition for PARAMS (avoids
8845 a conflict with the macro from lib/hash.h).
8846
8847 2002-01-11 Akim Demaille <akim@epita.fr>
8848
8849 * configure.in: Use AC_FUNC_STRNLEN.
8850 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
8851
8852 2002-01-09 Akim Demaille <akim@epita.fr>
8853
8854 * src/files.c, src/files.h (output_infix): New.
8855 (tab_extension): Remove.
8856 (compute_base_names): Compute the former, drop the latter.
8857 * src/output.c (prepare): Insert the muscles `output-infix', and
8858 `output-suffix'.
8859 * src/parse-skel.y (string, string.1): New.
8860 (section.header): Use it.
8861 (section.yacc): Remove.
8862 (prefix): Remove too.
8863 * src/scan-skel.l: Adjust.
8864 * src/bison.simple, src/bison.hairy: Adjust.
8865
8866 2002-01-09 Akim Demaille <akim@epita.fr>
8867
8868 * configure.in (WERROR_CFLAGS): Compute it.
8869 * src/Makefile.am (CFLAGS): Pass it.
8870 * tests/atlocal.in (CFLAGS): Idem.
8871 * src/files.c: Fix a few warnings.
8872 (get_extension_index): Remove, unused.
8873
8874 2002-01-08 Akim Demaille <akim@epita.fr>
8875
8876 * src/getargs.c (AS_FILE_NAME): New.
8877 (getargs): Use it to convert DOSish file names.
8878 * src/files.c (base_name): Rename as full_base_name to avoid
8879 clashes with `base_name ()'.
8880 (filename_split): New.
8881 (compute_base_names): N-th rewrite, using filename_split.
8882
8883 2002-01-08 Akim Demaille <akim@epita.fr>
8884
8885 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
8886 New, stolen from the Fileutils 4.1.
8887 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8888 * configure.in: Check for the presence of memrchr, and of its
8889 prototype.
8890
8891 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
8892
8893 * lib/hash.h (__P): Added definition for this macro.
8894 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
8895 BUILT_SOURCES, to ensure they are generated first.
8896 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
8897 %error-verbose to allow bootstrapping with bison 1.30x.
8898
8899 2002-01-06 Akim Demaille <akim@epita.fr>
8900
8901 * src/reader.c (parse_braces): Don't fetch the next char, the
8902 convention is to fetch on entry.
8903 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
8904 'switch' without a following semicolon.
8905 * tests/regression.at (braces parsing): New.
8906
8907 2002-01-06 Akim Demaille <akim@epita.fr>
8908
8909 Bison is dead wrong in its RR conflict reports.
8910
8911 * tests/torture.at (GNU Cim Grammar): New.
8912 * src/conflicts.c (count_rr_conflicts): Fix.
8913
8914 2002-01-06 Akim Demaille <akim@epita.fr>
8915
8916 Creating package.m4 from configure.ac causes too many problems.
8917
8918 * tests/Makefile.am (package.m4): Create it by hand,
8919 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
8920
8921 2002-01-06 Akim Demaille <akim@epita.fr>
8922
8923 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
8924 skeleton.h.
8925
8926 2002-01-04 Paul Eggert <eggert@twinsun.com>
8927
8928 * doc/bison.texinfo (Debugging):
8929 Remove YYSTDERR; it's no longer defined or used.
8930 Also, s/cstdio.h/cstdio/.
8931
8932 2002-01-03 Akim Demaille <akim@epita.fr>
8933
8934 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
8935
8936 2002-01-03 Akim Demaille <akim@epita.fr>
8937
8938 * src/parse-skel.y (process_skeleton): Don't bind the parser's
8939 tracing code to --trace, wait for a better --trace option, with
8940 args.
8941
8942 2002-01-03 Akim Demaille <akim@epita.fr>
8943
8944 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
8945 The ISO C++ standard is extremely clear about it: stderr is
8946 considered a macro, not a regular symbol (see table 94 `Header
8947 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
8948 Therefore std:: does not apply to it. It still does with fprintf.
8949 Also, s/cstdio.h/cstdio/.
8950
8951 2002-01-03 Akim Demaille <akim@epita.fr>
8952
8953 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
8954 for non system headers.
8955
8956 2002-01-02 Akim Demaille <akim@epita.fr>
8957
8958 Equip the skeleton chain with location tracking, runtime trace,
8959 pure parser and scanner.
8960
8961 * src/parse-skel.y: Request a pure parser, locations, and prefix
8962 renaming.
8963 (%union): Having several members with the same type does not help
8964 type mismatches, simplify.
8965 (YYPRINT, yyprint): New.
8966 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
8967 (skel_error): this.
8968 Handle locations.
8969 * src/scan-skel.l: Adjust to these changes.
8970 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
8971 (LOCATION_PRINT, skel_control_t): New.
8972
8973 2001-12-30 Akim Demaille <akim@epita.fr>
8974
8975 * src/parse-skel.y: Get rid of the shift/reduce conflict:
8976 replace `gb' with BLANKS.
8977 * src/scan-skel.l: Adjust.
8978
8979 2001-12-30 Akim Demaille <akim@epita.fr>
8980
8981 * src/system.h: We don't need nor want bcopy.
8982 Throw away MS-DOS crap: we don't need getpid.
8983 * configure.in: We don't need strndup. It was even causing
8984 problems: because Flex includes the headers *before* us,
8985 _GNU_SOURCE is not defined by config.h, and therefore strndup was
8986 not visible.
8987 * lib/xstrndup.c: New.
8988 * src/scan-skel.l: Use it.
8989 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
8990 * src/parse-skel.y: Use %directives instead of #defines.
8991
8992 2001-12-30 Akim Demaille <akim@epita.fr>
8993
8994 * src/skeleton.h: New.
8995 * src/output.c (output_parser, output_master_parser): Remove, dead
8996 code.
8997 * src/output.h (get_lines_number, actions_output, guards_output)
8998 (token_definitions_output): Prototype them.
8999 * src/parse-skel.y: Add the license notice.
9000 Include output.h and skeleton.h.
9001 (process_skeleton): Returns void, and takes a single parameter.
9002 * src/scan-skel.l: Add the license notice.
9003 Include skeleton.h.
9004 Don't use %option yylineno: it seems that then Flex imagines
9005 REJECT has been used, and therefore it won't reallocate its
9006 buffers (which makes no other sense to me than a bug). It results
9007 in warnings for `unused: yy_flex_realloc'.
9008
9009 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
9010
9011 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9012 (MUSCLE_INSERT_PREFIX): ...to there.
9013 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
9014 (MUSCLE_INSERT_PREFIX): Move from here...
9015
9016 * src/bison.hairy: Add a section directive. Put braces around muscle
9017 names. This parser skeleton is still broken, but Bison should not
9018 choke on a bad muscle 'syntax'.
9019 * src/bison.simple: Add a section directive. Put braces around muscle
9020 names.
9021
9022 * src/files.h (strsuffix, stringappend): Add declarations.
9023 (tab_extension): Add declaration.
9024 (short_base_name): Add declaration.
9025
9026 * src/files.c (strsuffix, stringappend): No longer static. These
9027 functions are used in the skeleton parser.
9028 (tab_extension): New.
9029 (compute_base_names): Use the computations done in this function
9030 to guess if the generated parsers should have '.tab' in their
9031 names.
9032 (short_base_name): No longer static.
9033
9034 * src/output.c (output_skeleton): New.
9035 (output): Disable call to output_master_parser, and give a try to
9036 a new skeleton handling system.
9037 (guards_output, actions_output): No longer static.
9038 (token_definitions_output, get_lines_number): No longer static.
9039
9040 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
9041
9042 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9043 parse-skel.y.
9044
9045 * src/parse-skel.y: New file.
9046 * src/scan-skel.l: New file.
9047
9048 2001-12-29 Akim Demaille <akim@epita.fr>
9049
9050 %name-prefix is broken.
9051
9052 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
9053 Adjust all dependencies.
9054 * tests/headers.at (export YYLTYPE): Strengthen this test: use
9055 %name-prefix.
9056
9057 Renaming yylval but not yylloc is not consistent. Now we do.
9058
9059 * src/bison.simple: Prefix yylloc if used.
9060 * doc/bison.texinfo (Decl Summary): Document that.
9061
9062 2001-12-29 Akim Demaille <akim@epita.fr>
9063
9064 * doc/bison.texinfo: Promote `%long-directive' over
9065 `%long_directive'.
9066 Remove all references to fixed-output-files, yacc is enough.
9067
9068 2001-12-29 Akim Demaille <akim@epita.fr>
9069
9070 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
9071 user prologue. These are defaults.
9072 * tests/actions.at (Mid-rule actions): Make sure the user can
9073 define YYDEBUG and YYERROR_VERBOSE.
9074
9075 2001-12-29 Akim Demaille <akim@epita.fr>
9076
9077 * src/output.c (header_output): Don't forget to export YYLTYPE and
9078 yylloc.
9079 * tests/headers.at (export YYLTYPE): New, make sure it does.
9080 * tests/regression.at (%union and --defines, Invalid CPP headers):
9081 Move to...
9082 * tests/headers.at: here.
9083
9084 2001-12-29 Akim Demaille <akim@epita.fr>
9085
9086 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
9087
9088 2001-12-29 Akim Demaille <akim@epita.fr>
9089
9090 * tests/actions.at (Mid-rule actions): Output on a single line
9091 instead of several.
9092
9093 2001-12-29 Akim Demaille <akim@epita.fr>
9094
9095 * doc/bison.texinfo: Formatting changes.
9096
9097 2001-12-29 Akim Demaille <akim@epita.fr>
9098
9099 Don't store the token defs in a muscle, just be ready to output it
9100 on command. Now possible via `symbols'. Fixes a memory leak.
9101
9102 * src/output.c (token_definitions_output): New.
9103 (output_parser, header_output): Use it.
9104 * src/reader.c (symbols_save): Remove.
9105
9106 2001-12-29 Akim Demaille <akim@epita.fr>
9107
9108 * src/bison.simple: Do not provide a default for YYSTYPE and
9109 YYLTYPE before the user's prologue. Otherwise it's hardly... a
9110 default.
9111
9112 2001-12-29 Akim Demaille <akim@epita.fr>
9113
9114 Mid-rule actions are simply... ignored!
9115
9116 * src/reader.c (readgram): Be sure to attach mid-rule actions to
9117 the empty-rule associated to the dummy symbol, not to the host
9118 rule.
9119 * tests/actions.at (Mid-rule actions): New.
9120
9121 2001-12-29 Akim Demaille <akim@epita.fr>
9122
9123 Memory leak.
9124
9125 * src/reader.c (reader): Free grammar.
9126
9127 2001-12-29 Akim Demaille <akim@epita.fr>
9128
9129 Memory leak.
9130
9131 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
9132 since it allocates it for each state, although only one is needed.
9133 (allocate_storage): Do it here.
9134
9135 2001-12-29 Akim Demaille <akim@epita.fr>
9136
9137 * src/options.h, src/options.c (create_long_option_table): Rename
9138 as...
9139 (long_option_table_new): this, with a clearer prototype.
9140 (percent_table): Remove, unused,
9141 * src/getargs.c (getargs): Adjust.
9142
9143 2001-12-29 Akim Demaille <akim@epita.fr>
9144
9145 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
9146 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
9147 as states.
9148
9149 2001-12-29 Akim Demaille <akim@epita.fr>
9150
9151 * src/lalr.c (build_relations): Rename `states' as `states1'.
9152 Sorry, I don't understand exactly what it is, no better name...
9153
9154 2001-12-29 Akim Demaille <akim@epita.fr>
9155
9156 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
9157 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
9158 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
9159 as rules.
9160
9161 2001-12-29 Akim Demaille <akim@epita.fr>
9162
9163 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
9164 ago.
9165
9166 2001-12-29 Akim Demaille <akim@epita.fr>
9167
9168 * src/reader.c, src/reader.h (user_toknums): Remove.
9169 Adjust all users to use symbols[i]->user_token_number.
9170
9171 2001-12-29 Akim Demaille <akim@epita.fr>
9172
9173 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
9174 Adjust all users to use symbols[i]->prec or ->assoc.
9175
9176 2001-12-29 Akim Demaille <akim@epita.fr>
9177
9178 * src/reader.c, src/reader.h (tags): Remove.
9179 Adjust all users to use symbols[i]->tag.
9180
9181 2001-12-29 Akim Demaille <akim@epita.fr>
9182
9183 * src/gram.h, src/gram.c (symbols): New, similar to state_table
9184 and rule_table.
9185 * src/reader.c (packsymbols): Fill this table.
9186 Drop sprec.
9187 * src/conflicts.c (resolve_sr_conflict): Adjust.
9188 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
9189 single table.
9190 Use symbols[i]->tag instead of tags[i].
9191
9192 2001-12-29 Akim Demaille <akim@epita.fr>
9193
9194 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
9195 In addition, put a comment in there, to replace...
9196 * tests/regression.at (%union and C comments): Remove.
9197
9198 2001-12-29 Akim Demaille <akim@epita.fr>
9199
9200 * tests/regression.at (Web2c Actions): Blindly move the actual
9201 output as expected output. The contents *seem* right to me, but I
9202 can't pretend reading perfectly parser tables... Nonetheless, all
9203 the other tests pass correctly, the table look OK, even though the
9204 presence of `$axiom' is to be noted: AFAICS it is useless (but
9205 harmless).
9206
9207 2001-12-29 Akim Demaille <akim@epita.fr>
9208
9209 * src/reader.c (readgram): Don't add the rule 0 if there were no
9210 rules read. In other words, add it _after_ having performed
9211 grammar sanity checks.
9212 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
9213
9214 2001-12-29 Akim Demaille <akim@epita.fr>
9215
9216 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
9217 visible, and some states have now a different number.
9218
9219 2001-12-29 Akim Demaille <akim@epita.fr>
9220
9221 * src/reader.c (readgram): Bind the initial rule's lineno to that
9222 of the first rule.
9223 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
9224 (Solved SR Conflicts): Adjust rule 0's line number.
9225
9226 2001-12-29 Akim Demaille <akim@epita.fr>
9227
9228 Fix the `GAWK Grammar' failure.
9229
9230 * src/LR0.c (final_state): Initialize to -1 so that we do compute
9231 the reductions of the first state which was mistakenly confused
9232 with the final state because precisely final_state was initialized
9233 to 0.
9234 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
9235 now noticed by Bison.
9236 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
9237 have a reduction on $default.
9238
9239 2001-12-29 Akim Demaille <akim@epita.fr>
9240
9241 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
9242 rule line numbers.
9243 * src/closure.c (print_closure): Likewise.
9244 * src/derives.c (print_derives): Likewise.
9245 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
9246 now.
9247
9248 2001-12-29 Akim Demaille <akim@epita.fr>
9249
9250 * src/lalr.c (lookaheads_print): New.
9251 (lalr): Call it when --trace-flag.
9252 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
9253 are dumped.
9254
9255 2001-12-29 Akim Demaille <akim@epita.fr>
9256
9257 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
9258 when walking through ritem, even via rule->rhs.
9259 * src/reduce.c (dump_grammar, useful_production, reduce_output)
9260 (useful_production, useless_nonterminals): Likewise.
9261 (reduce_grammar_tables): Likewise, plus update nritems.
9262 * src/nullable.c (set_nullable): Likewise.
9263 * src/lalr.c (build_relations): Likewise.
9264 * tests/sets.at (Nullable): Adjust.
9265 Fortunately, now, the $axiom is no longer nullable.
9266
9267 2001-12-29 Akim Demaille <akim@epita.fr>
9268
9269 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
9270 the 0-sentinel.
9271 * src/gram.c (ritem_longest_rhs): Likewise.
9272 * src/reduce.c (nonterminals_reduce): Likewise.
9273 * src/print_graph.c (print_graph): Likewise.
9274 * src/output.c (output_rule_data): Likewise.
9275 * src/nullable.c (set_nullable): Likewise.
9276
9277 2001-12-29 Akim Demaille <akim@epita.fr>
9278
9279 * src/output.c: Comment changes.
9280
9281 2001-12-27 Paul Eggert <eggert@twinsun.com>
9282
9283 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
9284 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
9285 Sparc, as they were causing more porting problems than the
9286 (minor) performance improvement was worth.
9287
9288 Also, catch up with 1.31's YYSTD.
9289
9290 2001-12-27 Akim Demaille <akim@epita.fr>
9291
9292 * src/output.c (output_gram): Rely on nritems, not the
9293 0-sentinel. See below.
9294 Use -1 as separator, not 0.
9295 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
9296 Rely on -1 as separator in yyrhs, instead of 0.
9297 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
9298 twice `Now at end of input', therefore there are two lines less to
9299 expect.
9300
9301 2001-12-27 Akim Demaille <akim@epita.fr>
9302
9303 * tests/regression.at (Unresolved SR Conflicts):
9304 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
9305 below.
9306
9307 2001-12-27 Akim Demaille <akim@epita.fr>
9308
9309 * src/LR0.c (new_state): Recognize the final state by the fact it
9310 is reached by eoftoken.
9311 (insert_start_shifting_state, insert_eof_shifting_state)
9312 (insert_accepting_state, augment_automaton): Remove, since now
9313 these states are automatically computed from the initial state.
9314 (generate_states): Adjust.
9315 * src/print.c: When reporting a rule number to the user, substract
9316 1, so that the axiom rule is rule 0, and the first user rule is 1.
9317 * src/reduce.c: Likewise.
9318 * src/print_graph.c (print_core): For the time being, just as for
9319 the report, depend upon --trace-flags to dump the full set of
9320 items.
9321 * src/reader.c (readgram): Once the grammar read, insert the rule
9322 0: `$axiom: START-SYMBOL $'.
9323 * tests/set.at: Adjust: rule 0 is now displayed, and since the
9324 number of the states has changed (the final state is no longer
9325 necessarily the last), catch up.
9326
9327 2001-12-27 Akim Demaille <akim@epita.fr>
9328
9329 Try to make the use of the eoftoken valid. Given that its value
9330 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
9331 is used instead of > 0 where appropriate, (ii), depend upon nritems
9332 instead of the 0-sentinel.
9333
9334 * src/gram.h, src/gram.c (nritems): New.
9335 Expected to be duplication of nitems, but for the time being...
9336 * src/reader.c (packgram): Assert nritems and nitems are equal.
9337 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
9338 * src/closure.c (print_closure, print_fderives): Likewise.
9339 * src/gram.c (ritem_print): Likewise.
9340 * src/print.c (print_core, print_grammar): Likewise.
9341 * src/print_graph.c: Likewise.
9342
9343 2001-12-27 Akim Demaille <akim@epita.fr>
9344
9345 * src/main.c (main): If there are complains after grammar
9346 reductions, then output the report anyway if requested, then die.
9347 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
9348 * src/reader.c (eoftoken): New.
9349 (parse_token_decl): If the token being defined has value `0', it
9350 is the eoftoken.
9351 (packsymbols): No longer hack `tags' to insert `$' by hand.
9352 Be sure to preserve the value of the eoftoken.
9353 (reader): Make sure eoftoken is defined.
9354 Initialize nsyms to 0: now eoftoken is created just like the others.
9355 * src/print.c (print_grammar): Don't special case the eof token.
9356 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
9357 lie anyway, albeit pleasant.
9358 * tests/calc.at: Exercise error messages with eoftoken.
9359 Change the grammar so that empty input is invalid.
9360 Adjust expectations.
9361 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
9362
9363 2001-12-27 Akim Demaille <akim@epita.fr>
9364
9365 * configure.in: Check the protos of strchr ans strspn.
9366 Replace strchr if needed.
9367 * src/system.h: Provide the protos of strchr, strspn and memchr if
9368 missing.
9369 * lib/strchr.c: New.
9370 * src/reader.c (symbols_save): Use strchr.
9371
9372 2001-12-27 Akim Demaille <akim@epita.fr>
9373
9374 * src/print.c, src/print_graph.c (escape): New.
9375 Use it to quote the TAGS outputs.
9376 * src/print_graph.c (print_state): Now errors are in red, and
9377 reductions in green.
9378 Prefer high to wide: output the state number on a line of its own.
9379
9380 2001-12-27 Akim Demaille <akim@epita.fr>
9381
9382 * src/state.h, src/state.c (reductions_new): New.
9383 * src/LR0.c (set_state_table): Let all the states have a
9384 `reductions', even if reduced to 0.
9385 (save_reductions): Adjust.
9386 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
9387 * src/print.c (print_reductions, print_actions): Adjust.
9388 * src/output.c (action_row): Adjust.
9389
9390 2001-12-27 Akim Demaille <akim@epita.fr>
9391
9392 * src/state.h, src/state.c (errs_new, errs_dup): New.
9393 * src/LR0.c (set_state_table): Let all the states have an errs,
9394 even if reduced to 0.
9395 * src/print.c (print_errs, print_reductions): Adjust.
9396 * src/output.c (output_actions, action_row): Adjust.
9397 * src/conflicts.c (resolve_sr_conflict): Adjust.
9398
9399 2001-12-27 Akim Demaille <akim@epita.fr>
9400
9401 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
9402
9403 2001-12-27 Akim Demaille <akim@epita.fr>
9404
9405 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
9406 * src/print.c: here.
9407 (lookaheadset, shiftset): New, used as additional storage by
9408 print_reductions.
9409 (print_results): Adjust.
9410 (print_shifts, print_gotos, print_errs): New, extracted from...
9411 (print_actions): here.
9412 * src/print_graph.c (print_actions): Remove dead code.
9413
9414 2001-12-27 Akim Demaille <akim@epita.fr>
9415
9416 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
9417 `$n' and `@n'.
9418
9419 2001-12-27 Akim Demaille <akim@epita.fr>
9420
9421 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
9422 (build_relations): Adjust.
9423
9424 2001-12-27 Akim Demaille <akim@epita.fr>
9425
9426 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
9427 duplication.
9428
9429 2001-12-27 Akim Demaille <akim@epita.fr>
9430
9431 * src/reader.c (packgram): Catch nitems overflows.
9432
9433 2001-12-27 Akim Demaille <akim@epita.fr>
9434
9435 * src/files.c, src/files.h (guard_obstack): Remove.
9436 * src/output.c (output): Adjust.
9437 * src/reader.c (parse_braces): New, factoring...
9438 (copy_action, copy_guard): these two which are renamed as...
9439 (parse_action, parse_guard): these.
9440 As a voluntary consequence, using braces around guards is now
9441 mandatory.
9442
9443 2001-12-27 Akim Demaille <akim@epita.fr>
9444
9445 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
9446 * src/reader.c (symbol_list): `guard' and `guard_line' are new
9447 members.
9448 (symbol_list_new): Adjust.
9449 (copy_action): action_line is the first line, not the last.
9450 (copy_guard): Just as for actions, store the `action' only, not
9451 the switch/case/break flesh.
9452 Don't parse the user action that might follow the guard, let...
9453 (readgram): do it, i.e., now, there can be an action after a
9454 guard.
9455 In other words the guard is just explicitly optional.
9456 (packgram): Adjust.
9457 * src/output.c (guards_output): New.
9458 (output_parser): Call it when needed.
9459 (output): Also free the guard and attrs obstacks.
9460 * src/files.c, src/files.h (obstack_save): Remove.
9461 (output_files): Remove.
9462 As a result, if one needs the former `.act' file, using an
9463 appropriate skeleton which requires actions and guards is now
9464 required.
9465 * src/main.c (main): Adjust.
9466 * tests/semantic.at: New.
9467 * tests/regression.at: Use `input.y' as input file name.
9468 Avoid 8+3 problems by requiring input.c when the test needs the
9469 parser.
9470
9471 2001-12-27 Akim Demaille <akim@epita.fr>
9472
9473 * src/reader.c (symbol_list_new): Be sure to initialize all the
9474 fields.
9475
9476 2001-12-27 Akim Demaille <akim@epita.fr>
9477
9478 All the hacks using a final pseudo state are now useless.
9479
9480 * src/LR0.c (set_state_table): state_table holds exactly nstates.
9481 * src/lalr.c (nLA): New.
9482 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
9483 instead of lookaheadsp from the pseudo state (nstate + 1).
9484
9485 2001-12-27 Akim Demaille <akim@epita.fr>
9486
9487 * src/output.c (action_row, token_actions): Use a state_t instead
9488 of a integer, and nlookaheads instead of the following state's
9489 lookaheadsp.
9490
9491 2001-12-27 Akim Demaille <akim@epita.fr>
9492
9493 * src/conflicts.c (log_resolution, flush_shift)
9494 (resolve_sr_conflict, set_conflicts, solve_conflicts)
9495 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
9496 (conflicts_print, print_reductions): Use a state_t instead of an
9497 integer when referring to a state.
9498 As much as possible, depend upon nlookaheads, instead of the
9499 `lookaheadsp' member of the following state (since lookaheads of
9500 successive states are successive, the difference between state n + 1
9501 and n served as the number of lookaheads for state n).
9502 * src/lalr.c (add_lookback_edge): Likewise.
9503 * src/print.c (print_core, print_actions, print_state)
9504 (print_results): Likewise.
9505 * src/print_graph.c (print_core, print_actions, print_state)
9506 (print_graph): Likewise.
9507 * src/conflicts.h: Adjust.
9508
9509 2001-12-27 Akim Demaille <akim@epita.fr>
9510
9511 * src/bison.hairy: Formatting/comment changes.
9512 ANSIfy.
9513 Remove `register' indications.
9514 Add plenty of `static'.
9515
9516 2001-12-27 Akim Demaille <akim@epita.fr>
9517
9518 * src/output.c (prepare): Drop the muscle `ntbase' which
9519 duplicates ntokens.
9520 * src/bison.simple: Formatting/comment changes.
9521 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
9522 is an undocumented synonym.
9523
9524 2001-12-22 Akim Demaille <akim@epita.fr>
9525
9526 * src/output.c (output_table_data): Change the prototype to use
9527 `int' for array ranges: some invocations do pass an int, not a
9528 short.
9529 Reported by Wayne Green.
9530
9531 2001-12-22 Akim Demaille <akim@epita.fr>
9532
9533 Some actions of web2c.y are improperly triggered.
9534 Reported by Mike Castle.
9535
9536 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
9537 * tests/regression.at (Web2c): Rename as...
9538 (Web2c Report): this.
9539 (Web2c Actions): New.
9540
9541 2001-12-22 Akim Demaille <akim@epita.fr>
9542
9543 Reductions in web2c.y are improperly reported.
9544 Reported by Mike Castle.
9545
9546 * src/conflicts.c (print_reductions): Fix.
9547 * tests/regression.at (Web2c): New.
9548
9549 2001-12-18 Akim Demaille <akim@epita.fr>
9550
9551 Some host fail on `assert (!"foo")', which expands to
9552 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
9553 Reported by Nelson Beebee.
9554
9555 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
9556 `#define it_succeeded 0' and `assert (it_succeeded)'.
9557
9558 2001-12-17 Marc Autret <autret_m@epita.fr>
9559
9560 * src/bison.simple: Don't hard code the skeleton line and filename.
9561 * src/output.c (output_parser): Rename 'line' as 'output_line'.
9562 New line counter 'skeleton_line' (skeleton-line muscle).
9563
9564 2001-12-17 Paul Eggert <eggert@twinsun.com>
9565
9566 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
9567 YYDEBUG must be defined to a nonzero value.
9568
9569 * src/bison.simple (yytname): Do not assume that the user defines
9570 YYDEBUG to a properly parenthesized expression.
9571
9572 2001-12-17 Akim Demaille <akim@epita.fr>
9573
9574 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
9575 nlookaheads is a new member.
9576 Adjust all users.
9577 * src/lalr.h (nlookaheads): Remove this orphan declaration.
9578 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
9579 state.
9580
9581 2001-12-17 Akim Demaille <akim@epita.fr>
9582
9583 * src/files.h, src/files.c (open_files, close_files): Remove.
9584 * src/main.c (main): Don't open/close files, nor invoke lex_free,
9585 let...
9586 * src/reader.c (reader): Do it.
9587
9588 2001-12-17 Akim Demaille <akim@epita.fr>
9589
9590 * src/conflicts.c (print_reductions): Formatting changes.
9591
9592 2001-12-17 Akim Demaille <akim@epita.fr>
9593
9594 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
9595 (flush_reduce): New.
9596 (resolve_sr_conflict): Adjust.
9597
9598 2001-12-17 Akim Demaille <akim@epita.fr>
9599
9600 * src/output.c (output_obstack): Be static and rename as...
9601 (format_obstack): this, to avoid any confusion with files.c's
9602 output_obstack.
9603 * src/reader.h (muscle_obstack): Move to...
9604 * src/output.h: here, since it's defined in output.c.
9605
9606 2001-12-17 Akim Demaille <akim@epita.fr>
9607
9608 * src/output.c (action_row, save_column, default_goto)
9609 (sort_actions, matching_state, pack_vector): Better variable
9610 locality.
9611
9612 2001-12-17 Akim Demaille <akim@epita.fr>
9613
9614 * src/output.c: Various formatting changes.
9615
9616 2001-12-17 Akim Demaille <akim@epita.fr>
9617
9618 * src/files.c (output_files): Free the output_obstack.
9619 * src/main.c (main): Call print and print_graph conditionally.
9620 * src/print.c (print): Work unconditionally.
9621 * src/print_graph.c (print_graph): Work unconditionally.
9622 * src/conflicts.c (log_resolution): Output only if verbose_flag.
9623
9624 2001-12-16 Marc Autret <autret_m@epita.fr>
9625
9626 * src/output.c (actions_output): Fix. When we use %no-lines,
9627 there is one less line per action.
9628
9629 2001-12-16 Marc Autret <autret_m@epita.fr>
9630
9631 * src/bison.simple: Remove a useless #line directive.
9632 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
9633 * src/output.c (get_lines_number): New.
9634 (output_parser): Adjust, now takes care about the lines of a
9635 output muscles.
9636 Fix line numbering.
9637 (actions_output): Computes the number of lines taken by actions.
9638 (output_master_parser): Insert new skeleton which is the name of
9639 the output parser file name.
9640
9641 2001-12-15 Marc Autret <autret_m@epita.fr>
9642
9643 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
9644
9645 2001-12-15 Marc Autret <autret_m@epita.fr>
9646
9647 * src/output.c (output_gram): Keep track of the hairy one.
9648
9649 2001-12-15 Akim Demaille <akim@epita.fr>
9650
9651 Make `make distcheck' work.
9652
9653 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
9654 system.h which uses libgettext.h.
9655
9656 2001-12-15 Akim Demaille <akim@epita.fr>
9657
9658 * src/nullable.c (set_nullable): Useless rules must be skipped,
9659 otherwise, since we range over their symbols, we might look at a
9660 nonterminal which no longer ``exists'', i.e., it is not counted in
9661 `nvars', hence we overflow our arrays.
9662
9663 2001-12-15 Akim Demaille <akim@epita.fr>
9664
9665 The header can also be produced directly, without any obstack!
9666 Yahoo!
9667
9668 * src/files.c, src/files.h (defines_obstack): Remove.
9669 (compute_header_macro): Global.
9670 (defines_obstack_save): Remove.
9671 * src/reader.c (parse_union_decl): No longer output to
9672 defines_obstack: its content can be found in the `stype' muscle
9673 anyway.
9674 (output_token_translations): Merge into...
9675 (symbols_output): this.
9676 Rename as...
9677 (symbols_save): this.
9678 (reader): Adjust.
9679 * src/output.c (header_output): New.
9680 (output): Call it.
9681
9682 2001-12-15 Akim Demaille <akim@epita.fr>
9683
9684 * src/reader.c (parse_union_decl): Instead of handling two obstack
9685 simultaneously, use one to define the `stype' muscle, and use the
9686 value of the latter to fill defines_obstack.
9687 (copy_comment): Remove.
9688 (copy_comment2): Work for a single obstack.
9689 Rename as...
9690 (copy_comment): this.
9691
9692 2001-12-15 Akim Demaille <akim@epita.fr>
9693
9694 * src/lex.c, src/lex.h (xgetc): No longer static.
9695 * src/reader.c (parse_union_decl): Revamp.
9696
9697 2001-12-15 Akim Demaille <akim@epita.fr>
9698
9699 Still making progress in separating Bison into (i) input, (ii)
9700 process, (iii) output: now we can directly output the parser file
9701 without using table_obstack at all.
9702
9703 * src/files.c, src/files.h (table_obstack): Bye bye.
9704 (parser_file_name): New.
9705 * src/files.c (compute_output_file_names): Compute it.
9706 * src/output.c (actions_output, output_parser)
9707 (output_master_parser): To a file instead of an obstack.
9708
9709 2001-12-15 Akim Demaille <akim@epita.fr>
9710
9711 Attach actions to rules, instead of pre-outputting them to
9712 actions_obstack.
9713
9714 * src/gram.h (rule_t): action and action_line are new members.
9715 * src/reader.c (symbol_list): Likewise.
9716 (copy_action): Save the actions within the rule.
9717 (packgram): Save them in rule_table.
9718 * src/output.c (actions_output): New.
9719 (output_parser): Use it on `%%actions'.
9720 (output_rule_data): Don't free rule_table.
9721 (output): Do it.
9722 (prepare): Don't save the `action' muscle.
9723 * src/bison.simple: s/%%action/%%actions/.
9724
9725 2001-12-15 Akim Demaille <akim@epita.fr>
9726
9727 * src/reader.c (copy_action): When --yacc, don't append a `;'
9728 to the user action: let it fail if lacking.
9729 Suggested by Arnold Robbins and Tom Tromey.
9730
9731 2001-12-14 Akim Demaille <akim@epita.fr>
9732
9733 * src/lex.c (literalchar): Simply return the char you decoded, non
9734 longer mess around with obstacks and int pointers.
9735 Adjust all callers.
9736
9737 2001-12-14 Akim Demaille <akim@epita.fr>
9738
9739 * src/lex.c (literalchar): Don't escape the special characters,
9740 just decode them, and keep them as char (before, eol was output as
9741 the 2 char string `\n' etc.).
9742 * src/output.c (output_rule_data): Use quotearg to output the
9743 token strings.
9744
9745 2001-12-13 Paul Eggert <eggert@twinsun.com>
9746
9747 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
9748 Do not infringe on the global user namespace when using C++.
9749 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
9750 All uses of `fprintf' and `stderr' changed.
9751
9752 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
9753
9754 2001-12-13 Akim Demaille <akim@epita.fr>
9755
9756 The computation of nullable is broken: it doesn't handle empty
9757 RHS's properly.
9758
9759 * tests/torture.at (GNU AWK Grammar): New.
9760 * tests/sets.at (Nullable): New.
9761 * src/nullable.c (set_nullable): Instead of blindly looping over
9762 `ritems', loop over the rules, and then over their rhs's.
9763
9764 Work around Autotest bugs.
9765
9766 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
9767 frame, because Autotest understand lines starting with a `+' as
9768 traces from the shell. Then, they are not processed properly.
9769 Admittedly an Autotest bug, but we don't have time to wait for
9770 Autotest to catch up.
9771 * tests/regression.at (Broken Closure): Adjust to the new table
9772 frames.
9773 Move to...
9774 * tests/sets.at: here.
9775
9776 2001-12-13 Akim Demaille <akim@epita.fr>
9777
9778 * src/closure.c (closure): Use nrules instead of playing tricks
9779 with BITS_PER_WORD.
9780
9781 2001-12-13 Akim Demaille <akim@epita.fr>
9782
9783 * src/print.c (print_actions): Output the handling of `$' as the
9784 traces do: shifting the token EOF. Before EOF was treated as a
9785 nonterminal.
9786 * tests/regression.at: Adjust some tests.
9787 * src/print_graph.c (print_core): Complete the set of items via
9788 closure. The next-to-final and final states are still unsatisfying,
9789 but that's to be addressed elsewhere.
9790 No longer output the rule numbers, but do output the state number.
9791 A single loop for the shifts + gotos is enough, but picked a
9792 distinct color for each.
9793 (print_graph): Initialize and finalize closure.
9794
9795 2001-12-13 Akim Demaille <akim@epita.fr>
9796
9797 * src/reader.c (readgram): Remove dead code, an strip useless
9798 braces.
9799 (get_type): Remove, unused.
9800
9801 2001-12-12 Akim Demaille <akim@epita.fr>
9802
9803 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
9804 on that of lib/error.c.
9805
9806 2001-12-12 Akim Demaille <akim@epita.fr>
9807
9808 Some hosts don't like `/' in includes.
9809
9810 * src/system.h: Include libgettext.h without qualifying the path.
9811 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
9812 $(top_srcdir).
9813
9814 2001-12-11 Marc Autret <autret_m@epita.fr>
9815
9816 * src/output.c (output_parser): Remove useless muscle.
9817
9818 2001-12-11 Marc Autret <autret_m@epita.fr>
9819
9820 * src/bison.simple: Remove #line just before %%epilogue. It
9821 is now handled in ...
9822 * src/reader.c (read_additionnal_code): Add the output of a
9823 #line for the epilogue.
9824
9825 2001-12-10 Marc Autret <autret_m@epita.fr>
9826
9827 * src/reader.c (copy_definition): Re-use CPP-outed code which
9828 replace precedent remove.
9829 * src/bison.simple: Remove #line before %%prologue because
9830 %%input-line is wrong at this time.
9831
9832 2001-12-10 Marc Autret <autret_m@epita.fr>
9833
9834 * src/reader.c (symbols_output): Clean up.
9835 * src/output.c (output_gram, output): Clean up.
9836
9837 2001-12-10 Akim Demaille <akim@epita.fr>
9838
9839 * src/lalr.c (initialize_lookaheads): New. Extracted from...
9840 * src/LR0.c (set_state_table): here.
9841 * src/lalr.c (lalr): Call it.
9842
9843 2001-12-10 Akim Demaille <akim@epita.fr>
9844
9845 * src/state.h (shifts): Remove the `number' member: shifts are
9846 attached to state, hence no longer need to be labelled with a
9847 state number.
9848
9849 2001-12-10 Akim Demaille <akim@epita.fr>
9850
9851 Now that states have a complete set of members, the linked list of
9852 shifts is useless: just fill directly the state's shifts member.
9853
9854 * src/state.h (shifts): Remove the `next' member.
9855 * src/LR0.c (first_state, last_state): Remove.
9856 Adjust the callers.
9857 (augment_automaton): Don't look for the shifts that must be added
9858 a shift on EOF: it is those of the state we looked for! But now,
9859 since shifts are attached, it is no longer needed to looking
9860 merely by its id: its number.
9861
9862 2001-12-10 Akim Demaille <akim@epita.fr>
9863
9864 * src/LR0.c (augment_automaton): Better variable locality.
9865 Remove an impossible branch: if there is a state corresponding to
9866 the start symbol being shifted, then there is shift for the start
9867 symbol from the initial state.
9868
9869 2001-12-10 Akim Demaille <akim@epita.fr>
9870
9871 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
9872 only when appropriate: when insert_start_shifting_state' is not
9873 invoked.
9874 * tests/regression.at (Rule Line Numbers): Adjust.
9875
9876 2001-12-10 Akim Demaille <akim@epita.fr>
9877
9878 * src/LR0.c (augment_automaton): Now that all states have shifts,
9879 merge the two cases addition shifts to the initial state.
9880
9881 2001-12-10 Akim Demaille <akim@epita.fr>
9882
9883 * src/lalr.c (set_state_table): Move to...
9884 * src/LR0.c: here.
9885 * src/lalr.c (lalr): Don't call it...
9886 * src/LR0.c (generate_states): do it.
9887 * src/LR0.h (first_state): Remove, only the table is used.
9888
9889 2001-12-10 Akim Demaille <akim@epita.fr>
9890
9891 * src/LR0.h (first_shift, first_reduction): Remove.
9892 * src/lalr.c: Don't use first_shift: find shifts through the
9893 states.
9894
9895 2001-12-10 Akim Demaille <akim@epita.fr>
9896
9897 * src/LR0.c: Attach shifts to states as soon as they are
9898 computed.
9899 * src/lalr.c (set_state_table): Instead of assigning shifts to
9900 state, just assert that the mapping was properly done.
9901
9902 2001-12-10 Akim Demaille <akim@epita.fr>
9903
9904 * src/LR0.c (insert_start_shift): Rename as...
9905 (insert_start_shifting_state): this.
9906 (insert_eof_shifting_state, insert_accepting_state): New.
9907 (augment_automaton): Adjust.
9908 Better locality of the variables.
9909 When looking if the start_symbol is shifted from the initial
9910 state, using `while (... symbol != start_symbol ...)' sounds
9911 better than `while (... symbol < start_symbol ...)': If fail
9912 to see how the order between symbols could be relevant!
9913
9914 2001-12-10 Akim Demaille <akim@epita.fr>
9915
9916 * src/getargs.h: Don't declare `spec_name_prefix' and
9917 `spec_file_prefix', declared by src/files.h.
9918 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
9919 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
9920 * src/output.c (prepare): Adjust.
9921 * src/reader.c (symbols_output): Likewise.
9922 * src/vmsgetargs.c: Vaguely adjust, but who cares?
9923
9924 2001-12-10 Akim Demaille <akim@epita.fr>
9925
9926 * src/muscle_tab.c (muscle_init): NULL is a better default than
9927 `"0"'.
9928
9929 2001-12-10 Akim Demaille <akim@epita.fr>
9930
9931 * src/reader.c (reader): Calling symbols_output once is enough.
9932
9933 2001-12-10 Akim Demaille <akim@epita.fr>
9934
9935 Now that states have a complete set of members, the linked list of
9936 reductions is useless: just fill directly the state's reductions
9937 member.
9938
9939 * src/state.h (struct reductions): Remove member `number' and
9940 `next'.
9941 * src/LR0.c (first_reduction, last_reduction): Remove.
9942 (save_reductions): Don't link the new reductions, store them in
9943 this_state.
9944 * src/lalr.c (set_state_table): No need to attach reductions to
9945 states, it's already done.
9946 * src/output.c (output_actions): No longer free the shifts, then
9947 the reductions, then the states: free all the states and their
9948 members.
9949
9950 2001-12-10 Akim Demaille <akim@epita.fr>
9951
9952 * src/options.c (OPTN, DRTV, BOTH): New.
9953 (option_table): Use them.
9954
9955 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
9956 the job of system.h.
9957 * src/options.c: Don't include stdio.h and xalloc.h for the same
9958 reasons.
9959
9960 2001-12-10 Akim Demaille <akim@epita.fr>
9961
9962 * src/output.c (output, prepare): Make sure the values of the
9963 muscles `action' and `prologue' are 0-terminated.
9964
9965 2001-12-10 Akim Demaille <akim@epita.fr>
9966
9967 Clean up GCC warnings.
9968
9969 * src/reader.c (copy_action): `buf' is not used.
9970 (parse_skel_decl): Be static.
9971 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
9972 * src/options.h (create_long_option_table): Have a real prototype.
9973 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
9974 (hash_delete_at): Return const void *.
9975 Adjust casts to preserve the const.
9976
9977 2001-12-10 Akim Demaille <akim@epita.fr>
9978
9979 * configure.in: Require 2.52g.
9980 M4 is not needed, but AUTOM4TE is.
9981 * m4/m4.m4: Remove.
9982 * tests/Makefile.am: Adjust.
9983
9984 2001-12-10 Akim Demaille <akim@epita.fr>
9985
9986 One structure for states is enough, even though theoretically
9987 there are LR(0) states and LALR(1) states.
9988
9989 * src/lalr.h (state_t): Remove.
9990 (state_table): Be state_t **, not state_t *.
9991 * src/state.h (core, CORE_ALLOC): Rename as...
9992 (state_t, STATE_ALLOC): this.
9993 Add the LALR(1) members: shifts, reductions, errs.
9994 * src/LR0.c (state_table): Rename as...
9995 (state_hash): this, to avoid name clashes with the global
9996 `state_table'.
9997 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
9998 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
9999
10000 2001-12-10 Akim Demaille <akim@epita.fr>
10001
10002 Bison dumps core on bash.y.
10003 Reported by Pascal Bart.
10004
10005 * src/warshall.c (bitmatrix_print): New.
10006 (TC): Use it.
10007 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
10008 j must be the outer loop.
10009 * tests/regression.at (Broken Closure): New.
10010
10011 2001-12-05 Akim Demaille <akim@epita.fr>
10012
10013 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
10014 its argument.
10015 Reported by Peter Hamorsky.
10016
10017 2001-12-05 Akim Demaille <akim@epita.fr>
10018
10019 * src/conflicts.c (err_table): Remove.
10020 (resolve_sr_conflict): Adjust.
10021 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
10022 Rename as...
10023 (state_t.reductions, state_t.shifts): this.
10024
10025 2001-12-05 Akim Demaille <akim@epita.fr>
10026
10027 * src/reduce.c (reduce_grammar_tables): No longer disable the
10028 removal of useless rules via CPP but via `if (0)', so that the
10029 compiler still check the code is valid.
10030 For instance, it should have noticed `rline' no longer exists: use
10031 the `line' member of rule_t.
10032 * src/gram.c (dummy, rline): Remove, unused.
10033
10034 2001-12-05 Akim Demaille <akim@epita.fr>
10035
10036 * src/output.c (pack_vector): Use assert, not berror.
10037 * src/main.c (berror): Remove, unused.
10038
10039 2001-12-05 Akim Demaille <akim@epita.fr>
10040
10041 New experimental feature: if --verbose --trace output all the
10042 items of a state, not only its kernel.
10043
10044 * src/print.c (print_core): If `trace_flag', then invoke closure
10045 before outputting the items of the state (print_core is no longer
10046 a correct name them).
10047 (print_results): Invoke new_closure/free_closure if needed.
10048
10049 2001-12-05 Akim Demaille <akim@epita.fr>
10050
10051 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
10052 * src/closure.c, src/closure.h (itemsetsize): Rename as...
10053 (nitemset): for consistency with the rest of the project.
10054
10055 2001-12-05 Akim Demaille <akim@epita.fr>
10056
10057 * src/closure.c (print_closure): Improve.
10058 (closure): Use it for printing input and output.
10059
10060 2001-12-05 Akim Demaille <akim@epita.fr>
10061
10062 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
10063 indexed by nonterminals.
10064
10065 2001-12-05 Akim Demaille <akim@epita.fr>
10066
10067 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
10068 what it was!).
10069 * src/warshall.h: Remove accidental duplication of the content.
10070
10071 2001-12-05 Akim Demaille <akim@epita.fr>
10072
10073 * src/closure.c (set_fderives): De-obfuscate.
10074
10075 2001-12-05 Akim Demaille <akim@epita.fr>
10076
10077 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
10078
10079 2001-12-05 Akim Demaille <akim@epita.fr>
10080
10081 * src/closure.c (set_firsts): De-obfuscate.
10082
10083 2001-12-05 Akim Demaille <akim@epita.fr>
10084
10085 * src/output.c (action_row): De-obfuscate
10086 using the good o' techniques: arrays not pointers, variable
10087 locality, BITISSET, RESETBIT etc.
10088
10089 2001-12-05 Akim Demaille <akim@epita.fr>
10090
10091 Pessimize the code to simplify it: from now on, all the states
10092 have a valid SHIFTS, which NSHIFTS is possibly 0.
10093
10094 * src/LR0.c (shifts_new): Be global and move to..
10095 * src/state.c, src/state.h: here.
10096 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
10097 * src/print_graph: Adjust.
10098
10099 2001-12-05 Akim Demaille <akim@epita.fr>
10100
10101 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
10102 * src/conflicts.c: Use it.
10103 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
10104 incorrectly ``simplified''.
10105
10106 2001-12-05 Akim Demaille <akim@epita.fr>
10107
10108 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
10109 using the good o' techniques: arrays not pointers, variable
10110 locality, BITISSET, RESETBIT etc.
10111
10112 2001-12-05 Akim Demaille <akim@epita.fr>
10113
10114 * src/state.h (SHIFT_SYMBOL): New.
10115 * src/conflicts.c: Use it to deobfuscate.
10116
10117 2001-12-05 Akim Demaille <akim@epita.fr>
10118
10119 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
10120 (print_reductions): De-obfuscate using the good o' techniques:
10121 arrays not pointers, variable locality, BITISSET.
10122
10123 2001-12-05 Akim Demaille <akim@epita.fr>
10124
10125 * src/conflicts.c (print_reductions): Arrays, not pointers.
10126 Use BITISSET.
10127
10128 2001-12-05 Akim Demaille <akim@epita.fr>
10129
10130 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10131
10132 2001-12-05 Akim Demaille <akim@epita.fr>
10133
10134 * src/conflicts.c (print_reductions): Improve variable locality.
10135
10136 2001-12-05 Akim Demaille <akim@epita.fr>
10137
10138 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10139
10140 2001-12-05 Akim Demaille <akim@epita.fr>
10141
10142 * src/conflicts.c (print_reductions): Improve variable locality.
10143
10144 2001-12-05 Akim Demaille <akim@epita.fr>
10145
10146 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
10147 * src/lalr.c: Use them.
10148
10149 2001-12-05 Akim Demaille <akim@epita.fr>
10150
10151 * src/LR0.c (augment_automaton): Formatting changes.
10152 Better variable locality.
10153
10154 2001-12-05 Akim Demaille <akim@epita.fr>
10155
10156 * src/lalr.c (matrix_print): New.
10157 (transpose): Use it.
10158 Use arrays instead of pointers.
10159
10160 2001-12-05 Akim Demaille <akim@epita.fr>
10161
10162 * src/lalr.c (maxrhs): Move to...
10163 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
10164 * src/lalr.c (build_relations): Adjust.
10165
10166 2001-12-05 Akim Demaille <akim@epita.fr>
10167
10168 * src/lalr.c (transpose): Free the memory allocated to the
10169 argument, as it is replaced by the results by the unique caller.
10170 (build_relations): Merely invoke transpose: it handles the memory
10171 deallocation.
10172 Improve variable locality.
10173 Avoid variables used as mere abbreviations.
10174 (compute_lookaheads): Use arrays instead of pointers.
10175
10176 2001-12-05 Akim Demaille <akim@epita.fr>
10177
10178 * src/lalr.c (initialize_F): Improve variable locality.
10179 Avoid variables used as mere abbreviations.
10180
10181 2001-12-05 Akim Demaille <akim@epita.fr>
10182
10183 * src/derives.c (print_derives): Display the ruleno.
10184 * src/lalr.c (initialize_F, transpose): Better variable locality
10185 to improve readability.
10186 Avoid variables used as mere abbreviations.
10187
10188 2001-12-05 Akim Demaille <akim@epita.fr>
10189
10190 * src/lalr.c (traverse): Use arrays instead of pointers.
10191
10192 2001-12-05 Akim Demaille <akim@epita.fr>
10193
10194 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
10195 the handling of squeue.
10196 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10197
10198 2001-12-05 Akim Demaille <akim@epita.fr>
10199
10200 Because useless nonterminals are now kept alive (instead of being
10201 `destroyed'), we now sometimes examine them, and store information
10202 related to them. Hence we need to know their number, and adjust
10203 memory allocations.
10204
10205 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
10206 static.
10207 * src/LR0.c (allocate_itemsets): The memory allocated to
10208 `symbol_count' was used for two different purpose: once to count
10209 the number of occurrences of each symbol, and later reassigned to
10210 `shift_symbol', containing the symbol that can be shifted from a
10211 given state.
10212 Deobfuscate, i.e., allocate, use and free `symbol_count' here
10213 only, and...
10214 (new_itemsets): Allocate `shift_symbol' here.
10215 (allocate_itemsets): symbol_count includes useless nonterminals.
10216 Make room for them.
10217 (free_storage): Use `free', not `XFREE', for pointers that cannot
10218 be null.
10219
10220 2001-12-05 Akim Demaille <akim@epita.fr>
10221
10222 * src/nullable.c (set_nullable): Deobfuscate the handling of
10223 ritem.
10224 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10225
10226 2001-12-05 Akim Demaille <akim@epita.fr>
10227
10228 * src/gram.c, src/gram.h (ritem_print): New.
10229 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
10230 (This useless function was defined only to work around VMS linkers
10231 that can't handle compilation units with variables only).
10232 * src/reduce.c (dump_grammar): Use it to trace the construction of
10233 ritem.
10234
10235 2001-12-04 Paul Eggert <eggert@twinsun.com>
10236
10237 * src/bison.simple (union yyalloc): Change member names
10238 to be the same as the stack names.
10239 (yyparse): yyptr is now union yyalloc *, not char *.
10240 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
10241 and may generate better code on some machines.
10242 (yystpcpy): Use prototype if __STDC__ is defined, not just
10243 if __cplusplus is defined.
10244
10245 2001-11-30 Akim Demaille <akim@epita.fr>
10246
10247 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
10248 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
10249 Gettext doesn't compile cleanly, and dies with -Werror.
10250 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
10251 Include WARNING_CFLAGS here.
10252 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
10253 before being defined.
10254
10255 2001-11-27 Paul Eggert <eggert@twinsun.com>
10256
10257 * lib/quotearg.h (quotearg_n, quotearg_n_style):
10258 First arg is int, not unsigned.
10259 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
10260 (SIZE_MAX, UINT_MAX): New macros.
10261 (quotearg_n_options): Abort if N is negative.
10262 Avoid overflow check on hosts where size_t is 64 bits and int
10263 is 32 bits, as overflow is impossible there.
10264 Fix off-by-one typo that caused unnecessary reallocation.
10265
10266 2001-11-29 Paul Eggert <eggert@twinsun.com>
10267
10268 Name space cleanup in generated parser.
10269
10270 * doc/bison.texinfo (Bison Parser): Discuss system headers
10271 and their effect on the user name space.
10272
10273 * src/bison.simple:
10274 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
10275 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
10276 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
10277
10278 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
10279 on user names when possible.
10280
10281 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
10282 Simplify test for whather <alloca.h> exists.
10283
10284 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
10285
10286 (<stdio.h>): Include if YYDEBUG.
10287
10288 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
10289 ! defined (yyoverflow) && ! defined (yymemcpy).
10290
10291 (yymemcpy, yyparse): Rename local variables as needed so that
10292 they all begin with 'yy'.
10293
10294 (yystrlen, yystpcpy): New functions.
10295
10296 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
10297 All uses changed.
10298
10299 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
10300 instead of relying on string.h functions. Use YYSTACK_ALLOC
10301 and YYSTACK_FREE instead of malloc and free.
10302
10303 2001-11-30 Akim Demaille <akim@epita.fr>
10304
10305 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
10306 before their first uses.
10307 (YYBISON, YYPURE): Move to the top of the output.
10308
10309 2001-11-30 Akim Demaille <akim@epita.fr>
10310
10311 * tests/reduce.at (Useless Nonterminals): Fix.
10312
10313 2001-11-30 Akim Demaille <akim@epita.fr>
10314
10315 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
10316 if body instead of `;' to pacify GCC's warnings.
10317
10318 2001-11-30 Akim Demaille <akim@epita.fr>
10319
10320 Instead of mapping the LHS of unused rules to -1, keep the LHS
10321 valid, but flag the rules as invalid.
10322
10323 * src/gram.h (rule_t): `useful' is a new member.
10324 * src/print.c (print_grammar): Adjust.
10325 * src/derives.c (set_derives): Likewise.
10326 * src/reader.c (packgram, reduce_output): Likewise.
10327 * src/reduce.c (reduce_grammar_tables): Likewise.
10328 * tests/reduce.at (Underivable Rules, Useless Rules): New.
10329
10330 2001-11-30 Akim Demaille <akim@epita.fr>
10331
10332 * src/reduce.c (reduce_output): Formatting changes.
10333 * src/print.c (print_results, print_grammar): Likewise.
10334 * tests/regression.at (Rule Line Numbers)
10335 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
10336
10337 2001-11-30 Akim Demaille <akim@epita.fr>
10338
10339 * src/reduce.c (nonterminals_reduce): Instead of throwing away
10340 useless nonterminals, move them at the end of the symbol arrays.
10341 (reduce_output): Adjust.
10342 * tests/reduce.at (Useless Nonterminals): Adjust.
10343
10344 2001-11-30 Akim Demaille <akim@epita.fr>
10345
10346 * src/reduce.c: Various comment/formatting changes.
10347 (nonterminals_reduce): New, extracted from...
10348 (reduce_grammar_tables): here.
10349 (reduce_grammar): Call nonterminals_reduce.
10350
10351 2001-11-29 Paul Eggert <eggert@twinsun.com>
10352
10353 * src/bison.simple (YYSTACK_REALLOC): Remove.
10354 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
10355 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
10356 New macros.
10357 (union yyalloc): New type.
10358 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
10359 an arbitrary restriction on hosts where size_t is wider than int.
10360
10361 (yyparse): Don't dump core if alloca or malloc fails; instead, report
10362 a parser stack overflow. Allocate just one block of memory for all
10363 three stacks, instead of allocating three blocks; this typically is
10364 faster and reduces fragmentation.
10365
10366 Do not limit the number of items in the stack to a value that fits
10367 in 'int', as this is an arbitrary limit on hosts with 64-bit
10368 size_t and 32-bit int.
10369
10370 2001-11-29 Marc Autret <autret_m@epita.fr>
10371
10372 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
10373 of defining YYERROR_VERBOSE.
10374 [AT_DATA]: $4 is now out of C declarations in the prologue.
10375
10376 2001-11-28 Marc Autret <autret_m@epita.fr>
10377
10378 * src/reader.c (parse_dquoted_param): New.
10379 (parse_skel_decl): Use it.
10380 * src/lex.h: Add its prototype.
10381 * src/lex.c (literalchar): Become not static.
10382
10383 2001-11-28 Marc Autret <autret_m@epita.fr>
10384
10385 * src/output.h: And put its extern declaration here.
10386 * src/output.c (error_verbose): Define here.
10387 (prepare): Echo name modification.
10388 * src/getargs.h: Clean its extern declaration.
10389 * src/getargs.c (error_verbose_flag): Remove.
10390 (getargs): Remove case 'e'.
10391 * src/options.c (option_table): 'error-verbose' is now seen as simple
10392 percent option.
10393 Include output.h.
10394
10395 * src/reader.c (read_declarations): Remove case tok_include.
10396 (parse_include_decl): Remove.
10397 * src/lex.h (token_t): Remove tok_include.
10398 * src/options.c (option_table): 'include' is now a simple command line
10399 option.
10400
10401 2001-11-28 Marc Autret <autret_m@epita.fr>
10402
10403 * src/bison.simple: Adjust muscle names.
10404 * src/muscle_tab.c (muscle_init): Also rename the muscles.
10405 * src/output.c (prepare): s/_/-/ for the muscles names.
10406 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
10407
10408 2001-11-28 Marc Autret <autret_m@epita.fr>
10409
10410 * src/bison.simple: Fix debug.
10411 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
10412
10413 2001-11-28 Akim Demaille <akim@epita.fr>
10414
10415 * src/LR0.c (shifts_new): New.
10416 (save_shifts, insert_start_shift, augment_automaton): Use it.
10417
10418 2001-11-28 Akim Demaille <akim@epita.fr>
10419
10420 * src/closure.c (closure): `b' and `ruleno' denote the same value:
10421 keep ruleno only.
10422
10423 2001-11-28 Akim Demaille <akim@epita.fr>
10424
10425 * src/closure.c (closure): Instead of looping over word in array
10426 then bits in words, loop over bits in array.
10427
10428 2001-11-28 Akim Demaille <akim@epita.fr>
10429
10430 * src/closure.c (closure): No longer optimize the special case
10431 where all the bits of `ruleset[r]' are set to 0, to make the code
10432 clearer.
10433
10434 2001-11-28 Akim Demaille <akim@epita.fr>
10435
10436 * src/closure.c (closure): `r' and `c' are new variables, used to
10437 de-obfuscate accesses to RULESET and CORE.
10438
10439 2001-11-28 Akim Demaille <akim@epita.fr>
10440
10441 * src/reduce.c (reduce_print): Use ngettext.
10442 (dump_grammar): Improve the trace accuracy.
10443
10444 2001-11-28 Akim Demaille <akim@epita.fr>
10445
10446 * src/reduce.c (dump_grammar): Don't translate trace messages.
10447
10448 2001-11-28 Akim Demaille <akim@epita.fr>
10449
10450 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
10451 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
10452 as all tags are free'ed afterwards.
10453 From Enrico Scholz.
10454
10455 2001-11-27 Paul Eggert <eggert@twinsun.com>
10456
10457 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
10458 use alloca when we didn't want to, and vice versa.
10459
10460 2001-11-27 Marc Autret <autret_m@epita.fr>
10461
10462 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
10463 initialization.
10464 * src/output.c (prepare): Remove its update.
10465
10466 2001-11-27 Marc Autret <autret_m@epita.fr>
10467
10468 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
10469 Use %error-verbose.
10470
10471 2001-11-27 Marc Autret <autret_m@epita.fr>
10472
10473 * src/bison.simple: Remove YYERROR_VERBOSE using.
10474 Use %%error_verbose.
10475 (yyparse): Likewise.
10476 * src/output.c (prepare): Give its final value.
10477 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
10478 * src/getargs.h: Add its extern declaration.
10479 * src/getargs.c (error_verbose_flag): New int.
10480 (getargs): Update to catch new case.
10481 * src/options.c (option_table): 'error-verbose' is a new option.
10482 (shortopts): Update.
10483
10484 2001-11-27 Akim Demaille <akim@epita.fr>
10485
10486 * src/system.h: Use intl/libgettext.h.
10487 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
10488
10489 2001-11-27 Akim Demaille <akim@epita.fr>
10490
10491 * tests/torture.at (Exploding the Stack Size with Malloc):
10492 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
10493
10494 2001-11-27 Akim Demaille <akim@epita.fr>
10495
10496 * src/files.c: Include error.h.
10497 Reported by Hans Aberg.
10498
10499 2001-11-26 Marc Autret <autret_m@epita.fr>
10500
10501 * src/reader.c (parse_include_decl): New, not yet implemented.
10502 (read_declarations): Add case tok_include.
10503 * src/getargs.h (include): Add its extern definition.
10504 * src/getargs.c (include): New const char *.
10505 (getargs): Add case '-I'.
10506 * src/options.c (option_table): Add include as command line and
10507 percent option.
10508 * src/lex.h (token_t): Add tok_include.
10509
10510 2001-11-26 Akim Demaille <akim@epita.fr>
10511
10512 * src/reader.c (readgram): Make sure rules for mid-rule actions
10513 have a lineno equal to that of their host rule.
10514 Reported by Hans Aberg.
10515 * tests/regression.at (Rule Line Numbers): New.
10516
10517 2001-11-26 Akim Demaille <akim@epita.fr>
10518
10519 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
10520 size_ts.
10521
10522 2001-11-26 Akim Demaille <akim@epita.fr>
10523
10524 * src/complain.c, src/complain.h (error): Remove, provided by
10525 lib/error.[ch].
10526
10527 2001-11-26 Akim Demaille <akim@epita.fr>
10528
10529 * src/reader.c (read_declarations): Don't abort on tok_illegal,
10530 issue an error message.
10531 * tests/regression.at (Invalid %directive): New.
10532 Reported by Hans Aberg.
10533
10534 2001-11-26 Akim Demaille <akim@epita.fr>
10535
10536 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
10537 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
10538
10539 2001-11-26 Akim Demaille <akim@epita.fr>
10540
10541 * src/conflicts.c (conflicts_print): Don't complain at all when
10542 there are no reduce/reduce conflicts, and as many shift/reduce
10543 conflicts as expected.
10544 * tests/regression.at (%expect right): Adjust.
10545
10546 2001-11-23 Akim Demaille <akim@epita.fr>
10547
10548 * lib/alloca.c: Update, from fileutils.
10549
10550 2001-11-23 Akim Demaille <akim@epita.fr>
10551
10552 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
10553
10554 2001-11-23 Akim Demaille <akim@epita.fr>
10555
10556 * src/system.h: Include alloca.h.
10557 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
10558
10559 2001-11-23 Akim Demaille <akim@epita.fr>
10560
10561 * src/print_graph.c (print_actions): Remove `rule', unused.
10562 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
10563 pacify GCC's signed < unsigned warnings.
10564 * src/closure.c (itemsetsize): Likewise.
10565 * src/reader.c (symbol_list_new): Static.
10566
10567 2001-11-23 Akim Demaille <akim@epita.fr>
10568
10569 Attaching lineno to buckets is stupid, since only one copy of each
10570 symbol is kept, only the line of the first occurrence is kept too.
10571
10572 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
10573 * src/reader.c (rline_allocated): Remove, unused.
10574 (symbol_list): Have a `line' member.
10575 (symbol_list_new): New.
10576 (readgram): Use it.
10577 * src/print.c (print_grammar): Output the rule line numbers.
10578 * tests/regression.at (Solved SR Conflicts)
10579 (Unresolved SR Conflicts): Adjust.
10580 Reported by Hans Aberg.
10581
10582 2001-11-22 Marc Autret <autret_m@epita.fr>
10583
10584 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
10585
10586 2001-11-22 Marc Autret <autret_m@epita.fr>
10587
10588 * src/muscle_tab.c (muscle_init): Remove initialization of
10589 skeleton muscle.
10590 * src/output.c (output_master_parser): Do it here.
10591
10592 2001-11-20 Akim Demaille <akim@epita.fr>
10593
10594 * po/sv.po: New.
10595 * configure.in (ALL_LINGUAS): Adjust.
10596 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
10597 longer contains strings to translate.
10598
10599 2001-11-19 Akim Demaille <akim@epita.fr>
10600
10601 * src/conflicts.c (conflicts_print): Add a missing \n.
10602
10603 2001-11-19 Akim Demaille <akim@epita.fr>
10604
10605 * src/nullable.c (nullable_print): New.
10606 (set_nullable): Call it when tracing.
10607 Better locality of variables.
10608
10609 2001-11-19 Akim Demaille <akim@epita.fr>
10610
10611 * src/print.c (print_actions): Better locality of variables.
10612
10613 2001-11-19 Akim Demaille <akim@epita.fr>
10614
10615 * src/derives.c (print_derives): Fix and enrich.
10616 * src/closure.c (print_fderives): Likewise.
10617
10618 2001-11-19 Akim Demaille <akim@epita.fr>
10619
10620 * src/closure.c (itemsetend): Remove, replaced with...
10621 (itemsetsize): new.
10622
10623 2001-11-19 Akim Demaille <akim@epita.fr>
10624
10625 * src/LR0.c (kernel_end): Remove, replaced with...
10626 (kernel_size): new.
10627
10628 2001-11-19 Akim Demaille <akim@epita.fr>
10629
10630 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
10631 to clarify.
10632
10633 2001-11-19 Akim Demaille <akim@epita.fr>
10634
10635 * src/closure.c (closure): Use arrays instead of pointers to clarify.
10636
10637 2001-11-19 Akim Demaille <akim@epita.fr>
10638
10639 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
10640 trace messages.
10641 * src/LR0.c: Likewise.
10642 (allocate_itemsets): Use arrays instead of pointers to clarify.
10643
10644 2001-11-19 Akim Demaille <akim@epita.fr>
10645
10646 * src/getargs.c (statistics_flag): Replace with...
10647 (trace_flag): New.
10648 (longopts): Accept --trace instead of --statistics.
10649 * src/getargs.h, src/options.c: Adjust.
10650 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
10651 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
10652
10653 2001-11-19 Akim Demaille <akim@epita.fr>
10654
10655 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
10656 pointers to clarify the code.
10657 (save_reductions, save_shifts): Factor common parts of alternatives.
10658
10659 2001-11-19 Akim Demaille <akim@epita.fr>
10660
10661 * src/LR0.c (new_state, get_state): Complete TRACE code.
10662 * src/closure.c: Include `reader.h' to get `tags', needed by the
10663 trace code.
10664 Rename the conditional DEBUG as TRACE.
10665 Output consistently TRACEs to stderr, not stdout.
10666 * src/derives.c: Likewise.
10667 * src/reduce.c: (inaccessable_symbols): Using if is better style
10668 than goto.
10669 Use `#if TRACE' instead of `#if 0' for tracing code.
10670
10671 2001-11-19 Akim Demaille <akim@epita.fr>
10672
10673 * src/system.h (LIST_FREE, shortcpy): New.
10674 * src/LR0.c: Use them.
10675 * src/output.c (free_itemsets, free_reductions, free_shifts):
10676 Remove, replaced by LIST_FREE.
10677
10678 2001-11-19 Akim Demaille <akim@epita.fr>
10679
10680 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
10681 (REDUCTIONS_ALLOC): New.
10682 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
10683 allocation.
10684
10685 2001-11-19 Akim Demaille <akim@epita.fr>
10686
10687 * src/LR0.c (new_state): Complete trace code.
10688 * src/nullable.c (set_nullable): Don't translate traces.
10689
10690 2001-11-19 Akim Demaille <akim@epita.fr>
10691
10692 * src/print_graph.c (print_core): Better locality of variables.
10693 * src/print.c (print_core): Likewise.
10694
10695 2001-11-19 Akim Demaille <akim@epita.fr>
10696
10697 * src/vcg.c: You do the output, so you are responsible of the
10698 handling of VCG syntax, in particular: use quotearg.
10699 * src/print_graph.c: Don't.
10700 (print_actions): Don't output the actions as part of the nodes,
10701 since that's the job of the edges.
10702 (print_state): Don't output by hand: fill the node description,
10703 and ask for its output.
10704
10705 2001-11-19 Akim Demaille <akim@epita.fr>
10706
10707 * src/bison.simple (yyparse): When verbosely reporting an error,
10708 no longer put additional quotes around token names.
10709 * tests/calc.at: Adjust.
10710
10711 2001-11-19 Akim Demaille <akim@epita.fr>
10712
10713 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
10714 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
10715 * src/output.c: Adjust.
10716
10717 2001-11-19 Akim Demaille <akim@epita.fr>
10718
10719 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
10720 (rule_t): this.
10721 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
10722
10723 2001-11-19 Akim Demaille <akim@epita.fr>
10724
10725 * src/gram.h (rule_t): New.
10726 (rule_table): New.
10727 (rrhs, rlhs): Remove, part of state_t.
10728 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
10729 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
10730 * src/reader.c, src/reduce.c: Adjust.
10731
10732 2001-11-19 Akim Demaille <akim@epita.fr>
10733
10734 * src/reader.c (symbols_output): New, extracted from...
10735 (packsymbols): Here.
10736 (reader): Call it.
10737
10738 2001-11-19 Akim Demaille <akim@epita.fr>
10739
10740 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
10741 (maxrhs): this new function.
10742
10743 2001-11-19 Akim Demaille <akim@epita.fr>
10744
10745 * src/lalr.c (F): New macro to access the variable F.
10746 Adjust.
10747
10748 2001-11-19 Akim Demaille <akim@epita.fr>
10749
10750 * src/lalr.h (LA): New macro to access the variable LA.
10751 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10752 * src/lalr.c: Adjust.
10753
10754 2001-11-19 Akim Demaille <akim@epita.fr>
10755
10756 * src/lalr.c (initialize_LA): Only initialize LA. Let...
10757 (set_state_table): handle the `lookaheads' members.
10758
10759 2001-11-19 Akim Demaille <akim@epita.fr>
10760
10761 * src/lalr.h (lookaheads): Removed array, whose contents is now
10762 a member of...
10763 (state_t): this structure.
10764 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10765 Adjust.
10766
10767 2001-11-19 Akim Demaille <akim@epita.fr>
10768
10769 * src/lalr.h (consistent): Removed array, whose contents is now
10770 a member of...
10771 (state_t): this structure.
10772 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10773 Adjust.
10774
10775 2001-11-19 Akim Demaille <akim@epita.fr>
10776
10777 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
10778 contents are now members of...
10779 (state_t): this structure.
10780 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10781 Adjust.
10782
10783 2001-11-19 Akim Demaille <akim@epita.fr>
10784
10785 * src/lalr.h (state_t): New.
10786 (state_table): Be a state_t * instead of a core **.
10787 (accessing_symbol): Remove, part of state_t.
10788 * src/lalr.c: Adjust.
10789 (set_accessing_symbol): Merge into...
10790 (set_state_table): this.
10791 * src/print_graph.c, src/conflicts.c: Adjust.
10792
10793 2001-11-14 Akim Demaille <akim@epita.fr>
10794
10795 * tests/calc.at, tests/output.at, tests/regression.at,
10796 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
10797 now the tests are run in private dirs, therefore AC_CLEANUP and
10798 family can be simplified to 0-ary.
10799 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
10800 use abs. path to find config.h.
10801 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
10802 stderr, there can be way too much random noise.
10803 Instead pass -Werror to GCC and rely on the exit status.
10804 Reported by Wolfram Wagner.
10805
10806 2001-11-14 Akim Demaille <akim@epita.fr>
10807
10808 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
10809 defined only if yyoverflow is defined, to avoid `warning: unused
10810 variable `yyvs1''.
10811 Reported by The Test Suite.
10812
10813 2001-11-14 Akim Demaille <akim@epita.fr>
10814
10815 * src/print.c: Include reduce.h.
10816 Reported by Hans Aberg.
10817
10818 2001-11-14 Akim Demaille <akim@epita.fr>
10819
10820 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
10821 Revert a previous patch: these are really const.
10822 * src/conflicts.c (conflict_report): Additional useless pair of
10823 braces to pacify GCC's warnings for `if () if () {} else {}'.
10824 * src/lex.c (parse_percent_token): Replace equal_offset with
10825 arg_offset.
10826 arg is const.
10827 Be sure to strdup `arg' when used, since there is no reason for
10828 token_buffer not to change.
10829
10830 2001-11-14 Akim Demaille <akim@epita.fr>
10831
10832 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
10833 definition.
10834 * src/main.c (main): Use them.
10835 Suggested by Hans Aberg.
10836
10837 2001-11-12 Akim Demaille <akim@epita.fr>
10838
10839 * src/system.h (ngettext): Now that we use ngettext, be sure to
10840 provide a default definition when NLS are not used.
10841
10842 2001-11-12 Akim Demaille <akim@epita.fr>
10843
10844 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
10845 Use @kbd to denote user input.
10846 (Language and Grammar): ANSIfy the example.
10847 Adjust its layout for info/notinfo.
10848 (Location Tracking Calc): Output error messages to stderr.
10849 Output locations in a more GNUtically correct way.
10850 Fix a couple of Englishos.
10851 Adjust @group/@end group pairs.
10852
10853 2001-11-12 Akim Demaille <akim@epita.fr>
10854
10855 %expect was not functioning at all.
10856
10857 * src/conflicts.c (expected_conflicts): Set to -1.
10858 (conflict_report): Use ngettext.
10859 (conflicts_print): Check %expect and make its violation an error.
10860 * doc/bison.texinfo (Expect Decl): Adjust.
10861 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
10862 * tests/regression.at (%expect not enough, %expect right)
10863 (%expect too much): New.
10864
10865 2001-11-12 Akim Demaille <akim@epita.fr>
10866
10867 * tests/regression.at (Conflicts): Rename as...
10868 (Unresolved SR Conflicts): this.
10869 (Solved SR Conflicts): New.
10870
10871 2001-11-12 Akim Demaille <akim@epita.fr>
10872
10873 * src/reduce.c (print_results): Rename as...
10874 (reduce_output): This.
10875 Output to OUT, passed as argument, instead of output_obstack.
10876 (dump_grammar): Likewise.
10877 (reduce_free): New.
10878 Also free V1.
10879 (reduce_grammar): No longer call reduce_output, since...
10880 * src/print.c (print_results): do it.
10881 * src/main.c (main): Call reduce_free;
10882
10883 2001-11-12 Akim Demaille <akim@epita.fr>
10884
10885 * src/conflicts.c (print_reductions): Accept OUT as argument.
10886 Output to it, not to output_obstack.
10887 * src/print.c (print_actions): Adjust.
10888
10889 2001-11-12 Akim Demaille <akim@epita.fr>
10890
10891 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
10892 the result instead of using...
10893 (src_total, rrc_total, src_count, rrc_count): Remove.
10894 (any_conflicts): Remove.
10895 (print_conflicts): Split into...
10896 (conflicts_print, conflicts_output): New.
10897 * src/conflicts.h: Adjust.
10898 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
10899 * src/print.c (print_grammar): Issue `\n' between two rules.
10900 * tests/regression.at (Conflicts): New.
10901 Reported by Tom Lane.
10902
10903 2001-11-12 Akim Demaille <akim@epita.fr>
10904
10905 * tests/regression.at (Invalid input): Remove, duplicate with
10906 ``Invalid input: 1''.
10907
10908 2001-11-12 Akim Demaille <akim@epita.fr>
10909
10910 * tests/torture.at (AT_DATA_STACK_TORTURE)
10911 (Exploding the Stack Size with Alloca)
10912 (Exploding the Stack Size with Malloc): New.
10913
10914 2001-11-12 Akim Demaille <akim@epita.fr>
10915
10916 * src/bison.simple (YYSTACK_REALLOC): New.
10917 (yyparse) [!yyoverflow]: Use it and free the old stack.
10918 Reported by Per Allansson.
10919
10920 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
10921
10922 * src/bison.simple: Define type yystype instead of YYSTYPE, and
10923 define CPP macro, which substitute YYSTYPE by yystype.
10924 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
10925 with yyltype/YYLTYPE. This allows inclusion of the generated
10926 header within the parser if the compiler, such as GGC, accepts
10927 multiple equivalent #defines.
10928 From Akim.
10929
10930 2001-11-05 Akim Demaille <akim@epita.fr>
10931
10932 * src/reader.c (symbols_output): New, extracted from...
10933 (packsymbols): here.
10934 (reader): Adjust.
10935
10936 2001-11-05 Akim Demaille <akim@epita.fr>
10937
10938 * src/lex.c (parse_percent_token): s/quotearg/quote/.
10939
10940 2001-11-05 Akim Demaille <akim@epita.fr>
10941
10942 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
10943 pattern.
10944
10945 2001-11-05 Akim Demaille <akim@epita.fr>
10946
10947 * src/options.h (struct option_table_struct): set_flags is void*.
10948 * src/options.c (longopts): Support `--output' and `%output'.
10949 (usage): Adjust.
10950 * src/lex.h (tok_setopt): Remove, replaced with...
10951 (tok_intopt, tok_stropt): these new guys.
10952 * src/lex.c (getopt.h): Not needed.
10953 (token_buffer, unlexed_token_buffer): Not const.
10954 (percent_table): Promote `-' over `_' in directive names.
10955 Active `%name-prefix', `file-prefix', and `output'.
10956 (parse_percent_token): Accept possible arguments to directives.
10957 Promote `-' over `_' in directive names.
10958
10959 2001-11-04 Akim Demaille <akim@epita.fr>
10960
10961 * doc/bison.texinfo (Decl Summary): Split the list into
10962 `directives for grammars' and `directives for bison'.
10963 Sort'em.
10964 Add description of `%name-prefix', `file-prefix', and `output'.
10965 Promote `-' over `_' in directive names.
10966 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
10967 Simplify the description of `--name-prefix'.
10968 Promote `-' over `_' in directive names.
10969 Promote `--output' over `--output-file'.
10970 Fix the description of `--defines'.
10971 * tests/output.at: Exercise %file-prefix and %output.
10972
10973 2001-11-02 Akim Demaille <akim@epita.fr>
10974
10975 * doc/refcard.tex: Update.
10976
10977 2001-11-02 Akim Demaille <akim@epita.fr>
10978
10979 * src/symtab.h (SUNDEF): New.
10980 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
10981 stand for `uninitialized', instead of 0.
10982 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
10983 * src/lex.c (lex): Adjust.
10984
10985 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
10986 Number it 0.
10987 Let yylex return it instead of a plain 0.
10988 Reported by Dick Streefland.
10989
10990 2001-11-02 Akim Demaille <akim@epita.fr>
10991
10992 * tests/regression.at (Mixing %token styles): New test.
10993
10994 2001-11-02 Akim Demaille <akim@epita.fr>
10995
10996 * src/reader.c (parse_thong_decl): Formatting changes.
10997 (token_translations_init): New, extracted from...
10998 (packsymbols): Here.
10999 Adjust.
11000
11001 2001-11-01 Akim Demaille <akim@epita.fr>
11002
11003 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
11004 Check that `9foo.y' produces correct cpp guards.
11005 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
11006 guards.
11007 Reported by Wwp.
11008
11009 2001-11-01 Akim Demaille <akim@epita.fr>
11010
11011 * tests/regression.at (Invalid input: 2): New.
11012 * src/lex.c (unlexed_token_buffer): New.
11013 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
11014 too.
11015 Reported by Wwp.
11016
11017 2001-11-01 Akim Demaille <akim@epita.fr>
11018
11019 * tests/calc.at: Catch up with 1.30.
11020 * configure.in: Bump to 1.49a.
11021 Adjust to newer Autotest.
11022
11023 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
11024
11025 * src/conflicts.c: Move global variables rrc_total and src_total ...
11026 (print_conflicts): here.
11027 * src/output.c (output): Free global variable user_toknums.
11028 * src/lex.c (token_obstack): Become static.
11029
11030 2001-10-18 Akim Demaille <akim@epita.fr>
11031
11032 * tests/atlocal.in (GCC): Add.
11033 * tests/calc.at: s/m4_match/m4_bmatch/.
11034 s/m4_patsubst/m4_bpatsubst/.
11035 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
11036 * configure.in: AC_SUBST(GCC).
11037
11038 2001-10-14 Marc Autret <autret_m@epita.fr>
11039
11040 * src/options.c (create_long_option_table): Fix.
11041
11042 2001-10-10 Akim Demaille <akim@epita.fr>
11043
11044 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
11045
11046 2001-10-04 Akim Demaille <akim@epita.fr>
11047
11048 * src/reader.c (parse_union_decl): Push the caracters in
11049 union_obstack, not attrs_obstack.
11050
11051 2001-10-04 Akim Demaille <akim@epita.fr>
11052
11053 Merge in the branch 1.29.
11054
11055 * src/reader.c (packsymbols): Use a temporary obstack for
11056 `%%tokendef', since output_stack is already used elsewhere.
11057
11058 2001-10-02 Akim Demaille <akim@epita.fr>
11059
11060 Bump 1.29d.
11061
11062 2001-10-02 Akim Demaille <akim@epita.fr>
11063
11064 Version 1.29c.
11065
11066 2001-10-02 Akim Demaille <akim@epita.fr>
11067
11068 * tests/regression.at (Invalid CPP headers): New.
11069 From Alexander Belopolsky.
11070 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
11071
11072 2001-10-02 Akim Demaille <akim@epita.fr>
11073
11074 * tests/regression.at (Invalid input): New.
11075 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
11076 Reported by Shura.
11077
11078 2001-10-02 Akim Demaille <akim@epita.fr>
11079
11080 * tests/calc.at: Now that --debug works, the tests must be adjusted.
11081
11082 2001-10-02 Akim Demaille <akim@epita.fr>
11083
11084 * src/output.c (output_parser): Assert `skeleton'.
11085 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
11086 systems.
11087 From Shura.
11088
11089 2001-10-01 Marc Autret <autret_m@epita.fr>
11090
11091 * src/lex.h: Echo modifications.
11092 * src/lex.c (unlex): Parameter is now token_t.
11093 From Hans Aberg.
11094
11095 2001-10-01 Marc Autret <autret_m@epita.fr>
11096
11097 * src/main.c: Include lex.h.
11098 From Hans Aberg.
11099
11100 2001-09-29 Akim Demaille <akim@epita.fr>
11101
11102 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
11103
11104 2001-09-28 Akim Demaille <akim@epita.fr>
11105
11106 * tests/testsuite.at: Update to newer Autotest.
11107 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
11108
11109 2001-09-27 Akim Demaille <akim@epita.fr>
11110
11111 Position independent wrapper.
11112
11113 * tests/bison: Remove.
11114 * tests/bison.in: New.
11115 * configure.in: Adjust.
11116
11117 2001-09-27 Paul Eggert <eggert@twinsun.com>
11118
11119 Port quotearg fixes from tar 1.13.24.
11120
11121 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
11122 tm to be declared.
11123 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
11124 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
11125
11126 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
11127 * m4/mbrtowc.m4: New file.
11128 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
11129 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
11130
11131 2001-09-27 Akim Demaille <akim@epita.fr>
11132
11133 Bump to 1.29c.
11134
11135 2001-09-27 Akim Demaille <akim@epita.fr>
11136
11137 Version 1.29b.
11138
11139 2001-09-25 Akim Demaille <akim@epita.fr>
11140
11141 * src/system.h: Include `xalloc.h'.
11142 Remove it from the C files.
11143 * src/files.c (output_files): Free the obstacks.
11144 * src/lex.c (init_lex): Rename as...
11145 (lex_init): this.
11146 (lex_free): New.
11147 * src/main.c (main): Use it.
11148
11149 2001-09-24 Marc Autret <autret_m@epita.fr>
11150
11151 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
11152 to output informations in fout (FILE*).
11153 (open_graph, close_graph): Likewise.
11154 (output_graph, output_edge, output_node): Likewise.
11155 * src/vcg.h: Update function prototypes.
11156 * src/print_graph.c (print_graph): Open output graph file.
11157 (print_actions): Adjust.
11158 * src/files.h: Remove extern declaration.
11159 * src/files.c: Remove graph_obstack declaration.
11160 (open_files): Remove graph_obstack initialization.
11161 (output_files): Remove graph_obstack saving.
11162
11163 2001-09-24 Marc Autret <autret_m@epita.fr>
11164
11165 * src/files.c (compute_output_file_names): Fix.
11166
11167 2001-09-24 Marc Autret <autret_m@epita.fr>,
11168 Akim Demaille <akim@epita.fr>
11169
11170 * src/reader.c (reader): Remove call to free_symtab ().
11171 * src/main.c (main): Call it here.
11172 Include symtab.h.
11173 * src/conflicts.c (initialize_conflicts): Rename as...
11174 (solve_conflicts): this.
11175 * src/print.c (print_core, print_actions, print_state)
11176 (print_grammar): Dump to a file instead a `output_obstack'.
11177 (print_results): Dump `output_obstack', and then proceed with the
11178 FILE *.
11179 * src/files.c (compute_output_file_names, close_files): New.
11180 (output_files): Adjust.
11181 * src/main.c (main): Adjust.
11182
11183 2001-09-23 Marc Autret <autret_m@epita.fr>
11184
11185 * src/files.c (compute_header_macro): Computes header macro name
11186 from spec_defines_file when given.
11187
11188 2001-09-23 Marc Autret <autret_m@epita.fr>
11189
11190 * src/files.c (output_files): Add default extensions.
11191
11192 2001-09-22 Akim Demaille <akim@epita.fr>
11193
11194 * src/conflicts.c (finalize_conflicts): Rename as...
11195 (free_conflicts): this.
11196
11197 2001-09-22 Akim Demaille <akim@epita.fr>
11198
11199 * src/gram.c (gram_free): Rename back as...
11200 (dummy): this.
11201 (output_token_translations): Free `token_translations'.
11202 * src/symtab.c (free_symtab): Free the tag field.
11203
11204 2001-09-22 Akim Demaille <akim@epita.fr>
11205
11206 Remove `translations' as it is always set to true.
11207
11208 * src/gram.h: Adjust.
11209 * src/reader.c (packsymbols, parse_token_decl): Adjust
11210 * src/print.c (print_grammar): Adjust.
11211 * src/output.c (output_token_translations): Adjust.
11212 * src/lex.c (lex): Adjust.
11213 * src/gram.c: Be sure the set pointers to NULL.
11214 (dummy): Rename as...
11215 (gram_free): this.
11216
11217 2001-09-22 Akim Demaille <akim@epita.fr>
11218
11219 * configure.in: Invoke AM_LIB_DMALLOC.
11220 * src/system.h: Use dmalloc.
11221 * src/LR0.c: Be sure to have pointers initialized to NULL.
11222 (allocate_itemsets): Allocate kernel_items only if needed.
11223
11224 2001-09-22 Akim Demaille <akim@epita.fr>
11225
11226 * configure.in: Bump to 1.29b.
11227 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
11228 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
11229 need xmalloc.c in calc.y.
11230 From Pascal Bart.
11231
11232 2001-09-21 Akim Demaille <akim@epita.fr>
11233
11234 Version 1.29a.
11235 * Makefile.maint, config/config.guess, config/config.sub,
11236 * config/missing: Update from masters.
11237 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
11238 upon package.m4.
11239 * configure.in (ALL_LINGUAS): Add `tr'.
11240
11241 2001-09-21 Akim Demaille <akim@epita.fr>
11242
11243 * tests/Makefile.am (package.m4): Move to...
11244 ($(srcdir)/$(TESTSUITE)): here.
11245
11246 2001-09-20 Akim Demaille <akim@epita.fr>
11247
11248 * src/complain.c: No longer try to be standalone: use system.h.
11249 Don't assume __STDC__ is defined to 1. Just test if it is defined.
11250 * src/complain.h: Likewise.
11251 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
11252 Remove the unused variable `n'.
11253 From Albert Chin-A-Young.
11254
11255 2001-09-18 Marc Autret <autret_m@epita.fr>
11256
11257 * doc/bison.1: Update.
11258 * doc/bison.texinfo (Bison Options): Update --defines and --graph
11259 descriptions.
11260 (Option Cross Key): Update.
11261 Add --graph.
11262
11263 2001-09-18 Marc Autret <autret_m@epita.fr>
11264
11265 * tests/regression.at: New test (comment in %union).
11266
11267 2001-09-18 Marc Autret <autret_m@epita.fr>
11268
11269 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
11270 do that.
11271 Reported by Keith Browne.
11272
11273 2001-09-18 Marc Autret <autret_m@epita.fr>
11274
11275 * tests/output.at: Add tests for --defines and --graph.
11276
11277 2001-09-18 Marc Autret <autret_m@epita.fr>
11278
11279 * tests/output.at: Removes tests of %{header,src}_extension features.
11280
11281 2001-09-18 Akim Demaille <akim@epita.fr>
11282
11283 * tests/Makefile.am (package.m4): New.
11284 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
11285 (_AT_CHECK_CALC_ERROR): Likewise.
11286 Factor the `, ' part of verbose error messages.
11287
11288 2001-09-18 Marc Autret <autret_m@epita.fr>
11289
11290 * src/getargs.c (longopts): Declare --defines and --graph as options
11291 with optional arguments.
11292 * src/files.h: Add extern declarations.
11293 * src/files.c (spec_graph_file, spec_defines_file): New.
11294 (output_files): Update.
11295 Remove CPP-outed code.
11296
11297 2001-09-18 Marc Autret <autret_m@epita.fr>
11298
11299 Turn off %{source,header}_extension feature.
11300
11301 * src/files.c (compute_exts_from_gf): Update.
11302 (compute_exts_from_src): Update.
11303 (output_files): CPP-out useless code.
11304 * src/files.h: Remove {header,source}_extension extern declarations.
11305 * src/reader.c (parse_dquoted_param): CPP-out.
11306 (parse_header_extension_decl): Remove.
11307 (parse_source_extension_decl): Remove.
11308 (read_declarations): Remove cases tok_{hdrext,srcext}.
11309 * src/lex.c (percent_table): Remove {header,source}_extension entries.
11310 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
11311
11312 2001-09-10 Akim Demaille <akim@epita.fr>
11313
11314 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
11315 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
11316 (AT_CHECK_OUTPUT): this.
11317 Merely check ls' exit status, its output is useless.
11318
11319 2001-09-10 Akim Demaille <akim@epita.fr>
11320
11321 * tests/calc.at: Use m4_match.
11322 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
11323
11324 2001-09-10 Marc Autret <autret_m@epita.fr>,
11325 Akim Demaille <akim@epita.fr>
11326
11327 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
11328 enum color_e.
11329 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
11330 to `normal'.
11331 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
11332 * src/lex.h: Adjust prototype.
11333 (token_t): Add `tok_undef'.
11334 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
11335 (parse_percent_token): Now returns token_t.
11336 Add default statement in switch.
11337 (lex): Separate `c' as an input variable, from the token_t result
11338 part.
11339 (unlexed): Is a token_t.
11340
11341 2001-09-10 Akim Demaille <akim@epita.fr>
11342
11343 * configure.in: Bump to 1.29a.
11344
11345 2001-09-07 Akim Demaille <akim@epita.fr>
11346
11347 Version 1.29.
11348
11349 2001-08-30 Akim Demaille <akim@epita.fr>
11350
11351 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
11352 * m4/atconfig.m4: Remove.
11353 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
11354 * tests/bison: New.
11355 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
11356 m4_if, m4_patsubst, and m4_regexp.
11357 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
11358 `input' file instead of echo.
11359
11360 2001-08-29 Akim Demaille <akim@epita.fr>
11361
11362 Bump to 1.28e.
11363
11364 2001-08-29 Akim Demaille <akim@epita.fr>
11365
11366 Version 1.28d.
11367
11368 2001-08-29 Paul Eggert <eggert@twinsun.com>
11369
11370 * src/bison.simple (yyparse): Don't take the address of an
11371 item before the start of an array, as that doesn't conform to
11372 the C Standard.
11373
11374 2001-08-29 Robert Anisko <anisko_r@epita.fr>
11375
11376 * doc/bison.texinfo (Location Tracking Calc): New node.
11377
11378 2001-08-29 Paul Eggert <eggert@twinsun.com>
11379
11380 * src/output.c (output): Do not define const, as this now
11381 causes more problems than it cures.
11382
11383 2001-08-29 Akim Demaille <akim@epita.fr>
11384
11385 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
11386 the nodes.
11387 Be sure to tag the `detailmenu'.
11388
11389 2001-08-29 Akim Demaille <akim@epita.fr>
11390
11391 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
11392 download in a tmp dir.
11393
11394 2001-08-28 Marc Autret <autret_m@epita.fr>
11395
11396 * config/depcomp: New file.
11397
11398 2001-08-28 Marc Autret <autret_m@epita.fr>
11399
11400 * doc/bison.1 (mandoc): Adjust.
11401 From Juan Manuel Guerrero.
11402
11403 2001-08-28 Marc Autret <autret_m@epita.fr>
11404
11405 * src/print_graph.c (print_state): Fix.
11406
11407 2001-08-27 Marc Autret <autret_m@epita.fr>
11408
11409 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
11410 char * members.
11411 Echo modifications to the functions prototypes.
11412 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
11413
11414 2001-08-27 Marc Autret <autret_m@epita.fr>
11415
11416 * src/vcg.c: Include `xalloc.h'.
11417 (add_colorentry): New.
11418 (add_classname): New.
11419 (add_infoname): New.
11420 * src/vcg.h: Add new prototypes.
11421
11422 2001-08-27 Akim Demaille <akim@epita.fr>
11423
11424 * Makefile.maint: Sync. again with CVS Autoconf.
11425
11426 2001-08-27 Akim Demaille <akim@epita.fr>
11427
11428 * Makefile.maint: Formatting changes.
11429 (po-update, cvs-update, update): New targets.
11430 (AMTAR): Remove.
11431
11432 2001-08-27 Akim Demaille <akim@epita.fr>
11433
11434 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
11435 * Makefile.maint: Sync. with CVS Autoconf.
11436
11437 2001-08-27 Marc Autret <autret_m@epita.fr>
11438
11439 * src/vcg.h (struct infoname_s): New.
11440 (struct colorentry_s): New.
11441 (graph_s): New fields {vertical,horizontal}_order in structure.
11442 Add `infoname' field.
11443 Add `colorentry' field;
11444 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
11445 (G_HORIZONTAL_ORDER): New.
11446 (G_INFONAME): New.
11447 (G_COLORENTRY): New.
11448 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
11449 Add output of `infoname'.
11450 Add output of `colorentry'.
11451
11452 2001-08-27 Marc Autret <autret_m@epita.fr>
11453
11454 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
11455 This one shadowed a global parameter.
11456
11457 2001-08-24 Marc Autret <autret_m@epita.fr>
11458
11459 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
11460 instead of `unsigned'.
11461 (print_state): Do not call obstack_object_size () in obstack_grow ()
11462 to avoid macro variables shadowing.
11463
11464 2001-08-23 Marc Autret <autret_m@epita.fr>
11465
11466 * src/lex.c (percent_table): Typo: s/naem/name/.
11467 Add graph option.
11468 Normalize new options declarations.
11469
11470 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
11471
11472 * tests/suite.at: Exercise %header_extension and %source_extension.
11473
11474 2001-08-16 Marc Autret <autret_m@epita.fr>
11475
11476 * src/reader.c (parse_dquoted_param): New.
11477 (parse_header_extension_decl): Use it.
11478 (parse_source_extension_decl): Likewise.
11479
11480 2001-08-16 Marc Autret <autret_m@epita.fr>
11481
11482 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
11483 (get_xxxx_str): Use assert () instead of complain ().
11484 Remove return invokations in default cases.
11485 (get_decision_str): Modify default behaviour. Remove second argument.
11486 Echo modifications on calls.
11487 (output_graph): Fix.
11488
11489 2001-08-16 Marc Autret <autret_m@epita.fr>
11490
11491 * src/getargs.c (usage): Update with ``-g, --graph''.
11492
11493 2001-08-16 Marc Autret <autret_m@epita.fr>
11494
11495 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
11496 (Option Cross Key): Likewise.
11497 * doc/bison.1: Update.
11498
11499 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
11500
11501 * src/output.c (output_master_parser): Don't finish action_obstack.
11502 (output_parser): Don't care about the muscle action, here.
11503 (prepare): Copy the action_obstack in the action muscle.
11504 (output): Free action_obstack.
11505
11506 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
11507
11508 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
11509 will contain `%union' declaration.
11510 (parse_union_decl): Delete #line directive output.
11511 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
11512 informations about %union.
11513 (parse_union_decl): Copy the union_obstack in the muscle stype.
11514 * src/bison.simple: Add new #line directive.
11515 Add typdef %%stype YYSTYPE.
11516
11517 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
11518
11519 * src/bison.simple: Add new `#line' directive.
11520
11521 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
11522
11523 * src/bison.simple: New `#line' directive.
11524 * src/output.c (output_parser): Support new dynamic muscle input_line.
11525
11526 2001-09-22 Marc Autret <autret_m@epita.fr>
11527
11528 * src/output.c (output_master_parser): New.
11529 (output_parser): Be more re-entrant.
11530
11531 2001-09-21 Marc Autret <autret_m@epita.fr>
11532
11533 * src/reader.c (copy_definition, parse_union_decl): Update and use
11534 `linef' muscle.
11535 (copy_action): Likewise.
11536 Use obstack_1grow ().
11537 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
11538
11539 2001-09-21 Marc Autret <autret_m@epita.fr>
11540
11541 * src/options.c (option_table): Adjust.
11542 * src/lex.c (parse_percent_token): Fix.
11543
11544 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
11545
11546 * src/options.c (symtab.h): Include it, need by lex.h.
11547
11548 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
11549
11550 * src/lex.c (parse_percent_token): Change type of variable `tx', which
11551 is now an option_table_struct*.
11552 (option_strcmp): New function option_strcmp.
11553 (parse_percent_token): Call option_strcmp.
11554 * src/getargs.c (xalloc.h, options.h): Include it.
11555 (getargs): Call create_long_option_table.
11556 (getargs): Free longopts at the end of the function.
11557 (shortopts): Move in options.c.
11558 * src/options.c (create_long_option_table): New function. Convert
11559 information from option_table to option structure.
11560 * src/reader.c (options.h): Include it.
11561
11562 * src/Makefile.am: Adjust.
11563 * src/options.c (option_table): Create from longopts and percent_table.
11564 * src/getargs.c (longopts): Delete.
11565 * src/lex.c (struct percent_table_struct): Delete.
11566 (percent_table): Delete.
11567 (options.h): Include it.
11568 * src/options.c: Create.
11569 * src/options.h: Create.
11570 Declare enum opt_access_e.
11571 Define struct option_table_struct.
11572
11573 2001-09-20 Marc Autret <autret_m@epita.fr>
11574
11575 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
11576 sections of Bison.
11577
11578 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
11579
11580 * src/bison.simple: s/%%filename/%%skeleton.
11581 * src/muscle_tab.c (getargs.h): Include it.
11582 (muscle_init): Insert new muscle skeleton.
11583
11584 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
11585
11586 * src/output.c (output_parser): Delete unused variable actions_dumped.
11587
11588 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
11589
11590 * src/output.c (output): Delete call to reader_output_yylsp.
11591 * src/reader.c (reader): Likewise.
11592 * src/reader.h: Delete declaration of reader_output_yylsp.
11593
11594 2001-09-02 Marc Autret <autret_m@epita.fr>
11595
11596 * src/reader.c: Include muscle_tab.h.
11597 (parse_union_decl): Update.
11598 (parse_macro_decl): Rename parse_muscle_decl.
11599 Update to use renamed functions and variable.
11600 (read_declarations, copy_action, read_additionnal_code, : Updated
11601 with correct variables and functions names.
11602 (packsymbols, reader): Likewise.
11603
11604 * src/reader.h (muscle_obstack): Extern declaration update.
11605
11606 * src/output.c: Include muscle_tab.h
11607 In all functions using macro_insert, change by using muscle_insert ().
11608 (macro_obstack): Rename muscle_obstack.
11609 Echo modifications in the whole file.
11610 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
11611 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
11612 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
11613
11614 * src/muscle_tab.h: Update double inclusion macros.
11615 (macro_entry_s): Rename muscle_entry_s.
11616 Update prototypes.
11617
11618 * src/muscle_tab.c: Include muscle_tab.h.
11619 Rename macro_tabble to muscle_table.
11620 (mhash1, mhash2, mcmp): Use muscle_entry.
11621 (macro_init): Rename muscle_init. Update.
11622 (macro_insert): Rename muscle_insert. Update.
11623 (macro_find): Rename muscle_find. Update.
11624
11625 * src/main.c: Include muscle_tab.h.
11626 (main): Call muscle_init ().
11627 * src/Makefile.am (bison_SOURCES): Echo modifications.
11628
11629 2001-09-02 Marc Autret <autret_m@epita.fr>
11630
11631 Now the files macro_tab.[ch] are named muscle_tab.[ch].
11632
11633 * src/muscle_tab.c, src/muscle_tab.h: Add files.
11634
11635 2001-09-02 Marc Autret <autret_m@epita.fr>
11636
11637 * src/macrotab.c, src/macrotab.h: Remove.
11638
11639 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
11640
11641 * src/reader.c (copy_guard): Use muscle to specify the `#line'
11642 filename.
11643
11644 2001-09-01 Marc Autret <autret_m@epita.fr>
11645
11646 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
11647 to an explicit value to activate the feature. We do it here.
11648
11649 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11650
11651 * src/output.c (prepare): Delete the `filename' muscule insertion.
11652 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
11653 (parse_union_decl): Likewise.
11654 * src/macrotab.c (macro_init): Initialize filename by infile.
11655
11656 2001-08-31 Marc Autret <autret_m@epita.fr>
11657
11658 * src/bison.simple (YYLSP_NEEDED): New definition.
11659 * src/output.c (prepare): Add macro insertion of `locations_flag'
11660
11661 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11662
11663 * src/output.c (prepare): Delete insertion of previous muscles,
11664 and insert the `prefix' muscles.
11665 * src/macrotab.c (macro_init): Likewise.
11666 (macro_init): Initialization prefix directive by `yy'.
11667 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
11668 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
11669 yylval, yydebug, yyerror, yynerrs and yyparse.
11670 New directive `#define' to substitute yydebug, ... with option
11671 name_prefix.
11672
11673 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11674
11675 * src/main.c (main): Standardize.
11676 * src/output.c (output_table_data, output_parser): Likewise.
11677 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
11678
11679 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
11680
11681 * src/reader.c (read_additionnal_code): Rename %%user_code to
11682 %%epilogue.
11683 * src/output.c (output): Rename %%declarations to %%prologue.
11684 * src/bison.simple: Echo modifications.
11685
11686 2001-08-31 Marc Autret <autret_m@epita.fr>
11687
11688 * src/reader.c (readgram): CleanUp.
11689 (output_token_defines): Likewise.
11690 (packsymbols): Likewise.
11691 (reader): Likewise.
11692 * src/output.c (output): CPP-out useless code.
11693
11694 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11695
11696 * src/reader.c (reader): Delete obsolete call to function
11697 output_trailers and output_headers.
11698 * src/output.h: Remove obsolete functions prototypes of output_headers
11699 and output_trailers.
11700
11701 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
11702
11703 * src/main.c: Include macrotab.h.
11704 * src/macrotab.h (macro_entry_s): Constify fields.
11705 Adjust functions prototypes.
11706 * src/macrotab.c (macro_insert): Constify key and value.
11707 (macro_find): Constify key.
11708 (macro_insert): Include 'xalloc.h'
11709 (macro_insert): Use XMALLOC.
11710 (macro_find): Constify return value.
11711 * src/output.c (output_table_data): Rename table to table_data.
11712 (output_parser): Constify macro_key, macro_value.
11713
11714 2001-08-30 Marc Autret <autret_m@epita.fr>
11715
11716 * src/reader.c (parse_skel_decl): New.
11717 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
11718 * src/lex.h (token_t): New token `tok_skel'.
11719 * src/lex.c (percent_table): Add skeleton option entry.
11720 Standardize.
11721
11722 2001-08-29 Marc Autret <autret_m@epita.fr>
11723
11724 * src/bison.simple: Add %%user_code directive at the end.
11725 * src/reader.c (read_additionnal_code): New.
11726 (reader): Use it.
11727 * src/output.c (output_program): Remove.
11728 (output): Update.
11729
11730 2001-08-28 Marc Autret <autret_m@epita.fr>
11731
11732 * src/output.c (output_actions): Clean up.
11733 (output_gram): CPP-out useless code.
11734 * src/reader.c (reader): Clean up, CPP-out useless code.
11735
11736 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
11737
11738 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
11739 directive.
11740 * src/bison.simple: Add `%%definitions'.
11741
11742 2001-08-28 Marc Autret <autret_m@epita.fr>
11743
11744 * config/depcomp: New file.
11745
11746 2001-08-27 Paul Eggert <eggert@twinsun.com>
11747
11748 * src/bison.simple (yyparse): Don't take the address of an
11749 item before the start of an array, as that doesn't conform to
11750 the C Standard.
11751
11752 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
11753
11754 * src/output.c (output): Remove the initialization of the macro
11755 obstack. It was done too late here.
11756
11757 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
11758 completely wrong.
11759 (reader): Initialize the macro obstack here, since we need it to grow
11760 '%define' directives.
11761
11762 * src/reader.h: Declare the macro obstack as extern.
11763
11764 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
11765
11766 * src/output.c (output_parser): Fix. Store single '%' characters in
11767 the output obstack instead of throwing them away.
11768
11769 2001-08-27 Akim Demaille <akim@epita.fr>
11770
11771 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
11772
11773 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11774
11775 * lib/Makefile.am: Adjust.
11776
11777 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11778
11779 * src/bison.simple: Update and add '%%' directives.
11780
11781 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11782
11783 * src/reader.c (reader): Remove calls to 'output_headers' and
11784 'output_trailers'. Remove some C output.
11785 (readgram): Disable a piece of code that was writing a default
11786 definition for 'YYSTYPE'.
11787 (reader_output_yylsp): Remove.
11788 (packsymbols): Output token defintions to a macro.
11789 (copy_definition): Disable C output.
11790
11791 * src/reader.c (parse_macro_decl): New function used to parse macro
11792 declarations.
11793 (copy_string2): Put the body of copy_string into this new function.
11794 Add a parameter to let the caller choose whether he wants to copy the
11795 string delimiters or not.
11796 (copy_string): Be a simple call to copy_string2 with the last argument
11797 bound to true.
11798 (read_declarations): Add case for macro definition.
11799 (copy_identifier): New.
11800 (parse_macro_decl): Read macro identifiers using copy_identifier
11801 rather than lex.
11802
11803 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11804
11805 * src/output.c (prepare): Add prefixed names.
11806 (output_parser): Output semantic actions.
11807 (output_parser): Fix bug on '%%line' directives.
11808
11809 * src/output.c (output_headers): Remove. The C code printed by this
11810 function should now be in the skeletons.
11811 (output_trailers): Remove.
11812 (output): Disable call to 'reader_output_yylsp'.
11813 (output_rule_data): Do not output tables to the table obstack.
11814
11815 * src/output.c: Remove some C dedicated output.
11816 Improve the use of macro and output obstacks.
11817 (output_defines): Remove.
11818
11819 * src/output.c (output_token_translations): Associate 'translate'
11820 table with a macro. No output to the table obstack.
11821 (output_gram): Same for 'rhs' and 'prhs'.
11822 (output_stos): Same for 'stos'.
11823 (output_rule_data): Same for 'r1' and 'r2'.
11824 (token_actions): Same for 'defact'.
11825 (goto_actions): Same for 'defgoto'.
11826 (output_base): Same for 'pact' and 'pgoto'.
11827 (output_table): Same for 'table'.
11828 (output_check): Same for 'check'.
11829
11830 * src/output.c (output_table_data): New function.
11831 (output_short_table): Remove.
11832 (output_short_or_char_table): Remove.
11833
11834 * src/output.c (output_parser): Replace most of the skeleton copy code
11835 with something new. Skeletons are now processed character by character
11836 rather than line by line, and Bison looks for '%%' macros. This is the
11837 first step in making Bison's output process (a lot) more flexible.
11838 (output_parser): Use the macro table.
11839
11840 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11841
11842 * src/main.c (main): Initialize the macro table.
11843
11844 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11845
11846 * src/lex.c (percent_table): Add tok_define.
11847 * src/lex.h: Add tok_define.
11848
11849 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11850
11851 * src/macrotab.c: New file.
11852 * src/macrotab.h: New file.
11853 * src/Makefile.am: Update.
11854
11855 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11856
11857 * lib/hash.c: New file.
11858 * lib/hash.h: New file.
11859 * lib/Makefile.am: Update.
11860
11861 2001-08-15 Akim Demaille <akim@epita.fr>
11862
11863 Version 1.28c.
11864
11865 2001-08-15 Marc Autret <autret_m@epita.fr>
11866
11867 * src/reader.c (readgram): Indent output macro YYSTYPE.
11868 (packsymbols): Likewise.
11869 (output_token_defines): Likewise.
11870 * src/files.c: Standardize.
11871 (compute_header_macro): New.
11872 (defines_obstack_save): New. Use compute_header_macro.
11873 (output_files): Update. Use defines_obstack_save.
11874
11875 2001-08-15 Akim Demaille <akim@epita.fr>
11876
11877 * doc/bison.texinfo (Table of Symbols): Document
11878 YYSTACK_USE_ALLOCA.
11879
11880 2001-08-15 Akim Demaille <akim@epita.fr>
11881
11882 * missing: Update from CVS Automake.
11883 * config/config.guess, config/config.sub, config/texinfo.tex:
11884 Update from gnu.org.
11885
11886 2001-08-15 Akim Demaille <akim@epita.fr>
11887
11888 * Makefile.maint: Sync with CVS Autoconf.
11889
11890 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
11891
11892 * doc/bison.texinfo: Include GNU Free Documentation License from
11893 `fdl.texi'.
11894 * doc/fdl.texi: Add to package.
11895
11896 2001-08-14 Marc Autret <autret_m@epita.fr>
11897
11898 Turn on %{source,header}_extension features.
11899
11900 * src/lex.c (percent_table): Un-CPP out header_extension and
11901 source_extension.
11902 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
11903 (compute_exts_from_src): Remove conditions. It restores priorities
11904 between options.
11905
11906 2001-08-14 Marc Autret <autret_m@epita.fr>
11907
11908 * src/files.c (compute_base_names): Add extensions computing when
11909 `--file-prefix' used.
11910 Standardize function calls.
11911
11912 2001-08-13 Marc Autret <autret_m@epita.fr>
11913
11914 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
11915 defining it (defined but null disables alloca).
11916
11917 2001-08-13 Marc Autret <autret_m@epita.fr>
11918
11919 * src/bison.simple (_yy_memcpy): CPP reformat.
11920
11921 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
11922
11923 * tests/atconfig.in (CPPFLAGS): Fix.
11924
11925 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
11926
11927 * doc/bison.texinfo: Include GNU General Public License from
11928 `gpl.texi'.
11929 * doc/gpl.texi: Add to package.
11930
11931 2001-08-10 Marc Autret <autret_m@epita.fr>
11932
11933 * src/print_graph.h: Fix.
11934 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
11935
11936 2001-08-10 Akim Demaille <akim@epita.fr>
11937
11938 * src/system.h: Provide default declarations for stpcpy, strndup,
11939 and strnlen.
11940
11941 2001-08-10 Robert Anisko <anisko_r@epita.fr>
11942
11943 * doc/bison.texinfo (Locations): Update @$ stuff.
11944
11945 2001-08-09 Robert Anisko <anisko_r@epita.fr>
11946
11947 * src/bison.simple (YYLLOC_DEFAULT): Update.
11948 (yyparse): Adjust.
11949
11950 2001-08-08 Marc Autret <autret_m@epita.fr>
11951
11952 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
11953 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
11954 Reported by Fabrice Bauzac.
11955
11956 2001-08-08 Marc Autret <autret_m@epita.fr>
11957
11958 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
11959 * src/vcg.c (output_node): Fix.
11960 * src/vcg.h: Cleanup.
11961 * src/print_graph.c: Add comments.
11962 (node_output_size): New global variable. Simplify the formatting of
11963 the VCG graph output.
11964 (print_actions): Unused code is now used. It notifies the final state
11965 and no action states in the VCG graph. It also give the reduce actions.
11966 The `shift and goto' edges are red and the `go to state' edges are
11967 blue.
11968 Get the current node name and node_obstack by argument.
11969 (node_obstack): New variable.
11970 (print_state): Manage node_obstack.
11971 (print_core): Use node_obstack given by argument.
11972 A node is not only computed here but in print_actions also.
11973 (print_graph): CPP out useless code instead of commenting it.
11974
11975 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
11976
11977 * tests/atconfig.in (CPPFLAGS): Fix.
11978
11979 2001-08-07 Akim Demaille <akim@epita.fr>
11980
11981 * src/print_graph.c (quote): New.
11982 (print_core): Use it.
11983
11984 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
11985
11986 * src/vcg.c (complain.h): Include it.
11987 Unepitaize `return' invocations.
11988 [NDEBUG] (main): Remove.
11989 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
11990 * src/files.c (open_files): Initialize graph_obstack.
11991 * src/print_graph.c (print_actions): CPP out useless code.
11992 (print_core): Don't output the last `\n' in labels.
11993 Use `quote'.
11994 * src/files.c (output_files): Output the VCG file.
11995 * src/main.c (main): Invoke print_graph ();
11996
11997 2001-08-06 Marc Autret <autret_m@epita.fr>
11998
11999 Automaton VCG graph output.
12000 Using option ``-g'' or long option ``--graph'', you can generate
12001 a gram_filename.vcg file containing a VCG description of the LALR (1)
12002 automaton of your grammar.
12003
12004 * src/main.c: Call to print_graph() function.
12005 * src/getargs.h: Update.
12006 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
12007 (graph_flag): New flag.
12008 (longopts): Update.
12009 (getargs): Add case `g'.
12010 * src/files.c (graph_obstack): New obstack struct.
12011 (open_files): Initialize new obstack.
12012 (output_files): Saves graph_obstack if required.
12013 * src/files.h (graph_obstack): New extern declaration.
12014 * src/Makefile.am: Add new source files.
12015
12016 2001-08-06 Marc Autret <autret_m@epita.fr>
12017
12018 * src/print_graph.c, src/print_graph.h (graph): New.
12019 * src/vcg.h: New file.
12020 * src/vcg.c: New file, VCG graph handling.
12021
12022 2001-08-06 Marc Autret <autret_m@epita.fr>
12023
12024 Add of %source_extension and %header_extension which specify
12025 the source or/and the header output file extension.
12026
12027 * src/files.c (compute_base_names): Remove initialisation of
12028 src_extension and header_extension.
12029 (compute_exts_from_gf): Update.
12030 (compute_exts_from_src): Update.
12031 (output_files): Update.
12032 * src/reader.c (parse_header_extension_decl): New.
12033 (parse_source_extension_decl): New.
12034 (read_declarations): New case statements for the new tokens.
12035 * src/lex.c (percent_table): Add entries for %source_extension
12036 and %header_extension.
12037 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
12038
12039 2001-08-06 Marc Autret <autret_m@epita.fr>
12040
12041 * configure.in: Bump to 1.28c.
12042 * doc/bison.texinfo: Texinfo thingies.
12043
12044 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
12045
12046 * tests/atconfig.in (CPPFLAGS): Add.
12047 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
12048
12049 2001-08-03 Akim Demaille <akim@epita.fr>
12050
12051 Version 1.28b.
12052
12053 2001-08-03 Akim Demaille <akim@epita.fr>
12054
12055 * tests/Makefile.am (check-local): Ship testsuite.
12056 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
12057 Include `string.h'.
12058
12059 2001-08-03 Akim Demaille <akim@epita.fr>
12060
12061 * configure.in: Try using -Wformat when compiling.
12062
12063 2001-08-03 Akim Demaille <akim@epita.fr>
12064
12065 * configure.in: Bump to 1.28b.
12066
12067 2001-08-03 Akim Demaille <akim@epita.fr>
12068
12069 * src/complain.c: Adjust strerror_r portability issues.
12070
12071 2001-08-03 Akim Demaille <akim@epita.fr>
12072
12073 Version 1.28a.
12074
12075 2001-08-03 Akim Demaille <akim@epita.fr>
12076
12077 * src/getargs.c, src/getarg.h (skeleton)): Constify.
12078 * src/lex.c (literalchar): Avoid name clashes on `buf'.
12079 * src/getargs.c: Include complain.h.
12080 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
12081 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
12082
12083 2001-08-03 Akim Demaille <akim@epita.fr>
12084
12085 * src/reader.c (readgram): Display hidden chars in error messages.
12086
12087 2001-08-03 Akim Demaille <akim@epita.fr>
12088
12089 Update to gettext 0.10.39.
12090
12091 2001-08-03 Akim Demaille <akim@epita.fr>
12092
12093 * lib/strspn.c: New.
12094
12095 2001-08-01 Marc Autret <autret_m@epita.fr>
12096
12097 * doc/bison.texinfo: Update.
12098 * doc/bison.1 (mandoc): Update.
12099 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
12100 * src/files.c: Support output files extensions computing.
12101 (src_extension): New static variable.
12102 (header_extension): New static variable.
12103 (tr): New function.
12104 (get_extension_index): New function, gets the index of an extension
12105 filename in a string.
12106 (compute_exts_from_gf): New function, computes extensions from the
12107 grammar file extension.
12108 (compute_exts_from_src): New functions, computes extensions from the
12109 C source file extension, file given by ``-o'' option.
12110 (compute_base_names): Update.
12111 (output_files): Update.
12112
12113 2001-08-01 Robert Anisko <anisko_r@epita.fr>
12114
12115 * doc/bison.texi: Document @$.
12116 (Locations): New section.
12117
12118 2001-07-18 Akim Demaille <akim@epita.fr>
12119
12120 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
12121 * config/prev-version.txt, config/move-if-change: New.
12122 * Makefile.am: Adjust.
12123
12124 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
12125
12126 * src/bison.simple (yyparse): Suppress warning `comparaison
12127 between signed and unsigned'.
12128
12129 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
12130
12131 * src/getargs.h (raw_flag): Remove.
12132 * src/getargs.c: Die on `-r'/`--raw'.
12133 * src/lex.c (parse_percent_token): Die on `%raw'.
12134 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
12135 * tests/calc.at: Suppress test with option `--raw'.
12136
12137 2001-07-14 Akim Demaille <akim@epita.fr>
12138
12139 * config/: New.
12140 * configure.in: Require Autoconf 2.50.
12141 Update to gettext 0.10.38.
12142
12143 2001-03-16 Akim Demaille <akim@epita.fr>
12144
12145 * doc/bison.texinfo: ANSIfy the examples.
12146
12147 2001-03-16 Akim Demaille <akim@epita.fr>
12148
12149 * getargs.c (skeleton): New variable.
12150 (longopts): --skeleton is a new option.
12151 (shortopts, getargs): -S is a new option.
12152 * getargs.h: Declare skeleton.
12153 * output.c (output_parser): Use it.
12154
12155 2001-03-16 Akim Demaille <akim@epita.fr>
12156
12157 * m4/strerror_r.m4: New.
12158 * m4/error.m4: Run AC_FUNC_STRERROR_R.
12159 * lib/error.h, lib/error.c: Update.
12160
12161 2001-03-16 Akim Demaille <akim@epita.fr>
12162
12163 * src/getargs.c (longopts): Clean up.
12164
12165 2001-02-21 Akim Demaille <akim@epita.fr>
12166
12167 * src/reader.c (gensym): `gensym_count' is your own.
12168 Use a static buf to create the symbol name, as token_buffer is no
12169 longer a buffer.
12170
12171 2001-02-08 Akim Demaille <akim@epita.fr>
12172
12173 * src/conflicts.c (conflict_report): Be sure not to append to res
12174 between two calls, which could happen if both first sprintf were
12175 skipped, but not the first cp += strlen.
12176
12177 2001-02-08 Akim Demaille <akim@epita.fr>
12178
12179 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
12180 New, from fileutils 4.0.37.
12181 * configure.in: Require Autoconf 2.49c. I took some time before
12182 making this decision. This is the only way out for portability
12183 issues in Bison, it would mean way too much duplicate effort to
12184 import in Bison features implemented in 2.49c since 2.13.
12185 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
12186
12187 2001-02-02 Akim Demaille <akim@epita.fr>
12188
12189 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
12190 * lib/xalloc.h, lib/xmalloc.c: Update.
12191
12192 2001-01-19 Akim Demaille <akim@epita.fr>
12193
12194 Get rid of the ad hoc handling of token_buffer in the scanner: use
12195 the obstacks.
12196
12197 * src/lex.c (token_obstack): New.
12198 (init_lex): Initialize it. No longer call...
12199 (grow_token_buffer): this. Remove it.
12200 Adjust all the places which used it to use the obstack.
12201
12202 2001-01-19 Akim Demaille <akim@epita.fr>
12203
12204 * src/lex.h: Rename all the tokens:
12205 s/\bENDFILE\b/tok_eof/g;
12206 s/\bIDENTIFIER\b/tok_identifier/g;
12207 etc.
12208 Let them be enums, not #define, to ease debugging.
12209 Adjust all the code.
12210
12211 2001-01-18 Akim Demaille <akim@epita.fr>
12212
12213 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
12214 * src/lex.c (maxtoken, grow_token_buffer): Static.
12215
12216 2001-01-18 Akim Demaille <akim@epita.fr>
12217
12218 Since we now use obstacks, more % directives can be enabled.
12219
12220 * src/lex.c (percent_table): Also accept `%yacc',
12221 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
12222 `%debug'.
12223 Handle the actions for `%semantic_parser' and `%pure_parser' here,
12224 instead of returning a token.
12225 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
12226 * src/reader.c (read_declarations): Adjust.
12227 * src/files.c (open_files): Don't call `compute_base_names', don't
12228 compute `attrsfile' since they depend upon data which might be
12229 *in* the input file now.
12230 (output_files): Do it here.
12231 * src/output.c (output_headers): Document the fact that this patch
12232 introduces a guaranteed SEGV for semantic parsers.
12233 * doc/bison.texinfo: Document them.
12234 * tests/suite.at: Exercise these %options.
12235
12236 2000-12-20 Akim Demaille <akim@epita.fr>
12237
12238 Also handle the output file (--verbose) with obstacks.
12239
12240 * files.c (foutput): Remove.
12241 (output_obstack): New.
12242 Adjust all dependencies.
12243 * src/conflicts.c: Return a string.
12244 * src/system.h (obstack_grow_string): Rename as...
12245 (obstack_sgrow): this. Be ready to work with non literals.
12246 (obstack_fgrow4): New.
12247
12248 2000-12-20 Akim Demaille <akim@epita.fr>
12249
12250 * src/files.c (open_files): Fix the computation of short_base_name
12251 in the case of `-o foo.tab.c'.
12252
12253 2000-12-20 Akim Demaille <akim@epita.fr>
12254
12255 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
12256 (copy_dollar): Now that everything uses obstacks, get rid of the
12257 FILE * parameters.
12258
12259 2000-12-20 Akim Demaille <akim@epita.fr>
12260
12261 * src/files.c (open_files): Actually the `.output' file is based
12262 on the short_base_name, not base_name.
12263 * tests/suite.at (Checking output file names): Adjust.
12264
12265 2000-12-20 Akim Demaille <akim@epita.fr>
12266
12267 * src/bison.s1: Remove, we now use directly...
12268 * src/bison.simple: this.
12269 * src/Makefile.am: Use pkgdata instead of data.
12270
12271 2000-12-20 Akim Demaille <akim@epita.fr>
12272
12273 * src/files.c (guard_obstack): New.
12274 (open_files): Initialize it.
12275 (output_files): Dump it...
12276 * src/files.h: Export it.
12277 * src/reader.c (copy_guard): Use it.
12278
12279 2000-12-19 Akim Demaille <akim@epita.fr>
12280
12281 * src/files.c (outfile, defsfile, actfile): Removed as global
12282 vars.
12283 (open_files): Don't compute them.
12284 (output_files): Adjust.
12285 (base_name, short_base_name): Be global.
12286 Adjust dependencies.
12287
12288 2000-12-19 Akim Demaille <akim@epita.fr>
12289
12290 * src/files.c (strsuffix): New.
12291 (stringappend): Be just like strcat but allocate.
12292 (base_names): Eve out from open_files.
12293 Try to simplify the rather hairy computation of base_name and
12294 short_base_name.
12295 (open_files): Use it.
12296 * tests/suite.at (Checking output file names): New test.
12297
12298 2000-12-19 Akim Demaille <akim@epita.fr>
12299
12300 * src/system.h (obstack_grow_literal_string): Rename as...
12301 (obstack_grow_string): this.
12302 * src/output.c (output_parser): Recognize `%% actions' instead of
12303 `$'.
12304 * src/bison.s1: s/$/%% actions/.
12305 * src/bison.hairy: Likewise.
12306
12307 2000-12-19 Akim Demaille <akim@epita.fr>
12308
12309 * src/output.c (output_parser): Compute the `#line' lines when
12310 there are.
12311 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
12312 Suggested by Hans Aberg.
12313
12314 2000-12-19 Akim Demaille <akim@epita.fr>
12315
12316 Let the handling of the skeleton files be local to the procedures
12317 that use it.
12318
12319 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
12320 longer static.
12321 (fparser, open_extra_files): Remove.
12322 (open_files, output_files): Don't take care of fparser.
12323 * src/files.h: Adjust.
12324 * src/output.c (output_parser): Open and close the file to the
12325 skeleton.
12326 * src/reader.c (read_declarations): When %semantic_parser, open
12327 fguard.
12328
12329 2000-12-19 Akim Demaille <akim@epita.fr>
12330
12331 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
12332 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
12333
12334 2000-12-19 Akim Demaille <akim@epita.fr>
12335
12336 * src/files.c (open_files): Yipee! We no longer need all the code
12337 looking for `/tmp' since we have no tmp file.
12338
12339 2000-12-19 Akim Demaille <akim@epita.fr>
12340
12341 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
12342 New macros.
12343 * src/files.c (open_files): Less dependency on MSDOS etc.
12344
12345 2000-12-14 Akim Demaille <akim@epita.fr>
12346
12347 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
12348 Provide a default definition.
12349 Use it when executing the default @ action.
12350 * src/reader.c (reader_output_yylsp): No longer include
12351 `timestamp' and `text' in the default YYLTYPE.
12352
12353 2000-12-12 Akim Demaille <akim@epita.fr>
12354
12355 * src/reader.c (copy_definition, parse_union_decl, copy_action)
12356 (copy_guard): Quote the file names.
12357 Reported by Laurent Mascherpa.
12358
12359 2000-12-12 Akim Demaille <akim@epita.fr>
12360
12361 * src/output.c (output_headers, output_program, output): Be sure
12362 to escape special characters when outputting filenames.
12363 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
12364 (output_headers): Don't depend on them, Use ACTSTR.
12365
12366 2000-11-17 Akim Demaille <akim@epita.fr>
12367
12368 * lib/obstack.h: Formatting changes.
12369 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
12370 prevents type checking.
12371 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
12372 cast the value to (void *): assigning a `foo *' to a `void *'
12373 variable is valid.
12374 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
12375 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
12376 append characters.
12377
12378 2000-11-17 Akim Demaille <akim@epita.fr>
12379
12380 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
12381 as...
12382 (suite.m4, regression.m4, calc.m4): these.
12383 * tests/atgeneral.m4: Update from CVS Autoconf.
12384
12385 2000-11-17 Akim Demaille <akim@epita.fr>
12386
12387 * tests/regression.m4 (%union and --defines): New test,
12388 demonstrating a current bug in the obstack implementation.
12389
12390 2000-11-17 Akim Demaille <akim@epita.fr>
12391
12392 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
12393 macros.
12394 Use them to declare the variables which are global or local to
12395 `yyparse'.
12396
12397 2000-11-17 Akim Demaille <akim@epita.fr>
12398
12399 * acconfig.h: Remove, no longer used.
12400
12401 2000-11-07 Akim Demaille <akim@epita.fr>
12402
12403 * src: s/Copyright (C)/Copyright/g.
12404
12405 2000-11-07 Akim Demaille <akim@epita.fr>
12406
12407 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
12408 defining.
12409 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
12410
12411 2000-11-07 Akim Demaille <akim@epita.fr>
12412
12413 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
12414 Merge in a single CPP if/else.
12415
12416 2000-11-07 Akim Demaille <akim@epita.fr>
12417
12418 * src/output.c (output): Remove useless variables.
12419 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
12420 argument `data' for consistency with the prototypes.
12421 Qualify it `const'.
12422 (obstack_copy, obstack_copy0): Rename the second argument as
12423 `address' for consistency. Qualify it `const'.
12424 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
12425 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
12426 `const' their input argument (`data' or `address').
12427 Adjust the corresponding macros to include `const' in casts.
12428
12429 2000-11-03 Akim Demaille <akim@epita.fr>
12430
12431 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
12432 s/PFILE1/BISON_HAIRY/.
12433 Adjust dependencies.
12434
12435 2000-11-03 Akim Demaille <akim@epita.fr>
12436
12437 For some reason, this was not applied.
12438
12439 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12440 `unlink': it's no longer used.
12441
12442 2000-11-03 Akim Demaille <akim@epita.fr>
12443
12444 * src/files.c (skeleton_find): New function, eved out of...
12445 (open_files, open_extra_files): here.
12446
12447 2000-11-03 Akim Demaille <akim@epita.fr>
12448
12449 Don't use `atexit'.
12450
12451 * src/files.c (obstack_save): New function.
12452 (done): Rename as...
12453 (output_files): this.
12454 Use `obstack_save'.
12455 * src/main.c (main): Don't use `atexit' to register `done', since
12456 it no longer has to remove tmp files, just call `output_files'
12457 when there are no errors.
12458
12459 2000-11-02 Akim Demaille <akim@epita.fr>
12460
12461 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12462 `unlink': it's no longer used.
12463 * src/files.h: Formatting changes.
12464
12465 2000-11-02 Akim Demaille <akim@epita.fr>
12466
12467 Remove the last uses of mktemp and unlink/delete.
12468
12469 * src/files.c (fdefines, ftable): Removed.
12470 (defines_ostack, table_obstack): New.
12471 Adjust dependencies of the former into uses of the latter.
12472 * src/output.c (output_short_or_char_table, output_short_table):
12473 Convert to using obstacks.
12474 * src/reader.c (copy_comment2): Accept one FILE * and two
12475 obstacks.
12476 (output_token_defines, reader_output_yylsp): Use obstacks.
12477 * src/system.h (obstack_fgrow3): New.
12478 * po/POTFILES.in: Adjust.
12479
12480 2000-11-01 Akim Demaille <akim@epita.fr>
12481
12482 Change each use of `fattrs' into a use of `attrs_obstack'.
12483
12484 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
12485 * src/files.c (fattrs): Remove.
12486 (attrs_obstack): New.
12487 Adjust all dependencies.
12488 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
12489
12490 2000-11-01 Akim Demaille <akim@epita.fr>
12491
12492 Introduce obstacks.
12493 Change each use of `faction' into a use of `action_obstack'.
12494
12495 * lib/obstack.h, lib/obstack.c: New files.
12496 * src/files.c (faction): Remove.
12497 (action_obstack): New.
12498 Adjust all dependencies.
12499
12500 2000-10-20 Akim Demaille <akim@epita.fr>
12501
12502 * lib/quote.h (PARAMS): New macro. Use it.
12503
12504 2000-10-16 Akim Demaille <akim@epita.fr>
12505
12506 * src/output.c (output_short_or_char_table): New function.
12507 (output_short_table, output_token_translations): Use it.
12508 (goto_actions): Use output_short_table.
12509
12510 2000-10-16 Akim Demaille <akim@epita.fr>
12511
12512 * src/symtab.c (bucket_new): New function.
12513 (getsym): Use it.
12514
12515 * src/output.c (output_short_table): New argument to display the
12516 comment associated with the table.
12517 Adjust dependencies.
12518 (output_gram): Use it.
12519 (output_rule_data): Nicer output layout for YYTNAME.
12520
12521 2000-10-16 Akim Demaille <akim@epita.fr>
12522
12523 * src/lex.c (read_typename): New function.
12524 (lex): Use it.
12525 * src/reader.c (copy_dollar): Likewise.
12526
12527 2000-10-16 Akim Demaille <akim@epita.fr>
12528
12529 * src/reader.c (copy_comment2): Expect the input stream to be on
12530 the `/' which is suspected to open a comment, instead of being
12531 called after `//' or `/*' was read.
12532 (copy_comment, copy_definition, parse_union_decl, copy_action)
12533 (copy_guard): Adjust.
12534
12535 2000-10-16 Akim Demaille <akim@epita.fr>
12536
12537 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
12538 `read_signed_integer'.
12539
12540 2000-10-16 Akim Demaille <akim@epita.fr>
12541
12542 * src/reader.c (copy_dollar): New function.
12543 (copy_guard, copy_action): Use it.
12544
12545 2000-10-16 Akim Demaille <akim@epita.fr>
12546
12547 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
12548 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
12549 New files, from Fileutils 4.0.27.
12550 * src/main.c (printable_version): Remove.
12551 * src/lex.c, src/reader.c: Use `quote'.
12552
12553 2000-10-04 Akim Demaille <akim@epita.fr>
12554
12555 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
12556
12557 2000-10-04 Akim Demaille <akim@epita.fr>
12558
12559 * doc/bison.texinfo: Various typos spotted by Neil Booth.
12560
12561 2000-10-04 Akim Demaille <akim@epita.fr>
12562
12563 When a literal string is used to define two different tokens,
12564 `bison -v' segfaults.
12565 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
12566
12567 * tests/regression.m4: New file.
12568 Include the core of the sample provided by Piotr Gackiewicz.
12569 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
12570 properly.
12571
12572 2000-10-04 Akim Demaille <akim@epita.fr>
12573
12574 * src/reader.c (parse_expect_decl): Keep `count' within the size
12575 of `buffer'.
12576 From Neil Booth.
12577
12578 2000-10-02 Paul Eggert <eggert@twinsun.com>
12579
12580 * bison.s1 (yyparse): Assign the default value
12581 unconditionally, to avoid a GCC warning and make the parser a
12582 tad smaller.
12583
12584 2000-10-02 Akim Demaille <akim@epita.fr>
12585
12586 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
12587 options.
12588
12589 2000-10-02 Akim Demaille <akim@epita.fr>
12590
12591 * src/derives.c, src/print.c, src/reduce.c: To ease the
12592 translation, move some `\n' out of the translated strings.
12593
12594 2000-10-02 Akim Demaille <akim@epita.fr>
12595
12596 The location tracking mechanism is precious for parse error
12597 messages. Nevertheless, it is enabled only when `@n' is used in
12598 the grammar, which is a different issue (you can use it in error
12599 message, but not in the grammar per se). Therefore, there should
12600 be another means to enable it.
12601
12602 * src/getargs.c (getargs): Support `--locations'.
12603 (usage): Report it.
12604 * src/getargs.h (locationsflag): Export it.
12605 * src/lex.c (percent_table): Support `%locations'.
12606 * src/reader.c (yylsp_needed): Remove this variable, now replaced
12607 with `locationsflag'.
12608 * doc/bison.texinfo: Document `--locations' and `%locations'.
12609 Sort the options.
12610 * tests/calc.m4: Test it.
12611
12612 For regularity of the names, replace each
12613 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
12614 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
12615 In addition replace each `flag' with `_flag'.
12616
12617 2000-10-02 Akim Demaille <akim@epita.fr>
12618
12619 Also test parse error messages, including with YYERROR_VERBOSE.
12620
12621 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
12622 associative).
12623 Use it to check the computations.
12624 Use it to check `nonassoc' is honored.
12625 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
12626 `--yyerror-verbose'.
12627 (_AT_CHECK_CALC): Adjust to this option.
12628 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
12629
12630 2000-10-02 Akim Demaille <akim@epita.fr>
12631
12632 Test also `--verbose', `--defines' and `--name-prefix'. Testing
12633 the latter demonstrates a flaw in the handling of non debugging
12634 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
12635 was used in order to simplify:
12636
12637 #if YYDEBUG
12638 if (yydebug)
12639 {
12640 ...
12641 }
12642 #endif
12643
12644 into
12645
12646 if (yydebug)
12647 {
12648 ...
12649 }
12650
12651 unfortunately this leads to a CPP conflict when
12652 `--name-prefix=foo' is used since it produces `#define yydebug
12653 foodebug'.
12654
12655 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
12656 (YYDPRINTF): New macro.
12657 Spread its use.
12658 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
12659 the bison options.
12660 Also test `--verbose', `--defines' and `--name-prefix'.
12661
12662 2000-10-02 Akim Demaille <akim@epita.fr>
12663
12664 Improve the readability of the produced parsers.
12665
12666 * src/bison.s1: Formatting changes.
12667 Improve the comment related to the `$' mark.
12668 (yydefault): Don't fall through to `yyresume': `goto' there.
12669 * src/output.c (output_parser): When the `$' is met, skip the end
12670 of its line.
12671 New variable, `number_of_dollar_signs', to check there's exactly
12672 one `$' in the parser skeleton.
12673
12674 2000-10-02 Akim Demaille <akim@epita.fr>
12675
12676 * lib/xstrdup.c: New file, from the fileutils.
12677 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
12678 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
12679 instead of strlen + xmalloc + strcpy.
12680 * src/symtab.c (copys): Remove, use xstrdup instead.
12681
12682 2000-10-02 Akim Demaille <akim@epita.fr>
12683
12684 * src/gram.h (associativity): New enum type which replaces the
12685 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
12686 `right_assoc', `left_assoc' and `non_assoc'.
12687 Adjust all dependencies.
12688 * src/reader.c: Formatting changes.
12689 (LTYPESTR): Don't define it, use it as a literal in
12690 `reader_output_yylsp'.
12691 * src/symtab.h (symbol_class): New enum type which replaces the
12692 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
12693 `sunknown', `stoken and `snterm'.
12694
12695 2000-10-02 Akim Demaille <akim@epita.fr>
12696
12697 * src/getargs.c (fixed_outfiles): Rename as...
12698 (yaccflag): for consistency and accuracy.
12699 Adjust dependencies.
12700
12701 2000-10-02 Akim Demaille <akim@epita.fr>
12702
12703 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
12704 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
12705 difficult and introduced a lot of core dump. It turns out that
12706 Bison used an implementation of `xmalloc' based on `calloc', and
12707 at various places it does depend upon the initialization to 0. I
12708 have not tried to isolate the pertinent places, and all the former
12709 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
12710 someone should address this issue.
12711
12712 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
12713 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
12714 files.
12715 Adjust dependencies.
12716 * src/warshall.h: New file.
12717 Propagate.
12718
12719 2000-10-02 Akim Demaille <akim@epita.fr>
12720
12721 Various anti-`extern in *.c' changes.
12722
12723 * src/system.h: Include `assert.h'.
12724
12725 2000-10-02 Akim Demaille <akim@epita.fr>
12726
12727 * src/state.h (nstates, final_state, first_state, first_shift)
12728 (first_reduction): Move their exportation from here...
12729 * src/LR0.h: to here.
12730 Adjust dependencies.
12731 * src/getargs.c (statisticsflag): New variable.
12732 Add support for `--statistics'.
12733 Adjust dependencies.
12734
12735 Remove a lot of now useless `extern' statements in most files.
12736
12737 2000-10-02 Akim Demaille <akim@epita.fr>
12738
12739 * src/LR0.h: New file.
12740 Propagate its use.
12741
12742 2000-10-02 Akim Demaille <akim@epita.fr>
12743
12744 * src/print.h: New file.
12745 Propagate its use.
12746 * src/print.c: Formatting and ordering changes.
12747 (verbose, terse): Replace with...
12748 (print_results): this new function.
12749 Adjust dependencies.
12750
12751 2000-10-02 Akim Demaille <akim@epita.fr>
12752
12753 * src/conflicts.c (conflict_report): New function.
12754 (conflict_log, verbose_conflict_log): Replace with...
12755 (print_conflicts): this function.
12756 Adjust dependencies.
12757 * src/conflicts.h: New file.
12758 Propagate its inclusion.
12759
12760 2000-10-02 Akim Demaille <akim@epita.fr>
12761
12762 * src/nullable.h: New file.
12763 Propagate its inclusion.
12764 * src/nullable.c: Formatting changes.
12765
12766 2000-10-02 Akim Demaille <akim@epita.fr>
12767
12768 * src/reduce.h: New file.
12769 Propagate its inclusion.
12770 * src/reduce.c: Topological sort and other formatting changes.
12771 (bool, TRUE, FALSE): Move their definition to...
12772 * src/system.h: here.
12773
12774 2000-10-02 Akim Demaille <akim@epita.fr>
12775
12776 * src/files.c: Formatting changes.
12777 (tryopen, tryclose, openfiles): Rename as...
12778 (xfopen, xfclose, open_files): this.
12779 (stringappend): static.
12780 * src/files.h: Complete the list of exported symbols.
12781 Propagate its use.
12782
12783 2000-10-02 Akim Demaille <akim@epita.fr>
12784
12785 * src/reader.h: New file.
12786 Propagate its use instead of tedious list of `extern' and
12787 prototypes.
12788 * src/reader.c: Formatting changes, topological sort,
12789 s/register//.
12790
12791 2000-10-02 Akim Demaille <akim@epita.fr>
12792
12793 * src/lex.h: Prototype `lex.c' exported functions.
12794 * src/reader.c: Adjust.
12795 * src/lex.c: Formatting changes.
12796 (safegetc): Rename as...
12797 (xgetc): this.
12798
12799 2000-10-02 Akim Demaille <akim@epita.fr>
12800
12801 * src/lalr.h: New file.
12802 Propagate its inclusion instead of prototypes and `extern'.
12803 * src/lalr.c: Formatting changes, topological sorting etc.
12804
12805 2000-10-02 Akim Demaille <akim@epita.fr>
12806
12807 * src/output.c (token_actions): Introduce a temporary array,
12808 YYDEFACT, that makes it possible for this function to use
12809 output_short_table.
12810
12811 2000-10-02 Akim Demaille <akim@epita.fr>
12812
12813 `user_toknums' is output as a `short[]' in `output.c', while it is
12814 defined as a `int[]' in `reader.c'. For consistency with the
12815 other output tables, `user_toknums' is now defined as a table of
12816 shorts.
12817
12818 * src/reader.c (user_toknums): Be a short table instead of an int
12819 table.
12820 Adjust dependencies.
12821
12822 Factor the short table outputs.
12823
12824 * src/output.c (output_short_table): New function.
12825 * src/output.c (output_gram, output_stos, output_rule_data)
12826 (output_base, output_table, output_check): Use it.
12827
12828 2000-10-02 Akim Demaille <akim@epita.fr>
12829
12830 * src/output.c (output): Topological sort of the functions, in
12831 order to get rid of the `static' prototypes.
12832 No longer use `register'.
12833 * src/output.h: New file.
12834 Propagate its inclusion in files explicitly prototyping functions
12835 from output.c.
12836
12837 2000-09-21 Akim Demaille <akim@epita.fr>
12838
12839 * src/atgeneral.m4: Update from Autoconf.
12840
12841 2000-09-21 Akim Demaille <akim@epita.fr>
12842
12843 * src/closure.h: New file.
12844 * src/closure.c: Formatting changes, topological sort over the
12845 functions, use of closure.h.
12846 (initialize_closure, finalize_closure): Rename as...
12847 (new_closure, free_closure): these. Adjust dependencies.
12848 * src/LR0.c: Formatting changes, topological sort, use of
12849 cloture.h.
12850 (initialize_states): Rename as...
12851 (new_states): this.
12852 * src/Makefile.am (noinst_HEADERS): Adjust.
12853
12854 2000-09-20 Akim Demaille <akim@epita.fr>
12855
12856 * src/acconfig.h: Don't protect config.h against multiple
12857 inclusion.
12858 Don't define PARAMS.
12859 * src/system.h: Define PARAMS.
12860 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
12861 purpose of config.h. system.h must not try to fix wrong
12862 definitions in config.h.
12863
12864 2000-09-20 Akim Demaille <akim@epita.fr>
12865
12866 * src/derives.h: New file.
12867 * src/main.c, src/derives.h: Use it.
12868 Formatting changes.
12869 * src/Makefile.am (noinst_HEADERS): Adjust.
12870
12871 2000-09-20 Akim Demaille <akim@epita.fr>
12872
12873 * tests/atgeneral.m4: Update from Autoconf.
12874 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
12875 (AT_CHECK_CALC): New macros.
12876 Use these macros to test bison with options `', `--raw',
12877 `--debug', `--yacc', `--yacc --debug'.
12878
12879 2000-09-19 Akim Demaille <akim@epita.fr>
12880
12881 * src/output.c: Formatting changes.
12882 * src/machine.h: Remove, leaving its contents in...
12883 * src/system.h: here.
12884 Include stdio.h.
12885 Adjust all dependencies on stdio.h and machine.h.
12886 * src/getargs.h: New file.
12887 Let all `extern' declarations about getargs.c be replaced with
12888 inclusion of `getargs.h'.
12889 * src/Makefile.am (noinst_HEADERS): Adjust.
12890
12891 * tests/calc.m4 (yyin): Be initialized in main, not on the global
12892 scope.
12893 (yyerror): Returns void, not int.
12894 * doc/bison.texinfo: Formatting changes.
12895
12896 2000-09-19 Akim Demaille <akim@epita.fr>
12897
12898 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
12899 portable.
12900
12901 2000-09-18 Akim Demaille <akim@epita.fr>
12902
12903 * configure.in: Append WARNING_CFLAGS to CFLAGS.
12904 * src/Makefile.am (INCLUDES): Don't.
12905 Be ready to fetch headers in lib/.
12906
12907 2000-09-18 Akim Demaille <akim@epita.fr>
12908
12909 * doc/bison.texinfo: Update the copyright.
12910 ANSIfy and GNUify the examples.
12911 Remove the old menu.
12912
12913 2000-09-18 Akim Demaille <akim@epita.fr>
12914
12915 First set of tests: use the `calc' example from the documentation.
12916
12917 * src/bison.s1 (yyparse): Condition the code using `yytname' which
12918 is defined only when YYDEBUG is.
12919 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
12920 * src/files.c (tryopen, tryclose): Formatting changes.
12921 Move to the top and be static.
12922 * src/reader.c (read_signed_integer): Likewise.
12923 * tests/calc.m4: New file.
12924 * Makefile.am, suite.m4: Adjust.
12925 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
12926
12927 2000-09-18 Akim Demaille <akim@epita.fr>
12928
12929 Add support for an Autotest test suite for Bison.
12930
12931 * m4/m4.m4, m4/atconfig.m4: New files.
12932 * m4/Makefile.am (EXTRA_DIST): Adjust.
12933 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
12934 files.
12935 * src/getargs.c: Display a more standard --version message.
12936 * src/reader.c (reader): Formatting changes.
12937 No longer depend upon VERSION_STRING.
12938 * configure.in: No longer use `dnl'.
12939 Set up the test suite and the new directory `tests/.
12940 (VERSION_STRING): Remove.
12941
12942 2000-04-14 Akim Demaille <akim@epita.fr>
12943
12944 * src/reader.c (copy_comment2): New function, same as former
12945 `copy_comment', but outputs into two FILE *.
12946 (copy_comment): Use it.
12947 (parse_union_decl): Use it.
12948 (get_type, parse_start_decl): Use the same `invalid' message.
12949 (parse_start_decl, parse_union_decl): Use the same `multiple'
12950 message.
12951 (parse_union_decl, copy_guard, copy_action): Use the same
12952 `unmatched' message.
12953 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
12954
12955 2000-03-31 Akim Demaille <akim@epita.fr>
12956
12957 * src/files.c (tryopen, tryclose): Move to the top.
12958 Be static.
12959
12960 2000-03-31 Akim Demaille <akim@epita.fr>
12961
12962 * src/main.c (main): Don't call `done', exit does it.
12963
12964 2000-03-31 Akim Demaille <akim@epita.fr>
12965
12966 * allocate.c: s/return (foo)/return foo/.
12967 * lalr.c: Likewise.
12968 * LR0.c: Likewise.
12969 * output.c: Likewise.
12970 * reader.c: Likewise.
12971 * symtab.c: Likewise.
12972 * vmsgetargs.c: Likewise.
12973
12974 2000-03-31 Akim Demaille <akim@epita.fr>
12975
12976 Clean up the error reporting functions.
12977
12978 * src/report.c: New file.
12979 * src/report.h: Likewise.
12980 * src/Makefile.am: Adjust.
12981 * m4/error.m4: New file.
12982 * m4/Makefile.am: Adjust.
12983 * configure.in (jm_PREREQ_ERROR): Call it.
12984 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
12985 Remove.
12986 (fatal, fatals): Remove. All callers use complain.c::fatal.
12987 (warn, warni, warns, warnss, warnss): Remove. All callers use
12988 complain.c::complain.
12989 (toomany): Remove, use fatal instead.
12990 * src/files.c (done): No argument, use complain_message_count.
12991 * src/main.c (main): Register `done' to `atexit'.
12992
12993 * src/getargs.c (usage): More `fputs', less `fprintf'.
12994
12995 2000-03-28 Akim Demaille <akim@epita.fr>
12996
12997 * lib/: New directory.
12998 * Makefile.am (SUBDIRS): Adjust.
12999 * configure.in: Adjust.
13000 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
13001 useless.
13002 * src/alloca.c: Moved to lib/.
13003 * src/getopt.c: Likewise.
13004 * src/getopt1.c: Likewise.
13005 * src/getopt.h: Likewise.
13006 * src/ansi2knr.c: Likewise.
13007 * src/ansi2knr.1: Likewise.
13008 * src/Makefile.am: Adjust.
13009 * lib/Makefile.am: New file.
13010
13011 2000-03-28 Akim Demaille <akim@epita.fr>
13012
13013 * src/getargs.c (usage): Refresh the help message.
13014
13015 2000-03-17 Akim Demaille <akim@epita.fr>
13016
13017 * src/getopt1.c: Updated from textutils 2.0e
13018 * src/getopt.c: Likewise.
13019 * src/getopt.h: Likewise.
13020
13021 2000-03-17 Akim Demaille <akim@epita.fr>
13022
13023 * src/Makefile.am (bison.simple): Fix the awk program: quote only
13024 the file name, not the whole `#line LINE FILE'.
13025
13026 2000-03-17 Akim Demaille <akim@epita.fr>
13027
13028 On syntax errors, report the token on which we choked.
13029
13030 * src/bison.s1 (yyparse): In the label yyerrlab, when
13031 YYERROR_VERBOSE, add yychar in msg.
13032
13033 2000-03-17 Akim Demaille <akim@epita.fr>
13034
13035 * src/reader.c (copy_at): New function.
13036 (copy_guard): Use it.
13037 (copy_action): Use it.
13038
13039 2000-03-17 Akim Demaille <akim@epita.fr>
13040
13041 Be kind to translators, save some useless translations.
13042
13043 * src/main.c (banner): New function.
13044 (fatal_banner): Use it.
13045 (warn_banner): Use it.
13046
13047 2000-03-17 Akim Demaille <akim@epita.fr>
13048
13049 * src/reader.c (copy_definition): Use copy_string and
13050 copy_comment. Removed now unused `match', `ended',
13051 `cplus_comment'.
13052 (copy_comment, copy_string): Moved, to be visible from
13053 copy_definition.
13054
13055 2000-03-17 Akim Demaille <akim@epita.fr>
13056
13057 * src/reader.c (copy_string): Declare `static inline'. No
13058 problems with inline, since it is checked by configure.
13059 (copy_comment): Likewise.
13060
13061 2000-03-17 Akim Demaille <akim@epita.fr>
13062
13063 * src/reader.c (packsymbols): Formatting changes.
13064
13065 2000-03-17 Akim Demaille <akim@epita.fr>
13066
13067 * src/reader.c (copy_comment): New function, factored out from:
13068 (copy_action): Use it. Removed now unused `match', `ended',
13069 `cplus_comment'.
13070 (copy_guard): Likewise.
13071
13072 2000-03-17 Akim Demaille <akim@epita.fr>
13073
13074 * src/reader.c (copy_string): New function, factored out from:
13075 (copy_action): Use it.
13076 (copy_guard): Likewise.
13077
13078 2000-03-17 Akim Demaille <akim@epita.fr>
13079
13080 Change the handling of @s so that they behave exactly like $s.
13081 There is now a pseudo variable @$ (readble and writable), location
13082 of the lhs of the rule (by default ranging from the location of
13083 the first symbol of the rhs, to the location of the last symbol,
13084 or, if the rhs is empty, YYLLOC).
13085
13086 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
13087 yyval.
13088 (yyparse): When providing a default semantic action, provide a
13089 default location action.
13090 (after the $): No longer change `*YYLSP', just stack YYLOC the
13091 same way you stack YYVAL.
13092 * src/reader.c (read_declarations): Use warns.
13093 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
13094 (copy_action, case '@'): Likewise.
13095 Use a standard error message, to save useless work from
13096 translators.
13097
13098 2000-03-17 Akim Demaille <akim@epita.fr>
13099
13100 * src/bison.s1: Formatting and cosmetics changes.
13101 * src/reader.c: Likewise.
13102 Update the Copyright notice.
13103
13104 2000-03-17 Akim Demaille <akim@epita.fr>
13105
13106 * src/bison.s1 (#line): All set to `#line' only, since the
13107 Makefile now handles them.
13108
13109 2000-03-16 Akim Demaille <akim@epita.fr>
13110
13111 * src/output.c (output_rule_data): Output the documentation of
13112 some of the tables.
13113 (Copyright notice): Update.
13114 Formatting changes.
13115
13116 2000-03-16 Akim Demaille <akim@epita.fr>
13117
13118 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
13119 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
13120 One `#if YYDEBUG' remains, since it uses variables which are
13121 defined only if `YYDEBUG != 0'.
13122
13123 2000-03-16 Akim Demaille <akim@epita.fr>
13124
13125 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
13126 and related variables so that the similarities are highlighted.
13127
13128 2000-03-16 Akim Demaille <akim@epita.fr>
13129
13130 * src/bison.s1: Properly indent CPP directives.
13131
13132 2000-03-16 Akim Demaille <akim@epita.fr>
13133
13134 * src/bison.s1: Properly indent the `alloca' CPP section.
13135
13136 2000-03-16 Akim Demaille <akim@epita.fr>
13137
13138 Do not hard code values of directories in `configure.in'.
13139 Update the `configure' tool chain.
13140
13141 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
13142 src/makefile.am.
13143 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
13144 (AC_OUTPUT): Add m4/Makefile.
13145 Bump to bison 1.28a, 1.29 has never been released.
13146 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
13147 handled via src/Makefile.am.
13148 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
13149 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
13150 autoheader.
13151 * Makefile.am (SUBDIRS): Add m4.
13152 (ACLOCAL_AM_FLAGS): New variable.
13153 (AUTOMAKE_OPTIONS): Add check-news.
13154 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
13155 the proper line number and file name.
13156 (DEFS): Propagate the location of bison library files and of the
13157 locale files.
13158 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
13159 builddir.
13160 * acinclude.m4: Remove, replaced by the directory m4.
13161 * m4/Makefile.am (EXTRA_DIST): New variable.
13162 * m4/gettext.m4: New file, from the fileutils.
13163 * m4/lcmessage.m4: Likewise
13164 * m4/progtest.m4: Likewise.
13165 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
13166
13167 2000-03-10 Akim Demaille <akim@epita.fr>
13168
13169 * src/closure.c:
13170 Formatting changes of various comments.
13171 Respect the GNU coding standards at various places.
13172 Don't use `_()' when no translation is needed.
13173
13174 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13175
13176 * src/files.c:
13177 OS/2 honors TMPDIR environment variable.
13178
13179 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13180
13181 * doc/bison.texinfo: Tweaked spelling and grammar.
13182 Updated ISBN.
13183 Removed reference to price of printed copy.
13184 Mention BISON_SIMPLE and BISON_HAIRY.
13185
13186 1999-12-13 Jesse Thilo <jthilo@gnu.org>
13187
13188 * configure.in, NEWS:
13189 Bison 1.29 released.
13190
13191 1999-10-27 Jesse Thilo <jthilo@gnu.org>
13192
13193 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
13194 Added reference card.
13195
13196 1999-07-26 Jesse Thilo <jthilo@gnu.org>
13197
13198 * po/ru.po: Added Russian translation.
13199
13200 1999-07-26 Jesse Thilo <jthilo@gnu.org>
13201
13202 * configure.in: Added Russian translation.
13203
13204 1999-07-06 Jesse Thilo <jthilo@gnu.org>
13205
13206 * configure.in, NEWS, README:
13207 Released version 1.28.
13208
13209 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13210
13211 * src/system.h:
13212 Squashed redefinition warning on some systems.
13213
13214 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
13215 Have configure build version string instead of relying on ANSI string
13216 concatentation.
13217
13218 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13219
13220 * po/POTFILES.in: Got rid of version.c.
13221
13222 1999-06-14 Jesse Thilo <jthilo@gnu.org>
13223
13224 * acconfig.h, configure.in:
13225 Have configure build version string instead of relying on ANSI string
13226 concatentation.
13227
13228 1999-06-08 Jesse Thilo <jthilo@gnu.org>
13229
13230 * doc/bison.1:
13231 Dropped mention of `+' for long-named options.
13232
13233 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13234
13235 * src/files.c: Added <unistd.h> for unlink().
13236
13237 * src/Makefile.am, src/system.h:
13238 I18n fixes.
13239
13240 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13241
13242 * README: Added a FAQ list.
13243
13244 * configure.in, acconfig.h:
13245 I18n fixes.
13246
13247 1999-05-30 Jesse Thilo <jthilo@gnu.org>
13248
13249 * doc/FAQ, doc/Makefile.am:
13250 Added a FAQ list.
13251
13252 1999-05-19 Jesse Thilo <jthilo@gnu.org>
13253
13254 * src/alloc.h, src/symtab.h, src/version.c:
13255 Protected inclusion of "config.h" with HAVE_CONFIG_H.
13256
13257 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13258
13259 * src/.cvsignore, src/Makefile.am:
13260 Reorganized: sources in `src', documentation in `doc'.
13261
13262 * src/lex.c (literalchar):
13263 fixed the code for escaping double quotes (thanks
13264 Jonathan Czisny.)
13265
13266 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13267
13268 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
13269 Adjusted paths to reflect directory reorganization.
13270
13271 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13272
13273 * doc/.cvsignore, doc/Makefile.am:
13274 Reorganized: sources in `src', documentation in `doc'.
13275
13276 1999-04-18 Jesse Thilo <jthilo@gnu.org>
13277
13278 * configure.in:
13279 Updated AC_INIT file to reflect directory reorganization.
13280
13281 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
13282 Reorganized: sources in `src', documentation in `doc'.
13283
13284 1999-04-13 Jesse Thilo <jthilo@gnu.org>
13285
13286 * src/allocate.c:
13287 Don't declare calloc() and realloc() if not necessary.
13288
13289 1999-04-13 Jesse Thilo <jthilo@gnu.org>
13290
13291 * configure.in, acconfig.h, acinclude.m4:
13292 Don't declare calloc() and realloc() if not necessary.
13293
13294 1999-03-23 Jesse Thilo <jthilo@gnu.org>
13295
13296 * po/.cvsignore: Added i18n support.
13297
13298 1999-03-23 Jesse Thilo <jthilo@gnu.org>
13299
13300 * acconfig.h, configure.in, Makefile.am:
13301 Added i18n support.
13302
13303 1999-03-22 Jesse Thilo <jthilo@gnu.org>
13304
13305 * src/bison.s1: Fixed #line numbers.
13306
13307 1999-03-15 Jesse Thilo <jthilo@gnu.org>
13308
13309 * po/es.po, po/fr.po, po/nl.po, po/de.po:
13310 Added PO files from Translation Project.
13311
13312 1999-03-03 Jesse Thilo <jthilo@gnu.org>
13313
13314 * Makefile.am:
13315 Added support for non-ANSI compilers (ansi2knr).
13316
13317 1999-02-16 Jesse Thilo <jthilo@gnu.org>
13318
13319 * configure.in: Bumped version number to 1.27.
13320
13321 * Makefile.am:
13322 Added `bison.simple' to list of files removed by `make distclean'.
13323
13324 1999-02-12 Jesse Thilo <jthilo@gnu.org>
13325
13326 * src/files.c, src/files.h:
13327 Defined locations of parser files in config.h instead of Makefile.
13328
13329 1999-02-12 Jesse Thilo <jthilo@gnu.org>
13330
13331 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
13332 Defined locations of parser files in config.h instead of Makefile.
13333
13334 1999-02-09 Jesse Thilo <jthilo@gnu.org>
13335
13336 * Makefile.am:
13337 Removed inappropriate use of $< macro.
13338
13339 1999-02-05 Jesse Thilo <jthilo@gnu.org>
13340
13341 * po/Makefile.in.in, po/POTFILES.in:
13342 Add `po' directory skeleton.
13343
13344 1999-01-27 Jesse Thilo <jthilo@gnu.org>
13345
13346 * README: Document help-bison list.
13347
13348 * configure.in: Add check for mkstemp().
13349
13350 1999-01-20 Jesse Thilo <jthilo@gnu.org>
13351
13352 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
13353 Hush a few compiler warnings.
13354
13355 * src/files.c:
13356 Add tryclose(), which verifies that fclose was successful.
13357 Hush a couple of compiler warnings.
13358
13359 1999-01-20 Jesse Thilo <jthilo@gnu.org>
13360
13361 * Makefile.am, OChangeLog:
13362 ChangeLog is now automatically generated. Include the old version as
13363 OChangeLog.
13364
13365 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13366
13367 * 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:
13368 Update FSF address.
13369
13370 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13371
13372 * doc/bison.texinfo: Fix formatting glitch.
13373
13374 * doc/bison.texinfo: Update FSF address.
13375
13376 1999-01-14 Jesse Thilo <jthilo@gnu.org>
13377
13378 * acconfig.h: Update FSF address.
13379
13380 1999-01-08 Jesse Thilo <jthilo@gnu.org>
13381
13382 * src/system.h:
13383 Don't define PACKAGE here, since config.h defines it.
13384
13385 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13386
13387 * src/reader.c: Update copyright date.
13388
13389 * src/main.c:
13390 Ditch sprintf to statically-sized buffers in fatal/warn functions in
13391 favor of output directly to stderr (avoids buffer overruns).
13392
13393 * src/reader.c: Some checks for premature EOF.
13394
13395 * 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:
13396 Use prototypes if the compiler understands them.
13397
13398 * src/files.c: Honor TMPDIR on Unix hosts.
13399 Use prototypes if the compiler understands them.
13400
13401 * src/reader.c:
13402 Fix a couple of buffer overrun bugs.
13403 Use prototypes if the compiler understands them.
13404
13405 * src/system.h: Include unistd.h and ctype.h.
13406 Use #ifdef instead of #if for NLS symbols.
13407
13408 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13409
13410 * doc/bison.texinfo:
13411 Delete comment "consider using @set for edition number, etc..." since
13412 we now are doing so.
13413
13414 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13415
13416 * configure.in:
13417 Use prototypes if the compiler understands them.
13418
13419 * NEWS: Document 1.26 highlights.
13420
13421 * Makefile.am: Require Automake 1.3 or later.
13422
13423 * acconfig.h:
13424 Use prototypes if the compiler understands them.
13425
13426 1998-12-29 Jesse Thilo <jthilo@gnu.org>
13427
13428 * src/version.c:
13429 Use VERSION symbol from automake for version number.
13430
13431 1998-12-29 Jesse Thilo <jthilo@gnu.org>
13432
13433 * acconfig.h, configure.in, version.cin:
13434 Use VERSION symbol from automake for version number.
13435
13436 1998-11-28 Jesse Thilo <jthilo@gnu.org>
13437
13438 * Makefile.am:
13439 Distribute original version of simple parser (bison.s1), not built
13440 version (bison.simple).
13441
13442 1998-11-28 Jesse Thilo <jthilo@gnu.org>
13443
13444 * doc/bison.texinfo: Add info dir entry.
13445
13446 * doc/bison.texinfo:
13447 Let automake put version number into documentation.
13448
13449 1998-11-26 Jesse Thilo <jthilo@gnu.org>
13450
13451 * src/bison.cld, src/build.com, src/vmshlp.mar:
13452 Add non-RCS files from /gd/gnu/bison.
13453
13454 1998-11-26 Jesse Thilo <jthilo@gnu.org>
13455
13456 * doc/bison.1:
13457 Document the BISON_HAIRY and BISON_SIMPLE variables.
13458
13459 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13460
13461 * src/version.c: Build version.c automatically.
13462
13463 * src/reader.c:
13464 Fix token numbering (used to start at 258, not 257).
13465
13466 * src/system.h: Include config.h.
13467
13468 * src/getargs.c: Update bug report address.
13469
13470 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
13471 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
13472
13473 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13474
13475 * Makefile.am:
13476 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13477
13478 * configure.in, version.cin:
13479 Build version.c automatically.
13480
13481 * AUTHORS: Add AUTHORS file.
13482
13483 * README: Update bug report address.
13484
13485 * bison.simple:
13486 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13487
13488 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
13489 Add automake stuff.
13490
13491 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13492
13493 * doc/bison.texinfo: Clean up some formatting.
13494
13495 1998-05-05 Richard Stallman <rms@gnu.org>
13496
13497 * doc/bison.texinfo:
13498 Explain better why to make a pure parser.
13499
13500 1998-01-05 Richard Stallman <rms@gnu.org>
13501
13502 * src/files.c (openfiles):
13503 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
13504 find a temporary directory, if possible. Do not unlink files while
13505 they are open.
13506
13507 1997-08-25 Richard Stallman <rms@gnu.org>
13508
13509 * src/reader.c (stack_offset;):
13510 Change some warni to warns.
13511
13512 * src/lex.c (literalchar): Use warns, not warni.
13513
13514 1997-06-28 Richard Stallman <rms@gnu.org>
13515
13516 * src/bison.s1: Add a Bison version comment.
13517
13518 * src/main.c (fatal, warn, berror):
13519 Use program_name.
13520
13521 1997-06-28 Richard Stallman <rms@gnu.org>
13522
13523 * Makefile.in (bison_version): New variable.
13524 (dist): Use that variable.
13525 (bison.s1): Substitute the Bison version into bison.simple.
13526
13527 * bison.simple: Add a Bison version comment.
13528
13529 1997-06-18 Richard Stallman <rms@gnu.org>
13530
13531 * src/main.c (fatal, warn, berror):
13532 Make error messages standard.
13533 (toomany): Improve error message text.
13534
13535 * 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:
13536 new.h renamed to alloc.h.
13537
13538 1997-06-18 Richard Stallman <rms@gnu.org>
13539
13540 * Makefile.in: new.h renamed to alloc.h.
13541
13542 1997-05-24 Richard Stallman <rms@gnu.org>
13543
13544 * src/lex.c (literalchar):
13545 Fix the code for escaping \, " and '.
13546
13547 (lex): Avoid trouble when there are many chars
13548 to discard in a char literal with just several chars in it.
13549
13550 1997-05-17 Richard Stallman <rms@gnu.org>
13551
13552 * src/bison.s1:
13553 Use malloc, if using alloca is troublesome.
13554 (YYSTACK_USE_ALLOCA): New flag macro.
13555 Define it for some systems and compilers.
13556 (YYSTACK_ALLOC): New macro.
13557 (yyparse): Use YYSTACK_ALLOC to allocate stack.
13558 If it was malloc'd, free it.
13559
13560 1997-05-17 Richard Stallman <rms@gnu.org>
13561
13562 * bison.simple:
13563 Use malloc, if using alloca is troublesome.
13564 (YYSTACK_USE_ALLOCA): New flag macro.
13565 Define it for some systems and compilers.
13566 (YYSTACK_ALLOC): New macro.
13567 (yyparse): Use YYSTACK_ALLOC to allocate stack.
13568 If it was malloc'd, free it.
13569
13570 1997-04-23 Richard Stallman <rms@gnu.org>
13571
13572 * src/bison.s1:
13573 (alloca) [__hpux]: Always define as __builtin_alloca.
13574
13575 1997-04-23 Richard Stallman <rms@gnu.org>
13576
13577 * bison.simple:
13578 (alloca) [__hpux]: Always define as __builtin_alloca.
13579
13580 1997-04-22 Richard Stallman <rms@gnu.org>
13581
13582 * src/bison.s1:
13583 [__hpux]: Include alloca.h (right for HPUX 10)
13584 instead of declaring alloca (right for HPUX 9).
13585
13586 * src/bison.s1 (__yy_memcpy):
13587 Declare arg `count' as unsigned int.
13588 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
13589
13590 1997-04-22 Richard Stallman <rms@gnu.org>
13591
13592 * bison.simple:
13593 [__hpux]: Include alloca.h (right for HPUX 10)
13594 instead of declaring alloca (right for HPUX 9).
13595
13596 * bison.simple (__yy_memcpy):
13597 Declare arg `count' as unsigned int.
13598 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
13599
13600 1997-01-03 Richard Stallman <rms@gnu.org>
13601
13602 * src/allocate.c: [__STDC__ or _MSC_VER]:
13603 Declare calloc and realloc to return void *.
13604
13605 1997-01-02 Richard Stallman <rms@gnu.org>
13606
13607 * src/system.h:
13608 [_MSC_VER]: Include stdlib.h and process.h.
13609 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
13610
13611 * src/main.c (main): Return FAILURE as a value.
13612 (printable_version): Declare arg as int, not char.
13613
13614 1997-01-02 Richard Stallman <rms@gnu.org>
13615
13616 * Makefile.in (dist):
13617 Explicitly check for symlinks, and copy them.
13618
13619 1996-12-19 Richard Stallman <rms@gnu.org>
13620
13621 * src/files.c:
13622 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
13623
13624 1996-12-18 Paul Eggert <eggert@gnu.org>
13625
13626 * src/bison.s1 (yyparse):
13627 If __GNUC__ and YYPARSE_PARAM are both defined,
13628 declare yyparse to have a void * argument.
13629
13630 1996-12-18 Paul Eggert <eggert@gnu.org>
13631
13632 * bison.simple (yyparse):
13633 If __GNUC__ and YYPARSE_PARAM are both defined,
13634 declare yyparse to have a void * argument.
13635
13636 1996-12-17 Richard Stallman <rms@gnu.org>
13637
13638 * src/reduce.c (nbits): Add some casts.
13639
13640 1996-08-12 Richard Stallman <rms@gnu.org>
13641
13642 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
13643
13644 1996-08-12 Richard Stallman <rms@gnu.org>
13645
13646 * bison.simple: Test _MSDOS as well as _MSDOS_.
13647
13648 1996-07-31 Richard Stallman <rms@gnu.org>
13649
13650 * src/bison.s1:
13651 [__sun && __i386]: Include alloca.h.
13652
13653 1996-07-31 Richard Stallman <rms@gnu.org>
13654
13655 * bison.simple:
13656 [__sun && __i386]: Include alloca.h.
13657
13658 1996-07-30 Richard Stallman <rms@gnu.org>
13659
13660 * src/bison.s1: Comment change.
13661
13662 * src/bison.s1: Test _MSDOS_, not MSDOS.
13663
13664 1996-07-30 Richard Stallman <rms@gnu.org>
13665
13666 * bison.simple: Comment change.
13667
13668 * bison.simple: Test _MSDOS_, not MSDOS.
13669
13670 1996-06-01 Richard Stallman <rms@gnu.org>
13671
13672 * 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:
13673 Insert `_' macro around many string constants.
13674
13675 * src/main.c:
13676 Insert `_' macro around many string constants.
13677
13678 (main): Call setlocale, bindtextdomain and textdomain.
13679
13680 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
13681 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
13682 [ENABLE_NLS]: Include libintl.h.
13683 [ENABLE_NLS] (gettext): Define.
13684 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
13685 (N_, PACKAGE, LOCALEDIR): New macros.
13686
13687 1996-06-01 Richard Stallman <rms@gnu.org>
13688
13689 * POTFILES.in: New file.
13690
13691 * Makefile.in (allocate.o):
13692 Define target explicitly.
13693
13694 * Makefile.in (CFLAGS): Set to @CFLAGS@.
13695 (LDFLAGS): Set to @LDFLAGS@.
13696 (configure): Run autoconf only if preceding `cd' succeeds.
13697 (bison.s1): Redirect output to temporary file then move the
13698 temporary to the target, rather than redirecting directly to bison.s1.
13699 (clean): Remove config.status and config.log.
13700 (distclean): Don't remove config.status here.
13701
13702 1996-05-12 Richard Stallman <rms@gnu.org>
13703
13704 * src/bison.s1:
13705 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
13706
13707 1996-05-12 Richard Stallman <rms@gnu.org>
13708
13709 * bison.simple:
13710 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
13711
13712 1996-05-11 Richard Stallman <rms@gnu.org>
13713
13714 * src/bison.s1 (__yy_memcpy):
13715 Really reorder the args, as was supposedly done on Feb 14 1995.
13716 (yyparse): Calls changed accordingly.
13717
13718 1996-05-11 Richard Stallman <rms@gnu.org>
13719
13720 * Makefile.in (dist): Don't use $(srcdir).
13721
13722 * bison.simple (__yy_memcpy):
13723 Really reorder the args, as was supposedly done on Feb 14 1995.
13724 (yyparse): Calls changed accordingly.
13725
13726 1996-01-27 Richard Stallman <rms@gnu.org>
13727
13728 * src/output.c (output_rule_data):
13729 Test YYERROR_VERBOSE in the conditional
13730 around the definition of ttyname.
13731
13732 1995-12-29 Richard Stallman <rms@gnu.org>
13733
13734 * src/bison.s1:
13735 Fix line numbers in #line commands.
13736
13737 1995-12-29 Richard Stallman <rms@gnu.org>
13738
13739 * bison.simple:
13740 Fix line numbers in #line commands.
13741
13742 1995-12-27 Richard Stallman <rms@gnu.org>
13743
13744 * src/bison.s1 (YYPARSE_PARAM_DECL):
13745 In C++, make it always null.
13746 (YYPARSE_PARAM_ARG): New macro.
13747 (yyparse): Use YYPARSE_PARAM_ARG.
13748
13749 1995-12-27 Richard Stallman <rms@gnu.org>
13750
13751 * bison.simple (YYPARSE_PARAM_DECL):
13752 In C++, make it always null.
13753 (YYPARSE_PARAM_ARG): New macro.
13754 (yyparse): Use YYPARSE_PARAM_ARG.
13755
13756 1995-11-29 Richard Stallman <rms@gnu.org>
13757
13758 * doc/bison.texinfo:
13759 Describe literal string tokens, %raw, %no_lines, %token_table.
13760
13761 1995-11-29 Daniel Hagerty <hag@gnu.org>
13762
13763 * doc/bison.texinfo: Fixed update date
13764
13765 1995-10-16 Richard Stallman <rms@gnu.org>
13766
13767 * src/version.c: Version 1.25.
13768
13769 1995-10-16 Richard Stallman <rms@gnu.org>
13770
13771 * NEWS: *** empty log message ***
13772
13773 1995-10-16 Richard Stallman <rms@gnu.org>
13774
13775 * doc/bison.1, doc/bison.rnh:
13776 Add new options.
13777
13778 1995-10-15 Richard Stallman <rms@gnu.org>
13779
13780 * src/vmsgetargs.c, src/getargs.c:
13781 Added -n, -k, and -raw switches.
13782 (noparserflag, toknumflag, rawtoknumflag): New variables.
13783
13784 * src/symtab.h (SALIAS):
13785 New #define for adding aliases to %token.
13786 (struct bucket): Added `alias' field.
13787
13788 * src/reduce.c (reduce_grammar):
13789 Revise error message.
13790 (print_notices): Remove final `.' from error message.
13791
13792 * src/reader.c (reader_output_yylsp):
13793 New function.
13794 (readgram): Use `#if 0' around code that accepted %command
13795 inside grammar rules: The documentation doesn't allow it,
13796 and it will fail since the %command processors scan for the next %.
13797 (parse_token_decl): Extended the %token
13798 declaration to allow a multi-character symbol as an alias.
13799 (parse_thong_decl): New function.
13800 (read_declarations): Added %thong declarations.
13801 (read_declarations): Handle NOOP to deal with allowing
13802 % declarations as another means to specify the flags.
13803 (readgram): Allow %prec prior to semantics embedded in a rule.
13804 (skip_to_char, read_declarations, copy_definition)
13805 (parse_token_decl, parse_start_decl, parse_type_decl)
13806 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
13807 (get_type_name, copy_guard, copy_action, readgram)
13808 (get_type, packsymbols): Revised most error messages.
13809 Changed `fatal' to `warnxxx' to avoid aborting for error.
13810 Revised and use multiple warnxxx functions to avoid using VARARGS1.
13811 (read_declarations): Improve the error message for
13812 an invalid character. Do not abort.
13813 (read_declarations, copy_guard, copy_action): Use
13814 printable_version to avoid unprintable characters in printed output.
13815 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
13816 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
13817 Allow the type of a non-terminal can be given
13818 more than once, as long as all specifications give the same type.
13819
13820 * src/output.c:
13821 (output_headers, output_trailers, output, output_gram)
13822 (output_rule_data): Implement noparserflag variable.
13823 Implement toknumflag variable.
13824 (output): Call reader_output_yylsp to output LTYPESTR.
13825
13826 * src/main.c (main):
13827 If reader sees an error, don't process the grammar.
13828 (fatals): Updated to not use VARARGS1.
13829 (printable_version, int_to_string, warn, warni, warns, warnss)
13830 (warnsss): New error reporting functions. Avoid abort for error.
13831
13832 * src/lex.h:
13833 Added THONG and NOOP for alias processing.
13834 Added SETOPT for the new code that allows setting options with %flags.
13835
13836 * src/lex.c:
13837 Include getopt.h. Add some extern decls.
13838 (safegetc): New function to deal with EOF gracefully.
13839 (literalchar); new function to deal with reading \ escapes.
13840 (lex): Use literalchar.
13841 (lex): Implemented "..." tokens.
13842 (literalchar, lex, parse_percent_token): Made tokenbuffer
13843 always contain the token. This includes growing the token
13844 buffer while reading an integer.
13845 (parse_percent_token): Replaced if-else statement with percent_table.
13846 (parse_percent_token): Added % declarations as another
13847 way to specify the flags -n, -l, and -r. Also added hooks for
13848 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
13849 major changes to files.c.
13850 (lex) Retain in the incoming stream a character following
13851 an incorrect '/'.
13852 (skip_white_space, lex): Revised most error messages
13853 and changed fatal to warn to avoid aborting.
13854 (percent_table): Added %thong declarations.
13855
13856 * src/gram.h: Comment changes.
13857
13858 * src/files.c (openfiles, open_extra_files, done):
13859 Add faction flag
13860 and actfile file. Handle noparserflag. Both for -n switch.
13861
13862 * src/conflicts.c (resolve_sr_conflict):
13863 Remove use of alloca.
13864
13865 1995-06-01 Jim Meyering <meyering@gnu.org>
13866
13867 * doc/bison.texinfo: *** empty log message ***
13868
13869 1995-05-06 Richard Stallman <rms@gnu.org>
13870
13871 * src/bison.s1: Comment change.
13872
13873 1995-05-06 Richard Stallman <rms@gnu.org>
13874
13875 * bison.simple: Comment change.
13876
13877 1995-05-03 Richard Stallman <rms@gnu.org>
13878
13879 * src/version.c: Version now 1.24.
13880
13881 * src/bison.s1: Change distribution terms.
13882
13883 * src/version.c: Version now 1.23.
13884
13885 1995-05-03 Richard Stallman <rms@gnu.org>
13886
13887 * doc/bison.texinfo:
13888 Rewrite "Conditions for Using Bison".
13889 Update version to 1.24.
13890
13891 1995-05-03 Richard Stallman <rms@gnu.org>
13892
13893 * bison.simple: Change distribution terms.
13894
13895 1995-02-23 Richard Stallman <rms@gnu.org>
13896
13897 * src/files.c: Test __VMS_POSIX as well as VMS.
13898
13899 1995-02-14 Jim Meyering <meyering@gnu.org>
13900
13901 * src/bison.s1 (__yy_memcpy):
13902 Renamed from __yy_bcopy to avoid
13903 confusion. Reverse FROM and TO arguments to be consistent with
13904 those of memcpy.
13905
13906 1995-02-14 Jim Meyering <meyering@gnu.org>
13907
13908 * bison.simple (__yy_memcpy):
13909 Renamed from __yy_bcopy to avoid
13910 confusion. Reverse FROM and TO arguments to be consistent with
13911 those of memcpy.
13912
13913 1994-11-10 David J. MacKenzie <djm@gnu.org>
13914
13915 * NEWS: reformat
13916
13917 * NEWS: New file.
13918
13919 * Makefile.in (DISTFILES): Include NEWS.
13920
13921 * Makefile.in (DISTFILES):
13922 Include install-sh, not install.sh.
13923
13924 * configure.in: Update to Autoconf v2 macro names.
13925
13926 1994-10-05 David J. MacKenzie <djm@gnu.org>
13927
13928 * Makefile.in: fix typo
13929
13930 * Makefile.in (prefix, exec_prefix):
13931 Let configure set them.
13932
13933 1994-09-28 David J. MacKenzie <djm@gnu.org>
13934
13935 * Makefile.in: Set datadir to $(prefix)/share.
13936
13937 1994-09-15 Richard Stallman <rms@gnu.org>
13938
13939 * src/bison.s1:
13940 Update copyright notice and GPL version.
13941
13942 1994-09-15 Richard Stallman <rms@gnu.org>
13943
13944 * bison.simple:
13945 Update copyright notice and GPL version.
13946
13947 1994-07-12 Richard Stallman <rms@gnu.org>
13948
13949 * src/reduce.c, src/reader.c:
13950 entered into RCS
13951
13952 1994-05-05 David J. MacKenzie <djm@gnu.org>
13953
13954 * Makefile.in: entered into RCS
13955
13956 1994-03-26 Richard Stallman <rms@gnu.org>
13957
13958 * src/bison.s1: entered into RCS
13959
13960 1994-03-26 Richard Stallman <rms@gnu.org>
13961
13962 * bison.simple: entered into RCS
13963
13964 1994-03-25 Richard Stallman <rms@gnu.org>
13965
13966 * src/main.c: entered into RCS
13967
13968 1994-03-24 Richard Stallman <rms@gnu.org>
13969
13970 * src/conflicts.c: entered into RCS
13971
13972 1994-01-02 Richard Stallman <rms@gnu.org>
13973
13974 * Makefile.in: *** empty log message ***
13975
13976 1993-11-21 Richard Stallman <rms@gnu.org>
13977
13978 * src/bison.s1: *** empty log message ***
13979
13980 1993-11-21 Richard Stallman <rms@gnu.org>
13981
13982 * doc/bison.texinfo: entered into RCS
13983
13984 * doc/bison.texinfo: *** empty log message ***
13985
13986 1993-11-21 Richard Stallman <rms@gnu.org>
13987
13988 * bison.simple: *** empty log message ***
13989
13990 1993-10-25 David J. MacKenzie <djm@gnu.org>
13991
13992 * doc/bison.texinfo: *** empty log message ***
13993
13994 1993-10-19 Richard Stallman <rms@gnu.org>
13995
13996 * src/bison.s1: *** empty log message ***
13997
13998 1993-10-19 Richard Stallman <rms@gnu.org>
13999
14000 * bison.simple: *** empty log message ***
14001
14002 1993-10-14 Richard Stallman <rms@gnu.org>
14003
14004 * src/bison.s1: *** empty log message ***
14005
14006 1993-10-14 Richard Stallman <rms@gnu.org>
14007
14008 * bison.simple: *** empty log message ***
14009
14010 1993-09-14 David J. MacKenzie <djm@gnu.org>
14011
14012 * doc/bison.texinfo: *** empty log message ***
14013
14014 1993-09-13 Noah Friedman <friedman@gnu.org>
14015
14016 * Makefile.in: *** empty log message ***
14017
14018 1993-09-10 Richard Stallman <rms@gnu.org>
14019
14020 * src/conflicts.c: *** empty log message ***
14021
14022 * src/system.h: entered into RCS
14023
14024 1993-09-10 Richard Stallman <rms@gnu.org>
14025
14026 * doc/bison.1: entered into RCS
14027
14028 1993-09-06 Noah Friedman <friedman@gnu.org>
14029
14030 * src/version.c: entered into RCS
14031
14032 1993-09-06 Noah Friedman <friedman@gnu.org>
14033
14034 * Makefile.in: *** empty log message ***
14035
14036 1993-07-30 David J. MacKenzie <djm@gnu.org>
14037
14038 * Makefile.in: *** empty log message ***
14039
14040 1993-07-24 Richard Stallman <rms@gnu.org>
14041
14042 * src/bison.s1: *** empty log message ***
14043
14044 1993-07-24 Richard Stallman <rms@gnu.org>
14045
14046 * bison.simple: *** empty log message ***
14047
14048 1993-07-08 David J. MacKenzie <djm@gnu.org>
14049
14050 * Makefile.in: *** empty log message ***
14051
14052 1993-07-04 Richard Stallman <rms@gnu.org>
14053
14054 * src/bison.s1: *** empty log message ***
14055
14056 1993-07-04 Richard Stallman <rms@gnu.org>
14057
14058 * bison.simple: *** empty log message ***
14059
14060 1993-06-26 David J. MacKenzie <djm@gnu.org>
14061
14062 * src/getargs.c: entered into RCS
14063
14064 1993-06-26 David J. MacKenzie <djm@gnu.org>
14065
14066 * doc/bison.texinfo: *** empty log message ***
14067
14068 * doc/bison.1: New file.
14069
14070 1993-06-25 Richard Stallman <rms@gnu.org>
14071
14072 * src/getargs.c: New file.
14073
14074 1993-06-16 Richard Stallman <rms@gnu.org>
14075
14076 * src/bison.s1: *** empty log message ***
14077
14078 1993-06-16 Richard Stallman <rms@gnu.org>
14079
14080 * bison.simple: *** empty log message ***
14081
14082 1993-06-03 Richard Stallman <rms@gnu.org>
14083
14084 * src/bison.s1: New file.
14085
14086 1993-06-03 Richard Stallman <rms@gnu.org>
14087
14088 * doc/bison.texinfo: *** empty log message ***
14089
14090 1993-06-03 Richard Stallman <rms@gnu.org>
14091
14092 * bison.simple: New file.
14093
14094 1993-05-19 Richard Stallman <rms@gnu.org>
14095
14096 * doc/bison.texinfo: New file.
14097
14098 1993-05-07 Noah Friedman <friedman@gnu.org>
14099
14100 * Makefile.in: *** empty log message ***
14101
14102 1993-04-28 Noah Friedman <friedman@gnu.org>
14103
14104 * src/reader.c: *** empty log message ***
14105
14106 1993-04-23 Noah Friedman <friedman@gnu.org>
14107
14108 * src/alloc.h: entered into RCS
14109
14110 1993-04-20 David J. MacKenzie <djm@gnu.org>
14111
14112 * src/version.c: *** empty log message ***
14113
14114 * src/files.c, src/allocate.c:
14115 entered into RCS
14116
14117 * src/reader.c: *** empty log message ***
14118
14119 * src/lex.c: entered into RCS
14120
14121 * src/conflicts.c: New file.
14122
14123 * src/symtab.c: entered into RCS
14124
14125 * src/alloc.h: New file.
14126
14127 * src/LR0.c: entered into RCS
14128
14129 1993-04-18 Noah Friedman <friedman@gnu.org>
14130
14131 * src/reader.c: New file.
14132
14133 * src/version.c: *** empty log message ***
14134
14135 1993-04-18 Noah Friedman <friedman@gnu.org>
14136
14137 * Makefile.in: *** empty log message ***
14138
14139 1993-04-17 Noah Friedman <friedman@gnu.org>
14140
14141 * Makefile.in: *** empty log message ***
14142
14143 1993-04-15 Richard Stallman <rms@gnu.org>
14144
14145 * src/main.c, src/files.c:
14146 New file.
14147
14148 1993-04-15 Noah Friedman <friedman@gnu.org>
14149
14150 * configure.in: entered into RCS
14151
14152 * configure.in: *** empty log message ***
14153
14154 * configure.in: New file.
14155
14156 1993-04-14 Richard Stallman <rms@gnu.org>
14157
14158 * Makefile.in: New file.
14159
14160 1993-04-13 Richard Stallman <rms@gnu.org>
14161
14162 * src/version.c: New file.
14163
14164 1993-03-25 Richard Stallman <rms@gnu.org>
14165
14166 * src/output.c: entered into RCS
14167
14168 1992-09-25 Richard Stallman <rms@gnu.org>
14169
14170 * configure.bat: entered into RCS
14171
14172 1992-06-22 Richard Stallman <rms@gnu.org>
14173
14174 * src/vmsgetargs.c: entered into RCS
14175
14176 1992-06-22 Richard Stallman <rms@gnu.org>
14177
14178 * doc/bison.rnh: entered into RCS
14179
14180 1992-04-20 David J. MacKenzie <djm@gnu.org>
14181
14182 * README: entered into RCS
14183
14184 1992-01-22 Richard Stallman <rms@gnu.org>
14185
14186 * src/machine.h: entered into RCS
14187
14188 1991-12-21 Richard Stallman <rms@gnu.org>
14189
14190 * src/lalr.c, src/closure.c:
14191 entered into RCS
14192
14193 1991-12-20 Richard Stallman <rms@gnu.org>
14194
14195 * src/state.h: entered into RCS
14196
14197 1991-12-18 Richard Stallman <rms@gnu.org>
14198
14199 * src/print.c, src/nullable.c, src/derives.c:
14200 entered into RCS
14201
14202 1991-11-03 David J. MacKenzie <djm@gnu.org>
14203
14204 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
14205 entered into RCS
14206
14207 1988-09-09 Richard Stallman <rms@gnu.org>
14208
14209 * src/bison.hairy: entered into RCS
14210
14211 1987-12-16 Richard Stallman <rms@gnu.org>
14212
14213 * REFERENCES: entered into RCS
14214
14215
14216 -----
14217
14218 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
14219 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
14220 Foundation, Inc.
14221
14222 Copying and distribution of this file, with or without
14223 modification, are permitted provided the copyright notice and this
14224 notice are preserved.