]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
yydestroyStackItem.
[bison.git] / ChangeLog
... / ...
CommitLineData
12005-08-25 Paul Eggert <eggert@cs.ucla.edu>
2
3 * data/glr.c (yydestroyStackItem): New function.
4 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
5 debugging information. Problem reported by Joel E. Denny.
6
72005-08-25 Akim Demaille <akim@epita.fr>
8
9 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
10
112005-08-24 Paul Eggert <eggert@cs.ucla.edu>
12
13 * data/glr.c (yyrecoverSyntaxError, yyreturn):
14 Don't invoke destructor on unresolved entries.
15 * tests/glr-regression.at
16 (User destructor for unresolved GLR semantic value): New test case.
17 Problem reported by Joel E. Denny in:
18 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
19
202005-08-21 Paul Eggert <eggert@cs.ucla.edu>
21
22 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
23 Add strnlen.c.
24 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
25 lib-prefix.m4, po.m4.
26
27 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
28 in yydestruct diagnostic, since it might not be an error.
29 Problem reported by Joel Denny near end of
30 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
31 * data/lalr1.cc (yyerturn): Likewise.
32 * data/yacc.c (yyreturn): Likewise.
33 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
34
35 * src/files.c: Remove obsolete FIXME comment.
36
37 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
38 with the other templates, and to fix bogus run-on messages such
39 as the one reported at the end of
40 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
41 All callers changed to avoid the newline.
42 (yyprocessOneStack): Output two lines rather than one, to accommodate
43 the above change. This changes the debug output format slightly.
44
45 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
46 reported by Joel E. Denny in
47 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
48 (trivial change).
49 * tests/glr-regression.at (Duplicate representation of merged trees):
50 New test, from Joel E. Denny in:
51 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
52 * THANKS: Add Joel E. Denny.
53
54 * configure.ac (AC_INIT): Bump to 2.0c.
55
562005-07-24 Paul Eggert <eggert@cs.ucla.edu>
57
58 * NEWS: Version 2.0b.
59
60 * Makefile.am (SUBDIRS): Put examples before tests, so that
61 "make check" doesn't finish with "All 1 tests passed".
62
63 * tests/regression.at (Token definitions): Don't rely on
64 AT_PARSER_CHECK for data that contains backslashes. It currently
65 uses 'echo', and 'echo' isn't portable if its argument contains
66 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
67 that the byte '\0xff' is not printable in the C locale; it is,
68 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
69 not printable, so use '\0x81' to test.
70
71 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
72 version of GCC, since the macro is used with non-GCC compilers.
73
74 Fix core dump reported by Pablo De Napoli in
75 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
76 * tests/regression.at (Invalid inputs with {}): New test.
77 * src/parse-gram.y (token_name): Translate type before using
78 it as an index.
79
80 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
81 the user's name space. All uses changed to __attribute__
82 ((__unused__)).
83 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
84 Add __attribute__ ((__noreturn__)).
85
86 * etc/clcommit: Remove. We weren't using it, and it failed
87 "make maintainer-distcheck".
88 * Makefile.maint: Merge from coreutils.
89 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
90 (syntax-check-rules): Change list of rules as described below.
91 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
92 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
93 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
94 (sc_trailing_space): New rules.
95 (sc_xalloc_h_in_src): Remove.
96 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
97 (sc_space_tab, sc_error_exit_success, sc_changelog):
98 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
99 (makefile-check, po-check, author_mark_check):
100 (makefile_path_separator_check, copyright-check):
101 Use grep -n, to make it easier to find violations.
102 Use CVS_LIST and CVS_LIST_EXCEPT.
103 (header_regexp, h_re): Remove.
104 (dd_c): New macro.
105 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
106 (my-distcheck): Use more-modern GCC flags.
107 (signatures, %.asc): Remove.
108 (rel-files, announcement): Remove signatures.
109 Restore old updating code, even though we don't use it, so
110 that we're the same as coreutils.
111 (alpha, beta, major): Depend on news-date-check.
112 Make the upload commands.
113
114 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
115 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
116 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
117 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
118 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
119 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
120 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
121 * tests/sets.at: Likewise.
122
123 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
124 we comment out the Autoconf version number.
125 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
126 it's error-prone and "make maintainer-distcheck" rejects it.
127
128 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
129 Indent calls to "error" to pacify "make maintainer-distcheck",
130 when the calls are not intended to be translated.
131 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
132
133 * src/Makefile.am (DEFS): Use +=, to pacify
134 "make maintainer-distcheck".
135 (bison_SOURCES): Add scan-skel.h.
136 (sc_tight_scope): New rule, from coreutils.
137
138 * src/files.c (src_extension, header_extension):
139 Now static, not extern.
140 * src/getargs.c (short_options): Likewise.
141 * src/muscle_tab.c (muscle_table): Likewise.
142 * src/parse-gram.y (current_class, current_type, current_prec):
143 Likewise.
144 * src/reader.c (grammar_end, previous_rule_end): Likewise.
145 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
146 * src/main.c (main): Cast bindtextdomain and textdomain calls to
147 void, to avoid warning when NLS is disabled.
148 * src/output.c: Include scan-skel.h.
149 (scan_skel): Remove decl, since scan-skel.h does this.
150 (output_skeleton):
151 Indent calls to "error" to pacify "make maintainer-distcheck".
152 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
153 * src/reader.h (gram_end, gram_lineno): New decls to pacify
154 "make maintainer-distcheck".
155 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
156 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
157 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
158 (skel_lex_destroy, scan_skel): Move these decls to...
159 * src/scan-skel.h: New file.
160 * src/uniqstr.c (uniqstr_assert):
161 Indent calls to "error" to pacify "make maintainer-distcheck".
162
163 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
164 not @VAR@.
165
166 * tests/torture.at: Revamp to avoid misuse of atoi that
167 "make maintainer-distcheck" complained about.
168
169 * examples/extexi (message): Don't print a message more than once,
170 and omit line-number decoration that makes Emacs compile think
171 that informative messages are worth worrying about.
172
1732005-07-22 Paul Eggert <eggert@cs.ucla.edu>
174
175 * configure.ac: Update version number.
176
177 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
178 accidentally.
179 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
180 autogenerated by the maintainer.
181 * examples/calc++/.cvsignore: Add *.yy.
182
183 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
184 * lib/bitset_stats.c (bitset_stats_init): Likewise.
185 * lib/bitsetv.c (bitsetv_alloc): Likewise.
186
187 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
188
189 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
190 from maintainer-distcheck about casting the argument of 'free'.
191
192 * NEWS: Mention recent yytname changes.
193 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
194
195 * bootstrap: For translations that have not yet been upgraded to
196 the new runtime-po domain, prime the pump by extracting the
197 relevant strings from the obsolete translations. This code can be
198 removed once the bison-runtime domain has been translated by each
199 team.
200
201 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
202 now that token names are already quoted.
203
204 Fix problem reported by Anthony Heading.
205 * data/glr.c (YYTOKEN_TABLE): New macro.
206 (yytname): Define if YYTOKEN_TABLE.
207 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
208 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
209 (YYERROR_VERBOSE): Define the same way the other skeletons do.
210 * src/output.c (prepare_symbols): Output token_table_flag.
211
2122005-07-21 Paul Eggert <eggert@cs.ucla.edu>
213
214 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
215 again if the first call fails.
216
217 * data/glr.c (yytnamerr): New function.
218 (yyreportSyntaxError): Use it to dequote most string literals.
219 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
220 with other skeletons. All uses changed.
221 (yytnameerr_): New function.
222 (yyreport_syntax_error): Use it to dequote most string literals.
223 * data/yacc.c (yytnamerr): New function.
224 (yyerrlab): Use it to decode most string literals.
225 * doc/bison.texinfo (Decl Summary, Calling Convention):
226 Clarify quoting convention of yytname.
227 * src/output.c (prepare_symbols): Quote all names. This undoes
228 the 2005-04-17 change, which is now accomplished (mostly) via
229 changes in the parsers as described above.
230 * tests/regression.at (Token definitions, Web2c Actions):
231 Undo most 2005-04-17 change here, too.
232
2332005-07-20 Paul Eggert <eggert@cs.ucla.edu>
234
235 Fix more problems reported by twlevo@xs4all.nl.
236 * tests/cxx-type.at: Don't pipe output of ./types through sed to
237 remove trailing spaces. This loses the exit status of ./types,
238 and isn't needed since ./types shouldn't be emitting trailing
239 spaces.
240 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
241 as the stack isn't valid in that case.
242
243 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
244 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
245 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
246 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
247 is used.
248 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
249 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
250 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
251 Likewise.
252
253 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
254 overly-picky compilers that reject 'char *foo = "bar";'.
255
256 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
257 to FILE * parameter, not to stderr. This fixes a typo introduced
258 in the 2005-07-12 change.
259
260 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
261 warnings from GCC 4.
262
263 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
264 (yyglrShiftDefer, yysplitStack):
265 Remove unused parameters b4_pure_formals. All uses changed.
266 (yyglrShift): Remove unused parameters b4_user_formals.
267 All uses changed.
268 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
269
2702005-07-18 Paul Eggert <eggert@cs.ucla.edu>
271
272 Destructor cleanups and regularization among the three skeletons.
273 * NEWS: Document the behavior changes.
274 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
275 stack before failing, as the cleanup code will do it for us now.
276 * data/lalr1.cc (yyerrlab): Likewise.
277 * data/glr.c (yyparse): Pop everything off the stack before
278 freeing it, so that destructors get called properly.
279 * data/lalr1.cc (yyreturn): Likewise.
280 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
281 This is more consistent.
282 * doc/bison.texinfo (Destructor Decl): Mention more reasons
283 why destructors might be called. 1.875 -> 2.1.
284 (Destructor Decl, Decl Summary, Table of Symbols):
285 Some English-language cleanups for %destructor.
286 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
287 Add output line for destructor of start symbol.
288 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
289 because of that same extra output line.
290
291 * NEWS: Document minor wording changes in diagnostics of
292 Bison-generated parsers.
293 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
294 Remove unused formals. All uses changed.
295 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
296 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
297 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
298 Rename yyoverflowab to yyexhaustedlab.
299 When memory exhaustion occurs during syntax-error reporting,
300 report it separately rather than in a single diagnostic; this
301 eases translation.
302 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
303 (Memory Exhausted): Renamed from Parser Stack Overflow.
304 Revamp wording slightly to prefer "memory exhaustion".
305 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
306
307 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
308
309 Add i18n support to the GLR skeleton. Partially fix the C++
310 skeleton; a C++ expert needs to finish this. Remove debugging
311 msgids; there's little point to having them translated, since they
312 can be understood only by someone who can read the
313 (English-language) source code.
314
315 Generate runtime-po/bison-runtime.pot automatically, so that we
316 don't have to worry about garbage getting in that file. We'll
317 make sure after the next official release that old msgids don't
318 get lost. See
319 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
320
321 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
322 Now auto-generated.
323 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
324 Fix typos in explanations of the runtime file.
325 * bootstrap: Change gettext keyword from YYI18N to YY_.
326 Use standard Makefile.in.in in runtime-po, since we'll arrange
327 for backward-compatible bison-runtime.po files in a different way.
328 * data/glr.c (YY_): New macro, from yacc.c.
329 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
330 Translate messages intended for users.
331 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
332 the wording in the other skeletons. We don't know that the memory
333 is virtual.
334 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
335 Use same method that yacc.c uses.
336 Don't translate debugging messages.
337 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
338 it doesn't work (yet), and requires C++ expertise to fix.
339 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
340 Move defn to a more logical place, to be consistent with other
341 skeletons.
342 Don't translate debugging messages.
343 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
344 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
345 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
346 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
347
348 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
349 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
350 void, not int.
351 * tests/glr-regression.at (Badly Collapsed GLR States):
352 Likewise.
353 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
354 yylex should return 0 at EOF rather than aborting.
355
356 Improve tests for stack overflow in GLR parser.
357 Problem reported by twlevo@xs4all.nl.
358 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
359 All uses removed.
360 (yyStackOverflow): Just longjmp, but with value 2 so that caller
361 can handle the problem.
362 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
363 (yyparse): New local variable yyresult to record the result.
364 Use result of setjmp to set it, rather than storing itinto
365 struct.
366 (yyDone): Remove label.
367 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
368 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
369 if YYABORT is used).
370 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
371 yyparse status; put status > 1 into diagnostic.
372 Check that status==2 works.
373 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
374 Use exit status 3 for failure to open (which shouldn't happen).
375
3762005-07-17 Paul Eggert <eggert@cs.ucla.edu>
377
378 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
379 1 on syntax error; just let yyparse do its thing.
380 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
381 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
382 (Exploding the Stack Size with Alloca):
383 (Exploding the Stack Size with Malloc):
384 Expect exit status 2, not 1, since the parser is supposed to blow
385 its stack. Problem reported by twlevo@xs4all.nl.
386
387 * data/glr.c (yyparse): Don't assume that the initial calls
388 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
389 Print a stack-overflow message and fail instead.
390 Initialize the line-number information before creating the stack,
391 so that the stack-overflow message can report line zero safely.
392
3932005-07-14 Paul Eggert <eggert@cs.ucla.edu>
394
395 Fix problems reported by twlevo@xs4all.nl.
396 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
397 (yyuserMerge): Provide a default case if b4_mergers is empty.
398 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
399 * tests/glr-regression.at
400 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
401 Add casts to pacify C++ compilers.
402 * tests/glr-regression.at (Improper merging of GLR delayed action
403 sets): Declare yylex before using it.
404 * tests/Makefile.am (maintainer-check-g++): Fix a stray
405 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
406 test for valgrind; valgrind is independent of g++.
407 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
408 for compatibility with POSIX 1003.1-2001 (if running coreutils).
409 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
410 Use a destructor, so that we can expand the stack. Change
411 YYSTYPE to char * so that we can free it. Cast result of malloc.
412
4132005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
414
415 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
416 a valgrind failure. Problem reported by twlevo@xs4all.nl.
417
4182005-07-13 Paul Eggert <eggert@cs.ucla.edu>
419
420 * PACKAGING: New file, suggested by Bruno Haible and taken from
421 similar wording in gettext's PACKAGING file.
422 * NEWS: Mention PACKAGING.
423 * Makefile.am (EXTRA_DIST): Add PACKAGING.
424
4252005-07-12 Paul Eggert <eggert@cs.ucla.edu>
426
427 * NEWS: Document recent i18n improvements.
428 * bootstrap: Get runtime translations into runtime-po.
429 Create runtime-po files automatically, if possible.
430 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
431 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
432 does not infringe on the user's name space.
433 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
434 * doc/bison.texinfo (Internationalization): Revamp the English
435 and Texinfo syntax a bit, to try to make it clearer.
436 (Bison Options, Option Cross Key): Mention --print-localedir.
437 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
438 YYENABLE_NLS. Quote a bit more.
439 * runtime-po/.cvsignore: New file.
440 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
441 * runtime-po/Rules-quot: Remove; now created by bootstrap.
442 * runtime-po/quot.sed: Likewise.
443 * runtime-po/boldquot.sed: Likewise.
444 * runtime-po/en@quot.header: Likewise.
445 * runtime-po/en@boldquot.header: Likewise.
446 * runtime-po/insert-header.sin: Likewise.
447 * runtime-po/remove-potcdate.sin: Likewise.
448 * runtime-po/Makevars: Likewise.
449 * runtime-po/LINGUAS: Likewise.
450 * runtime-po/de.po: Likewise; we will rely on the translation project
451 to maintain this, so "bootstrap" should get it.
452 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
453 its value.
454 * src/main.c (main): Bind the bison-runtime domain, too.
455
4562005-07-12 Bruno Haible <bruno@clisp.org>
457
458 * data/yacc.c: Include <libintl.h> when NLS is enabled.
459 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
460 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
461 * runtime-po: New directory.
462 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
463 $(DOMAIN).pot-update rule, so that old messages are never dropped.
464 * runtime-po/Rules-quot: New file, copied from po/.
465 * runtime-po/quot.sed: Likewise.
466 * runtime-po/boldquot.sed: Likewise.
467 * runtime-po/en@quot.header: Likewise.
468 * runtime-po/en@boldquot.header: Likewise.
469 * runtime-po/insert-header.sin: Likewise.
470 * runtime-po/remove-potcdate.sin: Likewise.
471 * runtime-po/Makevars: New file.
472 * runtime-po/POTFILES.in: New file.
473 * runtime-po/LINGUAS: New file.
474 * runtime-po/bison-runtime.pot: New file.
475 * runtime-po/de.po: New file.
476 * m4/bison.m4: New file.
477 * Makefile.am (SUBDIRS): Add runtime-po.
478 (aclocaldir, aclocal_DATA): New variables.
479 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
480 Define aclocaldir.
481 * src/getargs.c (usage): Document --print-localedir option.
482 (PRINT_LOCALEDIR_OPTION): New enum item.
483 (long_options): Add --print-localedir option.
484 (getargs): Handle --print-localedir option.
485 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
486 (Internationalization): New section.
487
4882005-07-12 Akim Demaille <akim@epita.fr>
489
490 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
491 for consistency with the rest of the code.
492 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
493 Add separators.
494
4952005-07-12 Akim Demaille <akim@epita.fr>
496
497 * src/parse-gram.y: Use %printer instead of YYPRINT.
498
4992005-07-12 Akim Demaille <akim@epita.fr>
500
501 * src/symtab.h, src/symtab.c (symbol_print): New.
502 * src/symlist.h, src/symlist.c (symbol_list_print): New.
503 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
504
5052005-07-12 Akim Demaille <akim@epita.fr>
506
507 * data/glr.c (b4_syncline): Fix (swap) the definitions of
508 b4_at_dollar and b4_dollar_dollar.
509
5102005-07-11 Paul Eggert <eggert@cs.ucla.edu>
511
512 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
513 and Pennello's paper.
514
5152005-07-09 Paul Eggert <eggert@cs.ucla.edu>
516
517 * data/yacc.c (yyparse): Undo previous patch. Instead,
518 set yylsp[0] and yyvsp[0] only if the initial action
519 sets yylloc and yylval, respectively.
520
521 * data/yacc.c (yyparse): In the initial action, set
522 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
523 This avoids the use of undefined variables if the initial
524 action does not set yylloc and/or yylval.
525
5262005-07-07 Paul Eggert <eggert@cs.ucla.edu>
527
528 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
529 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
530 Remove from CVS. These files are automatically generated.
531 * examples/extexi: Clarify that this file is now part of Bison,
532 not GNU M4, and that it works with any POSIX-compatible Awk.
533 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
534 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
535 so that we also get calc++-parser.yy. Geneate it.
536 Use $(AWK), not gawk, since any conforming Awk will do.
537 Put comment before action, since older 'make' can't handle comment
538 in action.
539 $(BUILT_SOURCES): List all built sources, not just some of them.
540 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
541 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
542 $($(calc_sources_generated)): Remove unnecessary test for existence
543 of target. (This had a shell syntax error anyway; a stray "x".)
544 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
545 calc++-parser.yy.
546 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
547
548 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
549 implied by the other modules.
550
5512005-07-06 Akim Demaille <akim@epita.fr>
552
553 Bind examples/calc++ to the package.
554 * examples/calc++/Makefile: Remove, replaced by...
555 * examples/calc++/Makefile.am: ... this new file.
556 * examples/calc++/test: Remove input.
557 * examples/calc++/compile: Remove.
558 * examples/Makefile.am: New.
559 * configure.ac, Makefile.am: Adjust.
560 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
561
5622005-07-05 Paul Eggert <eggert@cs.ucla.edu>
563
564 * data/glr.c (yyFail): Drastically simplify; since the format argument
565 never had any % directives, we can simply pass it to yyerror.
566 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
567 be modified later, as that is the usual style in glr.c.
568 Problems reported by Paul Hilfinger.
569
570 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
571 and size overflow errors.
572 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
573 in case the user prolog sets feature-test macros like _GNU_SOURCE.
574 (YYSIZEMAX): New macro.
575 (yystpcpy): New function, taken from yacc.c.
576 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
577 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
578 so that we don't have to maintain their signatures.
579 (yyFail): Check for buffer overflow, by using vsnprintf rather
580 than vsprintf. Allocate a bigger buffer if possible.
581 Report an error if buffer allocation fails.
582 (yyStackOverflow): New function.
583 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
584 the initialization was successful. It might fail if storage was
585 exhausted.
586 (yyexpandGLRStack): Add more checks for storage allocation failure.
587 Use yyStackOverflow to report failures.
588 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
589 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
590 Don't assume stack number fits in int.
591 (yysplitStack): Check for storage allocation failure.
592 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
593 can print diagnostics on storage allocation failure. All callers
594 changed.
595 (yyresolveValue): Use yybool for boolean.
596 (yyreportSyntaxError): Check for size-calculation overflow.
597 This code is taken from yacc.c.
598 (yyparse): Check for storage allocation errors when allocating
599 the initial stack.
600
6012005-07-05 Akim Demaille <akim@epita.fr>
602
603 Extract calc++ from the documentation.
604 * doc/bison.texinfo (Calc++): Add the extraction marks.
605 * examples/extexi: New, from the aborted GNU Programming 2E.
606 Separate the different paragraph of a file with empty lines.
607 * examples/Makefile: Use it to extract the whole calc++ example.
608
6092005-06-24 Akim Demaille <akim@epita.fr>
610
611 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
612 class typedefs.
613
6142005-06-22 Akim Demaille <akim@epita.fr>
615
616 * doc/bison.texinfo (C++ Language Interface): First stab.
617 (C++ Parsers): Remove.
618
6192005-06-22 Akim Demaille <akim@epita.fr>
620
621 * data/lalr1.cc (yylex_): Honor %lex-param.
622
6232005-06-22 Akim Demaille <akim@epita.fr>
624
625 Start a set of simple examples.
626 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
627 * examples/calc++/calc++-driver.hh,
628 * examples/calc++/calc++-parser.yy,
629 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
630 * examples/calc++/compile, examples/calc++/test: New.
631
6322005-06-09 Paul Eggert <eggert@cs.ucla.edu>
633
634 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
635 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
636 which stems from the 2005-05-27 patch.
637
6382005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
639
640 * data/glr.c: Modify treatment of unused parameters to permit use
641 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
642
6432005-05-30 Paul Eggert <eggert@cs.ucla.edu>
644
645 Fix infringement on user name space reported by Janos Zoltan Szabo.
646 * data/yacc.c (yyparse): strlen -> yystrlen.
647
6482005-05-30 Akim Demaille <akim@epita.fr>
649
650 * data/lalr1.cc (_): New.
651 Translate the various messages.
652
6532005-05-27 Paul Eggert <eggert@cs.ucla.edu>
654
655 Fix infringement on user name space reported by Bruno Haible.
656 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
657 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
658 the user's name space.
659 (alloca): Include <stdlib.h> to get it, if it's not built in.
660 (YYMALLOC, YYFREE): Define only if needed.
661 (malloc, free): Declare, but only if needed, as this infringes on
662 the user name space.
663
6642005-05-25 Paul Eggert <eggert@cs.ucla.edu>
665
666 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
667 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
668 with %d format.
669 * lib/ebitset.c (min, max): Undef before defining.
670 * lib/vbitset.c (min, max): Likewise.
671 * lib/subpipe.c (create_subpipe): Save local variables in case
672 vfork clobbers them.
673
6742005-05-24 Bruno Haible <bruno@clisp.org>
675
676 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
677 error message syntax used by gcc-4.0.
678
6792005-05-23 Paul Eggert <eggert@cs.ucla.edu>
680
681 * README: Mention m4 1.4.3. Remove obsolete advice about
682 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
683
684 * bootstrap: Remove workaround for problem I encountered with
685 gettext 0.14.1; it seems to be fixed now.
686
6872005-05-22 Paul Eggert <eggert@cs.ucla.edu>
688
689 * NEWS: Version 2.0a.
690
691 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
692 the previous change.
693
694 Various maintainer cleanups.
695 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
696 conftest*, for benefit of CVS commands run at the same time as
697 "configure". Add build-aux, since "bootstrap" now creates it and
698 its subfiles.
699 * Makefile.cfg (move_if_change): Remove.
700 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
701 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
702 (po_repo, do-po-update, po-update, wget_files, get-targets):
703 (config.guess-url_prefix, config.sub-url_prefix):
704 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
705 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
706 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
707 Remove.
708 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
709 this is now the recommended name.
710 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
711 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
712 ylwrap. These files now go into build-aux.
713 * config/move-if-change: Remove.
714 * config/prev-version.txt: Bump from 1.75 to 2.0.
715
716 * bootstrap: Add stdio-safer, unistd-safer modules.
717 Remove m4/glibc2.m4 (introduced by latest gnulib, but
718 we don't need it).
719 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
720 fopen-safer.c, stdio-safer.h, unistd-safer.h.
721 * lib/subpipe.c: Include "unistd-safer.h".
722 (create_subpipe): Make sure all the newly-created
723 file descriptors are > 2, so that diagnostics don't
724 get sent down them (which might cause Bison to hang, in theory).
725 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
726 * src/files.c (xfopen): Use fopen_safer, not fopen.
727
728 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
729 yesterday's yacc.c fix.
730
7312005-05-21 Paul Eggert <eggert@cs.ucla.edu>
732
733 * data/glr.c, data/lalr1.cc: Update copyright date.
734
735 Fix a destructor bug reported by Wolfgang Spraul in
736 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
737 * data/yacc.c (yyabortlab): Don't call destructor, and
738 don't set yychar to EMPTY.
739 (yyoverflowlab): Don't call destructor.
740 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
741 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
742 since we no longer output the message "discarding lookahead token
743 end of input ()".
744
7452005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
746
747 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
748 fix a small glitch in debugging output.
749 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
750 after YY_SYMBOL_PRINT where needed.
751
752 (struct yyGLRState): Add some comments.
753 (struct yySemanticOption): Add some comments.
754 (union yyGLRStackItem): Add comment.
755
756 (yymergeOptionSets): Correct this to properly perform the union,
757 avoiding infinite reported by Michael Rosien.
758 Update comment.
759
760 * tests/glr-regression.at: Add test for GLR merging error reported
761 by M. Rosien.
762
7632005-05-13 Paul Eggert <eggert@cs.ucla.edu>
764
765 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
766 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
767 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
768 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
769 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
770 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
771 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
772 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
773 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
774 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
775 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
776 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
777 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
778 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
779 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
780 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
781 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
782 src/derives.h, src/files.c, src/files.h, src/getargs.c,
783 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
784 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
785 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
786 src/output.h, src/parse-gram.c, src/parse-gram.h,
787 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
788 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
789 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
790 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
791 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
792 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
793 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
794 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
795 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
796 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
797 tests/reduce.at, tests/regression.at, tests/sets.at,
798 tests/synclines.at, tests/testsuite.at, tests/torture.at:
799 Update FSF postal mail address.
800
8012005-05-11 Paul Eggert <eggert@cs.ucla.edu>
802
803 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
804 Problem reported by Ralf Menzel.
805
8062005-05-01 Paul Eggert <eggert@cs.ucla.edu>
807
808 * tests/actions.at: Test that stack overflow invokes destructors.
809 From Marcus Holland-Moritz.
810 * data/yacc.c (yyerrlab): Move the code that destroys the stack
811 from here....
812 (yyreturn): to here. That way, destructors are called properly
813 even if the stack overflows, or the user calls YYACCEPT or
814 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
815 (yyoverflowlab): Destroy the lookahead.
816
8172005-04-24 Paul Eggert <eggert@cs.ucla.edu>
818
819 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
820
8212005-04-17 Paul Eggert <eggert@cs.ucla.edu>
822
823 * NEWS: Bison-generated C parsers no longer quote literal strings
824 associated with tokens.
825 * src/output.c (prepare_symbols): Don't escape strings,
826 since users don't want to see C escapes.
827 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
828 in diagnostics.
829 * tests/input.at (Torturing the Scanner): Likewise.
830 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
831
8322005-04-16 Paul Eggert <eggert@cs.ucla.edu>
833
834 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
835 the data size is known to be too small and we can't increase it.
836 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
837
8382005-04-15 Paul Eggert <eggert@cs.ucla.edu>
839
840 * src/parse-gram.y: Include quotearg.h.
841 (string_as_id): Quote $1 before using it as a key, since the
842 lexer no longer quotes it for us.
843 (string_content): Don't strip quotes, since lexer no longer
844 quotes it for us.
845 * src/scan-gram.l: Include quotearg.h.
846 ("\""): Omit quote.
847 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
848 a key, since the rest of the lexer doesn't quote it.
849 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
850 * tests/regression.at (Token definitions): Check for backslashes
851 in token strings.
852
853 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
854 (YYSIZE_T): Define to unsigned long int when using an older compiler.
855 (yyparse): Revamp code to generate long syntax error message, to
856 make it easier to translate, and to avoid problems with arithmetic
857 overflow. Change "virtual memory" to "memory" in diagnostic, since
858 we don't know whether the memory is virtual.
859
8602005-04-13 Paul Eggert <eggert@cs.ucla.edu>
861
862 * NEWS: Bison-generated C parsers now use the _ macro to
863 translate strings.
864 * data/yacc.c (_) [!defined _]: New macro.
865 All English strings wrapped inside this macro.
866 * doc/bison.texinfo (Bison Parser): Document _.
867 * po/POTFILES.in: Include src/parse-gram.c, since it now
868 includes translateable strings that parse-gram.y doesn't.
869
8702005-04-12 Paul Eggert <eggert@cs.ucla.edu>
871
872 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
873 reverting the 2004-10-11 change to this function.
874 (symbol_check_alias_consistency): Don't call symbol_type_set
875 if the type name is already correct.
876 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
877
8782005-03-25 Paul Eggert <eggert@cs.ucla.edu>
879
880 * tests/regression.at (Token definitions): Don't use a token named
881 c, as that generates a "#define c ..." that runs afoul of buggy
882 stdlib.h that uses the identifier c as a member of struct
883 drand48_data. Problem reported by Horst Wente.
884
8852005-03-21 Paul Eggert <eggert@cs.ucla.edu>
886
887 * bootstrap: Change translation URL from
888 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
889 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
890 redirection glitches. Problem reported by twlevo@xs4all.nl.
891
8922005-03-20 Paul Eggert <eggert@cs.ucla.edu>
893
894 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
895 after operands; POSIX says this isn't portable for the c99 command.
896
8972005-03-18 Paul Eggert <eggert@cs.ucla.edu>
898
899 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
900 immediately if a data overrun has occurred; this may help us track
901 down what may be a spurious failure on MacOS.
902
9032005-03-17 Paul Eggert <eggert@cs.ucla.edu>
904
905 Respond to problems reported by twlevo@xs4all.nl.
906
907 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
908
909 * src/vcg.h: Comment fix.
910 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
911 (G_CMAX): Change to -1 instead of INT_MAX.
912
913 * data/yacc.c (yyparse): Omit spaces before #line.
914
9152005-03-15 Paul Eggert <eggert@cs.ucla.edu>
916
917 * src/tables.c (state_number_to_vector_number): Put it inside an
918 "#if 0", since it's not currently used. Problem reported by
919 Roland McGrath.
920
9212005-03-06 Paul Eggert <eggert@cs.ucla.edu>
922
923 * src/output.c (escaped_output): Renamed from
924 escaped_file_name_output, since we now use it for symbol tags as
925 well. All uses changed.
926 (symbol_destructors_output, symbol_printers_output):
927 Escape symbol tags too.
928 Problem reported by Matyas Forstner in
929 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
930
931 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
932 not needed.
933 * src/output.c (user_actions_output, token_definitions_output,
934 symbol_destructors_output, symbol_printers_output): Likewise.
935 * src/reader.c (prologue_augment): Likewise.
936 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
937
938 * src/vcg.c (output_edge): Don't quote linestyle arg.
939 Problem reported by twlevo@xs4all.nl.
940
9412005-02-28 Paul Eggert <eggert@cs.ucla.edu>
942
943 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
944 example, reported by Derek M Jones. Also, make the example even
945 more outrageous, to better illustrate how bad the problem is.
946
9472005-02-24 Paul Eggert <eggert@cs.ucla.edu>
948
949 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
950 putsym. Typo reported by Sebastian Piping.
951
9522005-02-23 Paul Eggert <eggert@cs.ucla.edu>
953
954 * doc/bison.texinfo (Language and Grammar): some -> same
955 (Epilogue): int he -> in the
956 Typos reported by Sebastian Piping via Justin Pence.
957
9582005-02-07 Paul Eggert <eggert@cs.ucla.edu>
959
960 * tests/glr-regression.at (Improper handling of embedded actions
961 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
962 embedded actions and $-N in GLR parsers", work around an Autoconf bug
963 with dollar signs in test names.
964 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
965 for a similar reason.
966
9672005-01-28 Paul Eggert <eggert@cs.ucla.edu>
968
969 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
970 wants to redefine G_VIEW.
971
9722005-01-27 Paul Eggert <eggert@cs.ucla.edu>
973
974 * src/vcg.c (get_view_str): Remove case for normal_view.
975 Problem reported by twlevo@xs4all.nl.
976
9772005-01-24 Paul Eggert <eggert@cs.ucla.edu>
978
979 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
980 Problem reported by twlevo@xs4all.nl.
981
982 * doc/bison.texinfo: Change @dircategory from "GNU programming
983 tools" to "Software development". Requested by Richard Stallman
984 via Karl Berry.
985
9862005-01-23 Paul Eggert <eggert@cs.ucla.edu>
987
988 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
989 Problem reported by twlevo@xs4all.nl.
990
9912005-01-21 Paul Eggert <eggert@cs.ucla.edu>
992
993 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
994 keyword; it's not needed with modern compilers, and it doesn't
995 affect correctness with older compilers. Suggested by
996 twlevo@xs4all.nl.
997
9982005-01-17 Paul Eggert <eggert@cs.ucla.edu>
999
1000 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
1001 gcc -Wswitch-default.
1002 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
1003 * data/yacc.c (yyparse): Likewise.
1004
10052005-01-12 Paul Eggert <eggert@cs.ucla.edu>
1006
1007 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
1008 already. Let config.h define any nonstandard values.
1009
10102005-01-10 Paul Eggert <eggert@cs.ucla.edu>
1011
1012 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
1013 for the benefit of slower hosts. Problem reported by
1014 Nelson H. F. Beebe.
1015
10162005-01-07 Paul Eggert <eggert@cs.ucla.edu>
1017
1018 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
1019 being defined and not used.
1020 * data/lalr1.cc (yyparse): Likewise.
1021 Use "if (false)" rather than "if (0)".
1022
10232005-01-05 Paul Eggert <eggert@cs.ucla.edu>
1024
1025 * TODO: Mention that we should allow NUL bytes in tokens.
1026
10272005-01-02 Paul Eggert <eggert@cs.ucla.edu>
1028
1029 * src/scan-skel.l (<<EOF>>): Don't close standard output.
1030 Problem reported by Hans Aberg.
1031
10322005-01-01 Paul Eggert <eggert@cs.ucla.edu>
1033
1034 * src/getargs.c (version): Happy new year; update overall
1035 program copyright date from 2004 to 2005.
1036
1037 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
1038 Problem reported by Hans Aberg.
1039 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
1040 (Output file names.): Add a test for the case when standard output
1041 is closed.
1042
10432004-12-26 Paul Eggert <eggert@cs.ucla.edu>
1044
1045 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
1046 to fix an oversight in the Bison 2.0 manual.
1047
10482004-12-25 Paul Eggert <eggert@cs.ucla.edu>
1049
1050 * NEWS: Version 2.0. Reformat the existing news items since
1051 1.875, so that related items are grouped together.
1052 * configure.ac (AC_INIT): Bump version to 2.0.
1053 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
1054
1055 * tests/torture.at (Exploding the Stack Size with Alloca): Set
1056 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
1057 otherwise, we're not testing alloca. Unfortunately there's no
1058 simple way to consult HAVE_ALLOCA here.
1059
1060 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
1061 for yymsg, too.
1062
1063 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
1064 hand. This avoids a warning about comparing int to size_t when
1065 GCC warnings are enabled.
1066
10672004-12-22 Paul Eggert <eggert@cs.ucla.edu>
1068
1069 * NEWS: Bison-generated parsers no longer default to using the
1070 alloca function (when available) to extend the parser stack, due
1071 to widespread problems in unchecked stack-overflow detection.
1072 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
1073 responsibility to set it to a positive value. This lets the user
1074 specify a value that is not a preprocessor constant.
1075 * data/yacc.c (YYMAXDEPTH): Likewise.
1076 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
1077 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
1078 to be a compile-time constant. However, explain the constraints on it.
1079 Also, explain the constraints on YYINITDEPTH.
1080 (Table of Symbols): Explain that alloca is no longer the default.
1081 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
1082 to 1.
1083
1084 * doc/bison.texinfo (Location Default Action): Mention that n must
1085 be zero when k is zero. Suggested by Frank Heckenbach.
1086
10872004-12-22 Akim Demaille <akim@epita.fr>
1088
1089 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
1090 (parser::state_type, parser::semantic_type, parser::location_type):
1091 Private, not public.
1092 (parser::parse): Return ints, not bool.
1093 Returning a bool introduces a problem: 0 corresponds to false, and
1094 it seems weird to return false on success. Returning true changes
1095 the conventions for yyparse.
1096 Alternatively we could return void and send an exception.
1097 There is no clear consensus (yet?).
1098 (state_stack, semantic_stack, location_stack): Rename as...
1099 (state_stack_type, semantic_stack_type, location_stack_type): these.
1100 Private, not public.
1101 * tests/c++.at: New.
1102 * tests/testsuite.at, tests/Makefile.am: Adjust.
1103
11042004-12-21 Akim Demaille <akim@epita.fr>
1105
1106 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
1107
11082004-12-21 Akim Demaille <akim@epita.fr>
1109
1110 Don't impose std::string for filenames.
1111
1112 * data/lalr1.cc (b4_filename_type): New.
1113 (position::filename): Use it.
1114 (parser.hh): Move the inclusion of stack.hh and location.hh below
1115 the user code, so that needed headers for the filename type can be
1116 included first.
1117 Forward declare them before the user code.
1118 * tests/Makefile.am (check-local, installcheck-local): Pass
1119 TESTSUITEFLAGS to the TESTSUITE.
1120
11212004-12-20 Akim Demaille <akim@epita.fr>
1122
1123 Use more STL like names: my_class instead of MyClass.
1124
1125 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
1126 (SemanticStack, SemanticType, StateStack, StateType)
1127 (TokenNumberType, Stack, Slice, Traits, Parser::location)
1128 (Parser::value): Rename as...
1129 (location_stack, location_type, rhs_number_type, semantic_stack)
1130 (semantic_type, state_stack, state_type, token_number_type, stack)
1131 (slice, traits, parser::yylloc, parser::yylval): these.
1132
1133 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
1134
11352004-12-19 Paul Eggert <eggert@cs.ucla.edu>
1136
1137 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
1138 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
1139
11402004-12-17 Paul Eggert <eggert@cs.ucla.edu>
1141
1142 Remove uses of 'short int' and 'unsigned short int'. This raises
1143 some arbitrary limits. It uses more memory but nowadays that's
1144 not much of an issue.
1145
1146 This change does not affect the generated parsers; that's a different
1147 task, as some users will want to conserve memory there.
1148
1149 Ideally we should use size_t to represent all object counts, and
1150 something like ptrdiff_t to represent signed differences of object
1151 counts; but that will require more code-cleanup than I have the
1152 time to do right now.
1153
1154 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
1155 Use size_t, not int or short int, to count objects.
1156 * src/closure.c (nritemset, closure): Likewise.
1157 * src/closure.h (nritemset, closure): Likewise.
1158 * src/nullable.c (nullable_compute): Likewise.
1159 * src/print.c (print_core): Likewise.
1160 * src/print_graph.c (print_core): Likewise.
1161 * src/state.c (state_compare, state_hash): Likewise.
1162 * src/state.h (struct state): Likewise.
1163 * src/tables.c (default_goto, goto_actions): Likewise.
1164
1165 * src/gram.h (rule_number, rule): Use int, not short int.
1166 * src/output.c (prepare_rules): Likewise.
1167 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
1168 errs, reductions): Likewise.
1169 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
1170 Likewise.
1171 * src/tables.c (vector_number, tally, action_number,
1172 ACTION_NUMBER_MINIMUM): Likewise.
1173 * src/output.c (muscle_insert_short_int_table): Remove.
1174
11752004-12-17 Akim Demaille <akim@epita.fr>
1176
1177 * data/lalr1.cc: Extensive Doxygenation.
1178 (error_): Rename as...
1179 (error): this, since it is visible to the user.
1180 Adjust callers.
1181 (Parser::message): Now an automatic variable from...
1182 (Parser::yyreport_syntax_error_): here.
1183 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
1184 Parser::error.
1185 * tests/input.at: Escape $.
1186
11872004-12-16 Paul Eggert <eggert@cs.ucla.edu>
1188
1189 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
1190 Parenthesize rhs to avoid obscure problems with mistakes like
1191 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
1192 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1193 b4_rhs_location): Likewise.
1194 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
1195 b4_rhs_location): Likewise.
1196
11972004-12-16 Akim Demaille <akim@epita.fr>
1198
1199 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
1200 yacc.c: be sure to stay within yycheck_.
1201 * tests/actions.at: Re-enable C++ tests.
1202
12032004-12-16 Akim Demaille <akim@epita.fr>
1204
1205 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
1206 real.
1207
12082004-12-16 Akim Demaille <akim@epita.fr>
1209
1210 Use #define to handle the %name-prefix.
1211
1212 * data/glr.c, data/yacc.c: Comment changes.
1213 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
1214 so that one can refer to yylex in the parser file, and have it
1215 renamed, as is the case with other skeletons.
1216
12172004-12-16 Akim Demaille <akim@epita.fr>
1218
1219 Move lalr1.cc internals into yy*.
1220
1221 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
1222 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
1223 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
1224 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
1225 (empty_, final_, terror_, errcode_, ntokens_)
1226 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
1227 (looka_, ilooka_, error_range_, nerrs_):
1228 Rename as...
1229 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
1230 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
1231 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
1232 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
1233 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
1234 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
1235 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
1236 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
1237 these.
1238
12392004-12-15 Paul Eggert <eggert@cs.ucla.edu>
1240
1241 Fix some problems reported by twlevo at xs4all.
1242 * src/symtab.c (symbol_new): Report an error if the input grammar
1243 contains too many symbols. This is better than calling abort() later.
1244 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
1245 (struct node, struct graph):
1246 Rename member expand to stretch. All uses changed.
1247 (struct graph): Remove member layoutalgorithm. All uses removed.
1248 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
1249 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
1250 All uses changed.
1251 (N_STRETCH): Rename from N_EXPAND. All uses changed.
1252
12532004-12-15 Akim Demaille <akim@epita.fr>
1254
1255 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
1256 Add more Doxygen comments.
1257 (symprint_, stack_print_, reduce_print_, destruct_, pop)
1258 (report_syntax_error_, translate_): Rename as...
1259 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
1260 (yypop_, yyreport_syntax_error_, yytranslate_): this.
1261
12622004-12-15 Akim Demaille <akim@epita.fr>
1263
1264 * data/lalr1.cc (lex_): Rename as...
1265 (yylex_): this.
1266 Move the trace here.
1267 Take the %name-prefix into account.
1268 Reported by Alexandre Duret-Lutz.
1269
12702004-12-15 Akim Demaille <akim@epita.fr>
1271
1272 Simplify the C++ parser constructor.
1273
1274 * data/lalr1.cc (debug_): Rename as...
1275 (yydebug_): so that the parser's internals are always in the yy*
1276 pseudo namespace.
1277 Adjust uses.
1278 (b4_parse_param_decl): Remove the leading comma as it is now only
1279 called as unique argument list.
1280 (Parser::Parser): Remove the constructor accepting a location and
1281 an initial debugging level.
1282 Remove from the other ctor the argument for the debugging level.
1283 (debug_level_type, debug_level, set_debug_level): New.
1284
1285 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
1286 constructor calls.
1287
12882004-12-15 Akim Demaille <akim@epita.fr>
1289
1290 Remove b4_root related material: failure experiment
1291 (which goal was to allow to derive from a class).
1292
1293 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
1294 definitions and uses.
1295
12962004-12-14 Paul Eggert <eggert@cs.ucla.edu>
1297
1298 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
1299 not 2, since it's not portable to subtract 1 from the start of an
1300 array. The new item 0 is never set or used. All uses changed.
1301
1302 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
1303 the default definition of YYLLOC_DEFAULT. Problem reported
1304 by Frank Heckenbach.
1305
13062004-12-12 Paul Eggert <eggert@cs.ucla.edu>
1307
1308 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
1309 the normal case and one for the error case. Just use the
1310 first one uniformly. Problem reported by Frank Heckenbach.
1311 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
1312 use exactly the same macro in both places.
1313 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
1314 so that the normal-case YYRHSLOC works for the error case too.
1315 All uses changed.
1316 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
1317 (YYLLOC_DEFAULT): Use the same macro as glr.c.
1318 * doc/bison.texinfo (Location Default Action): Don't claim that
1319 we have an array of locations. Use the same macro for both glr
1320 and lalr parsers. Mention YYRHSLOC. Mention what happens when
1321 the index is 0.
1322
13232004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1324
1325 * HACKING: Update email addresses to send announcements to.
1326
1327 * configure.ac (AC_INIT): Bump version to 1.875f.
1328
13292004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1330
1331 * NEWS: Version 1.875e.
1332 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
1333
1334 * src/scan-skel.l: Include "complain.h", for "fatal".
1335
1336 * src/relation.h (relation_print, relation_digraph):
1337 Relation sizes are of type relation_node, not size_t (this is
1338 merely a doc fix, since the two types are equivalent).
1339 (relation_transpose): Relation sizes are of type relation_node,
1340 not int.
1341 * src/relation.c: Likewise.
1342 (top, infinity): Now of type relation_node, not int.
1343 (traverse, relation_transpose): Use relation_node, not int.
1344
1345 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
1346 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
1347 (yyparse): Remove unused local introduced in 2004-10-25 patch.
1348
1349 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
1350 specifying whether the test should be skipped. Use it tp
1351 specify that the [%defines %skeleton "lalr1.cc"] tests currently
1352 fail on some hosts, and should be skipped.
1353
13542004-12-08 Paul Eggert <eggert@cs.ucla.edu>
1355
1356 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
1357 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
1358 unless otherwise specified below.
1359
1360 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
1361 to allocate kernel_base, kernel_items, kernel_size, since
1362 they needn't be initialized to 0.
1363 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
1364 * src/closure.c (new_closure): Likewise, for itemset.
1365 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
1366 * src/lalr.c (set_goto_map): Likewise, for temp_map.
1367 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
1368 (build_relations): Likewise for edge, states1, includes.
1369 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
1370 * src/reader.c (packgram): Likewise, for ritem, rules.
1371 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
1372 * src/relation.c (relation_digraph): Likewise for VERTICES.
1373 (relation_transpose): Likewise for new_R, end_R.
1374 * src/symtab.c (symbols_token_translations_init): Likewise for
1375 token_translations.
1376 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
1377 (token_actions): Likewise for yydefact, actrow, conflrow,
1378 conflict_list.
1379 (save_column): Likewise for froms[symno], tos[symno].
1380 (goto_actions): Likewise for state_count.
1381 (pack_table): Likewise for base, pos, check.
1382 (tables_generate): Likewise for width.
1383
1384 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
1385 for initial core. Just have a separate core, so we needn't worry
1386 about whether kernel_size and kernel_base are initialized.
1387
1388 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
1389 kernel_size, kernel_items): Remove unnecessary initialization.
1390 * src/conflicts.c (conflicts): Likewise.
1391 * src/derives.c (derives): Likewise.
1392 * src/muscle_tablc (muscle_insert): Likewise.
1393 * src/relation.c (relation_digraph): Likewise.
1394 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
1395 conflrow, conflict_table, conflict_list, table, check):
1396 Likewise.
1397
1398 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
1399 This is because all callers pass unsigned int.
1400 * src/closure.h (new_closure): Likewise.
1401
1402 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
1403 (build_relations): Initialize includes[i] in all cases.
1404 * src/reader.c (packgram): Always initialize rules[ruleno].prec
1405 and rules[ruleno].precsym. Initialize members in order.
1406 * src/relation.c (relation_transpose): Always initialize new_R[i]
1407 and end_R[i].
1408 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
1409
1410 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
1411 conflict_list[0] was always 0, but now it isn't initialized.
1412
1413 * src/table.c (table_grow): When conflict_table grew, the grown
1414 area wasn't cleared. Fix this.
1415
1416 * lib/.cvsignore: Add strdup.c, strdup.h.
1417 * m4/.cvsignore: Add strdup.m4.
1418
14192004-12-07 Paul Eggert <eggert@cs.ucla.edu>
1420
1421 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
1422 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
1423 GOTO_NUMBER_MAXIMUM, since we occasionally compute
1424 ngotos + 1 without checking for overflow.
1425 (build_relations): Use END_NODE, not -1, to denote end of edges.
1426 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
1427 build_relations): Use goto_number, not int, for goto numbers.
1428 * src/tables.c (save_column, default_goto): Likewise.
1429
14302004-11-23 Akim Demaille <akim@epita.fr>
1431
1432 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
1433 of #defining from yystype.
1434 Don't typedef yystype, C++ does not need it.
1435 This lets it possible to forward declare it as union.
1436
14372004-11-23 Paul Eggert <eggert@cs.ucla.edu>
1438
1439 * bootstrap (gnulib_modules): Add extensions.
1440 Problem reported by Jim Meyering.
1441
14422004-11-22 Paul Eggert <eggert@cs.ucla.edu>
1443
1444 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
1445 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
1446 src/system.h, src/tables.c: XFREE -> free, to accommodate
1447 recent change to gnulib xalloc.h.
1448 Problem reported by Jim Meyering.
1449
14502004-11-17 Akim Demaille <akim@epita.fr>
1451
1452 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
1453
14542004-10-28 Akim Demaille <akim@epita.fr>,
1455 Alexandre Duret-Lutz <adl@gnu.org>
1456
1457 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
1458 changes.
1459 (YYCDEBUG): Adjust.
1460 Use it instead of cdebug_.
1461 (Parser::debug_stream, Parser::set_debug_stream): New.
1462 (Parser::symprint_): Define cdebug_ for temporary backward
1463 compatibility.
1464 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
1465 debug_stream ().
1466
14672004-11-17 Akim Demaille <akim@epita.fr>
1468
1469 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
1470 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
1471 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
1472 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1473
14742004-10-27 Paul Eggert <eggert@cs.ucla.edu>
1475
1476 * data/glr.c (yyloc_default): Remove; not used.
1477 Problem reported by Frank Heckenbach.
1478
14792004-10-25 Akim Demaille <akim@epita.fr>
1480
1481 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
1482 Introduce another definition to address simple location arrays.
1483 (yyGLRStack): New member: yyerror_range.
1484 (yyrecoverSyntaxError, yyparse): Update it.
1485 (yyrecoverSyntaxError): Use it when shifting the error token to
1486 have an accurate range, equivalent to the one computed by both
1487 yacc.c and lalr1.cc.
1488 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
1489 that column numbers start at column 0, as per GNU Coding
1490 Standards, the others tests, and the doc.
1491 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
1492 Adjust to the above change (first column is 0).
1493 And adjust the location of the "<error>", now covering the whole
1494 line.
1495
14962004-10-22 Akim Demaille <akim@epita.fr>
1497 and Paul Eggert <eggert@cs.ucla.edu>
1498
1499 Remove some arbitrary limits on goto numbers and relations.
1500 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
1501 initial values, since they're never used.
1502 (set_goto_map): ngotos is now unsigned, so test for overflow
1503 by seeing whether it wraps around to zero.
1504 * src/lalr.h (goto_number): Now size_t, not short int.
1505 (GOTO_NUMBER_MAXIMUM): Remove.
1506 * src/relation.c (relation_print, traverse, relation_transpose):
1507 Check for END_NODE rather than looking at sign.
1508 * src/relation.h (END_NODE): New macro.
1509 (relation_node): Now size_t, not short int.
1510
15112004-10-22 Paul Eggert <eggert@cs.ucla.edu>
1512
1513 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
1514 keyword, not an identifier. Problem reported by Baron Schwartz in
1515 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
1516
15172004-10-11 Akim Demaille <akim@epita.fr>
1518
1519 * src/symtab.c (symbol_check_alias_consistency): Also check
1520 type names, destructors, and printers.
1521 Reported by Alexandre Duret-Lutz.
1522 Recode the handling of associativity and precedence in terms
1523 of symbol_precedence_set.
1524 Accept no redeclaration at all, not even equal to the previous
1525 value.
1526 (redeclaration): New.
1527 Use it to factor redeclaration complaints.
1528 (symbol_make_alias): Don't set the type of the alias, let
1529 symbol_check_alias_consistency do it as for other features.
1530 * src/symtab.h (symbol): Add new member prec_location, and
1531 type_location.
1532 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
1533 * tests/input.at (Incompatible Aliases): New.
1534
15352004-10-09 Paul Eggert <eggert@cs.ucla.edu>
1536
1537 .cvsignore fixes to accommodate gnulib changes,
1538 and the practice of naming build directories "_build".
1539 * .cvsignore: Add "_*". Sort.
1540 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
1541 * m4/.cvsignore: Add "*_gl.m4".
1542
15432004-10-06 Akim Demaille <akim@epita.fr>
1544
1545 * src/parse-gram.y (add_param): Fix the truncation of trailing
1546 spaces.
1547
15482004-10-05 Akim Demaille <akim@epita.fr>
1549
1550 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
1551 whether the reducion was empty or not. This leaves room to
1552 improve the use of YYLLOC_DEFAULT in such a case.
1553 lalr1.cc is still experimental, so changing this is acceptable.
1554 And finally, there are probably not many users who changed the
1555 handling of locations in GLR, so changing is admissible too.
1556
1557 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
1558 empty reduction, set @$ to an empty location ending the previously
1559 stacked symbol.
1560 Adjust uses to make sure the code is triggered on empty
1561 reductions.
1562 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
1563 expected output: empty reductions have empty locations.
1564
15652004-09-29 Akim Demaille <akim@epita.fr>
1566
1567 * data/lalr1.cc: Move towards a more standard C++ coding style
1568 for templates: Class < T > -> Class<T>.
1569
15702004-09-29 Akim Demaille <akim@epita.fr>
1571
1572 * data/lalr1.cc: Reinstall the former ctor, for sake of
1573 compatibility, but warn it will be removed.
1574 Move towards a more standard C++ coding style (i.e., type *var ->
1575 type* var).
1576
15772004-09-27 Paul Eggert <eggert@cs.ucla.edu>
1578
1579 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
1580 since it's less likely to work if NULs are involved in the future.
1581
15822004-09-27 Akim Demaille <akim@epita.fr>
1583
1584 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
1585
15862004-09-27 Akim Demaille <akim@epita.fr>
1587
1588 * data/lalr1.cc (b4_parse_param_decl_1): New.
1589 (b4_parse_param_decl): Use it to have different names between attribute
1590 and argument names.
1591 (b4_cc_constructor_call): Likewise.
1592
15932004-09-24 Akim Demaille <akim@epita.fr>
1594
1595 * src/parse-gram.y (add_param): Strip the leading and trailing
1596 blanks from a formal argument declaration.
1597 (YY_LOCATION_PRINT): New.
1598
15992004-09-24 Akim Demaille <akim@epita.fr>
1600
1601 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
1602 after the location.
1603
16042004-09-24 Akim Demaille <akim@epita.fr>
1605
1606 * doc/bison.texinfo (Table of Symbols): Sort.
1607
16082004-09-21 Akim Demaille <akim@epita.fr>
1609
1610 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
1611 the useless parentheses.
1612 Suggested by Paul Eggert.
1613
16142004-09-20 Akim Demaille <akim@epita.fr>
1615
1616 Let the initial-action act on the look-ahead, and use it for the
1617 "initial push" (corresponding to an hypothetical beginning-of-file).
1618 And let lalr1.cc honor %initial-action.
1619
1620 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
1621 example.
1622 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
1623 (Parser::Parser): Remove the ctor that used to initialize it.
1624 (Parser::parse): Like in the other skeletons, issue the "starting
1625 parse" message before any action.
1626 Honor %initial-action.
1627 Initialize the stacks with the lookahead.
1628 * data/yacc.c: Let $$ and @$ in %initial-action designate the
1629 look-ahead.
1630 Push them in the stacks.
1631 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
1632
16332004-09-20 Akim Demaille <akim@epita.fr>
1634
1635 * doc/bison.texinfo (Initial Action Decl): New.
1636
16372004-09-20 Akim Demaille <akim@epita.fr>
1638
1639 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
1640 clearer criterion to define it.
1641 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
1642 When reducing on an empty RHS, use the latest stacked location as
1643 location.
1644 yylloc is not always available.
1645 * data/glr.c: Likewise.
1646 Also, honor initial-actions.
1647
16482004-09-20 Akim Demaille <akim@epita.fr>
1649
1650 * data/yacc.c (YY_LOCATION_PRINT): New.
1651 Define when we know YYLTYPE's structure, i.e., when the default
1652 YYLLOC_DEFAULT is used.
1653 * data/c.m4 (b4_yysymprint_generate): Use it.
1654 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
1655 value of the result.
1656 (error_start_): Replace with...
1657 (error_range_): this location array.
1658 This allows to replace code relying on the implementation of
1659 locations by portable code.
1660 * data/yacc.c (yylerrsp): Replace with...
1661 (yyerror_range): this.
1662 Every time a token is popped, update yyerror_range[0], to have an
1663 accurate location for the error token.
1664 * data/glr.c (YY_LOCATION_PRINT): New.
1665 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
1666 deference a pointer.
1667 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
1668 report the location in %printers.
1669
1670 * src/scan-skel.l: Instead of abort, report error messages to ease
1671 understanding skeleton scanning failures.
1672
16732004-09-16 Akim Demaille <akim@epita.fr>
1674
1675 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
1676 (iterator, const_iterator): these, to be more in the C++ spirit.
1677 Also, return reverse iterators so that when displaying the stack
1678 we display its bottom first.
1679 (Parser::stack_print_, Parser::reduce_print_): Match the messages
1680 from yacc.c.
1681 We should probably use vector here though.
1682
16832004-09-16 Akim Demaille <akim@epita.fr>
1684
1685 Have more complete shift traces.
1686
1687 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
1688 to report Shifts instead of ad hoc YYDPRINTF invocations,
1689 including for the error token.
1690 * data/lalr1.cc (symprint_): Output the location.
1691 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
1692 output the location within the %printer.
1693 Activate GLR tests, at least to make sure they compile properly.
1694 They still don't pass though.
1695 * tests/calc.at: Adjust expect verbose output, since now "Entering
1696 state..." is on a different line than the "Shifting" message.
1697
16982004-09-08 Akim Demaille <akim@epita.fr>
1699
1700 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
1701 Bison directive from the Bison file to the invocation of this
1702 macro, so that these directives are passed to
1703 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
1704 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
1705 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
1706 the extra Bison directives instead of the whole series.
1707 Change the grammar so that there are recoverable errors, and
1708 unrecoverable errors. Now we can have the parser give up before
1709 consuming the whole input. As a result we now can observe that
1710 the lookahead is freed when needed.
1711 Change the parser source to parse argv[1] instead of a hard coded
1712 string.
1713 Simplify yylex, and give a value and location to EOF.
1714 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
1715 passed directives already coded in the file.
1716 Add some tests to check the location of "error".
1717 For some tests, the C++ parser is correct, and not yacc.c.
1718 For other tests, they provide different, but unsatisfying, values,
1719 so keep the C++ value so that at least one parser is "correct"
1720 according to the test suite.
1721 (Actions after errors): Remove, this is subsumed by the
1722 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
1723
17242004-09-06 Akim Demaille <akim@epita.fr>
1725
1726 * data/lalr1.cc: Adjust the indentation of the labels.
1727 (Parser::pop): New.
1728 Use it.
1729
17302004-09-06 Akim Demaille <akim@epita.fr>
1731
1732 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
1733 argument, an informative message.
1734 Call YY_SYMBOL_PRINT.
1735 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
1736 * data/lalr1.cc (destruct_): Likewise.
1737 In addition, no longer depend on b4_yysymprint_generate and
1738 b4_yydestruct_generate to generate these functions, do it "by
1739 hand".
1740
17412004-09-03 Akim Demaille <akim@epita.fr>
1742
1743 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
1744 invoked, yydestruct the lookahead.
1745 * tests/calc.at (Calculator $1): Update the expected lengths of
1746 traces: there is an added line for the discarded lookahead.
1747 * doc/bison.texinfo (Destructor Decl): Some rewording.
1748 Define "discarded" symbols.
1749
17502004-09-02 Akim Demaille <akim@epita.fr>
1751
1752 * data/lalr1.cc (translate_, destruct_): No reason to be static.
1753
17542004-09-02 Akim Demaille <akim@epita.fr>
1755
1756 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
1757 (YYDSYMPRINTF): Rename as...
1758 (YY_SYMBOL_PRINT): this.
1759 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
1760 two.
1761 Use it instead of direct symprint_ calls.
1762 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
1763 one.
1764
17652004-09-02 Akim Demaille <akim@epita.fr>
1766
1767 * data/lalr1.cc (b4_yysymprint_generate): New.
1768 (symprint_): New member function, defined when YYDEBUG.
1769 Use it consistently instead of token/nterm debugging output by
1770 hand.
1771 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
1772 %printer calls to use cdebug_ when using lalr1.cc.
1773
17742004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
1775
1776 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
1777 with #ifdef YYDEBUG.
1778
17792004-08-26 Akim Demaille <akim@epita.fr>
1780
1781 * doc/bison.texinfo (Implementing Loops): Rename as...
1782 (Implementing Gotos/Loops): this.
1783
17842004-08-13 Paul Eggert <eggert@cs.ucla.edu>
1785
1786 Adjust to latest gnulib.
1787 * bootstrap (gnulib_modules): Add xalloc-die.
1788 Set LC_ALL=C so that file names sort consistently.
1789 Prefer the gnulib copies of gettext.m4, glibc21.m4,
1790 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
1791 uintmax_t.m4, ulonglong.m4.
1792 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
1793 po.m4 since we are now using _gl.m4 instead.
1794
17952004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
1796
1797 * src/scan-action.l: Remove. Scanning of semantic actions is
1798 handled in scan-gram.l.
1799
18002004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
1801
1802 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
1803
1804 * src/location.h (struct): The file member is a uniqstr.
1805 (equal_boundaries): Use UNIQSTR_EQ for comparison.
1806
18072004-07-22 Paul Eggert <eggert@cs.ucla.edu>
1808
1809 Fix bug with non-%union parsers that have printers or destructors,
1810 which led to a Bison core dump. Reported by Peter Fales in
1811 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
1812
1813 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
1814 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
1815 not to our own type.
1816 * src/output.c (symbol_destructors_output, symbol_printers_output):
1817 Don't assume %union.
1818 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
1819 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
1820 UNION-FLAG. All callers changed.
1821 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
1822 Use type char, not unsigned int, when declaring an array of char;
1823 this lets us remove a cast.
1824 (Printers and Destructors): Add non-%union test cases.
1825
18262004-06-21 Paul Eggert <eggert@cs.ucla.edu>
1827
1828 * doc/bison.texinfo: Minor editorial changes, mostly to the new
1829 GLR writeups. E.g., avoid frenchspacing and the future tense,
1830 change "lookahead" to "look-ahead", and change "wrt" to "with
1831 respect to".
1832
18332004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1834
1835 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
1836 New sections, split off from the GLR Parsers section. Put the new
1837 Simple GLR Parser near the start of the GLR section, for clarity.
1838 Rewrite connective text.
1839
18402004-06-21 Frank Heckenbach <frank@g-n-u.de>
1841
1842 * doc/bison.texinfo (Simple GLR Parsers): New section.
1843
18442004-06-21 Paul Eggert <eggert@cs.ucla.edu>
1845
1846 * NEWS, TODO, doc/bison.texinfo:
1847 Use "look-ahead" instead of "lookahead", to be consistent.
1848 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
1849 while we're fixing "look-ahead".
1850 * src/conflicts.c (shift_set): Renamed from shiftset.
1851 (look_ahead_set): Renamed from lookaheadset.
1852 * src/print.c: Likewise.
1853 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
1854 name for "lookahead".
1855 (report_types, usage): Likewise.
1856 * src/getargs.h (report_look_ahead_tokens): Renamed from
1857 report_lookaheads.
1858 * src/lalr.c (compute_look_ahead_tokens): Renamed from
1859 compute_lookaheads.
1860 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
1861 (look_ahead_tokens_print): Renamed from lookaheads_print.
1862 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
1863 state_rule_lookaheads_print.
1864 * src/state.h: Likewise.
1865 (reductions.look_ahead_tokens): Renamed from lookaheads.
1866 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
1867 AT_DATA_LOOKAHEADS_GRAMMAR.
1868
18692004-06-03 Paul Eggert <eggert@cs.ucla.edu>
1870
1871 * README: Update location of patched M4 distribution.
1872
18732004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
1874
1875 Don't assume the C++ compiler takes the same arguments as the C compiler
1876 (trivial change).
1877 * configure.ac (O0CXXFLAGS): New var.
1878 * tests/atlocal.in (CXXFLAGS): Use it.
1879
18802004-05-29 Paul Eggert <eggert@cs.ucla.edu>
1881
1882 Fix some "make check" problems with C++ reported by
1883 Albert Chin-A-Young for Tru64 C++ in this thread:
1884 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
1885
1886 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
1887 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1888 Output to a .cc file for C++, not to a .c file.
1889 * tests/calc.at (AT_CHECK_CALC): Likewise.
1890 * tests/regression.at (AT_CHECK_DANCER): Likewise.
1891 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
1892
18932004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
1894
1895 * tests/calc.at, tests/actions.at: Workaround for SGI
1896 C++ compiler. (trivial change)
1897
18982004-05-27 Paul Eggert <eggert@cs.ucla.edu>
1899
1900 Spent a few hours checking out which prerequisite versions the
1901 current sources actually require. I went all the way back to
1902 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
1903 a seemingly endless set of combinations of versions more recent
1904 than that. The bottom line is that the current sources require
1905 fairly recent versions of the build tools, and it'll be some work
1906 to change this.
1907 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
1908 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
1909 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
1910 Add comments explaining why those particular versions are
1911 currently needed.
1912
1913 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
1914 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
1915 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
1916
1917 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
1918 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
1919
19202004-05-26 Paul Eggert <eggert@cs.ucla.edu>
1921
1922 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
1923 0.11.5. Suggested by Bruno Haible.
1924 * bootstrap: Remove gettext version checking.
1925
1926 * doc/bison.texinfo (Decl Summary): Also mention that %union
1927 can depend on prerequisite types. Problem reported by Tim
1928 Van Holder.
1929
19302004-05-25 Paul Eggert <eggert@cs.ucla.edu>
1931
1932 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
1933 * README-alpha: Don't tell people not to package this.
1934
1935 * bootstrap: Don't assume $(...) works; use `...` instead.
1936 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
1937 gettext better.
1938
1939 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
1940 put into the -d output file, and mention what to do if YYSTYPE is
1941 defined as a macro.
1942
19432004-05-24 Paul Eggert <eggert@cs.ucla.edu>
1944
1945 Undo change made earlier today: it caused autopoint to not bring
1946 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
1947 autopoint's.
1948
1949 * bootstrap: Check that gettext version matches what's in
1950 configure.ac. Warn users to ignore robots.txt ERROR 404.
1951 * bootstrap: Undo today's earlier change (logged below).
1952 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
1953
1954 The gettext version checking is causing more trouble than it's
1955 curing; remove it. Problem reported by Paul Hilfinger.
1956
1957 * bootstrap: Issue a warning that one can expect a message
1958 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
1959 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
1960
19612004-05-23 Paul Eggert <eggert@cs.ucla.edu>
1962
1963 Ensure that the C++ compiler used for testing actually works on a
1964 simple test program; if not, skip the C++-related tests. Problem
1965 reported by Vin Shelton in:
1966 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
1967
1968 * m4/cxx.m4: New file.
1969 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
1970 * tests/atlocal.in (BISON_CXX_WORKS): Add.
1971 * tests/local.at (AT_COMPILE_CXX): Use it.
1972
19732004-05-21 Paul Eggert <eggert@cs.ucla.edu>
1974
1975 * data/glr.c (yylloc): Output this macro even if locations are not
1976 being generated, as the GLR parser needs it even in that case.
1977 Problem reported by Troy A. Johnson
1978 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
1979
1980 * configure.ac (AC_INIT): Update to 1.875e.
1981
19822004-05-21 Paul Eggert <eggert@cs.ucla.edu>
1983
1984 * NEWS: Version 1.875d.
1985 * configure.ac (AC_INIT): Likewise.
1986 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
1987
1988 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
1989 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
1990 lalr1.cc runs afoul of the first, and the last two are no longer
1991 supported by GCC 3.4.0.
1992 * README: Mention GNU m4 1.4 or later; mention m4 patches.
1993 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
1994
19952004-05-06 Paul Eggert <eggert@cs.ucla.edu>
1996
1997 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
1998 unsigned int, for compatibility with latest gnulib hash module.
1999 * src/state.c (state_hash, state_hasher): Likewise.
2000 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
2001 * src/uniqstr.c (hash_uniqstr): Likewise.
2002
20032004-05-03 Paul Eggert <eggert@cs.ucla.edu>
2004
2005 * NEWS: Unescaped newlines are no longer allowed in char & strings.
2006
2007 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
2008 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
2009 character and string literals.
2010 (unexpected_end): New function.
2011 (unexpected_eof): Use it.
2012 (unexpected_newline): New function.
2013 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
2014 actions.
2015
2016 * NEWS: Document %expect-rr.
2017
2018 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
2019 Fix typo by replacing $1 with $option.
2020 Remove more 'intl'-related files.
2021 Don't DEFUN AM_INTL_SUBDIR twice.
2022
2023 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
2024 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
2025 strtoul.c.
2026 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
2027 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
2028 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
2029 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
2030 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
2031 * src/.cvsignore: Add *.output.
2032
2033 * src/parse-gram.y: Put copyright notice inside %{ %} so it
2034 gets copied to the output file.
2035
20362004-04-28 Paul Eggert <eggert@twinsun.com>
2037
2038 Get files from the gnulib and po repositories, instead of relying
2039 on them being in our CVS. Upgrade to latest versions of gnulib
2040 and Automake.
2041
2042 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
2043 * bootstrap: Bootstrap from gnulib and po repositories.
2044 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
2045 * README-cvs: Document these changes. Remove version numbers from
2046 mentions of build tools, since they change so often. Mention Flex.
2047
2048 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
2049 (gl_USE_SYSTEM_EXTENSIONS): Add.
2050 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
2051 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
2052 does this for us.
2053 (AC_ISC_POSIX): Remove; we no longer support this
2054 ancient OS, as it gets in the way of latest Autoconf & gnulib.
2055 (AC_HEADER_STDC): Remove: we now assume C89 or better.
2056 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
2057 Do not check for C89 headers, except for locale.h which is used
2058 by the Yacc library and must port to K&R hosts.
2059 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
2060 Do not check for C89 functions, except for setlocale which is
2061 used by the Yacc library.
2062 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
2063 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
2064 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
2065 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
2066 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
2067 AM_GNU_GETTEXT): Remove; now done by:
2068 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
2069 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
2070 for us.
2071
2072 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
2073 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
2074 Define to empty, as gnulib.mk will do the rest for us.
2075 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
2076 for us.
2077 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
2078 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
2079
2080 * src/files.c: Include gnulib's xstrndup.h.
2081
2082 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
2083 (REALLOC): Use xnrealloc, for likewise.
2084 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
2085 (strnlen, memrchr): Remove decls; functions no longer used.
2086 Include <stpcpy.h>.
2087
2088 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
2089 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
2090 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
2091 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
2092 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
2093 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
2094 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
2095 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
2096 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
2097 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
2098 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
2099 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
2100 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
2101 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
2102 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
2103 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
2104 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
2105 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
2106 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
2107 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
2108 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
2109 Remove, as these files are now generated automatically
2110 by bootstrap or automake.
2111
2112 * po/ChangeLog: Remove: all but one entry was a duplicate
2113 of this file, and I moved that 2000-11-02 entry here.
2114
2115 * config/.cvsignore: Add Makefile, depcomp, install-sh.
2116 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
2117 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
2118 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
2119 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
2120 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
2121 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
2122 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
2123 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
2124 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
2125 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
2126 xstrndup.h.
2127 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
2128 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
2129 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
2130 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
2131 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
2132 * src/.cvsignore: Remove *_.c.
2133
2134
2135 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
2136 support it. (The latest stable gzip doesn't.)
2137
21382004-04-27 Paul Eggert <eggert@twinsun.com>
2139
2140 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
2141 case, as stos_ is now used by destructors due to the 2004-02-09
2142 change.
2143
2144 Remove more K&R C support.
2145 * lib/libiberty.y (PARAMS): Remove. All uses removed.
2146 * lib/subpipe.c (errno): Remove decl.
2147 Include <stdlib.h> unconditionally.
2148 (EXIT_FAILURE): Remove macro.
2149 * src/complain.c (vfprintf, strerror): Remove.
2150 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
2151 unconditionally.
2152 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
2153 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
2154 (strchr, strspn, memchr): Remove decls.
2155 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
2156 unconditionally. Do not declare perror.
2157 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
2158 unconditionally.
2159
2160 * src/complain.c (_): Remove useless defn, as system.h defines this.
2161
2162 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
2163 with latest obstack.h.
2164 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
2165 to procedure types, as obstack.h now does that for us.
2166 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
2167
2168 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
2169 so that this include file can stand alone.
2170 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
2171 does this now. Include subpipe.h first after config.h, to
2172 test whether it can stand alone.
2173
2174 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
2175 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
2176 unused declaration.
2177
2178 * tests/synclines.at (%union synch line): Put a dummy member in
2179 the union, because empty unions aren't allowed in C. Caught
2180 by GCC 3.4.0.
2181
21822004-04-13 Jim Meyering <jim@meyering.net>
2183
2184 * src/conflicts.c (conflicts_print): Correct format string typo:
2185 use `%%' to produce literal `%'. (trivial change)
2186
21872004-03-30 Paul Eggert <eggert@twinsun.com>
2188
2189 * src/getargs.c (version): Update copyright year to 2004.
2190
2191 * data/c.m4 (b4_int_type): Use 'short int' rather than
2192 'short', and similarly for 'long', 'unsigned', etc.
2193 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
2194 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
2195 yy_yypstack, yydumpstack): Likewise.
2196 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
2197 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
2198 Likewise.
2199 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
2200 yy_stack_print, yyparse): Likewise.
2201 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
2202 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
2203 * lib/bitset.c (bitset_print): Likewise.
2204 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
2205 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
2206 * lib/bitsetv.c (bitsetv_dump): Likewise.
2207 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
2208 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
2209 Likewise.
2210 * src/LR0.c (allocate_itemsets): Likewise.
2211 * src/gram.h (rule_number, rule): Likewise.
2212 * src/lalr.h (goto_number): Likewise.
2213 * src/nullable.c (nullable_compute): Likewise.
2214 * src/output.c (prepare_rules): Likewise.
2215 * src/relation.c (relation_print, relation_digraph): Likewise.
2216 * src/relation.h (relation_node): Likewise.
2217 * src/state.h (state_number, transitions, errs, reductions,
2218 struct state): Likewise.
2219 * src/symtab.h (symbol_number, struct symbol): Likewise.
2220 * src/tables.c (vector_number, tally, action_number,
2221 default_goto, goto_actions): Likewise.
2222 * tests/existing.at (GNU Cim Grammar): Likewise.
2223 * tests/regression.at (Web2c Actions): Likewise.
2224
2225 * src/output.c (muscle_insert_short_int_table): Renamed from
2226 muscle_insert_short_table. All uses changed.
2227
22282004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
2229
2230 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
2231 (declaration): Replace expected_conflicts with expected_sr_conflicts.
2232 Add %expect-rr rule.
2233
2234 * src/scan-gram.l: Recognize %expect-rr.
2235
2236 * src/conflicts.h (expected_sr_conflicts): Rename from
2237 expected_conflicts.
2238 (expected_rr_conflicts): Declare.
2239
2240 * src/conflicts.c (expected_sr_conflicts): Rename from
2241 expected_conflicts.
2242 (expected_rr_conflicts): Define.
2243 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
2244 for GLR parsers.
2245 Use expected_sr_conflicts in place of expected_conflicts.
2246 Warn if expected_rr_conflicts used in non-GLR parser.
2247
2248 * doc/bison.texinfo: Add documentation for %expect-rr.
2249
22502004-03-08 Paul Eggert <eggert@gnu.org>
2251
2252 Add support for hex token numbers. Suggested by Odd Arild Olsen in
2253 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
2254
2255 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
2256 in lalr1.cc.
2257 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
2258 * src/scan-gram.l (scan_integer): New function.
2259 ({int}): Use it.
2260 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
2261 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
2262 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
2263 Say "long int", not "long", for uniformity with GNU style.
2264
22652004-02-25 Paul Eggert <eggert@twinsun.com>
2266
2267 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
2268 compilers. This fixes a problem with Intel's C++ compiler being
2269 chatty, reported by Guido Trentalancia in
2270 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
2271
22722004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
2273
2274 Support %destructor and merge error locations in lalr1.cc.
2275
2276 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
2277 (Parser::stos_): Define unconditionally.
2278 (Parser::destruct_): New method. Generate its body with
2279 b4_yydestruct_generate.
2280 (Parser::error_start_): New attribute.
2281 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
2282 token which are discarded.
2283 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
2284 error_start_ when erroneous token are discarded.
2285 (Parser::parse) <yyerrlab1>: Compute the location of the error
2286 token so that it covers all the discarded tokens.
2287 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
2288 it can be called with `%skeleton "lalr1.cc"', and do that.
2289
22902004-02-02 Paul Eggert <eggert@twinsun.com>
2291
2292 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
2293 $(top_srcdir)/lib and ../lib. This fixes a bug reported
2294 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
2295 There's no need to mention top_builddir since Automake does that
2296 for us.
2297 (INCLUDES): Remove, as Automake says it's obsolescent.
2298 Contents migrated into AM_CPPFLAGS as described above.
2299 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
2300
23012004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2302
2303 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
2304 (yyreportSyntaxError): Handle case where lookahead token is
2305 YYEMPTY.
2306
23072004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2308
2309 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
2310 resulting parsers are compilable with C++.
2311
23122003-12-23 Paul Eggert <eggert@twinsun.com>
2313
2314 * config/depcomp, config/install-sh: Sync with Automake 1.8.
2315 * src/output.c (output_skeleton): Rename local var.
2316 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
2317 Bison tokens, as this runs afoul of the 2003-10-07 change that
2318 disallowed NUL bytes in character constants or string literals.
2319
2320 * tests/local.at: Require Autoconf 2.59's Autotest.
2321 * tests/testsuite.at: Don't include local.at, since we now assume
2322 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
2323 including it.
2324 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
2325 multiple inclusion warnings.
2326
23272003-12-02 Akim Demaille <akim@epita.fr>
2328
2329 * doc/bison.texinfo (How Can I Reset the Parser): More about start
2330 conditions.
2331 From Bruno Haible.
2332
23332003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
2334
2335 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
2336
23372003-10-07 Paul Eggert <eggert@twinsun.com>
2338
2339 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
2340 if testsuite doesn't exist.
2341
2342 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
2343 literals, unfortunately.
2344 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
2345 Complain about NUL bytes in character constants or string literals.
2346
23472003-10-05 Paul Eggert <eggert@twinsun.com>
2348
2349 * NEWS: Don't document %no-default-prec, as it's still
2350 too experimental.
2351 * doc/bison.texinfo: Document %no-default-prec only if
2352 the defaultprec flag is set. Normally it's not.
2353
23542003-10-04 Paul Eggert <eggert@twinsun.com>
2355
2356 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
2357 non-modifiable lvalue, instead of a modifiable one.
2358 * doc/bison.texinfo (Actions): Document that $$ can
2359 be assigned to. Do not claim that $$ and $N are
2360 array element references: user code should not rely on this.
2361
23622003-10-01 Paul Eggert <eggert@twinsun.com>
2363
2364 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
2365 (grammar_declaration): Use it.
2366 * src/scan-gram.l: New token %no-default-prec.
2367 * tests/conflicts.at: Revamp tests to use %no-default-prec.
2368 * NEWS, doc/bison.texinfo: Document the above.
2369
23702003-10-01 Akim Demaille <akim@epita.fr>
2371
2372 VCG no longer supports long_straight_phase.
2373
2374 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
2375 * src/print_graph.c (print_graph): Adjust.
2376
23772003-09-30 Frank Heckenbach <frank@g-n-u.de>
2378 and Paul Eggert <eggert@twinsun.com>
2379
2380 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
2381 Table of Symbols): Document %default-prec.
2382 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
2383 (grammar_declaration): Set default_prec on %default-prec.
2384 * src/scan-gram.l (%default-prec): New token.
2385 * src/reader.h (default_prec): New flag.
2386 * src/reader.c: Likewise.
2387 (packgram): Handle it.
2388 * tests/conflicts.at (%default-prec without %prec,
2389 %default-prec with %prec, %default-prec 1): New tests.
2390
23912003-09-30 Paul Eggert <eggert@twinsun.com>
2392
2393 * tests/testsuite.at: Include local.at, not input.at, fixing
2394 a typo in the 2003-08-25 patch.
2395
23962003-08-27 Akim Demaille <akim@epita.fr>
2397
2398 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
2399 GCC warnings.
2400
24012003-08-26 Akim Demaille <akim@epita.fr>
2402
2403 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
2404 "<\#" to avoid magic from Gnus when posting parts of this script.
2405
24062003-08-26 Akim Demaille <akim@epita.fr>
2407
2408 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
2409 (Parser::parse): here.
2410 Adjust: nerrs and errstatus is now replaced by...
2411 (Parser::nerrs_, Parser::errstatus_): New.
2412
24132003-08-25 Akim Demaille <akim@epita.fr>
2414
2415 * config/announce-gen, Makefile.cfg: New.
2416 * Makefile.am: Adjust.
2417 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
2418 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
2419
24202003-08-25 Akim Demaille <akim@epita.fr>
2421
2422 When reducing initial empty rules, Bison parser read an initial
2423 location that is not defined. This results in garbage, and that
2424 affects Bison's own parser. Therefore we need (i) to extend Bison
2425 to support a means to initialize this location, and (ii) to use
2426 this CVS Bison to fix CVS Bison's parser.
2427
2428 * src/reader.h, reader.c (epilogue_augment): Remove, replace
2429 with...
2430 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
2431 * src/parse-gram.y: Adjust.
2432 (%initial-action): New.
2433 (%error-verbose): Since we require CVS Bison, there is no reason
2434 not to use it.
2435 * src/scan-gram.l: Adjust.
2436 * src/Makefile.am (YACC): New, to make sure we use our own parser.
2437 * data/yacc.c (yyparse): Use b4_initial_action.
2438
24392003-08-25 Akim Demaille <akim@epita.fr>
2440
2441 * doc/bison.texinfo: Don't promote stdout for error messages.
2442
24432003-08-25 Akim Demaille <akim@epita.fr>
2444
2445 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
2446 From Alexandre Duret-Lutz.
2447
24482003-08-25 Akim Demaille <akim@epita.fr>
2449
2450 Version 1.875c.
2451
24522003-08-25 Akim Demaille <akim@epita.fr>
2453
2454 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
2455 Use them.
2456
24572003-08-25 Akim Demaille <akim@epita.fr>
2458
2459 * data/lalr1.cc (Parser::reduce_print_): New.
2460 Use it.
2461
24622003-08-25 Akim Demaille <akim@epita.fr>
2463
2464 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
2465 error recovery loops. This patch is based on
2466 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
2467 Also, augment the similarity between lalr1.cc and yacc.c.
2468 Note: the locations of error recovery rules are not correct yet.
2469
2470 * data/lalr1.cc: Comment changes to augment the similarity between
2471 lalr1.cc and yacc.c.
2472 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
2473 (yyerrlab1): Remove, but where it used to be (now the bottom part of
2474 yyerrlab), when hitting EOF, pop the whole stack here instead of
2475 merely falling thru the default error handling mechanism.
2476 (yyerrorlab): New label, with the old contents of YYERROR,
2477 plus the following change: pop the stack of rhs corresponding
2478 to the production that invoked YYERROR. That is how Yacc
2479 behaves (required by POSIX).
2480 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
2481 fail.
2482
24832003-08-25 Akim Demaille <akim@epita.fr>
2484
2485 Tune local.at so that people can "autom4te -l autotest calc.at -o
2486 calc" for instance, to extract a sub test suite.
2487
2488 * tests/testsuite.at: Move the initialization, Autotest version
2489 requirement, and AT_TESTED invocation into...
2490 * tests/local.at: here.
2491 * tests/testsuite.at: Include it for compatibility with Autoconf
2492 2.57.
2493 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
2494 be ignore.
2495
24962003-08-04 Paul Eggert <eggert@twinsun.com>
2497
2498 Rework code slightly to avoid gcc -Wtraditional warnings.
2499 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
2500 The returned value is now stored in *YY0. All callers changed.
2501 * src/output.c (merge_output): Adjust to the above change.
2502
25032003-07-26 Paul Eggert <eggert@twinsun.com>
2504
2505 * data/glr.c (YYASSERT): New macro.
2506 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
2507 yyresolveStates, yyprocessOneStack):
2508 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
2509 Derived from a suggestion by Frank Heckenbach.
2510
25112003-07-25 Paul Eggert <eggert@twinsun.com>
2512
2513 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
2514 for portability to K&R C (after ansi2knr, presumably). See
2515 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
2516 by Frank Heckenbach, though I have omitted the structure-initialization
2517 part of his glr-knr.diff patch since I recall that the Portable
2518 C Compiler didn't require that change.
2519
2520 Let the user specify how to allocate and free memory.
2521 Derived from a suggestion by Frank Heckenbach in
2522 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
2523 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
2524 All uses of free, malloc, realloc changed to use these macros,
2525 and unnecessary casts removed.
2526 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
2527
25282003-07-06 Matthias Mann <MatthiasMann@gmx.de>
2529
2530 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
2531 use s.empty() rather than s == "" to test for empty string; see
2532 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
2533 (trivial change)
2534
25352003-06-25 Akim Demaille <akim@epita.fr>
2536
2537 * config/depcomp, config/install-sh: Update from masters.
2538
25392003-06-20 Paul Eggert <eggert@twinsun.com>
2540
2541 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
2542 and return properly parenthesized result.
2543 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
2544 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
2545 Remove unnecessary parentheses from uses.
2546 * doc/bison.texinfo (Location Default Action): Describe the
2547 conventions for parentheses.
2548
25492003-06-19 Paul Eggert <eggert@twinsun.com>
2550
2551 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
2552 yyreportTree): Do not assume that size_t is the same width as int,
2553 when printing sizes. Print sizes using an unsigned format.
2554 Problem reported by Frank Heckenbach in
2555 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
2556
2557 Port to Forte Developer 7 C compiler.
2558 * data/glr.c (struct YYLTYPE): If locations are not being used,
2559 declare a single dummy member, as empty structs do not conform
2560 to the C standard.
2561 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
2562 the Forte Developer 7 C compiler complains that end-of-loop
2563 code is not reached.
2564
25652003-06-17 Paul Eggert <eggert@twinsun.com>
2566
2567 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
2568 avoid warnings from picky compilers about redefinition of PARAMS.
2569
25702003-06-17 Paul Eggert <eggert@twinsun.com>
2571
2572 Version 1.875b.
2573
2574 * NEWS: Document 1.875b.
2575
2576 * lib/bbitset.h: Do not include config.h; that's the includer's job.
2577 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
2578 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
2579 Don't use 'index' in comments, as it's a builtin fn on some hosts.
2580 * lib/bitset_stats.c: Include gettext.h unconditionally, as
2581 per recent gettext manual's suggestion.
2582 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
2583 Use prototypes, not old-style definitions.
2584 * lib/lbitset.c (lbitset_unused_clear): Likewise.
2585 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
2586 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
2587 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
2588 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
2589 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
2590 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
2591 vbitset_or_and_cmp, vbitset_copy): Likewise.
2592
2593 * lib/libiberty.h: Do not include config.h; that's the includer's job.
2594 Do not include <stdlib.h>.
2595 (PARAMS): Define unconditionally for C89.
2596 (ATTRIBUTE_NORETURN): Remove.
2597 (ATTRIBUTE_UNUSED): Define unconditionally.
2598
2599 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
2600 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
2601 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
2602 * lib/vbitset.c, lib/vbitset.h: New files.
2603 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2604 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
2605 from libbitset.
2606
2607 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
2608 `How Can I Reset @code{yyparse}', since texinfo does not allow
2609 arbitrary @ in node names.
2610
2611 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
2612 shouldn't be needed according to the gettext 0.12.1 documentation
2613 but which seem to be needed anyway: codeset.m4 glibc21.m4
2614 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
2615 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
2616 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
2617
2618 * lib/.cvsignore: Add stdbool.h.
2619 * m4/.cvsignore: Add nls.m4, po.m4.
2620
2621 Upgrade to CVS gnulib.
2622 * stdbool_.h: File renamed from stdbool.h.in.
2623 * configure.ac (AM_STDBOOL_H): Invoke this instead of
2624 AC_HEADER_STDBOOL.
2625 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
2626 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
2627 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
2628 (MOSTLYCLEANFILES): New var.
2629 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
2630 (stdbool.h): New rule.
2631 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
2632 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
2633 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
2634 m4/quote.m4: Upgrade to today's gnulib.
2635
2636 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
2637 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
2638 the tests right now.
2639 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
2640 yyerror are declared before use; C99 requires this.
2641
26422003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2643
2644 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
2645 first.
2646 (yyrecoverSyntaxError): Correct the logic for setting and testing
2647 yyerrState.
2648 Correct comment on handling EOF.
2649 Allow states with only a default reduction, rather than failing
2650 (I can't quite reconstruct why these were not allowed before).
2651
2652 Fixes to avoid problem that $-N rules in GLR parsers can cause
2653 buffer overruns, corrupting state.
2654
2655 * src/output.c (prepare_rules): Output max_left_semantic_context
2656 definition.
2657 * src/reader.h (max_left_semantic_context): New variable declaration.
2658 * src/scan-gram.l (max_left_semantic_context): Define.
2659 (handle_action_dollar): Update max_left_semantic_context.
2660 * data/glr.c (YYMAXLEFT): New definition.
2661 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
2662 (yyresolveAction): Ditto.
2663
2664 Fixes to problems with location handling in GLR parsers reported by
2665 Frank Heckenbach (2003/06/05).
2666
2667 * data/glr.c (YYLTYPE): Make trivial if locations not used.
2668 (YYRHSLOC): Add parentheses, and define only if locations used.
2669 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
2670 locations not used.
2671 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
2672 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
2673
2674 * tests/cxx-type.at: Exercise location information; update tests
2675 to differentiate output with and without locations.
2676 Remove forward declarations of yylex and yyerror---caused errors
2677 because default YYLTYPE not yet defined.
2678 Change semantic actions to compute strings, rather than printing
2679 them directly (to test proper passing of semantics values). Change
2680 output to prefix notation and update test data and expected results.
2681 (yylex): Track locations.
2682 (stmtMerge): Return value rather than printing, and include arguments
2683 in value.
2684
26852003-06-03 Paul Eggert <eggert@twinsun.com>
2686
2687 Avoid warnings generated by GCC 2.95.4 when Bison is
2688 configured with --enable-gcc-warnings.
2689 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
2690 yy::]b4_parser_class_name[::translate_,
2691 yy::Stack::operator[] (unsigned),
2692 yy::Stack::operator[] (unsigned) const,
2693 yy::Slice::operator[] (unsigned),
2694 yy::Slice::operator[] (unsigned) const):
2695 Rename local vars to avoid warnings.
2696 * tests/glr-regression.at (Improper handling of embedded actions
2697 and $-N in GLR parsers): Remove unused local variable from yylex.
2698 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
2699 (void) as arg when not pure, since we now assume C89 when building
2700 Bison. Pacify GCC by using parameter.
2701
27022003-06-02 Paul Eggert <eggert@twinsun.com>
2703
2704 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
2705 yy::Location::lines, yy::Location::columns): Rename arguments
2706 to avoid shadowing; this removes a warning generated by GCC 3.3.
2707
27082003-06-01 Paul Eggert <eggert@twinsun.com>
2709
2710 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
2711 to g++, as GCC 3.3 complains if you do it.
2712 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
2713 everything that WARNING_CFLAGS has, except omit warnings
2714 not suitable for C++.
2715 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
2716 * tests/atlocal.in (CXXFLAGS): New var.
2717 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
2718
2719 Fix a GLR parser bug I reported in February; see
2720 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
2721 The problem was that GLR parsers did not conform to the C standard,
2722 because actions like { $1 = $2 + $3; } expanded to expressions
2723 that invoked YYFILL in separate subexpressions, and YYFILL assigned
2724 to a local variable. The C standard says that expressions
2725 like (var = f ()) + (var = f ()) have undefined behavior.
2726 Another problem was that GCC sometimes issues warnings that
2727 yyfill and its parameters are unused.
2728
2729 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
2730 as possibly unused.
2731 (yyfill): New function.
2732 (YYFILL): Use it.
2733 (yyuserAction): Change type of yynormal to bool, so that it matches
2734 the new yyfill signature. Mark it as possibly unused.
2735
2736
2737 Follow up on a bug I reported in February, where a Bison-generated
2738 parser can loop. Provide a test case and a fix for yacc.c. I
2739 don't have a fix for lalr1.cc or for glr.c, unfortunately.
2740 The original bug report is in:
2741 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
2742
2743 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
2744 macro's size was becoming unwieldy.
2745 (yyerrlab): Do not discard an empty lookahead symbol, as this
2746 might destroy garbage.
2747 (yyerrorlab): New label, with the old contents of YYERROR,
2748 plus the following change: pop the stack of rhs corresponding
2749 to the production that invoked YYERROR. That is how Yacc
2750 behaves, and POSIX requires this behavior.
2751 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
2752 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
2753 Define 'alarm' to do nothing if unistd.h is not available.
2754 Add a new rule "exp: '-' error;" to test the above change to
2755 data/yacc.c. Use 'alarm' to abort any test taking longer than
2756 10 seconds, as it's probably looping.
2757 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
2758 Also, the new yacc.c generates two fewer diagnostics for an
2759 existing test.
2760
27612003-05-24 Paul Eggert <eggert@twinsun.com>
2762
2763 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
2764 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
2765 This fixes a problem reported by John Bowman when the Compaq/HP
2766 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
2767 -ansi -Wall -gall).
2768 * data/yacc.c (union yyalloc): Likewise.
2769 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
2770
2771 Switch from 'int' to 'bool' where that makes sense.
2772
2773 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
2774 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
2775 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
2776 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
2777 Return or accept bool, not int. All callers changed.
2778 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
2779 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
2780 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
2781 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
2782 bitset_or_and_cmp_): Likewise.
2783 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
2784 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
2785 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
2786 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
2787 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
2788 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
2789 bitset_stats_or_and_cmp): Likewise.
2790 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
2791 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
2792 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
2793 ebitset_xor_cmp): Likewise.
2794 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
2795 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
2796 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
2797 lbitset_xor_cmp): Likewise.
2798 * lib/bbitset.h: Include <stdbool.h>.
2799 (struct bitset_vtable): The following members now return bool, not
2800 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
2801 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
2802 or_and_cmp).
2803 * src/conflicts.c (count_rr_conflicts): Likewise.
2804 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
2805 All uses changed.
2806 * lib/ebitset.c (ebitset_obstack_init): Likewise.
2807 * lib/lbitset.c (lbitset_obstack_init): Likewise.
2808 * src/getargs.c (debug_flag, defines_flag, locations_flag,
2809 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
2810 graph_flag): Likewise.
2811 * src/getargs.h (debug_flag, defines_flag, locations_flag,
2812 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
2813 graph_flag): Likewise.
2814 * src/output.c (error_verbose): Likewise.
2815 * src/output.h (error_verbose): Likewise.
2816 * src/reader.c (start_flag, typed): Likewise.
2817 * src/reader.h (typed): Likewise.
2818 * src/getargs.c (LOCATIONS_OPTION): New constant.
2819 (long_options, getargs): Use it.
2820 * src/lalr.c (build_relations): Use bool, not int.
2821 * src/nullable.c (nullable_compute): Likewise.
2822 * src/print.c (print_reductions): Likewise.
2823 * src/tables.c (action_row, pack_vector): Likewise.
2824 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
2825 * src/output.c (prepare): Use it.
2826 * src/output.c (token_definitions_output,
2827 symbol_destructors_output, symbol_destructors_output): Use string,
2828 not boolean integer, to keep track of whether to output separator.
2829 * src/print_graph.c (print_core): Likewise.
2830 * src/state.c (state_rule_lookaheads_print): Likewise.
2831
2832 * config/install-sh: Sync from automake 1.7.5.
2833
28342003-05-14 Paul Eggert <eggert@twinsun.com>
2835
2836 * src/parse-gram.y (rules_or_grammar_declaration): Require a
2837 semicolon after a grammar declaration, in the interest of possible
2838 future changes to the Bison input language.
2839 Do not allow a stray semicolon at the start of the grammar.
2840 (rhses.1): Allow one or more semicolons after any rule, including
2841 just before "|" as required by POSIX.
2842 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
2843 grammar.
2844
28452003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
2846
2847 %parse-param support for lalr1.cc.
2848
2849 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
2850 b4_cc_constructor_calls, b4_cc_constructor_call,
2851 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
2852 definitions.
2853 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
2854 parse-param arguments.
2855 (yy::b4_parser_class_name): Declare instance variables to
2856 hold parse-param arguments.
2857 * tests/calc.at: s/value/semantic_value/ because value clashes
2858 with a member of yy::b4_parser_class_name. Adjust C++ code
2859 to handle %parse-param. Enable %parse-param test in C++.
2860
28612003-05-12 Paul Eggert <eggert@twinsun.com>
2862
2863 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
2864 English a bit. Fix fclose typo. Change "const char" to "char
2865 const", and use ANSI C rather than K&R for "main". Suggest
2866 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
2867 and suggest yy_switch_to_buffer.
2868
28692003-05-05 Paul Eggert <eggert@twinsun.com>
2870
2871 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
2872 C89. This avoids a diagnostic on compilers that define __STDC__
2873 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
2874 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
2875
28762003-05-03 Paul Eggert <eggert@twinsun.com>
2877
2878 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
2879 Do not overrun array bounds.
2880 This should fix a bug reported today by Olatunji Oluwabukunmi in
2881 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
2882
28832003-04-29 Akim Demaille <akim@epita.fr>
2884
2885 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
2886 * src/getargs.c, src/getargs.h: here, as bool, not int.
2887 (nondeterministic_parser): New.
2888 * src/parse-gram.y, src/scan-gram.l: Support
2889 %nondeterministic-parser.
2890 * src/output.c (prepare): Use nondeterministic_parser instead
2891 of glr_parser where appropriate.
2892 * src/tables.c (conflict_row, action_row, save_row)
2893 (token_actions, token_actions, pack_vector): Ditto.
2894
28952003-04-29 Akim Demaille <akim@epita.fr>
2896
2897 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
2898
28992003-04-29 Akim Demaille <akim@epita.fr>
2900
2901 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
2902 with %pure-parser and %locations to exercise the patch from Yakov
2903 Markovitch below.
2904
29052003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
2906
2907 * data/yacc.c: (b4_lex_param): Corrected for the case where
2908 %lex-param is provided and %pure-parser isn't.
2909
29102003-04-27 Paul Eggert <eggert@twinsun.com>
2911
2912 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
2913 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
2914 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
2915 if it is not defined.
2916 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
2917
29182003-04-26 Paul Eggert <eggert@twinsun.com>
2919
2920 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
2921 Declare to be of type suitable for the ninf value itself, not of
2922 type suitable for the corresponding table, since the latter might
2923 be unsigned but the ninf value might be negative. This fixes a
2924 bug reported by Alexandre Duret-Lutz in
2925 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
2926
2927 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
2928 invokes it. We shouldn't invoke it twice because it will attempt
2929 to put error.o in the archive twice. This fixes a glitch reported
2930 by Martin Mokrejs in
2931 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
2932
29332003-04-21 Paul Eggert <eggert@twinsun.com>
2934
2935 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
2936 to gnulib.
2937
29382003-04-21 Yakov Markovitch <Markovitch@iso.ru>
2939
2940 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
2941 Fix obvious typo that results in uncompilable GLR parsers
2942 when both %pure-parser and %locations are used. (trivial change)
2943
29442003-04-17 Paul Eggert <eggert@twinsun.com>
2945
2946 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
2947 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
2948 Do not insert the expected token via unput, as this runs afoul
2949 of a POSIX-compatibility bug in flex 2.5.31.
2950 All uses changed to BEGIN the parent state,
2951 since we no longer insert the expected token via unput.
2952 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
2953 that is no longer emitted after the above change.
2954
2955 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
2956 the first one. This change is from Paul Hilfinger, and it fixes
2957 regression reported by Werner Lemberg in
2958 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2959
2960 (resolve_sr_conflict): Don't invoke state_errs_set
2961 unless one or more tokens have been explicitly made errors.
2962 Otherwise, the above change causes Bison to abort.
2963
2964 * tests/existing.at (GNU pic Grammar): New test case, taken from
2965 Lemberg's email.
2966
29672003-03-31 Akim Demaille <akim@epita.fr>
2968
2969 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
2970
29712003-03-31 Akim Demaille <akim@epita.fr>
2972
2973 * src/output.c (prepare_symbols): Avoid trailing spaces in the
2974 output.
2975
29762003-03-31 Akim Demaille <akim@epita.fr>
2977
2978 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
2979 From Paul Hilfinger.
2980
29812003-03-29 Akim Demaille <akim@epita.fr>
2982
2983 * m4/error.m4: Do not put under dynamic conditions some code which
2984 expansion is under static control.
2985
29862003-03-29 Akim Demaille <akim@epita.fr>
2987
2988 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
2989
29902003-03-29 Akim Demaille <akim@epita.fr>
2991
2992 * doc/bison.texinfo (Strings are Destroyed): New.
2993
29942003-03-13 Paul Eggert <eggert@twinsun.com>
2995
2996 * .cvsignore: Add configure.lineno.
2997 * src/.cvsignore: Add yacc.
2998 * tests/.cvsignore: Add testsuite.log.
2999 * doc/fdl.texi: Sync with latest FSF version.
3000
30012003-03-12 Paul Eggert <eggert@twinsun.com>
3002
3003 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
3004 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
3005 cursor, instead of leaving it undefined. This fixes a bug
3006 reported by Tim Van Holder in
3007 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
3008 * tests/input.at (Torturing the Scanner): Test the scanner on
3009 an empty input file, which was Tim Van Holder's test case.
3010
3011 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
3012 <sys/resource.h> can be included, include sys/time.h and
3013 sys/times.h first, if available. This works around the SunOS
3014 4.1.4 porting bug reported by Bruce Becker in
3015 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
3016
3017 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
3018 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
3019 AC_HEADER_SYS_WAIT.
3020
3021 Merge changes from gnulib. This was prompted because the CVS
3022 snapshot didn't build on Solaris 7 due to strnlen problems.
3023
3024 These changes need to be merged back into gnulib:
3025 * lib/hash.c: Include <stdbool.h> unconditionally.
3026 * m4/onceonly.m4 (m4_quote): New macro.
3027 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
3028 Quote AC_FOREACH variable-expansions properly.
3029 The 2003-01-03 obstack.h change also needs merging.
3030 {end of changes requiring merging}
3031
3032 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
3033 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
3034 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
3035 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
3036 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
3037 New files, imported from gnulib.
3038 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
3039 above.
3040
3041 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
3042 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
3043 gnulib sources.
3044
3045 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
3046 Add.
3047 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
3048 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
3049 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
3050 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
3051 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
3052 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
3053 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
3054 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
3055 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
3056 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
3057 (jm_PREREQ_ARGMATCH): Remove.
3058 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
3059 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
3060
3061 * src/system.h: Include <stdbool.h> unconditionally.
3062
3063 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
3064 assuming at least C89 in the bitset code for some time now.
3065
30662003-03-03 Akim Demaille <akim@epita.fr>
3067
3068 * ro.po: New.
3069
30702003-03-02 Akim Demaille <akim@epita.fr>
3071
3072 * doc/bison.texinfo (Table of Symbols): Reactivate the
3073 documentation for %lex-param, and %parse-param.
3074
30752003-03-02 Akim Demaille <akim@epita.fr>
3076
3077 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
3078 generate verbose error messages.
3079 Use the number of tokens as an upper bound in yytname, as it
3080 cannot be a non terminal.
3081
30822003-03-02 Akim Demaille <akim@epita.fr>
3083
3084 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
3085 message.
3086
30872003-03-02 Akim Demaille <akim@epita.fr>
3088
3089 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
3090 Use them to exercise yycheck overrun.
3091 Based on Andrew Suffield's grammar.
3092
30932003-03-02 Akim Demaille <akim@epita.fr>
3094
3095 Create tests/local.at for Bison generic testing macros.
3096
3097 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
3098 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
3099 This new file.
3100 * tests/calc.at (AT_CHECK_CALC): Adjust.
3101 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
3102 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
3103 * tests/local.at: here.
3104 (AT_COMPILE_CXX): Tags the tests using it as c++.
3105 Ignore the test if CXX is not functional.
3106
31072003-03-01 Paul Eggert <eggert@twinsun.com>
3108
3109 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
3110 not loc->end, since loc->end might contain garbage and this leads
3111 to undefined behavior on some platforms.
3112 (id_loc, token_start): Use (IF_LINTed) initial values that do not
3113 depend on *loc, so that the reader doesn't give the the false
3114 impression that *loc is initialized.
3115 (<INITIAL>"%%"): Do not bother setting code_start, since its value
3116 does not survive the return.
3117
31182003-03-01 Akim Demaille <akim@epita.fr>
3119
3120 * src/scan-gram.l (code_start): Always initialize it when entering
3121 into yylex, as SC_EPILOGUE is activated *before* the corresponding
3122 yylex invocation. An alternative would be making it static, but
3123 then it starts with the second %%'s beginning, instead of its end.
3124
31252003-02-28 Paul Eggert <eggert@twinsun.com>
3126
3127 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
3128 around a UnixWare 7.1.1 porting bug reported by John Hughes in
3129 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
3130
31312003-02-26 Paul Eggert <eggert@twinsun.com>
3132
3133 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
3134 Remove Sequent/Pyramid discussion (nobody uses them any more).
3135 Merge VMS and MS-DOS discussion; these ports may well be dead
3136 but let's keep mentioning them for now. Put <> around email
3137 addresses. Add copyright notice.
3138
31392003-02-24 Paul Eggert <eggert@twinsun.com>
3140
3141 * data/glr.c (yy_reduce_print): yylineno -> yylno,
3142 to avoid collision with flex use of yylineno.
3143 Problem reported by Bruce Lilly in
3144 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
3145 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
3146 * data/yacc.c (yy_reduce_print): Likewise.
3147
3148 * config/depcomp: Sync with Automake 1.7.3.
3149
31502003-02-21 Akim Demaille <akim@epita.fr>
3151
3152 * data/lalr1.cc: Use temporary variables instead of casts to
3153 change integer types.
3154 Suggested by Paul Eggert.
3155
31562003-02-21 Akim Demaille <akim@epita.fr>
3157
3158 * doc/bison.texinfo: Use "location" consistently to refer to @n,
3159 to avoid confusions with lalr1.cc's notion of Position.
3160 Suggested by Paul Eggert.
3161
31622003-02-20 Akim Demaille <akim@epita.fr>
3163
3164 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
3165 before initial_columns.
3166 (location.hh): Use consistent variable names when defining the
3167 operator<<.
3168 Use "last" so that we subtract from Positions, not from unsigned.
3169
31702003-02-20 Akim Demaille <akim@epita.fr>
3171
3172 * data/lalr1.cc (position.hh): New subfile, including the extended
3173 and Doxygen'ed documentation of class Position.
3174 (location.hh): Use it.
3175 Document a` la Doxygen.
3176 With the help of Benoit Perrot.
3177
31782003-02-20 Akim Demaille <akim@epita.fr>
3179
3180 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
3181 AT_YACC_IF.
3182 Redefine AT_YYERROR_SEES_LOC_IF using it.
3183 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
3184 not defined.
3185 Don't use the location in yy::Parser::error_ and
3186 yy::Parser::print_ when not %locations.
3187 Activate more lalr1.cc tests.
3188
31892003-02-19 Akim Demaille <akim@epita.fr>
3190
3191 * data/lalr1.cc: When displaying a line number, be sure to make it
3192 an int.
3193
31942003-02-19 Akim Demaille <akim@epita.fr>
3195
3196 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
3197 Remove, useless.
3198 (YYABORT, YYACCEPT, YYERROR): New.
3199 * tests/calc.at: Renable the lalr1.cc test.
3200
32012003-02-19 Akim Demaille <akim@epita.fr>
3202
3203 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
3204 error recovery, mixing with/without pops and discarding of the
3205 lookahead.
3206 Exercise YYERROR.
3207 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
3208
32092003-02-17 Paul Eggert <eggert@twinsun.com>
3210
3211 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
3212 * tests/testsuite.at (AT_COMPILE): Use them.
3213 This fixes the testsuite problem reported by Robert Lentz in
3214 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
3215
32162003-02-12 Paul Eggert <eggert@twinsun.com>
3217
3218 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
3219 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
3220 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
3221 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
3222 Check for malloc failure, for consistency with yacc.c.
3223 (yytname_size): Remove, for consistency with yacc.c.
3224
3225 The bug still remains in data/lalr1.cc, as I didn't have time
3226 to fix it there.
3227
32282003-02-06 Akim Demaille <akim@epita.fr>
3229
3230 * configure.ac (GXX): Rename as...
3231 (CXX): this, to keep the original Autoconf semantics.
3232 Require 2.57.
3233 * data/lalr1.cc: Fix b4_copyright invocations.
3234 If YYDEBUG is not defined, don't depend upon name_ being defined.
3235 (location.hh): Include string and iostream.
3236 (Position::filename): New member.
3237 (Position::Position ()): New.
3238 (operator<< (Position)): New.
3239 (operator- (Position, int)): New.
3240 (Location::first, Location::last): Rename as...
3241 (Location::begin, Location::end): these, to mock the conventional
3242 iterator names.
3243 (operator<< (Location)): New.
3244 * tests/atlocal.in (CXX): New.
3245 * tests/testsuite.at (AT_COMPILE_CXX): New.
3246 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
3247 locations in a more synthetic way.
3248 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
3249 lalr1.cc is used.
3250 Adjust the C locations to match those from Emacs: first column is
3251 column 0.
3252 Change all the expected results.
3253 Conform to the GCS: simplify the locations when applicable.
3254 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
3255 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
3256 these CPP macros with the m4 macros new defined by...
3257 (AT_CHECK_PUSHDEFS): this, i.e.:
3258 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
3259 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
3260 New macros.
3261 (AT_CHECK_POPDEFS): Undefine them.
3262 (AT_CHECK_CALC_LALR1_CC): New.
3263 Use it for the first lalr1.cc test.
3264
32652003-02-04 Akim Demaille <akim@epita.fr>
3266
3267 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
3268 Location as is defined.
3269
32702003-02-04 Akim Demaille <akim@epita.fr>
3271
3272 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
3273 name_ being defined.
3274
32752003-02-03 Paul Eggert <eggert@twinsun.com>
3276
3277 * src/gram.h (start_symbol): Remove unused decl.
3278
3279 Use more-consistent naming conventions for local vars.
3280
3281 * src/derives.c (derives_compute): Change type of local var from
3282 int to rule_number.
3283 * src/gram.c (grammar_rules_partial_print): Likewise.
3284 * src/print.c (print_core): Likewise.
3285 * src/reduce.c (reduce_grammar_tables): Likewise.
3286
3287 * src/gram.c (grammar_dump): Change name of item_number *
3288 local var from r to rp.
3289 * src/nullable.c (nullable_compute): Likewise.
3290
3291 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
3292
3293 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
3294 for symbol or symbol_number var.
3295 * src/reader.c (grammar_start_symbol_set): Likewise.
3296 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
3297 Likewise.
3298 * src/state.c (transitions_to): Likewise.
3299 * src/state.h: Likewise.
3300 * src/tables.c (symbol_number_to_vector_number): Likewise.
3301
3302 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
3303 char * var.
3304
3305 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
3306 var.
3307
3308 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
3309 var.
3310
3311 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
3312 Use str, not s, for char * var. Use ch, not c, for character var.
3313 Use size for size var.
3314
3315 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
3316 char * var.
3317 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
3318 uniqstr var.
3319 * src/uniqstr.h: Likewise.
3320
3321 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
3322 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
3323 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
3324 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
3325 param to have same name as that of enum, so that we don't use
3326 "s" to stand for a non-state.
3327
33282003-02-02 Akim Demaille <akim@epita.fr>
3329
3330 * src/scan-skel.l: Scan more than one inert character per yylex
3331 invocation.
3332
33332003-02-01 Paul Eggert <eggert@twinsun.com>
3334
3335 Version 1.875a.
3336
3337 * po/LINGUAS: Add ms.
3338
33392003-01-30 Akim Demaille <akim@epita.fr>
3340
3341 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
3342
33432003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3344
3345 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
3346 of $1.
3347
3348 Changes in response to error report by S. Eken: GLR mode does not
3349 handle negative $ indices or $ indices in embedded rules correctly.
3350 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
3351
3352 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
3353 (b4_rhs_location): Ditto.
3354 (yyfill): New function to copy from stack tree into array
3355 incrementally.
3356 (yyuserAction): Modify to allow incremental move of semantic values
3357 to rhs array when in GLR mode.
3358 Define YYFILL to use in user-defined actions to fill semantic array
3359 as needed.
3360 Remove dummy use of yystack, as there is now a guaranteed use.
3361 (yydoAction): Modify to allow incremental move of semantic values
3362 to rhs array when in GLR mode.
3363 (yyresolveAction): Ditto.
3364 (yyglrShiftDefer): Update comment.
3365 (yyresolveStates): Use X == NULL for pointers, not !X.
3366 (yyglrReduce): Ditto.
3367 (yydoAction): Ditto
3368
3369 * tests/glr-regr1.at: Rename to ...
3370 * tests/glr-regression.at: Add new regression test for the problems
3371 described above (adapted from S. Eken).
3372 Update copyright notice.
3373 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
3374 * tests/Makefile.am: Ditto.
3375
33762003-01-28 Paul Eggert <eggert@twinsun.com>
3377
3378 * data/lalr1.cc: Do not use @output_header_name@ unless
3379 b4_defines_flag is set. This fixes two bugs reported by
3380 Tim Van Holder in
3381 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
3382 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
3383
33842003-01-21 Paul Eggert <eggert@twinsun.com>
3385
3386 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
3387 we don't need to worry about yyerrlab1 being reported as an
3388 "unused label" by non-GCC C compilers. The downside is that if
3389 locations are used then a couple of statements are duplicated each
3390 time YYERROR is invoked, but the upside is that the warnings
3391 should vanish.
3392 (yyerrlab1): Move code to YERROR.
3393 (yyerrlab2): Remove. Change uses back to yyerrlab1.
3394 This reverts some of the 2002-12-27 change.
3395
33962003-01-17 Paul Eggert <eggert@twinsun.com>
3397
3398 * src/output.c (symbol_printers_output): Fix typo that led
3399 to core dump. Problem reported by Antonio Rus in
3400 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
3401
34022003-01-13 Akim Demaille <akim@epita.fr>,
3403 Quoc Peyrot <chojin@lrde.epita.fr>,
3404 Robert Anisko <anisko_r@lrde.epita.fr>
3405
3406 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
3407 when the stacks contain one element, as the loop would otherwise
3408 free the last state, and then use the top state (the one we just
3409 popped). This means that the initial elements will not be freed
3410 explicitly, as is the case in yacc.c; it is not a problem, as
3411 these elements have fake values.
3412
34132003-01-11 Paul Eggert <eggert@twinsun.com>
3414
3415 * NEWS: %expect-violations are now just warnings, reverting
3416 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
3417 bootstrapping problem reported by Matthias Klose; see
3418 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
3419 * src/conflicts.c (conflicts_print): Likewise.
3420 * tests/conflicts.at (%expect not enough, %expect too much,
3421 %expect with reduce conflicts): Likewise.
3422 * doc/bison.texinfo (Expect Decl): Document this. Also mention
3423 that the warning is enabled if the number of conflicts changes
3424 (not necessarily increases).
3425
3426 * src/getargs.c (version): Update copyright year.
3427
34282003-01-09 Akim Demaille <akim@epita.fr>
3429
3430 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
3431
34322003-01-08 Paul Eggert <eggert@twinsun.com>
3433
3434 * Makefile.maint (WGETFLAGS):
3435 New macro, containing "-C off" to disable proxy caches.
3436 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
3437 (rel-check): Use $(WGET) instead of wget.
3438
34392003-01-06 Paul Eggert <eggert@twinsun.com>
3440
3441 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
3442 the GLR paper of Scott, Johnstone and Hussain.
3443
34442003-01-04 Paul Eggert <eggert@twinsun.com>
3445
3446 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
3447 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
3448 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
3449 (EXTRA_LIBRARIES): New var, for liby.a.
3450 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
3451 (EXTRA_SCRIPTS): New var, for yacc.
3452
3453 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
3454 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
3455 Problem reported by Nelson H. F. Beebe.
3456
34572003-01-03 Paul Eggert <eggert@twinsun.com>
3458
3459 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
3460 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
3461 when compiling Bison 1.875's `bitset bset = obstack_alloc
3462 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
3463
3464 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
3465 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
3466 grow to a huge size with typical invocation.
3467
3468 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
3469 Use the pattern recommended by Autoconf 2.57, except also protect
3470 against double-definition.
3471 * src/system.h: Likewise.
3472 Portability issues reported by Nelson H. F. Beebe.
3473
3474 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
3475 All uses changed. Provide a definition in both C and C++.
3476 (yytrue, yyfalse): Define even if defined (__cplusplus).
3477
3478 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
3479 Reported by Nelson H. F. Beebe.
3480
3481 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
3482
34832003-01-02 Paul Eggert <eggert@twinsun.com>
3484
3485 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
3486 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
3487 Bug reported by Nelson H. F. Beebe.
3488
34892003-01-01 Paul Eggert <eggert@twinsun.com>
3490
3491 * Version 1.875.
3492
34932002-12-30 Paul Eggert <eggert@twinsun.com>
3494
3495 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
3496 Moved here from...
3497 (<INITIAL>","): Here. This causes stray "," to be treated
3498 more uniformly.
3499
3500 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
3501 last brace in braced code when not in Yacc mode, for compatibility
3502 with Bison 1.35. This resurrects the 2001-12-15 patch to
3503 src/reader.c.
3504
3505 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
3506 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
3507
35082002-12-28 Paul Eggert <eggert@twinsun.com>
3509
3510 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
3511 that of SYM's type. This fixes Debian bug 168069, reported by
3512 Thomas Olsson.
3513
35142002-12-28 Paul Eggert <eggert@twinsun.com>
3515
3516 Version 1.75f.
3517
3518 Switch back to the Yacc style of conflict reports, undoing some
3519 of the 2002-07-30 change.
3520 * doc/bison.texinfo (Understanding): Use Yacc style for
3521 conflict reports. Also, use new way of locating rules.
3522 * src/conflicts.c (conflict_report):
3523 Renamed from conflict_report_yacc, removing the old
3524 'conflict_report'. Translate the entire conflict report at once,
3525 so that we don't assume that "," has the same interpretation in
3526 all languages.
3527 (conflicts_output): Use Yacc-style conflict report for each state,
3528 instead of our more-complicated style.
3529 (conflicts_print): Use Yacc-style conflict report, except print
3530 the input file name when not emulating Yacc.
3531 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
3532 Conflicted Reduction, %expect not enough, %expect too much,
3533 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
3534 * tests/existing.at (GNU Cim Grammar): Likewise.
3535 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
3536
3537 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
3538 fatal): Don't invoke fflush; it's not needed and it might even be
3539 harmful for stdout, as stdout might not be open.
3540 * src/reduce.c (reduce_print): Likewise.
3541
35422002-12-27 Paul Eggert <eggert@twinsun.com>
3543
3544 Fix a bug where error locations were not being recorded correctly.
3545 This problem was originally reported by Paul Hilfinger in
3546 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
3547
3548 * data/yacc.c (yyparse): New local var yylerrsp, to record the
3549 top of the location stack's error locations.
3550 (yyerrlab): Set it. When discarding a token, push its location
3551 onto yylerrsp so that we don't lose track of the error's end.
3552 (yyerrlab1): Now is only the target of YYERROR, so that we can
3553 properly record the location of the action that failed. For GCC
3554 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
3555 GCC warning about yyerrlab1 being unused if YYERROR is unused.
3556 (yyerrlab2): New label, which yyerrlab now falls through to.
3557 Compute the error's location by applying YYLLOC_DEFAULT to
3558 the locations of all the symbols that went into the error.
3559 * doc/bison.texinfo (Location Default Action): Mention that
3560 YYLLOC_DEFAULT is also invoked for syntax errors.
3561 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3562 Error locations include the locations of all the tokens that were
3563 discarded, not just the last token.
3564
35652002-12-26 Paul Eggert <eggert@twinsun.com>
3566
3567 * src/files.c: Include quote.h.
3568 (compute_output_file_names): Warn if we detect conflicting
3569 outputs to the same file. This should catch the misunderstanding
3570 exemplified by Debian Bug 165349, reported by Bruce Stephens..
3571
3572 * src/conflicts.c (conflicts_print): If the user specifies
3573 "%expect N", report an error if there are any reduce/reduce
3574 conflicts. This is what the manual says should happen.
3575 This fixes Debian bug 130890, reported by Anthony DeRobertis.
3576 * tests/conflicts.at (%expect with reduce conflicts): New test.
3577
3578 Don't use m4_include on relative file names, as it doesn't work as
3579 desired if there happens to be a file with that name under ".".
3580
3581 * m4sugar/version.m4: Remove; it was included but it wasn't used.
3582 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
3583 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
3584 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
3585 * src/output.c (output_skeleton): Use full path names when
3586 specifying a file to include; don't rely on include path, as
3587 it's unreliable when the working file contains a file with
3588 that name.
3589
35902002-12-25 Paul Eggert <eggert@twinsun.com>
3591
3592 Remove obsolete references to bison.simple and bison.hairy.
3593 Problem mentioned by Aubin Mahe in
3594 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
3595 * data/glr.c: Comment fix.
3596 * doc/bison.1: Remove references. Also, mention "yacc".
3597
3598 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
3599 with -g option.
3600
3601 * src/parse-gram.y (declaration): Use enum "report_states" rather
3602 than its numeric value 1.
3603
3604 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
3605 opening a new one. This fixes Debian bug 165349, reported by
3606 Bruce Stephens.
3607
36082002-12-24 Paul Eggert <eggert@twinsun.com>
3609
3610 Version 1.75e.
3611
3612 * Makefile.maint (cvs-update): Don't assume that the shell
3613 supports $(...), as Solaris sh doesn't.
3614
3615 * src/parse-gram.y (lloc_default): Remove test for empty
3616 nonterminals at the end, since it didn't change the result.
3617
36182002-12-24 Paul Eggert <eggert@twinsun.com>
3619
3620 If the user does not define YYSTYPE as a macro, Bison now declares it
3621 using typedef instead of defining it as a macro. POSIX requires this.
3622 For consistency, YYLTYPE is also declared instead of defined.
3623
3624 %union directives can now have a tag before the `{', e.g., the
3625 directive `%union foo {...}' now generates the C code
3626 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
3627 The default union tag is `YYSTYPE', for compatibility with Solaris 9
3628 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
3629 instead of `yyltype'.
3630
3631 `yystype' and `yyltype' are now obsolescent macros instead of being
3632 typedefs or tags; they are no longer documented and will be
3633 withdrawn in a future release.
3634
3635 * data/glr.c (b4_location_type): Remove.
3636 (YYSTYPE): Renamed from yystype.
3637 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
3638 (struct YYLTYPE): Renamed from struct yyltype.
3639 (YYLTYPE): Renamed from yyltype.
3640 (yyltype, yystype): New (and obsolescent) macros,
3641 for backward compatibility.
3642 * data/yacc.c: Likewise.
3643
3644 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
3645 does not specify a union tag. This is for compatibility with
3646 Solaris 9 yacc.
3647
3648 * src/parse-gram.y (add_param): 2nd arg is now char * not char
3649 const *, since it is now modified by stripping surrounding { }.
3650 (current_braced_code): Remove.
3651 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
3652 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
3653 trailing " {...}". Now of type <chars>.
3654 (grammar_declaration): Adjust to bundled tokens.
3655 (code_content): Remove; stripping is now done by add_param.
3656 (print_token_value): Print contents of bundled tokens.
3657 (token_name): New function.
3658
3659 * src/reader.h (braced_code, current_braced_code): Remove.
3660 (token_name): New decl.
3661
3662 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
3663 token_type, not braced_code code_kind. All uses changed.
3664 (SC_PRE_CODE): New state, for scanning after a keyword that
3665 has (or usually has) an immediately-following braced code.
3666 (token_type): New local var, to keep track of which token type
3667 to return when scanning braced code.
3668 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
3669 <INITIAL>"%parse-param", <INITIAL>"%printer",
3670 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
3671 instead of returning a token type immediately.
3672 (<INITIAL>"{"): Set token type.
3673 (<SC_BRACED_CODE>"}"): Use it.
3674 (handle_action_dollar, handle_action_at): Now returns bool
3675 indicating success. Fail if ! current_rule; this prevents a core dump.
3676 (handle_symbol_code_dollar, handle_symbol_code_at):
3677 Remove; merge body into caller.
3678 (handle_dollar, handle_at): Complain in invalid contexts.
3679
3680 * NEWS, doc/bison.texinfo: Document the above.
3681 * NEWS: Fix years and program names in copyright notice.
3682
36832002-12-17 Paul Eggert <eggert@twinsun.com>
3684
3685 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
3686 Reporting, Table of Symbols): Omit mentions of %lex-param and
3687 %parse-param from the documentation for now.
3688
36892002-12-15 Paul Eggert <eggert@twinsun.com>
3690
3691 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
3692 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
3693 lookahead symbol, and which sets yychar in parser actions) and it
3694 disagreed with the Bison documentation. Bug
3695 reported by Andrew Walrond.
3696
3697 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
3698 as the caller now does that.
3699 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
3700 (YYEMPTY): Parenthesize right hand side, since others use it.
3701 (yyparse): Don't assume that our generated code is the only code
3702 that sets yychar.
3703
37042002-12-13 Paul Eggert <eggert@twinsun.com>
3705
3706 Version 1.75d.
3707
3708 POSIX requires a "yacc" command.
3709 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
3710 (MOSTLYCLEANFILES): Add yacc.
3711 (yacc): New rule.
3712 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
3713 as an alias for bison y.
3714
3715 * po/LINGUAS: Add da.
3716
3717 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
3718 problem with latest <getopt.h>.
3719 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
3720
3721 * doc/fdl.texi: Upgrade to 1.2.
3722 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
3723 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
3724 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
3725 gnulib.
3726 * config/install-sh: Sync with autotools.
3727
3728 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
3729 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
3730 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
3731 locations are requested.
3732 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
3733 locations are requested.
3734
37352002-12-12 Paul Eggert <eggert@twinsun.com>
3736
3737 Remove unportable casts and storage allocation tricks.
3738 While we're at it, remove almost all casts, since they
3739 usually aren't needed and are a sign of trouble.
3740
3741 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
3742
3743 * src/derives.c (derives_compute): Do not subtract NTOKENS from
3744 the pointer DSET returned by malloc; this isn't portable.
3745 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
3746 Similarly for DERIVES.
3747 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
3748 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
3749 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
3750
3751 * src/derives.c (derives_compute): Do not bother invoking
3752 int_of_rule_number, since rule numbers are integers.
3753
3754 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
3755 rather than XMALLOC (char, N).
3756
3757 * src/files.c (filename_split): Rewrite to avoid cast.
3758
3759 * src/gram.h (symbol_number_as_item_number,
3760 item_number_as_symbol_number, rule_number_as_item_number,
3761 item_number_as_rule_number):
3762 Now inline functions rather than macros, to avoid casts.
3763 * src/state.h (state_number_as_int): Likewise.
3764 * src/tables.c (state_number_to_vector_number,
3765 symbol_number_to_vector_number): Likewise.
3766
3767 * src/gram.h (int_of_rule_number): Remove; no longer used.
3768
3769 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
3770 since the resulting storage is always stored into.
3771
3772 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
3773 where it's needed.
3774
3775 * src/muscle_tab.c (muscle_m4_output):
3776 Now inline. Return bool, not int.
3777 * src/state.c (state_compare): Likewise.
3778 * src/symtab.c (symbol_check_defined,
3779 symbol_check_alias_consistency, symbol_pack, symbol_translation,
3780 hash_compare_symbol, hash_symbol):
3781 Likewise.
3782 * src/uniqstr.c (uniqstr_print): Likewise.
3783 * src/muscle_tab.c (muscle_m4_output_processor):
3784 New function, to avoid casts.
3785 * src/state.c (state_comparator, stage_hasher): Likewise.
3786 * src/symtab.c (symbol_check_defined_processor,
3787 symbol_check_alias_consistency_processor, symbol_pack_processor,
3788 symbol_translation_processor, hash_symbol_comparator,
3789 hash_symbol_hasher): Likewise.
3790 * src/uniqstr.c (uniqstr_print_processor): Likewise.
3791 * src/muscle_tab.c (muscles_m4_output):
3792 Use new functions instead of casting old functions unportably.
3793 * src/state.c (state_hash_new): Likewise.
3794 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
3795 symbols_token_translations_init):
3796 Likewise.
3797 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
3798
3799 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
3800 var instead of casting to long, to avoid casts.
3801 (prepare_states): Use MALLOC rather than alloca, so that we don't
3802 have to worry about alloca.
3803 * src/state.c (state_hash_lookup): Likewise.
3804
3805 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
3806 local var instead of casting to unsigned char, to avoid casts.
3807
3808 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
3809 STATE_ALLOC): Remove.
3810 (transitions_new, errs_new, reductions_new, state_new): Use malloc
3811 rather than calloc, and use offsetof to avoid allocating slightly
3812 too much storage.
3813 (state_new): Initialize all members.
3814
3815 * src/state.c (state_hash): Use unsigned accumulator, not signed.
3816
3817 * src/symtab.c (symbol_free): Remove; unused.
3818 (symbol_get): Remove cast in lhs of assignment.
3819 (symbols_do): Now static. Accept generic arguments, not
3820 hashing-related ones.
3821
3822 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
3823 (symbol_processor): Remove.
3824 (symbols_do): Remove decl; now static.
3825
3826 * src/system.h (alloca): Remove; decl no longer needed.
3827 (<stddef.h>): Include, for offsetof.
3828 (<inttypes.>, <stdint.h>): Include if available.
3829 (uintptr_t): New type, if system lacks it.
3830 (CALLOC, MALLOC, REALLOC): New macros.
3831 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
3832 new macros.
3833
3834 * src/tables.c (table_size): Now int, to pacify GCC.
3835 (table_grow, table_ninf_remap): Use signed table size.
3836 (save_row): Don't bother initializing locals when not needed.
3837 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
3838 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
3839
3840 * src/vcg.h: Correct misspellings.
3841
3842 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
3843
3844
3845 * src/getargs.c (getargs): Don't assume EOF == -1.
3846
38472002-12-09 Paul Eggert <eggert@twinsun.com>
3848
3849 Change identifier spellings to avoid collisions with names
3850 that are reserved by POSIX.
3851
3852 Don't use names ending in _t, since POSIX reserves them.
3853 For consistency, remove _e and _s endings -- they're weren't
3854 needed to remove ambiguity. All uses changed.
3855 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
3856 turn was just renamed from struniq_t.
3857 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
3858 which in turn was just renamed from struniq_processor_t.
3859 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
3860 in turn was renamed from hash_compare_struniq_t.
3861 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
3862 (state_list): Renamed from state_list_t.
3863 * src/assoc.h (assoc): Renamed from assoc_t.
3864 * src/conflicts.c (enum conflict_resolution): Renamed from
3865 enum conflict_resolution_e.
3866 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
3867 (rule_list): Renamed from rule_list_t.
3868 * src/getargs.h (enum trace): Renamed from enum trace_e.
3869 (enum report): Renamed from enum report_e.
3870 * src/gram.h (item_number): Renamed from item_number_t.
3871 (rule_number): Renamed from rule_number_t.
3872 (struct rule_s): Remove the "rule_s" part; not used.
3873 (rule): Renamed from rule_t.
3874 (rule_filter): Renamed from rule_filter_t.
3875 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
3876 (goto_list): Renamed from goto_list_t.
3877 * src/lalr.h (goto_number): Renamed from goto_number_t.
3878 * src/location.h (location): Renamed from location_t.
3879 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
3880 and moved here from:
3881 * src/muscle_tab.h (muscle_entry_t): here.
3882 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
3883 (rule_list): Renamed from rule_list_t.
3884 * src/print_graph.c (static_graph): Renamed from graph.
3885 * src/reader.h (braced_code): Renamed from braced_code_t.
3886 Remove brace_code_e tag.
3887 * src/relation.h (relation_node): Renamed from relation_node_t.
3888 (relation_nodes): Renamed from relation_nodes_t.
3889 (relation): Renamed from relation_t.
3890 * src/state.h (state_number): Renamed from state_number_t.
3891 (struct state): Renamed from struct state_s.
3892 (state): Renamed from state_t.
3893 (transitions): Renamed from transitions_t. Unused (and
3894 misspelled) transtion_s tag removed.
3895 (errs): Renamed from errs_t. Unused errs_s tag removed.
3896 (reductions): Renamed from reductions_t. Unused tag
3897 reductions_s removed.
3898 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
3899 (struct symbol_list): Renamed from struct symbol_list_s.
3900 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
3901 (struct symbol): Renamed from struct symbol_s.
3902 (symbol): Renamed from symbol_t.
3903 * src/tables.c (vector_number): Renamed from vector_number_t.
3904 (action_number): Renamed from action_t.
3905 * src/tables.h (base_number): Renamed from base_t.
3906 * src/vcg.h (enum color): Renamed from enum color_e.
3907 (enum textmode): Renamed from enum textmode_e.
3908 (enum shape): Renamed from enum shape_e.
3909 (struct colorentry): Renamed from struct colorentry_s.
3910 (struct classname): Renamed from struct classname_s.
3911 (struct infoname): Renamed from struct infoname_s.
3912 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
3913 (enum decision): Renamed from enum decision_e.
3914 (enum orientation): Renamed from enum orientation_e.
3915 (enum alignment): Renamed from enum alignment_e.
3916 (enum arrow_mode): Renamed from enum arrow_mode_e.
3917 (enum crossing_type): Renamed from enum crossing_type_e.
3918 (enum view): Renamed from enum view_e.
3919 (struct node): Renamed from struct node_s.
3920 (node): Renamed from node_t.
3921 (enum linestyle): Renamed from enum linestyle_e.
3922 (enum arrowstyle): Renamed from enum arrowstyle_e.
3923 (struct edge): Renamed from struct edge.
3924 (edge): Renamed from edge_t.
3925 (struct graph): Renamed from struct graph_s.
3926 (graph): Renamed from graph_t.
3927 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
3928 Rename value_t -> value.
3929 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
3930 value_t_as_yystype -> value_as_yystype.
3931
3932 Don't include <errno.h> in the mainstream code, since it
3933 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
3934 * lib/get-errno.c, lib/get-errno.h: New files.
3935 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
3936 get-errno.c.
3937 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
3938 * src/output.c (output_skeleton): Likewise.
3939 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
3940 instead of errno.
3941 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
3942 Likewise.
3943 (handle_action_dollar, handle_action_at): Likewise.
3944 * src/system.h: Do not include <errno.h>.
3945 (TAB_EXT): Renamed from EXT_TAB.
3946 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
3947
3948 Avoid str[a-z]*, since <string.h> reserves that name space.
3949 Change all instances of "struniq" in names to "uniqstr", and
3950 likewise for "STRUNIQ" and "UNIQSTR".
3951 * src/uniqstr.c: Renamed from src/struniq.c.
3952 * src/uniqstr.h: Renamed from src/struniq.h.
3953 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
3954 * src/files.c (strsuffix): Remove; unused.
3955 (concat2): Renamed from stringappend. Now static.
3956 * src/files.h (strsuffix, stringappend): Remove; unused.
3957 * src/parse-gram.y (<chars>): Renamed from <string>.
3958 (<uniqstr>): Renamed from <struniq>.
3959 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
3960 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
3961 (struct graph_s.expand): Renamed from struct graph_s.stretch.
3962 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
3963 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
3964 (N_EXPAND): Renamed from N_STRETCH.
3965
3966 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
3967 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
3968 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
3969 Remove; unused.
3970 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
3971 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
3972 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
3973 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
3974 (BASE_MAXIMUM): Renamed from BASE_MAX.
3975 (BASE_MINIMUM): Renamed from BASE_MIN.
3976 (ACTION_MAX): Remove; unused.
3977 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
3978 Unnecessary casts removed from above defines.
3979
3980
3981 Fix misspelling in names.
3982 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
3983 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
3984 G_NODE_ALIGNEMENT.
3985
3986
3987 * lib/timevar.c (timevar_report): Renamed from time_report,
3988 for consistency with other names.
3989 * lib/timevar.h (timevar_report): New decl.
3990 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
3991
3992
3993 Sort include-file uses.
3994
3995 Reorder all include files under src to be in the order "system.h".
3996 then the ../lib include files in angle brackets (alphabetized),
3997 then the . include files in double-quotes (alphabetized). Fix
3998 dependency breakages encountered in this process, as follows:
3999 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
4000 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
4001 * src/state.h: Include "symtab.h".
4002
40032002-12-08 Paul Eggert <eggert@twinsun.com>
4004
4005 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
4006 since this causes problems when __file__ contains character
4007 sequences like "@" that are treated specially by src/scan-skel.l.
4008 Instead, just use the file's basename. This fixes the bug
4009 reported by Martin Mokrejs in
4010 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
4011
40122002-12-06 Paul Eggert <eggert@twinsun.com>
4013
4014 Add support for rules that do not have trailing semicolons, as
4015 POSIX requires. Improve the quality of locations in Bison
4016 diagnostics.
4017
4018 * src/location.c: Include <quotearg.h>.
4019 (empty_location): Now const.
4020 (location_print): New function. Follow the recommendation of the
4021 GNU Coding Standards for locations that span file boundaries.
4022 * src/location.h: Do not include <quotearg.h>; no longer needed.
4023 (boundary): New type.
4024 (location_t): Use it. This allows locations to span file boundaries.
4025 All member uses changed: file -> start.file or end.file (as needed),
4026 first_line -> start.line, first_column -> start.column,
4027 last_line -> end.line, last_column -> end.column.
4028 (equal_boundaries): New function.
4029 (LOCATION_RESET, LOCATION_STEP): Remove.
4030 (LOCATION_PRINT): Remove. All callers changed to use location_print.
4031 (empty_location): Now const.
4032 (location_print): New decl.
4033 * src/parse-gram.y (lloc_default): New function, which handles
4034 empty locations more accurately.
4035 (YYLLOC_DEFAULT): Use it.
4036 (%token COLON): Remove.
4037 (%token ID_COLON): New token.
4038 (rules): Use it.
4039 (declarations, rules): Remove trailing semicolon.
4040 (declaration, rules_or_grammar_declaration):
4041 Allow empty (";") declaration.
4042 (symbol_def): Remove empty actions; no longer needed.
4043 (rules_or_grammar_declaration): Remove trailing semicolon.
4044 (semi_colon.opt): Remove.
4045 * src/reader.h: Include location.h.
4046 (scanner_cursor): New decl.
4047 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
4048 rolling our own.
4049 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
4050 of *loc.
4051 (STEP): Remove. No longer needed, now that adjust_location does
4052 the work. All uses removed.
4053 (scanner_cursor): New var.
4054 (adjust_location): Renamed from extend_location. It now sets
4055 *loc and adjusts the scanner cursor. All uses changed.
4056 Don't bother testing for CR.
4057 (handle_syncline): Remove location arg; now updates scanner cursor.
4058 All callers changed.
4059 (unexpected_end_of_file): Now accepts start boundary of token or
4060 comment, not location. All callers changed. Update scanner cursor,
4061 not the location.
4062 (SC_AFTER_IDENTIFIER): New state.
4063 (context_state): Renamed from c_context. All uses changed.
4064 (id_loc, code_start, token_start): New local vars.
4065 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
4066 processing of Yacc white space and equivalents here.
4067 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
4068 instead of returning ID immediately, since we need to search for
4069 a subsequent colon.
4070 (<INITIAL>"'", "\""): Save token_start.
4071 (<INITIAL>"%{", "{", "%%"): Save code_start.
4072 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
4073 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
4074 BEGIN context_state at end, not INITIAL.
4075 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
4076 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
4077 Return correct token start.
4078 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
4079 the start of a character, string or multiline comment is found.
4080 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
4081 Reduction): Adjust reported locations to match the more-precise
4082 results now expected.
4083 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
4084 * tests/reduce.at (Useless Rules, Reduced Automaton,
4085 Underivable Rules): Likewise.
4086 * tests/regression.at (Invalid inputs): No longer `expecting ";"
4087 or "|"' now that so many other tokens are allowed by the new grammar.
4088
4089 * src/complain.h (current_file): Remove duplicate decl;
4090 current_file is now owned by files.h.
4091 * src/complain.c, src/scan-gram.l: Include files.h.
4092
40932002-12-06 Paul Eggert <eggert@twinsun.com>
4094
4095 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
4096 promotes to int; it might be unsigned int.
4097 * data/yacc.c (yy_reduce_print): Likewise.
4098
4099 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
4100 be #defined in the prologue, not in the Bison declarations.
4101 This fixes Debian Bug 102878, reported by Shaul Karl.
4102
41032002-12-02 Paul Eggert <eggert@twinsun.com>
4104
4105 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
4106 * lib/strtoul.c: New file, from gnulib.
4107 This fixes a porting bug reported by Peter Klein in
4108 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
4109
41102002-11-30 Paul Eggert <eggert@twinsun.com>
4111
4112 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
4113 and put only a forward declaration in the prologue. This is for
4114 consistency with the other scanner helper functions.
4115
4116 Type clashes now generate warnings, not errors, since it
4117 appears that POSIX may allow some grammars with type clashes.
4118 * src/reader.c (grammar_current_rule_check): Warn about
4119 type clashes instead of complaining.
4120 * tests/input.at (Type Clashes): Expect warnings, not complaints.
4121
4122 Add Yacc library, since POSIX requires it.
4123 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
4124 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
4125 * lib/main.c, lib/yyerror.c: New files.
4126
4127 gram_error can be static; it need not be extern.
4128 * src/reader.h (gram_error): Remove decl.
4129 * src/parse-gram.y (gram_error): Now static. Add static decl.
4130 (print_token_value): Omit parameter names from forward decl,
4131 for consistency.
4132
41332002-11-29 Paul Eggert <eggert@twinsun.com>
4134
4135 * doc/bison.texinfo: Emphasize that yylex and yyerror must
4136 be declared before being used. E.g., one should typically
4137 declare them in the prologue. Use GNU coding style in examples.
4138 Put "const" consistently after the type it modifies. Mention
4139 that C99 supports "inline". Mention that yyerror traditionally
4140 returns "int".
4141
4142 %parse-param and %lex-param now take just one argument, the
4143 declaration; the argument name is deduced from the declaration.
4144
4145 * doc/bison.texinfo (Parser Function, Pure Calling, Error
4146 Reporting, Table of Symbols): Document this.
4147 * src/parse-gram.y (add_param): New function.
4148 (COMMA): Remove.
4149 (declaration): Implement new rule for %parse-param and %lex-param.
4150 * src/scan-gram.l: "," now elicits a warning, rather than being
4151 a token; this is more compatible with byacc.
4152 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
4153
41542002-11-27 Paul Eggert <eggert@twinsun.com>
4155
4156 Rename identifiers to avoid real and potential collisions.
4157
4158 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
4159 to avoid collision with lex macro described by Bruce Lilly in
4160 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
4161 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
4162 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
4163 * src/parse-gram.y (print_token_value): Renamed from yyprint.
4164 All uses changed.
4165 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
4166 The name "yycontrol" violates the name space rules, and this stuff
4167 wasn't being used anyway.
4168 (input): Remove action; this stuff wasn't being used.
4169 (gram_error): Rename local variable yylloc -> loc.
4170 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
4171 (YY_DECL): Don't use "yy" at start of local variables.
4172 All uses changed, e.g., yylloc -> loc.
4173 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
4174 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
4175 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
4176 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
4177
4178 * src/parse-gram.y (gram_error): loc is now const *.
4179 * src/reader.h (gram_error): Likewise.
4180
41812002-11-24 Paul Eggert <eggert@twinsun.com>
4182
4183 Version 1.75c.
4184
4185 * tests/actions.at (Actions after errors): Use an output format
4186 more similar to that of the Printers and Destructors test.
4187 Test the position of the ';' token too.
4188 (Printers and Destructors): Likewise.
4189 (Printers and Destructors: %glr-parser): Remove for now, to avoid
4190 unnecessarily alarming people when the test fails.
4191
4192 * data/yacc.c (yyerrlab1): Move this label down, so that the
4193 parser does not discard the lookahead token if the user code
4194 invokes YYERROR. This change is required for POSIX conformance.
4195
4196 * lib/error.c: Sync with gnulib.
4197
41982002-11-22 Paul Eggert <eggert@twinsun.com>
4199
4200 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
4201 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
4202 * lib/xmalloc.c: Likewise.
4203
42042002-11-20 Paul Eggert <eggert@twinsun.com>
4205
4206 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
4207
42082002-11-20 Paul Eggert <eggert@twinsun.com>
4209
4210 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
4211 should use `if (! x) abort ();' rather than `assert (x);', and
4212 anyway it's one less thing to worry about configuring.
4213
4214 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
4215 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
4216 and replace all instances of assert with abort.
4217 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
4218 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
4219
4220 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
4221 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
4222 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
4223 hash_find_entry, hash_rehash, hash_insert): Likewise.
4224 * src/conflicts.c (resolve_sr_conflict): Likewise.
4225 * src/lalr.c (set_goto_map, map_goto): Likewise.
4226 * src/nullable.c (nullable_compute): Likewise.
4227 * src/output.c (prepare_rules, token_definitions_output): Likewise.
4228 * src/reader.c (packgram, reader): Likewise.
4229 * src/state.c (state_new, state_free, state_transitions_set,
4230 state_reduction_find): Likewise.
4231 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
4232 symbol_pack): Likewise.
4233 * src/tables.c (conflict_row, pack_vector): Likewise.
4234 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
4235 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
4236 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
4237 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
4238
4239 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
4240 (ARGMATCH_CONSTRAINT): New macro.
4241 (ARGMATCH_ASSERT): Use it.
4242
4243 * src/system.h (verify): New macro.
4244 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
4245 rather than assert.
4246 * src/tables.c (tables_generate): Likewise.
4247
4248 * src/struniq.c (struniq_assert): Now returns void, and aborts
4249 if the assertion is false.
4250 (struniq_assert_p): Remove.
4251 * src/struniq.h: Likewise.
4252
42532002-11-18 Paul Eggert <eggert@twinsun.com>
4254
4255 * data/glr.c (yygetLRActions): Replace `yyindex' with
4256 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
4257 This fixes the regression with Sun ONE Studio 7 cc that I reported in
4258 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
4259
42602002-11-18 Akim Demaille <akim@epita.fr>
4261
4262 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
4263 space.
4264 From Tim Van Holder.
4265
42662002-11-17 Paul Eggert <eggert@twinsun.com>
4267
4268 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
4269 to "SyntaxError" for consistency with my 2002-11-15 change.
4270
4271 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
4272 not define to {}, since this breaks the common use of `YYDPRINTF
4273 ((...));' if a single statement is desired (e.g. before `else').
4274 Work around GCC warnings by surrounding corresponding calls with
4275 {} if needed.
4276 (yyhasResolvedValue): Remove unused function.
4277 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
4278 loop body.
4279 (yyreportSyntaxError): Renamed from yyreportParseError.
4280 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
4281 All uses changed.
4282 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
4283 extern when possible. Remove unused initializations.
4284
42852002-11-16 Akim Demaille <akim@epita.fr>
4286
4287 Augment the similarity between GLR and LALR traces.
4288
4289 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
4290 (YY_REDUCE_PRINT): New.
4291 (yyparse): Use them.
4292 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
4293 YYDPRINT here.
4294 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
4295 state reached after the reduction/recovery, since...
4296 (yyparse, yyprocessOneStack): Report the state we are entering in.
4297
42982002-11-16 Akim Demaille <akim@epita.fr>
4299
4300 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
4301 Add support for --trace=skeleton.
4302 * src/scan-skel.l: %option debug.
4303 Scan strings of non-@ or \n instead of character by character.
4304 (scan_skel): Handle trace_skeleton.
4305 (QPUTS): New.
4306 (@output_parser_name@, @output_header_name@): ``Restore'' their
4307 support (used to be M4 macros).
4308 * data/yacc.c: Quote larger chunks, a la glr.c.
4309 * data/lalr1.cc: Likewise.
4310 The header guards are no longer available, so use some other
4311 string than `YYLSP_NEEDED'.
4312
43132002-11-16 Akim Demaille <akim@epita.fr>
4314
4315 Make the ``Printers and Destructors'' test more verbose, taking
4316 `yacc.c''s behavior as (possibly wrong) reference.
4317
4318 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
4319 instead of fprint on stdout.
4320 Set and report the last_line of the symbols.
4321 Consistently display values and locations.
4322
43232002-11-16 Paul Eggert <eggert@twinsun.com>
4324
4325 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
4326
43272002-11-15 Paul Eggert <eggert@twinsun.com>
4328
4329 * tests/actions.at (Actions after errors): New test case.
4330
4331 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
4332 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
4333 tests/action.at, tests/calc.at, tests/conflicts.at,
4334 tests/cxx-type.at, tests/regression.at:
4335 "parse error" -> "syntax error" for POSIX compatibility.
4336 "parsing stack overflow..." -> "parser stack overflow" so
4337 that code matches Bison documentation.
4338
43392002-11-15 Akim Demaille <akim@epita.fr>
4340
4341 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
4342 take two BRACED_CODE, not two string_content.
4343 Free the scanner's obstack when we are done.
4344 (code_content): New.
4345 * tests/calc.at: Adjust.
4346 * doc/bison.texinfo: Adjust.
4347 Also, make sure to include the `,' for these declarations.
4348
43492002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
4350
4351 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
4352 definition; avoids potential autoreconf problems.
4353
43542002-11-15 Akim Demaille <akim@epita.fr>
4355
4356 Always check the value returned by yyparse.
4357
4358 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
4359 returned by yyparse.
4360 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
4361 Adjust calls.
4362 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
4363 returned by yyparse.
4364
43652002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4366
4367 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
4368 on input.at test.
4369
43702002-11-14 Paul Eggert <eggert@twinsun.com>
4371
4372 * src/output.c (output_skeleton): Call xfopen instead of
4373 duplicating xfopen's body.
4374
4375 Fix bugs reported by Nelson H. F. Beebe in
4376 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
4377
4378 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
4379 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
4380 Group compiler. Instead, use "$CC -E bar.c". Include the .h
4381 file twice in the grammar, as an extra check.
4382
4383 * tests/input.at (Torturing the Scanner): Surround the
4384 backslash-newline tests with "#if 0", to make it less likely that
4385 we'll run into compiler bugs. Bring back solitary \ inside
4386 comment, but add a closing comment to work around HP C bug. Don't
4387 test backslash-newline in C character constant.
4388
43892002-11-14 Akim Demaille <akim@epita.fr>
4390
4391 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
4392 status of the compiler.
4393 Calling `exit 1' is no longer needed.
4394 Reported by Nelson H. F. Beebe.
4395
43962002-11-14 Akim Demaille <akim@epita.fr>
4397
4398 * tests/atlocal.in (CPPFLAGS): We have config.h.
4399 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
4400 New.
4401 * tests/actions.at, tests/calc.at, tests/conflicts.at,
4402 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
4403 * tests/regression.at, tests/torture.at: Use them for all the
4404 grammars that are to be compiled.
4405 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
4406 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
4407 * doc/bison.texinfo (GLR Parsers): Document `inline'.
4408
44092002-11-14 Akim Demaille <akim@epita.fr>
4410
4411 * doc/bison.texinfo: Various formatting changes (alignments in
4412 samples, additional @group/@end group, GCS in samples.
4413 Use @deffn instead of simple @table to define the directives,
4414 macros, variables etc.
4415
44162002-11-13 Paul Eggert <eggert@twinsun.com>
4417
4418 Fix some bugs reported by Albert Chin-A-Young in
4419 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
4420
4421 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
4422 -o c"; the HP C compiler chatters during compilation.
4423 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
4424 * tests/headers.at (export YYLTYPE): Likewise.
4425
4426 * tests/input.at (Torturing the Scanner): Remove lines containing
4427 solitary backslashes, as they tickle a bug in the HP C compiler.
4428
4429 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
4430 comments, since they're not portable. Use GNU coding style.
4431
44322002-11-13 Akim Demaille <akim@epita.fr>
4433
4434 * data/yacc.c: Leave bigger chunks of quoted text.
4435 (YYDSYMPRINTF): New.
4436 Use it to report symbol activities.
4437 * data/glr.c (YYDSYMPRINTF): New.
4438 Use it.
4439
44402002-11-12 Paul Eggert <eggert@twinsun.com>
4441
4442 Version 1.75b.
4443
4444 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
4445 (yyglrReduce): Return yyok, not 0.
4446 This should avoid the enumerated-type warnings reported
4447 by Nelson H. F. Beebe in
4448 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
4449
4450 * lib/bbitset.h (BITSET_INLINE): Remove.
4451 * lib/bitset.h [! BITSET_INLINE]: Remove.
4452 (bitset_set, bitset_reset, bitset_test): Rename local vars
4453 to avoid shadowing warnings by GCC.
4454
4455 * data/glr.c (inline): Remove #define. It's the user's
4456 responsibility to #define it away, just like 'const'.
4457 This fixes one of the bugs reported by Nelson H. F. Beebe in
4458 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
4459
4460 * Makefile.maint (po-check): Scan .l and .y files instead of the
4461 .c and the .h files that they generate. This fixes the bug
4462 reported by Tim Van Holder in:
4463 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
4464 Look for N_ as well as for _. Try to avoid matching #define for
4465 N_ and _.
4466 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
4467 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
4468 * src/scan-gram.l: Revamp regular expressions so that " and '
4469 do not confuse xgettext.
4470
4471 * src/struniq.h (struniq_new): Do not declare the return type
4472 to be 'const'; this violates the C standard.
4473 * src/struniq.c (struniq_new): Likewise.
4474
44752002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
4476
4477 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
4478 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
4479 linker.
4480
44812002-11-12 Akim Demaille <akim@epita.fr>
4482
4483 * Makefile.maint: Sync with Autoconf:
4484 (local_updates): New.
4485
44862002-11-12 Akim Demaille <akim@epita.fr>
4487
4488 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
4489
44902002-11-12 Akim Demaille <akim@epita.fr>
4491
4492 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
4493 locations.
4494
44952002-11-12 Akim Demaille <akim@epita.fr>
4496
4497 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
4498 not yyvalue.
4499
45002002-11-12 Akim Demaille <akim@epita.fr>
4501
4502 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
4503 Use it to test the GLR parser.
4504
45052002-11-12 Akim Demaille <akim@epita.fr>
4506
4507 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
4508 defines it.
4509 * data/glr.c (yystos): New.
4510 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
4511 (YYDSYMPRINT): New.
4512 (yyval): Don't define it, it is handled via M4.
4513 (yyrecoverParseError): Free verbosely the discarded symbols.
4514 * data/yacc.c (yysymprint): Remove, rather...
4515 (b4_yysymprint_generate): invoke.
4516 * data/c.m4 (b4_yysymprint_generate): New.
4517 Accept pointers as arguments, as opposed to the version from
4518 yacc.c.
4519 (b4_yydestruct_generate): Likewise.
4520 * tests/cations.at (Printers and Destructors): Use Bison directives
4521 instead of CPP macros.
4522 Don't rely on internal details.
4523
45242002-11-12 Akim Demaille <akim@epita.fr>
4525
4526 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
4527 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
4528 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
4529 it against YYEMPTY and so forth), work on yytoken (i.e., set
4530 it to YYEMPTY etc.).
4531 (yydestruct): Replace with a b4_yydestruct_generate invocation.
4532 (b4_symbol_actions): Remove.
4533 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
4534 for 0, end-of-input.
4535
45362002-11-12 Akim Demaille <akim@epita.fr>
4537
4538 * doc/bison.texinfo (Destructor Decl): New.
4539
45402002-11-12 Akim Demaille <akim@epita.fr>
4541
4542 * src/tables.c (tables_generate): Use free for pointers that
4543 cannot be NULL, not XFREE.
4544 (pack_vector): Use assert, not fatal, for bound violations.
4545 * src/state.c (state_new): Likewise.
4546 * src/reader.c (reader): Likewise.
4547 * src/lalr.c (set_goto_map): Likewise.
4548 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
4549 the file name.
4550
45512002-11-12 Akim Demaille <akim@epita.fr>
4552
4553 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
4554 Restore.
4555 * src/scan-gram.l (last_string): Is global to the file, not to
4556 yylex.
4557 * src/parse-gram.y (input): Don't append the epilogue here,
4558 (epilogue.opt): do it here, and free the scanner's obstack.
4559 * src/reader.c (epilogue_set): Rename as...
4560 (epilogue_augment): this.
4561 * data/c.m4 (b4_epilogue): Defaults to empty.
4562
45632002-11-12 Akim Demaille <akim@epita.fr>
4564
4565 * src/getargs.c (long_options): Remove duplicates.
4566 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
4567 Remove.
4568 * doc/bison.rnh: Remove.
4569 * doc/bison.texinfo (VMS Invocation): Remove.
4570
45712002-11-12 Akim Demaille <akim@epita.fr>
4572
4573 * src/struniq.h, src/struniq.c (struniq_t): Is const.
4574 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
4575
4576 Use struniq for symbols.
4577
4578 * src/symtab.h (symbol_t): The tag member is a struniq.
4579 (symbol_type_set): Adjust.
4580 * src/symtab.c (symbol_new): Takes a struniq.
4581 (symbol_free): Don't free the tag member.
4582 (hash_compare_symbol_t, hash_symbol_t): Rename as...
4583 (hash_compare_symbol, hash_symbol): these.
4584 Use the fact that tags as struniqs.
4585 (symbol_get): Use struniq_new.
4586 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
4587 Returns a strniq.
4588 * src/reader.h (merger_list, grammar_currentmerge_set): The name
4589 and type members are struniqs.
4590 * src/reader.c (get_merge_function)
4591 (grammar_current_rule_merge_set): Adjust.
4592 (TYPE, current_type): Are struniq.
4593
4594 Use struniq for file names.
4595
4596 * src/files.h, src/files.c (infile): Split into...
4597 (grammar_file, current_file): these.
4598 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
4599 * src/reduce.c (reduce_print): Likewise.
4600 * src/getargs.c (getargs): Likewise.
4601 * src/complain.h, src/complain.c: Likewise.
4602 * src/main.c (main): Call struniqs_new early enough to use it for
4603 file names.
4604 Don't free the input file name.
4605
46062002-11-12 Akim Demaille <akim@epita.fr>
4607
4608 * src/symtab.c (symbol_free): Remove dead deactivated code:
4609 type_name are properly removed.
4610 Don't use XFREE to free items that cannot be NULL.
4611 * src/struniq.h, src/struniq.c: New.
4612 * src/main.c (main): Initialize/free struniqs.
4613 * src/parse-gram.y (%union): Add astruniq member.
4614 (yyprint): Adjust.
4615 * src/scan-gram.l (<{tag}>): Return a struniq.
4616 Free the obstack bit that used to store it.
4617 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
4618
46192002-11-11 Paul Eggert <eggert@twinsun.com>
4620
4621 Revamp to fix many (but not all) of the C- and M4-related quoting
4622 problems. Among other things, this fixes the Bison bug reported
4623 by Jan Hubicka when processing the Bash grammar; see:
4624 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
4625
4626 Use new @ escapes consistently. Represent brackets with @{ and @}
4627 rather than @<:@ and @:>@, since this works a bit better with dumb
4628 editors like vi. Represent @ with @@, since @ is now consistently
4629 an escape. Use @oline@ and @ofile@ rather than __oline__ and
4630 __ofile__, to avoid unexpected expansions. Similarly, use @output
4631 rather than #output.
4632
4633 * data/c.m4 (b4_copyright): Omit file name from comment, since
4634 the file name could contain "*/".
4635 (b4_synclines_flag): Don't quote the 2nd argument; it should already
4636 be quoted. All uses changed.
4637
4638 * data/glr.c: Use new @ escapes consistently.
4639 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
4640 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
4641 Remove, since they couldn't handle arbitrary characters in file
4642 names.
4643 * data/lalr1.cc: Likewise.
4644 * data/yacc.c: Likewise.
4645
4646 * src/files.c (output_infix): Remove; all uses removed.
4647 * src/files.h: Likewise.
4648
4649 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
4650 mishandled funny characters in file names, and anyway it isn't
4651 needed any more.
4652 * data/yacc.c: Likewise.
4653 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
4654
4655 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
4656 * data/yacc.c: Likewise.
4657
4658 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
4659 strings now.
4660 (muscle_init): Quote filename as a C string.
4661 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
4662 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
4663 * src/output.c (escaped_file_name_output): New function.
4664 (prepare_symbols): Quote tokens for M4.
4665 (prepare): Don't insert output_infix, output_prefix,
4666 output_parser_name, output_header_name; this is now down by scan-skel.
4667 Insert skeleton as a C string.
4668
4669 * src/output.c (user_actions_output, symbol_destructors_output,
4670 symbol_printers_output): Quote filenames for C and M4.
4671 * src/reader.c (prologue_augment, epilogue_set): Likewise.
4672
4673 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
4674 escapes other than \\ and \'; this simplifies the code.
4675 (<SC_STRING>): Likewise, for \\ and \".
4676 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
4677 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
4678 Use new escapes @{ and @} for [ and ].
4679
4680 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
4681 them with auto vars.
4682 Switch to new escape scheme, where @ is the escape character uniformly.
4683 Abort if a stray escape character is found. Avoid unbounded input
4684 buffer when parsing non-escaped text.
4685
4686 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
4687 __oline__, #output, $@, and @{ do not have unintended meanings.
4688
46892002-11-09 Paul Eggert <eggert@twinsun.com>
4690
4691 Fix the test failure due to GCC warnings described in
4692 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
4693 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
4694 evaluate to 0 if it's impossible for NINF to be in the respective
4695 table.
4696 (yygetLRActions, yyrecoverParseError): Use them.
4697
4698 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
4699 counted in the token inserted at end of file. Now takes
4700 location_t *, not location_t, so that the location can be
4701 adjusted. All uses changed.
4702
4703 * tests/regression.at (Invalid inputs): Adjust wording in
4704 diagnostic to match the new behavior.
4705
4706 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
4707 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
4708 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
4709 abort ();'. This reduces the runtime of the "Many lookaheads"
4710 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
4711 GCC 3.2.
4712
47132002-11-07 Paul Eggert <eggert@twinsun.com>
4714
4715 * src/parse-gram.y (CHARACTER): Remove unused token.
4716 All uses removed.
4717
4718 * src/scan-gram.l: Remove stack option. We no longer use the
4719 stack, since the stack was never deeper than 1; instead, use the
4720 new auto var c_context to record the stacked value.
4721
4722 Remove nounput option. At an unexpected end of file, we now unput
4723 the minimal input necessary to end cleanly; this simplifies the
4724 code.
4725
4726 Avoid unbounded token sizes where this is easy.
4727
4728 (unexpected_end_of_file): New function.
4729 Use it to systematize the error message on unexpected EOF.
4730 (last-string): Now auto, not static.
4731 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
4732 (scanner_last_string_free): Remove; not used.
4733 (percent_percent_count): Move decl to just before use.
4734 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
4735 not the (never otherwised-used) CHARACTER.
4736
47372002-11-07 Akim Demaille <akim@epita.fr>
4738
4739 Let yyerror always receive the msg as last argument, so that
4740 yyerror can be variadic.
4741
4742 * data/yacc.c (b4_yyerror_args): New.
4743 Use it when calling yyerror.
4744 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
4745 Use it when calling yyerror.
4746 * doc/bison.texinfo (Error Reporting): Adjust.
4747 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
4748 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
4749
47502002-11-06 Akim Demaille <akim@epita.fr>
4751
4752 #line should have quoted strings.
4753 Ideally, this should be done by m4_quotearg.
4754
4755 * src/scan-skel.l: Include quotearg.h.
4756 Quote __ofile__.
4757 * src/output.c (symbol_printers_output)
4758 (symbol_destructors_output): Quote the file name.
4759
47602002-11-06 Akim Demaille <akim@epita.fr>
4761
4762 * tests/regression.at (Invalid inputs): Adjust to the recent
4763 messages.
4764
47652002-11-06 Akim Demaille <akim@epita.fr>
4766
4767 Restore --no-lines.
4768 Reported by Jim Kent.
4769
4770 * data/c.m4 (b4_syncline): New.
4771 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
4772 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
4773 * src/output.c (user_actions_output): Likewise.
4774 (prepare): Define 'b4_synclines_flag'.
4775 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
4776
47772002-11-06 Akim Demaille <akim@epita.fr>
4778
4779 * src/main.c (main): Free `infile'.
4780 * src/scan-gram.l (handle_syncline): New.
4781 Recognize `#line'.
4782 * src/output.c (user_actions_output, symbol_destructors_output)
4783 (symbol_printers_output): Use the location's file name, not
4784 infile.
4785 * src/reader.c (prologue_augment, epilogue_set): Likewise.
4786
47872002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4788
4789 * src/tables.c (matching_state): Don't allow states to match if
4790 either has GLR conflict entries.
4791
47922002-11-05 Paul Eggert <eggert@twinsun.com>
4793
4794 * src/scan-gram.l: Use more accurate diagnostics, e.g.
4795 "integer out of range" rather than "invalid value".
4796 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
4797 accordingly.
4798
4799 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
4800 Also, remove one static variable in the scanner.
4801
4802 * src/scan-gram.l (braces_level): Now auto, not static.
4803 Initialize to zero if the compiler is being picky.
4804 (INITIAL): Clear braces_level instead of incrementing it.
4805 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
4806 as POSIX 1003.1-2001 requires.
4807 * src/system.h (IF_LINT): New macro, taken from coreutils.
4808 * configure.ac: Define "lint" if --enable-gcc-warnings.
4809
48102002-11-05 Akim Demaille <akim@epita.fr>
4811
4812 * src/scan-gram.l: When it starts with `%', complain about the
4813 whole directive, not just that `invalid character: %'.
4814
48152002-11-04 Akim Demaille <akim@epita.fr>
4816
4817 * Makefile.maint: Update from Autoconf.
4818 (update, cvs-update, po-update, do-po-update): New.
4819
48202002-11-04 Akim Demaille <akim@epita.fr>
4821
4822 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
4823 and yyerror.
4824 Have yyerror `use' its arguments.
4825 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
4826 returns true when location & yacc & pure & parse-param.
4827 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
4828
48292002-11-04 Akim Demaille <akim@epita.fr>
4830
4831 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
4832 clashes.
4833 * src/scan-gram.l: Use [\'] instead of ['] to pacify
4834 font-lock-mode.
4835 Use complain_at.
4836 Use quote, not quote_n since LOCATION_PRINT no longer uses the
4837 slot 0.
4838
48392002-11-03 Paul Eggert <eggert@twinsun.com>
4840
4841 * src/reader.c (get_merge_function, grammar_current_rule_check):
4842 Use consistent diagnostics for reporting type name clashes.
4843 Quote the types with <>, for consistency with Yacc.
4844 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
4845
48462002-11-03 Akim Demaille <akim@epita.fr>
4847
4848 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
4849 New.
4850 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
4851 (b4_parse_param): Remove.
4852 Use b4_identification.
4853 Propagate b4_pure_args where needed to pass them to yyerror.
4854 * data/glr.m4 (b4_parse_param): Remove.
4855 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
4856 (b4_lpure_formals): New.
4857 Use b4_identification.
4858 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
4859 b4_user_formals and b4_user_args.
4860 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
4861 (yyreportAmbiguity): When using a pure parser, also need
4862 the location, and the parse-params.
4863 Adjust callers.
4864 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
4865 When using a pure parser, also need the parse-params.
4866 Adjust callers.
4867 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
4868 (%pure-parser + %parse-param) LALR and GLR parsers.
4869 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
4870 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
4871 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
4872 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
4873 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
4874 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
4875 * doc/bison.texinfo: Untabify the whole file.
4876 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
4877 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
4878 (Error Reporting): Adjust to these new directives.
4879 Document %error-verbose, deprecate YYERROR_VERBOSE.
4880
48812002-11-03 Akim Demaille <akim@epita.fr>
4882
4883 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
4884 AT_CHECK_CALC_GLR invocations to use % directives, instead of
4885 command line options.
4886 * tests/cxx-type.at: Formatting changes.
4887
48882002-11-03 Paul Eggert <eggert@twinsun.com>
4889
4890 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
4891 to count columns correctly, and to check for invalid inputs.
4892
4893 Use mbsnwidth to count columns correctly. Account for tabs, too.
4894 Include mbswidth.h.
4895 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
4896 (extend_location): New function.
4897 (YY_LINES): Remove.
4898
4899 Handle CRLF in C code rather than in Lex code.
4900 (YY_INPUT): New macro.
4901 (no_cr_read): New function.
4902
4903 Scan UCNs, even though we don't fully handle them yet.
4904 (convert_ucn_to_byte): New function.
4905
4906 Handle backslash-newline correctly in C code.
4907 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
4908 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
4909 all uses changed.
4910 (tag, splice): New EREs. Do not allow NUL or newline in tags.
4911 Use {splice} wherever C allows backslash-newline.
4912 YY_STEP after space, newline, vertical-tab.
4913 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
4914
4915 (letter, id): Don't assume ASCII; e.g., spell out a-z.
4916
4917 ({int}, handle_action_dollar, handle_action_at): Check for integer
4918 overflow.
4919
4920 (YY_STEP): Omit trailing semicolon, so that it's more like C.
4921
4922 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
4923 as well as \000. Check for UCHAR_MAX, not 255.
4924 Allow \x with an arbitrary positive number of digits, as in C.
4925 Check for overflow here.
4926 Allow \? and UCNs, for compatibility with C.
4927
4928 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
4929 with quote slot used by complain_at.
4930
4931 * tests/input.at: Add tests for backslash-newline, m4 quotes
4932 in symbols, long literals, and funny escapes in strings.
4933
4934 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
4935 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
4936 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
4937 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
4938 * m4/mbswidth.m4: New file, from GNU coreutils.
4939
4940 * doc/bison.texinfo (Grammar Outline): Document // comments.
4941 (Symbols): Document that trigraphs have no special meaning in Bison,
4942 nor is backslash-newline allowed.
4943 (Actions): Document that trigraphs have no special meaning.
4944
4945 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
4946 no longer used.
4947
49482002-11-02 Paul Eggert <eggert@twinsun.com>
4949
4950 * src/reader.c: Don't include quote.h; not needed.
4951 (get_merge_function): Reword warning to be consistent with
4952 type clash diagnostic in grammar_current_rule_check.
4953
4954 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
4955 bug in trigraph handling.
4956
4957 * src/output.c (prepare_symbols): When printing token names,
4958 escape "[" as "@<:@" and likewise for "]".
4959
4960 * src/system.h (errno): Remove declaration, as we are now
4961 assuming C89 or better, and C89 guarantees errno.
4962
49632002-10-30 Paul Eggert <eggert@twinsun.com>
4964
4965 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
4966 Check for close failures.
4967 * src/files.h (xfclose): Return void, not int, since it always
4968 returned zero.
4969 * src/files.c (xfclose): Likewise. Report I/O error if ferror
4970 indicates one.
4971 * src/output.c (output_skeleton): Use xfclose rather than fclose
4972 and ferror. xfclose now checks ferror.
4973
4974 * data/glr.c (YYLEFTMOST_STATE): Remove.
4975 (yyreportTree): Use a stack-based leftmost state. This avoids
4976 our continuing battles with bogus warnings about initializers.
4977
49782002-10-30 Akim Demaille <akim@epita.fr>
4979
4980 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
4981 #if.
4982
49832002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4984
4985 * tests/glr-regr1.at: New test for reported regressions.
4986 * tests/testsuite.at: Add glr-regr1.at test.
4987 * tests/Makefile.am: Add glr-regr1.at test.
4988
49892002-10-24 Paul Eggert <eggert@twinsun.com>
4990
4991 Version 1.75a.
4992
4993 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
4994 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
4995 we use malloc. Don't assume 'A' through 'Z' are contiguous.
4996 Don't assume strdup exists; POSIX says its an XSI extension.
4997 Check for buffer overflow on input.
4998
49992002-10-24 Akim Demaille <akim@epita.fr>
5000
5001 * src/output.c (output_skeleton): Don't disable M4sugar comments
5002 too soon: it results in comments being expanded.
5003 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
5004 first output.
5005
50062002-10-24 Akim Demaille <akim@epita.fr>
5007
5008 * data/yacc.c (m4_int_type): New.
5009 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
5010 char' as only yacc.c wants K&R portability.
5011 * data/glr.c (yysigned_char): Remove.
5012 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
5013 Reported by Quoc Peyrot.
5014
50152002-10-23 Paul Eggert <eggert@twinsun.com>
5016
5017 * src/main.c (main): With --trace=time, report times even if a
5018 non-fatal error occurs. Formerly, the times were reported in some
5019 such cases but not in others.
5020 * src/reader.c (reader): Just return if a complaint has been issued,
5021 instead of exiting, so that 'main' can report times.
5022
50232002-10-22 Akim Demaille <akim@epita.fr>
5024
5025 * src/system.h: Include sys/types.
5026 Reported by Bert Deknuydt.
5027
50282002-10-23 Paul Eggert <eggert@twinsun.com>
5029
5030 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
5031 Suggested by Art Haas.
5032
50332002-10-22 Paul Eggert <eggert@twinsun.com>
5034
5035 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
5036 decl; not needed any more.
5037 * src/main.c (main): Use return to exit, undoing yesterday's change.
5038 The last OS that we could find where this wouldn't work is
5039 SunOS 3.5, and that's too old to worry about now.
5040
5041 * data/glr.c (struct yyltype): Define members even when not
5042 doing locations. This is more consistent with yacc.c, and it
5043 works around the following bug reports:
5044 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
5045 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
5046
5047 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
5048 @acronym consistently. Standardize on "Yacc" instead of "YACC",
5049 "Algol" instead of "ALGOL". Give a bit more history about BNF.
5050
50512002-10-22 Akim Demaille <akim@epita.fr>
5052
5053 * data/README: New.
5054
50552002-10-21 Paul Eggert <eggert@twinsun.com>
5056
5057 Be consistent about 'bool'; the old code used an enum in one
5058 module and an int in another, and this violates the C standard.
5059 * m4/stdbool.m4: New file, from coreutils 4.5.3.
5060 * configure.ac (AC_HEADER_STDBOOL): Add.
5061 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
5062 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
5063 * src/symtab.c (hash_compare_symbol_t): Likewise.
5064 * src/system.h (bool, false, true): Use a definition consistent
5065 with ../lib/hash.c. All uses changed.
5066
5067 * src/complain.c (warning_issued): Renamed from warn_message_count,
5068 so that we needn't worry about integer overflow (!).
5069 Now of type bool. All uses changed.
5070 (complaint_issued): Renamed from complain_message_count; likewise.
5071
5072 * src/main.c (main): Use exit to exit with failure.
5073
5074 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
5075 rather than 1 and 0.
5076 * src/main.c (main): Likewise.
5077 * src/getargs.c (getargs): Likewise.
5078 * src/reader.c (reader): Likewise.
5079
5080 * src/getarg.c (getargs): Remove duplicate code for
5081 "Try `bison --help'".
5082
5083 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
5084 What was that "2" for?
5085
5086 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
5087 * src/getargs.c (usage): Likewise.
5088
5089 * src/getargs.c (getargs): When there are too few operands, report
5090 the last one. When there are too many, report the first extra
5091 one. This is how diffutils does it.
5092
50932002-10-20 Paul Eggert <eggert@twinsun.com>
5094
5095 Remove K&R vestiges.
5096 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
5097 * src/complain.c (VA_START): Remove. Assume prototypes.
5098 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
5099 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
5100 fatal): Assume prototypes.
5101 * src/complain.h: Assume prototypes.
5102 * src/system.h (PARAMS): Remove.
5103 Include <limits.h> unconditionally, since it's guaranteeed even
5104 for a freestanding C89 compiler.
5105 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
5106 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
5107
51082002-10-20 Akim Demaille <akim@epita.fr>
5109
5110 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
5111 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
5112 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
5113 (yyresolveStates, yyresolveAction, yyresolveStack)
5114 (yyprocessOneStack): Use them.
5115 (yy_reduce_print): New.
5116 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
5117
51182002-10-20 Akim Demaille <akim@epita.fr>
5119
5120 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
5121 arguments and output `void'.
5122 (b4_c_function): Rename as...
5123 (b4_c_function_def): this.
5124 (b4_c_function_decl, b4_c_ansi_function_def)
5125 (b4_c_ansi_function_decl): New.
5126 Change the interpretation of the arguments: before `int, foo', now
5127 `int foo, foo'.
5128 * data/yacc.c (yyparse): Prototype and define thanks to these.
5129 Adjust b4_c_function_def uses.
5130 * data/glr.c (yyparse): Likewise, but ANSI only.
5131
51322002-10-20 Akim Demaille <akim@epita.fr>
5133
5134 * src/output.c (prepare): Move the definition of `tokens_number',
5135 `nterms_number', `undef_token_number', `user_token_number_max'
5136 to...
5137 (prepare_tokens): Here.
5138 (prepare_tokens): Rename as...
5139 (prepare_symbols): this.
5140 (prepare): Move the definition of `rules_number' to...
5141 (prepare_rules): here.
5142 (prepare): Move the definition of `last', `final_state_number',
5143 `states_number' to...
5144 (prepare_states): here.
5145 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
5146
51472002-10-20 Akim Demaille <akim@epita.fr>
5148
5149 * src/tables.h, src/tables.c, src/output.c: Comment changes.
5150
51512002-10-20 Akim Demaille <akim@epita.fr>
5152
5153 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
5154 * data/c.m4: here.
5155
51562002-10-20 Akim Demaille <akim@epita.fr>
5157
5158 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
5159 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
5160 `pair'.
5161 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
5162 `name' to...
5163 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
5164 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
5165 These.
5166
51672002-10-19 Paul Eggert <eggert@twinsun.com>
5168
5169 Do not create a temporary file, as that involves security and
5170 cleanup headaches. Instead, use a pair of pipes.
5171 Derived from a suggestion by Florian Krohm.
5172 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
5173 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
5174 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
5175 (BISON_PREREQ_SUBPIPE): Add.
5176 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
5177 Add subpipe.h, subpipe.c.
5178 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
5179 * po/POTFILES.in: Add lib/subpipe.c.
5180 * src/output.c: Include "subpipe.h".
5181 (m4_invoke): Remove decl.
5182 (scan_skel): New decl.
5183 (output_skeleton): Use pipe rather than temporary file for m4 input.
5184 Check that m4sugar.m4 is readable, to avoid deadlock.
5185 Check for pipe I/O error.
5186 * src/scan-skel.l (readpipe): Remove decl.
5187 (scan_skel): New function, to be used in place of m4_invoke.
5188 Read from stream rather than file.
5189
5190 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
5191 float, as this generates a warning on Solaris 8 + GCC 3.2 with
5192 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
5193 this generates a more-accurate value anyway.
5194
5195 * lib/timevar.c (timervar_accumulate): Rename locals to
5196 avoid confusion with similarly-named more-global.
5197 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
5198
5199 * src/output.c (prepare): Use xstrdup to convert char const *
5200 to char *, to avoid GCC warning.
5201
52022002-10-19 Akim Demaille <akim@epita.fr>
5203
5204 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
5205 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
5206 Use them to have `calc.y' ready for %pure-parser.
5207 * data/yacc.c (YYLEX): Pass a yylex return type to
5208 b4_c_function_call.
5209
52102002-10-19 Akim Demaille <akim@epita.fr>
5211
5212 Prototype support of %lex-param and %parse-param.
5213
5214 * src/parse-gram.y: Add the definition of the %lex-param and
5215 %parse-param tokens, plus their rules.
5216 Drop the `_' version of %glr-parser.
5217 Add the "," token.
5218 * src/scan-gram.l (INITIAL): Scan them.
5219 * src/muscle_tab.c: Comment changes.
5220 (muscle_insert, muscle_find): Rename `pair' as `probe'.
5221 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
5222 (muscle_entry_s): The `value' member is no longer const.
5223 Adjust all dependencies.
5224 * src/muscle_tab.c (muscle_init): Adjust: use
5225 MUSCLE_INSERT_STRING.
5226 Initialize the obstack earlier.
5227 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
5228 (muscle_pair_list_grow): New.
5229 * data/c.m4 (b4_c_function_call, b4_c_args): New.
5230 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
5231 * tests/calc.at: Use %locations, not --locations.
5232 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
5233
52342002-10-19 Akim Demaille <akim@epita.fr>
5235
5236 * src/getargs.c (usage): Take status as argument and exit
5237 accordingly.
5238 Report the traditional `Try ... --help' message when status != 0.
5239 (usage, version): Don't take a FILE * as arg, it is pointless.
5240 (getargs): When there is an incorrect number of arguments, make it
5241 an error, and report it GNUlically thanks to `usage ()'.
5242
52432002-10-18 Paul Eggert <eggert@twinsun.com>
5244
5245 * data/glr.c (yyreportParseError): Don't assume that sprintf
5246 yields the length of the printed string, as this is not true
5247 on SunOS 4.1.4. Reported by Peter Klein.
5248
5249 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
5250 * tests/conflicts.at (%nonassoc and eof): Likewise.
5251 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
5252
52532002-10-17 Akim Demaille <akim@epita.fr>
5254
5255 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
5256 * src/getargs.c (trace_types, trace_args): Adjust.
5257 * src/reader.c (grammar_current_rule_prec_set)
5258 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
5259 Standardize error messages.
5260 And s/@prec/%prec/!
5261 (reader): Use trace_flag to enable scanner/parser debugging,
5262 instead of an adhoc scheme.
5263 * src/scan-gram.l: Remove trailing debugging code.
5264
52652002-10-16 Paul Eggert <eggert@twinsun.com>
5266
5267 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
5268 MUSCLE_TAB_H.
5269
5270 * NEWS: Officially drop support for building Bison with K&R C,
5271 since it didn't work anyway and it's not worth worrying about.
5272 * Makefile.maint (wget_files): Remove ansi2knr.c.
5273 (ansi2knr.c-url_prefix): Remove.
5274 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
5275 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5276 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
5277
52782002-10-15 Paul Eggert <eggert@twinsun.com>
5279
5280 Stop using the "enum_" trick for K&R-style function definitions;
5281 it confused me, and I was the author! Instead, assume that people
5282 who want to use K&R C compilers (when using these modules in GCC,
5283 perhaps?) will run ansi2knr.
5284
5285 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
5286 All uses of "enum_" changed to "enum ".
5287 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
5288 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
5289
5290 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
5291 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
5292 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
5293 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
5294 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
5295 abitset_not, abitset_ones, abitset_or, abitset_or_and,
5296 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
5297 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
5298 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
5299 Use function prototypes; this removes the need for declaring
5300 static functions simply to provide their prototypes.
5301 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
5302 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
5303 bitset_count_, bitset_create, bitset_dump, bitset_first,
5304 bitset_free, bitset_init, bitset_last, bitset_next,
5305 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
5306 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
5307 bitset_print, bitset_release_memory, bitset_toggle_,
5308 bitset_type_choose, bitset_type_get, bitset_type_name_get,
5309 debug_bitset): Likewise.
5310 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
5311 * lib/bitset_stats.c (bitset_log_histogram_print,
5312 bitset_percent_histogram_print, bitset_stats_and,
5313 bitset_stats_and_cmp, bitset_stats_and_or,
5314 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
5315 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
5316 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
5317 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
5318 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
5319 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
5320 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
5321 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
5322 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
5323 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
5324 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
5325 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
5326 bitset_stats_zero): Likewise.
5327 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
5328 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
5329 bitsetv_dump, debug_bitsetv): Likewise.
5330 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
5331 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
5332 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
5333 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
5334 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
5335 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
5336 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
5337 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
5338 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
5339 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
5340 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
5341 Likewise.
5342 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
5343 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
5344 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
5345 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
5346 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
5347 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
5348 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
5349 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
5350 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
5351 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
5352 lbitset_xor_cmp, lbitset_zero): Likewise.
5353
53542002-10-14 Akim Demaille <akim@epita.fr>
5355
5356 Version 1.75.
5357
53582002-10-14 Akim Demaille <akim@epita.fr>
5359
5360 * tests/Makefile.am (maintainer-check-posix): New.
5361
53622002-10-14 Akim Demaille <akim@epita.fr>
5363
5364 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
5365 member.
5366
53672002-10-14 Akim Demaille <akim@epita.fr>
5368
5369 * src/tables.c (table_ninf_remap): base -> tab.
5370 Reported by Matt Rosing.
5371
53722002-10-14 Paul Eggert <eggert@twinsun.com>
5373
5374 * tests/action.at, tests/calc.at, tests/conflicts.at,
5375 tests/cxx-type.at, tests/headers.at, tests/input.at,
5376 tests/regression.at, tests/synclines.at, tests/torture.at:
5377 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
5378 so that the tests still work even if POSIXLY_CORRECT is set.
5379 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
5380
5381 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
5382 for portability to K&R hosts. Fix typo: signed char is guaranteed
5383 only to 127, not to 128.
5384 * data/glr.c (yysigned_char): New type.
5385 * data/yacc.c (yysigned_char): Likewise.
5386 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
5387
53882002-10-13 Paul Eggert <eggert@twinsun.com>
5389
5390 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
5391 true due to limited range of data type" warning from GCC.
5392
5393 * data/c.m4 (b4_token_defines): Protect against double-inclusion
5394 by wrapping enum yytokentype's definition inside #ifndef
5395 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
5396
53972002-10-13 Akim Demaille <akim@epita.fr>
5398
5399 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
5400 Un yy- yyrhs to avoid the name clash with the global YYRHS.
5401
54022002-10-13 Akim Demaille <akim@epita.fr>
5403
5404 * Makefile.maint: Update from Autoconf 2.54.
5405 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
5406
54072002-10-13 Akim Demaille <akim@epita.fr>
5408
5409 * src/print.c (print_state): Separate the list of solved conflicts
5410 from the other items.
5411 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
5412
54132002-10-13 Akim Demaille <akim@epita.fr>
5414
5415 Let nondeterministic skeletons be usable with deterministic
5416 tables.
5417
5418 With the patch, GAWK compiled by GCC without -O2 passes its test
5419 suite using a GLR parser driven by LALR tables. It fails with -O2
5420 because `struct stat' gives two different answers on my machine:
5421 88 (definition of an auto var) and later 96 (memset on this var).
5422 Hence the stack is badly corrumpted. The headers inclusion is to
5423 blame: if I move the awk.h inclusion before GLR's system header
5424 inclusion, the two struct stat have the same size.
5425
5426 * src/tables.c (pack_table): Always create conflict_table.
5427 (token_actions): Always create conflict_list.
5428 * data/glr.c (YYFLAG): Remove, unused.
5429
54302002-10-13 Akim Demaille <akim@epita.fr>
5431
5432 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
5433 (O0FLAGS): New.
5434 (VALGRIND, GXX): New.
5435 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
5436 * tests/bison.in: Run $PREBISON a pre-command.
5437 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
5438 (maintainer-check-g++): New.
5439 * Makefile.am (maintainer-check): New.
5440
54412002-10-13 Akim Demaille <akim@epita.fr>
5442
5443 * data/glr.c: Formatting changes.
5444 Tweak some trace messages to match yacc.c's.
5445
54462002-10-13 Akim Demaille <akim@epita.fr>
5447
5448 GLR parsers sometimes raise parse errors instead of performing the
5449 default reduction.
5450 Reported by Charles-Henry de Boysson.
5451
5452 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
5453 check the length of the traces when %glr.
5454 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
5455 GLR's traces.
5456 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
5457 Test GLR parsers.
5458 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
5459 (yyltype): Remove the yy prefix from the member names.
5460 (yytable): Complete its comment.
5461 (yygetLRActions): Map error action number from YYTABLE from
5462 YYTABLE_NINF to 0.
5463 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
5464 (which was a bug: it should have been YYTABEL_NINF, and yet it was
5465 not satisfying as we could compare an YYACTION computed from
5466 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
5467 only value for error actions.
5468 (yyreportParseError): In verbose parse error messages, don't issue
5469 `error' in the list of expected tokens.
5470 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
5471 next action to perform to match glr.c's decoding.
5472 (yytable): Complete its comment.
5473
54742002-10-13 Paul Eggert <eggert@twinsun.com>
5475
5476 Fix problem reported by Henrik Grubbstroem in
5477 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
5478 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
5479 because the Bison parser reads the second action before reducing
5480 the first one.
5481 * src/scan-gram.l (rule_length): New static var.
5482 Use it to keep track of the rule length in the scanner, since
5483 we can't expect the parser to be in lock-step sync with the scanner.
5484 (handle_action_dollar, handle_action_at): Use this var.
5485 * tests/actions.at (Exotic Dollars): Test for the problem.
5486
54872002-10-12 Paul Eggert <eggert@twinsun.com>
5488
5489 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
5490 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
5491 Include <sys/time.h> when checking for clock_t and struct tms.
5492 Use same include order as source.
5493 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
5494 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
5495
5496 * lib/timevar.c: Update copyright date and clarify comments.
5497 (get_time) [IN_GCC]: Keep the GCC version for reference.
5498
5499 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
5500 GCC version as of today, then merge Bison's changes.
5501 Change "GCC" to "Bison" in copyright notice. timevar.def's
5502 author is Akim, so change that too.
5503
5504 * src/reader.c (grammar_current_rule_check):
5505 Don't worry about the default action if $$ is untyped.
5506 Prevents bogus warnings reported by Jim Gifford in
5507 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
5508
5509 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
5510 * data/glr.c, data/lalr1.cc, data/yacc.c:
5511 Output token definitions before the first part of user declarations.
5512 Fixes compatibility problem reported by Jim Gifford for kbd in
5513 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
5514
55152002-10-11 Paul Eggert <eggert@twinsun.com>
5516
5517 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
5518 (yyparse): here. This undoes some of the 2002-07-25 change.
5519 Compatibility problem reported by Ralf S. Engelschall with
5520 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
5521
55222002-10-11 Akim Demaille <akim@epita.fr>
5523
5524 * tests/regression.at Characters Escapes): New.
5525 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
5526 characters.
5527 Reported by Jan Nieuwenhuizen.
5528
55292002-10-11 Akim Demaille <akim@epita.fr>
5530
5531 * po/id.po: New.
5532
55332002-10-10 Paul Eggert <eggert@twinsun.com>
5534
5535 Portability fixes for bitsets; this also avoids several GCC
5536 warnings.
5537
5538 * lib/abitset.c: Include <stddef.h>, for offsetof.
5539 * lib/lbitset.c: Likewise.
5540
5541 * lib/abitset.c (abitset_bytes): Return a size that is aligned
5542 properly for vectors of objects. Do not assume that adding a
5543 header size to a multiple of a word size yields a value that is
5544 properly aligned for the whole union.
5545 * lib/bitsetv.c (bitsetv_alloc): Likewise.
5546
5547 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
5548 unique names for structures.
5549 * lib/ebitset.c (ebitset_bytes): Likewise.
5550 * lib/lbitset.c (lbitset_bytes): Likewise.
5551
5552 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
5553 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
5554 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
5555 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
5556 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
5557 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
5558 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
5559 to improve the type-checking that GCC can do.
5560 * lib/bitset.c (bitset_op4_cmp): Likewise.
5561 * lib/bitset_stats.c (bitset_stats_count,
5562 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
5563 bitset_stats_copy, bitset_stats_disjoint_p,
5564 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
5565 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
5566 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
5567 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
5568 bitset_stats_and_or_cmp, bitset_stats_andn_or,
5569 bitset_stats_andn_or_cmp, bitset_stats_or_and,
5570 bitset_stats_or_and_cmp): Likewise.
5571 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
5572 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
5573 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
5574 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
5575
5576 * lib/abitset.h: Include bitset.h, not bbitset.h.
5577 * lib/ebitset.h: Likewise.
5578 * lib/lbitset.h: Likewise.
5579
5580 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
5581 All instances of parameters of type enum bitset_opts are now of
5582 type enum_bitset_opts, to conform to the C Standard, and similarly
5583 for enum_bitset_type.
5584 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
5585 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
5586
5587 Do not use "struct bitset_struct" to mean different things in
5588 different modules. Not only is this confusing, it violates
5589 the C Standard, which requires that structure types in different
5590 modules must be compatible if one is to be passed to the other.
5591 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
5592 All instances of "struct bitset_struct *" replaced with "bitset".
5593 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
5594 (union bitset_union, struct abitset_struct, struct ebitset_struct,
5595 struct lbitset_struct, struct bitset_stats_struct): New types.
5596 All uses of struct bitset_struct changed to union bitset_union,
5597 etc.
5598 * lib/abitset.c (struct abitset_struct, abitset,
5599 struct bitset_struct): Remove.
5600 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
5601 struct bitset_struct): Remove.
5602 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
5603 bitset_struct): Remove.
5604 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
5605 Likewise.
5606
5607 Do not call a function of type T using a call that assumes the
5608 function is of a different type U. Standard C requires that a
5609 function must be called with a type that is compatible with its
5610 definition.
5611 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
5612 New decls.
5613 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
5614 New functions.
5615 * lib/ebitset.c (PFV): Remove.
5616 * lib/lbitset.c (PFV): Likewise.
5617 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
5618 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
5619 decls.
5620 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
5621 (ebitset_vtable): Use them.
5622 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
5623 lbitset_xor): New functions.
5624 (lbitset_vtable): Use them.
5625
5626 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
5627 Declare.
5628
5629 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
5630 GCC warning.
5631 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
5632 Use offsetof, for simplicity.
5633
56342002-10-06 Paul Eggert <eggert@twinsun.com>
5635
5636 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
5637 the same width as int. This reapplies a hunk of the 2002-08-12 patch
5638 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
5639 which was inadvertently undone by the 2002-09-30 patch.
5640 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
5641 the same width as int.
5642
56432002-10-04 Paul Eggert <eggert@twinsun.com>
5644
5645 Version 1.50.
5646
5647 * configure.ac (AC_INIT), NEWS: Increment version number.
5648
5649 * doc/bison.texinfo: Minor spelling, grammar, and white space
5650 fixes.
5651 (Symbols): Mention that any negative value returned from yylex
5652 signifies end-of-input. Warn about negative chars. Mention
5653 the portable Standard C character set.
5654
5655 The GNU coding standard says CFLAGS and YFLAGS are reserved
5656 for the installer to set.
5657 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
5658 * src/Makefile.am (AM_CFLAGS): Likewise.
5659 (AM_YFLAGS): Renamed from YFLAGS.
5660
5661 Fix some MAX and MIN problems.
5662 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
5663 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
5664 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
5665 * src/reader.c (reader): Use it.
5666
5667 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
5668 POSIX 1003.1-2001 has removed fgrep.
5669
56702002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5671
5672 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
5673 interpreted as signed.
5674 * lib/ebitset.c (ebitset_list): Fix bug.
5675
56762002-10-01 Paul Eggert <eggert@twinsun.com>
5677
5678 More fixes for 64-bit hosts and large bitsets.
5679
5680 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
5681 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
5682 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
5683 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
5684 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
5685 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
5686 bitset_count_): Likewise.
5687 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
5688 bitset_first, bitset_last): Likewise.
5689 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
5690 bitset_stats_list_reverse, bitset_stats_size,
5691 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
5692 Likewise.
5693 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5694 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
5695 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
5696 bitsetv_reflexive_transitive_closure): Likewise.
5697 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
5698 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
5699 Likewise.
5700 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
5701 Likewise.
5702
5703 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
5704 Use size_t, not unsigned int, to count bytes.
5705 * lib/abitset.h (abitset_bytes): Likewise.
5706 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
5707 Likewise.
5708 * lib/bitset.h (bitset_bytes): Likewise.
5709 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
5710 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
5711 * lib/bitsetv.c (bitsetv_alloc): Likewise.
5712 * lib/ebitset.c (ebitset_bytes): Likewise.
5713 * lib/ebitset.h (ebitset_bytes): Likewise.
5714 * lib/lbitset.c (lbitset_bytes): Likewise.
5715 * lib/lbitset.h (lbitset_bytes): Likewise.
5716
5717 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
5718 abitset_subset_p, abitset_disjoint_p, abitset_and,
5719 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
5720 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
5721 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
5722 abitset_or_and, abitset_or_and_cmp):
5723 Use bitset_windex instead of unsigned int.
5724 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
5725 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
5726 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
5727 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
5728 Likewise.
5729 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
5730
5731 * lib/bitset.c (bitset_print):
5732 Use proper printf formats for widths of integer types.
5733 * lib/bitset_stats.c (bitset_percent_histogram_print,
5734 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
5735 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5736 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
5737 * lib/lbitset.c (lbitset_bytes): Likewise.
5738
5739 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
5740 BITSET_SIZE_MAX): New macros.
5741 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
5742 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
5743 to BITSET_WINDEX_MAX.
5744
5745 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
5746 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
5747 since we now return the bitset_bindex type (not int).
5748
5749 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
5750 when computing sizes.
5751 * lib/ebitset.c (ebitset_elts_grow): Likewise.
5752
5753 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
5754 and avoid cast to unsigned.
5755
57562002-09-30 Akim Demaille <akim@epita.fr>
5757
5758 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
5759 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
5760 Updates from Michael Hayes.
5761
57622002-09-30 Art Haas <ahaas@neosoft.com>
5763
5764 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
5765 invocations.
5766 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
5767 defined.
5768
57692002-09-27 Akim Demaille <akim@epita.fr>
5770
5771 Version 1.49c.
5772
57732002-09-27 Akim Demaille <akim@epita.fr>
5774
5775 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
5776 (Because of AC_LIBSOURCE).
5777
57782002-09-27 Akim Demaille <akim@epita.fr>
5779
5780 Playing with Autoscan.
5781
5782 * configure.ac: Remove the old LIBOBJ tweaks.
5783 (AC_REPLACE_FUNCS): Add strrchr and strtol.
5784 * lib/strrchr.c: New.
5785 * lib/strtol.c: New, from the Coreutils 4.5.1.
5786
57872002-09-27 Akim Demaille <akim@epita.fr>
5788
5789 Playing with Autoscan.
5790
5791 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
5792 * lib/Makefile.am (libbison_a_SOURCES): No longer include
5793 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
5794 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
5795 Coreutils 4.5.1.
5796
57972002-09-24 Akim Demaille <akim@epita.fr>
5798
5799 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
5800 (Frequently Asked Questions, Parser Stack Overflow): New.
5801
58022002-09-13 Akim Demaille <akim@epita.fr>
5803
5804 Playing with autoscan.
5805
5806 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
5807 * src/files.c (skeleton_find): Remove, unused.
5808 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
5809 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
5810
58112002-09-13 Akim Demaille <akim@epita.fr>
5812
5813 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
5814 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
5815
58162002-09-13 Akim Demaille <akim@epita.fr>
5817
5818 * configure.ac: Require 2.54.
5819 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
5820 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
5821 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
5822 Remove, provided by Autoconf macros.
5823
58242002-09-12 Akim Demaille <akim@epita.fr>
5825
5826 * m4/prereq.m4: Update, from Coreutils 4.5.1.
5827
58282002-09-12 Akim Demaille <akim@epita.fr>
5829
5830 * m4/prereq.m4: Update, from Fileutils 4.1.5.
5831 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
5832 Reported by Martin Mokrejs.
5833
58342002-09-10 Akim Demaille <akim@epita.fr>
5835
5836 * src/parse-gram.y: Associate a human readable string to each
5837 token type.
5838 * tests/regression.at (Invalid inputs): Adjust.
5839
58402002-09-10 Gary V. Vaughan <gary@gnu.org>
5841
5842 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
5843 with an Autoconf-2.5x style configure.ac.
5844
58452002-09-06 Paul Eggert <eggert@twinsun.com>
5846
5847 * doc/bison.texinfo (Conditions): Make explicit that the GPL
5848 exception applies only to yacc.c. This is a modification of a
5849 patch originally suggested by Akim Demaille.
5850
58512002-09-06 Akim Demaille <akim@epita.fr>
5852
5853 * data/c.m4 (b4_copyright): Move the GPL exception comment from
5854 here to...
5855 * data/yacc.c: here.
5856
5857 * data/lalr1.cc (struct yyltype): Don't define it, since we use
5858 LocationType.
5859 (b4_ltype): Default to yy::Location from location.hh.
5860
58612002-09-04 Jim Meyering <jim@meyering.net>
5862
5863 * data/yacc.c: Guard the declaration of yytoknum also with
5864 `#ifdef YYPRINT', so it is declared only when used.
5865
58662002-09-04 Akim Demaille <akim@epita.fr>
5867
5868 * configure.in: Rename as...
5869 * configure.ac: this.
5870 Bump to 1.49c.
5871
58722002-09-04 Akim Demaille <akim@epita.fr>
5873
5874 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
5875 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
5876 translate maintainer only messages.
5877
58782002-08-12 Paul Eggert <eggert@twinsun.com>
5879
5880 Version 1.49b.
5881
5882 * Makefile.am (SUBDIRS): Remove intl.
5883 (DISTCLEANFILES): Remove.
5884 * NEWS: Mention that GNU M4 is now required. Clarify what is
5885 meant by "larger grammars". Mention the pt_BR translation.
5886 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
5887 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
5888 Bump version from 0.11.2 to 0.11.5.
5889 (BISON_PREREQ_STAGE): Remove.
5890 (AM_GNU_GETTEXT): Use external gettext.
5891 (AC_OUTPUT): Remove intl/Makefile.
5892
5893 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
5894
5895 * data/glr.c: Include string.h, for strlen.
5896 (yyreportParseError): Use size_t for yysize.
5897 (yy_yypstack): No longer nested inside yypstates, as nested
5898 functions are not portable. Do not assume size_t is the
5899 same width as int.
5900 (yypstates): Do not assume that ptrdiff_t is the same width
5901 as int, and similarly for yyposn and YYINDEX.
5902
5903 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
5904
5905 * lib/Makefile.am (INCLUDES): Do not include from the intl
5906 directory, which has been removed.
5907 * src/Makefile.am (INCLUDES): Likewise.
5908
5909 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
5910 (bitsets_sources, additional_bitsets_sources, timevars_sources):
5911 New vars.
5912
5913 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
5914 * tests/Makefile.am (EXTRA_DIST): Likewise.
5915
5916 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
5917 Do not assume that bitset_windex is the same width as unsigned.
5918
5919 * lib/abitset.c (abitset_unused_clear): Do not assume that
5920 bitset_word is the same width as int.
5921 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
5922 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
5923 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
5924 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
5925 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
5926
5927 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
5928 portability to one's complement hosts!).
5929 * lib/ebitset.c (ebitset_op1): Likewise.
5930 * lib/lbitset.c (lbitset_op1): Likewise.
5931
5932 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
5933 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
5934 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
5935 Sync with fileutils.
5936 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
5937 lib/gettext.h: Sync with diffutils.
5938
5939 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
5940 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
5941
5942 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
5943 PROTOTYPES to check for prototypes, and "defined __STDC__" to
5944 check for void *.
5945
5946 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
5947 size_t; the old version tried to do this but casted improperly.
5948 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
5949 (bitset_test): Now returns int, not unsigned long.
5950
5951 * lib/bitset_stats.c: Include "gettext.h".
5952 (_): New macro.
5953 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
5954 name locals "index", as it generates unnecessary warnings on some
5955 hosts that have an "index" function.
5956
5957 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
5958 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
5959 they need translation.
5960 * src/LR0.c (state_list_append, new_itemsets, get_state,
5961 append_states, generate_states): Likewise.
5962 * src/assoc.c (assoc_to_string): Likewise.
5963 * src/closure.c (print_closure, set_firsts, closure): Likewise.
5964 * src/gram.c (grammar_dump): Likewise.
5965 * src/injections.c (injections_compute): Likewise.
5966 * src/lalr.c (lookaheads_print): Likewise.
5967 * src/relation.c (relation_transpose): Likewise.
5968 * src/scan-gram.l: Likewise.
5969 * src/tables.c (table_grow, pack_vector): Likewise.
5970
5971 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
5972 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
5973 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
5974 * m4/mbstate_t.m4: Sync with fileutils.
5975 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
5976
5977 * po/LINGUAS: Add pt_BR.
5978 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
5979 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
5980 lib/timevar.c.
5981 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
5982 manual recommends.
5983 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
5984
5985 * src/complain.c (strerror_r): Remove decl; not needed.
5986 (strerror): Use same pattern as ../lib/error.c.
5987
5988 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
5989
5990 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
5991
5992 * src/main.c (main): Cast result of bindtextdomain and textdomain
5993 to void, to avoid a GCC warning when --disable-nls is in effect.
5994
5995 * src/scan-gram.l: Use strings rather than escapes when possible,
5996 to minimize the number of warnings from xgettext.
5997 (handle_action_dollar, handle_action_at): Don't use isdigit,
5998 as it mishandles negative chars and it may not work as expected
5999 outside the C locale.
6000
6001 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
6002 this is a GCC extension and is not portable to other compilers.
6003
6004 * src/system.h (alloca): Use same pattern as ../lib/error.c.
6005 Do not include <ctype.h>; no longer needed.
6006 Do not include <malloc.h>; no longer needed (and generates
6007 warnings on OpenBSD 3.0).
6008
6009 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
6010 it's not portable.
6011
6012 * tests/regression.at: Do not use 'cc -c input.c -o input';
6013 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
6014
6015 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
6016 exit status as failure, not just exit status 1. Sun C exits
6017 with status 2 sometimes.
6018
6019 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
6020 Use it for the two large tests.
6021
60222002-08-02 Akim Demaille <akim@epita.fr>
6023
6024 * src/conflicts.c (conflicts_output): Don't output rules never
6025 reduced here, since anyway that computation doesn't work.
6026 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
6027 (rule_useless_p, rule_never_reduced_p): New.
6028 (grammar_rules_partial_print): Use a filter instead of a range.
6029 Display the title only if needed.
6030 (grammar_rules_print): Adjust.
6031 (grammar_rules_never_reduced_report): New.
6032 * src/tables.c (action_row): Move the computation of rules never
6033 reduced to...
6034 (token_actions): here.
6035 * src/main.c (main): Make the parser before making the report, so
6036 that rules never reduced are computed.
6037 Call grammar_rules_never_reduced_report.
6038 * src/print.c (print_results): Report rules never reduced.
6039 * tests/conflicts.at, tests/reduce.at: Adjust.
6040
60412002-08-01 Akim Demaille <akim@epita.fr>
6042
6043 Instead of attaching lookaheads and duplicating the rules being
6044 reduced by a state, attach the lookaheads to the reductions.
6045
6046 * src/state.h (state_t): Remove the `lookaheads',
6047 `lookaheads_rule' member.
6048 (reductions_t): Add a `lookaheads' member.
6049 Use a regular array for the `rules'.
6050 * src/state.c (reductions_new): Initialize the lookaheads member
6051 to 0.
6052 (state_rule_lookaheads_print): Adjust.
6053 * src/state.h, src/state.c (state_reductions_find): New.
6054 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
6055 (count_rr_conflicts): Adjust.
6056 * src/lalr.c (LArule): Remove.
6057 (add_lookback_edge): Adjust.
6058 (state_lookaheads_count): New.
6059 (states_lookaheads_initialize): Merge into...
6060 (initialize_LA): this.
6061 (lalr_free): Adjust.
6062 * src/main.c (main): Don't free nullable and derives too early: it
6063 is used by --verbose.
6064 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
6065
60662002-08-01 Akim Demaille <akim@epita.fr>
6067
6068 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
6069 `rule_number_t**'.
6070 (set_derives, free_derives): Rename as...
6071 (derives_compute, derives_free): this.
6072 Adjust all dependencies.
6073 * src/nullable.c (set_nullable, free_nullable): Rename as...
6074 (nullable_compute, nullable_free): these.
6075 (rule_list_t): Store rule_t *, not rule_number_t.
6076 * src/state.c (state_rule_lookaheads_print): Directly compare rule
6077 pointers, instead of their numbers.
6078 * src/main.c (main): Call nullable_free, and derives_free earlier,
6079 as they were lo longer used.
6080
60812002-08-01 Akim Demaille <akim@epita.fr>
6082
6083 * lib/timevar.c (get_time): Include children time.
6084 * src/lalr.h (LA, LArule): Don't export them: used with the
6085 state_t.
6086 * src/lalr.c (LA, LArule): Static.
6087 * src/lalr.h, src/lalr.c (lalr_free): New.
6088 * src/main.c (main): Call it.
6089 * src/tables.c (pack_vector): Check whether loc is >= to the
6090 table_size, not >.
6091 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
6092 (tables_generate): do it, since that's also it which allocates
6093 them.
6094 Don't free LA and LArule, main does.
6095
60962002-07-31 Akim Demaille <akim@epita.fr>
6097
6098 Separate parser tables computation and output.
6099
6100 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
6101 (conflict_list, conflict_list_cnt, table, check, table_ninf)
6102 (yydefgoto, yydefact, high): Move to...
6103 * src/tables.h, src/tables.c: here.
6104 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6105 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6106 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
6107 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
6108 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
6109 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
6110 (action_row, save_row, token_actions, save_column, default_goto)
6111 (goto_actions, sort_actions, matching_state, pack_vector)
6112 (table_ninf_remap, pack_table, prepare_actions): Move to...
6113 * src/tables.c: here.
6114 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
6115 * src/output.c (token_actions, output_base, output_conflicts)
6116 (output_check): Merge into...
6117 (prepare_actions): this.
6118 (actions_output): Rename as...
6119 (user_actions_output): this.
6120 * src/main.c (main): Call tables_generate and tables_free.
6121
61222002-07-31 Akim Demaille <akim@epita.fr>
6123
6124 Steal GCC's --time-report support.
6125
6126 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
6127 stolen/adjusted from GCC.
6128 * m4/stage.m4: Remove time related checks.
6129 * m4/timevar.m4: New.
6130 * configure.in: Adjust.
6131 * src/system.h: Adjust to using timevar.h.
6132 * src/getargs.h, src/getargs.c: Support trace_time for
6133 --trace=time.
6134 * src/main.c (stage): Remove.
6135 (main): Replace `stage' invocations with timevar calls.
6136 * src/output.c: Insert pertinent timevar calls.
6137
61382002-07-31 Akim Demaille <akim@epita.fr>
6139
6140 Let --trace have arguments.
6141
6142 * src/getargs.h (enum trace_e): New.
6143 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
6144 (long_options, short_options): --trace/-T takes an optional
6145 argument.
6146 Change all the uses of trace_flag to reflect the new flags.
6147 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
6148
6149 Strengthen `stage' portability.
6150
6151 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
6152 * configure.in: Use it.
6153 Don't check for malloc.h and sys/times.h.
6154 * src/system.h: Include them when appropriate.
6155 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
6156 times and struct tms are available.
6157
61582002-07-30 Akim Demaille <akim@epita.fr>
6159
6160 In verbose parse error message, don't report `error' as an
6161 expected token.
6162 * tests/actions.at (Printers and Destructors): Adjust.
6163 * tests/calc.at (Calculator $1): Adjust.
6164 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
6165 error message, do not report the parser accepts the error token in
6166 that state.
6167
61682002-07-30 Akim Demaille <akim@epita.fr>
6169
6170 Normalize conflict related messages.
6171
6172 * src/complain.h, src/complain.c (warn, complain): New.
6173 * src/conflicts.c (conflicts_print): Use them.
6174 (conflict_report_yacc): New, extracted from...
6175 (conflicts_print): here.
6176 * tests/conflicts.at, tests/existing.at: Adjust.
6177
61782002-07-30 Akim Demaille <akim@epita.fr>
6179
6180 Report rules which are never reduced by the parser: those hidden
6181 by conflicts.
6182
6183 * src/LR0.c (save_reductions): Don't make the final state too
6184 different: save its reduction (accept) instead of having a state
6185 without any action (no shift or goto, no reduce).
6186 Note: the final state is now a ``regular'' state, i.e., the
6187 parsers now contain `reduce 0' as default reduction.
6188 Nevertheless, since they decide to `accept' when yystate =
6189 final_state, they still will not reduce rule 0.
6190 * src/print.c (print_actions, print_reduction): Adjust.
6191 * src/output.c (action_row): Track reduced rules.
6192 (token_actions): Report rules never reduced.
6193 * tests/conflicts.at, tests/regression.at: Adjust.
6194
61952002-07-30 Akim Demaille <akim@epita.fr>
6196
6197 `stage' was accidently included in a previous patch.
6198 Initiate its autoconfiscation.
6199
6200 * configure.in: Look for malloc.h and sys/times.h.
6201 * src/main.c (stage): Adjust.
6202 Report only when trace_flag.
6203
62042002-07-29 Akim Demaille <akim@epita.fr>
6205
6206 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
6207 state_number_t.
6208 (errs_t): symbol_t*, not symbol_number_t.
6209 (reductions_t): rule_t*, not rule_number_t.
6210 (FOR_EACH_SHIFT): New.
6211 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
6212 * src/print.c, src/print_graph.c: Adjust.
6213
62142002-07-29 Akim Demaille <akim@epita.fr>
6215
6216 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
6217
6218 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
6219 (endtoken, accept): these.
6220 * src/reader.c (reader): Set endtoken's default tag to "$end".
6221 Set undeftoken's tag to "$undefined" instead of "$undefined.".
6222 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
6223 Adjust.
6224
62252002-07-29 Akim Demaille <akim@epita.fr>
6226
6227 * src/reduce.c (reduce_grammar): When the language is empty,
6228 complain about the start symbol, not the axiom.
6229 Use its location.
6230 * tests/reduce.at (Empty Language): New.
6231
62322002-07-26 Akim Demaille <akim@epita.fr>
6233
6234 * src/reader.h, src/reader.c (gram_error): ... can't get
6235 yycontrol without making too strong assumptions on the parser
6236 itself.
6237 * src/output.c (prepare_tokens): Use the real 0th value of
6238 token_translations instead of `0'.
6239 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
6240 visible here.
6241 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
6242 for the time being: %locations ought to provide it to yyerror.
6243
62442002-07-25 Akim Demaille <akim@epita.fr>
6245
6246 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
6247 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
6248 * tests/regression.at (Web2c Actions): Adjust.
6249
62502002-07-25 Akim Demaille <akim@epita.fr>
6251
6252 Stop storing rules from 1 to nrules + 1.
6253
6254 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
6255 * src/nullable.c, src/output.c, src/print.c, src/reader.c
6256 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
6257 Iterate from 0 to nrules.
6258 Use rule_number_as_item_number and item_number_as_rule_number.
6259 Adjust to `derive' now containing possibly 0.
6260 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
6261 Handle the `- 1' part in rule numbers from/to item numbers.
6262 * src/conflicts.c (log_resolution): Fix the message which reversed
6263 shift and reduce.
6264 * src/output.c (action_row): Initialize default_rule to -1.
6265 (token_actions): Adjust.
6266 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
6267 expected output.
6268 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
6269
62702002-07-25 Akim Demaille <akim@epita.fr>
6271
6272 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
6273 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
6274 (b4_c_knr_arg_decl): New.
6275 * data/yacc.c: Use it to define yysymprint, yydestruct, and
6276 yyreport_parse_error.
6277
62782002-07-25 Akim Demaille <akim@epita.fr>
6279
6280 * data/yacc.c (yyreport_parse_error): New, extracted from...
6281 (yyparse): here.
6282 (yydestruct, yysymprint): Move above yyparse.
6283 Be K&R compliant.
6284
62852002-07-25 Akim Demaille <akim@epita.fr>
6286
6287 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
6288 replace...
6289 (b4_sint_type, b4_uint_type): these.
6290 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
6291 * tests/regression.at (Web2c Actions): Adjust.
6292
62932002-07-25 Akim Demaille <akim@epita.fr>
6294
6295 * src/gram.h (TIEM_NUMBER_MAX): New.
6296 (item_number_of_rule_number, rule_number_of_item_number): Rename
6297 as...
6298 (rule_number_as_item_number, item_number_as_rule_number): these.
6299 Adjust dependencies.
6300 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6301 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6302 (symbol_number_to_vector_number): New.
6303 (order): Of vector_number_t* type.
6304 (base_t, BASE_MAX, BASE_MIN): New.
6305 (froms, tos, width, pos, check): Of base_t type.
6306 (action_number_t, ACTION_MIN, ACTION_MAX): New.
6307 (actrow): Of action_number_t type.
6308 (conflrow): Of unsigned int type.
6309 (table_ninf, base_ninf): New.
6310 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
6311 (muscle_insert_int_table, muscle_insert_base_table)
6312 (muscle_insert_rule_number_table): New.
6313 (prepare_tokens): Output `toknum' as int_table.
6314 (action_row): Returns a rule_number_t.
6315 Use ACTION_MIN, not SHRT_MIN.
6316 (token_actions): yydefact is rule_number_t*.
6317 (table_ninf_remap): New.
6318 (pack_table): Use it for `base' and `table'.
6319 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
6320 replaced with...
6321 (YYPACT_NINF, YYTABLE_NINF): these.
6322 (yypact, yytable): Compute their types instead of hard-coded
6323 `short'.
6324 * tests/regression.at (Web2c Actions): Adjust.
6325
63262002-07-19 Akim Demaille <akim@epita.fr>
6327
6328 * src/scan-gram.l (id): Can start with an underscore.
6329
63302002-07-16 Akim Demaille <akim@epita.fr>
6331
6332 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
6333 Adjust all former `associativity' dependencies.
6334 * src/symtab.c (symbol_new): Default associativity is `undef', not
6335 `right'.
6336 (symbol_check_alias_consistence): Adjust.
6337
63382002-07-09 Akim Demaille <akim@epita.fr>
6339
6340 * doc/bison.texinfo: Properly set the ``header'' part.
6341 Use @dircategory ``GNU programming tools'' as per Texinfo's
6342 documentation.
6343 Use @copying.
6344
63452002-07-09 Akim Demaille <akim@epita.fr>
6346
6347 * lib/quotearg.h: Protect against multiple inclusions.
6348 * src/location.h (location_t): Add a `file' member.
6349 (LOCATION_RESET, LOCATION_PRINT): Adjust.
6350 * src/complain.c (warn_at, complain_at, fatal_at): Drop
6351 `error_one_per_line' support.
6352
63532002-07-09 Akim Demaille <akim@epita.fr>
6354
6355 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
6356 * src/reader.c (lineno): Remove.
6357 Adjust all dependencies.
6358 (get_merge_function): Take a location and use complain_at.
6359 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
6360 * tests/regression.at (Invalid inputs, Mixing %token styles):
6361 Adjust.
6362
63632002-07-09 Akim Demaille <akim@epita.fr>
6364
6365 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
6366 recovery rule, and forbid extensions when --yacc.
6367 (gram_error): Use complain_at.
6368 * src/reader.c (reader): Exit if there were parse errors.
6369
63702002-07-09 Akim Demaille <akim@epita.fr>
6371
6372 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
6373 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
6374 Reported by R Blake <blakers@mac.com>.
6375
63762002-07-09 Akim Demaille <akim@epita.fr>
6377
6378 * data/yacc.c: Output the copyright notive in the header.
6379
63802002-07-03 Akim Demaille <akim@epita.fr>
6381
6382 * src/output.c (froms, tos): Are state_number_t.
6383 (save_column): sp, sp1, and sp2 are state_number_t.
6384 (prepare): Rename `final' as `final_state_number', `nnts' as
6385 `nterms_number', `nrules' as `rules_number', `nstates' as
6386 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
6387 unused.
6388 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
6389 * data/lalr1.cc (nsym_): Remove, unused.
6390
63912002-07-03 Akim Demaille <akim@epita.fr>
6392
6393 * src/lalr.h, src/lalr.c (goto_number_t): New.
6394 * src/lalr.c (goto_list_t): New.
6395 Propagate them.
6396 * src/nullable.c (rule_list_t): New.
6397 Propagate.
6398 * src/types.h: Remove.
6399
64002002-07-03 Akim Demaille <akim@epita.fr>
6401
6402 * src/closure.c (print_fderives): Use rule_rhs_print.
6403 * src/derives.c (print_derives): Use rule_rhs_print.
6404 (rule_list_t): New, replaces `shorts'.
6405 (set_derives): Add comments.
6406 * tests/sets.at (Nullable, Firsts): Adjust.
6407
64082002-07-03 Akim Demaille <akim@epita.fr>
6409
6410 * src/output.c (prepare_actions): Free `tally' and `width'.
6411 (prepare_actions): Allocate and free `order'.
6412 * src/symtab.c (symbols_free): Free `symbols'.
6413 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
6414 * src/output.c (m4_invoke): Move to...
6415 * src/scan-skel.l: here.
6416 (<<EOF>>): Close yyout, and free its name.
6417
64182002-07-03 Akim Demaille <akim@epita.fr>
6419
6420 Fix some memory leaks, and fix a bug: state 0 was examined twice.
6421
6422 * src/LR0.c (new_state): Merge into...
6423 (state_list_append): this.
6424 (new_states): Merge into...
6425 (generate_states): here.
6426 (set_states): Don't ensure a proper `errs' state member here, do it...
6427 * src/conflicts.c (conflicts_solve): here.
6428 * src/state.h, src/state.c: Comment changes.
6429 (state_t): Rename member `shifts' as `transitions'.
6430 Adjust all dependencies.
6431 (errs_new): For consistency, also take the values as argument.
6432 (errs_dup): Remove.
6433 (state_errs_set): New.
6434 (state_reductions_set, state_transitions_set): Assert that no
6435 previous value was assigned.
6436 (state_free): New.
6437 (states_free): Use it.
6438 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
6439 temporary storage: use `errs' and `nerrs' as elsewhere.
6440 (set_conflicts): Allocate and free this `errs'.
6441
64422002-07-02 Akim Demaille <akim@epita.fr>
6443
6444 * lib/libiberty.h: New.
6445 * lib: Update the bitset implementation from upstream.
6446 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
6447 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
6448 * src/main.c: Adjust bitset stats calls.
6449
64502002-07-01 Paul Eggert <eggert@twinsun.com>
6451
6452 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
6453 char, so that negative chars don't collide with $.
6454
64552002-06-30 Akim Demaille <akim@epita.fr>
6456
6457 Have the GLR tests be `warning' checked, and fix the warnings.
6458
6459 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
6460 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
6461 (yyremoveDeletes): `yyi' and `yyj' are size_t.
6462 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
6463 (yyaddDeferredAction): static.
6464 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
6465 (yyreportParseError): yyprefix is const.
6466 yytokenp is used only when verbose.
6467 (yy__GNUC__): Replace with __GNUC__.
6468 (yypdumpstack): yyi is size_t.
6469 (yypreference): Un-yy local variables and arguments, to avoid
6470 clashes with `yyr1'. Anyway, we are not in the user name space.
6471 (yytname_size): be an int, as is compared with ints.
6472 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
6473 Use them.
6474 * tests/cxx-gram.at: Use quotation to protect $1.
6475 Use AT_COMPILE to enable warnings hunts.
6476 Prototype yylex and yyerror.
6477 `Use' argc.
6478 Include `string.h', not `strings.h'.
6479 Produce and prototype stmtMerge only when used.
6480 yylex takes a location.
6481
64822002-06-30 Akim Demaille <akim@epita.fr>
6483
6484 We spend a lot of time in quotearg, in particular when --verbose.
6485
6486 * src/symtab.c (symbol_get): Store a quoted version of the key.
6487 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
6488 Adjust all callers.
6489
64902002-06-30 Akim Demaille <akim@epita.fr>
6491
6492 * src/state.h (reductions_t): Rename member `nreds' as num.
6493 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
6494 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
6495
64962002-06-30 Akim Demaille <akim@epita.fr>
6497
6498 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
6499 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
6500 (shifts_to): Rename as...
6501 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
6502 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
6503 (TRANSITION_IS_DISABLED, transitions_to): these.
6504
65052002-06-30 Akim Demaille <akim@epita.fr>
6506
6507 * src/print.c (print_shifts, print_gotos): Merge into...
6508 (print_transitions): this.
6509 (print_transitions, print_errs, print_reductions): Align the
6510 lookaheads columns.
6511 (print_core, print_transitions, print_errs, print_state,
6512 print_grammar): Output empty lines separator before, not after.
6513 (state_default_rule_compute): Rename as...
6514 (state_default_rule): this.
6515 * tests/conflicts.at (Defaulted Conflicted Reduction),
6516 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
6517 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
6518
65192002-06-30 Akim Demaille <akim@epita.fr>
6520
6521 Display items as we display rules.
6522
6523 * src/gram.h, src/gram.c (rule_lhs_print): New.
6524 * src/gram.c (grammar_rules_partial_print): Use it.
6525 * src/print.c (print_core): Likewise.
6526 * tests/conflicts.at (Defaulted Conflicted Reduction),
6527 (Unresolved SR Conflicts): Adjust.
6528 (Unresolved SR Conflicts): Adjust and rename as...
6529 (Resolved SR Conflicts): this, as was meant.
6530 * tests/regression.at (Web2c Report): Adjust.
6531
65322002-06-30 Akim Demaille <akim@epita.fr>
6533
6534 * src/print.c (state_default_rule_compute): New, extracted from...
6535 (print_reductions): here.
6536 Pessimize, but clarify the code.
6537 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
6538
65392002-06-30 Akim Demaille <akim@epita.fr>
6540
6541 * src/output.c (action_row): Let default_rule be always a rule
6542 number.
6543
65442002-06-30 Akim Demaille <akim@epita.fr>
6545
6546 * src/closure.c (print_firsts, print_fderives, closure):
6547 Use BITSET_EXECUTE.
6548 * src/lalr.c (lookaheads_print): Likewise.
6549 * src/state.c (state_rule_lookaheads_print): Likewise.
6550 * src/print_graph.c (print_core): Likewise.
6551 * src/print.c (print_reductions): Likewise.
6552 * src/output.c (action_row): Likewise.
6553 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
6554
65552002-06-30 Akim Demaille <akim@epita.fr>
6556
6557 * src/print_graph.c: Use report_flag.
6558
65592002-06-30 Akim Demaille <akim@epita.fr>
6560
6561 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
6562 to...
6563 * src/relation.h, src/relation.c (traverse, relation_digraph)
6564 (relation_print, relation_transpose): New.
6565
65662002-06-30 Akim Demaille <akim@epita.fr>
6567
6568 * src/state.h, src/state.c (shifts_to): New.
6569 * src/lalr.c (build_relations): Use it.
6570
65712002-06-30 Akim Demaille <akim@epita.fr>
6572
6573 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
6574 (item_number_of_rule_number, rule_number_of_item_number): New.
6575 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
6576 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
6577 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
6578 Propagate their use.
6579 Much remains to be done, in particular wrt `shorts' from types.h.
6580
65812002-06-30 Akim Demaille <akim@epita.fr>
6582
6583 * src/symtab.c (symbol_new): Initialize the `printer' member.
6584
65852002-06-30 Akim Demaille <akim@epita.fr>
6586
6587 * src/LR0.c (save_reductions): Remove, replaced by...
6588 * src/state.h, src/state.c (state_reductions_set): New.
6589 (reductions, errs): Rename as...
6590 (reductions_t, errs_t): these.
6591 Adjust all dependencies.
6592
65932002-06-30 Akim Demaille <akim@epita.fr>
6594
6595 * src/LR0.c (state_list_t, state_list_append): New.
6596 (first_state, last_state): Now symbol_list_t.
6597 (this_state): Remove.
6598 (new_itemsets, append_states, save_reductions): Take a state_t as
6599 argument.
6600 (set_states, generate_states): Adjust.
6601 (save_shifts): Remove, replaced by...
6602 * src/state.h, src/state.c (state_shifts_set): New.
6603 (shifts): Rename as...
6604 (shifts_t): this.
6605 Adjust all dependencies.
6606 * src/state.h (state_t): Remove the `next' member.
6607
66082002-06-30 Akim Demaille <akim@epita.fr>
6609
6610 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
6611 escaped in slot 0.
6612
66132002-06-30 Akim Demaille <akim@epita.fr>
6614
6615 Use hash.h for the state hash table.
6616
6617 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
6618 (allocate_storage): Use state_hash_new.
6619 (free_storage): Use state_hash_free.
6620 (new_state, get_state): Adjust.
6621 * src/lalr.h, src/lalr.c (states): Move to...
6622 * src/states.h (state_t): Remove the `link' member, no longer
6623 used.
6624 * src/states.h, src/states.c: here.
6625 (state_hash_new, state_hash_free, state_hash_lookup)
6626 (state_hash_insert, states_free): New.
6627 * src/states.c (state_table, state_compare, state_hash): New.
6628 * src/output.c (output_actions): Do not free states now, since we
6629 still need to know the final_state number in `prepare', called
6630 afterwards. Do it...
6631 * src/main.c (main): here: call states_free after `output'.
6632
66332002-06-30 Akim Demaille <akim@epita.fr>
6634
6635 * src/state.h, src/state.c (state_new): New, extracted from...
6636 * src/LR0.c (new_state): here.
6637 * src/state.h (STATE_ALLOC): Move to...
6638 * src/state.c: here.
6639 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
6640 * src/state.h, src/state.c: here.
6641
66422002-06-30 Akim Demaille <akim@epita.fr>
6643
6644 * src/reader.c (gensym): Rename as...
6645 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
6646 (getsym): Rename as...
6647 (symbol_get): this.
6648
66492002-06-30 Akim Demaille <akim@epita.fr>
6650
6651 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
6652 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
6653 * src/output.c, src/print.c, src/print_graph.c: Propagate.
6654 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
6655
66562002-06-30 Akim Demaille <akim@epita.fr>
6657
6658 Make the test suite pass with warnings checked.
6659
6660 * tests/actions.at (Printers and Destructors): Improve.
6661 Avoid unsigned vs. signed issues.
6662 * tests/calc.at: Don't exercise the scanner here, do it...
6663 * tests/input.at (Torturing the Scanner): here.
6664
66652002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6666
6667 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
6668 reorganize first lines parallel to yacc.c.
6669
66702002-06-28 Akim Demaille <akim@epita.fr>
6671
6672 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
6673 (b4_token_enum, b4_token_defines): New, factored from...
6674 * data/lalr1.cc, data/yacc.c, glr.c: here.
6675
66762002-06-28 Akim Demaille <akim@epita.fr>
6677
6678 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
6679 unused variables.
6680 * src/output.c (merger_output): static.
6681
66822002-06-28 Akim Demaille <akim@epita.fr>
6683
6684 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
6685 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
6686 pacify GCC.
6687 * src/output.c (save_row): Initialize all the variables to pacify GCC.
6688
66892002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6690
6691 Accumulated changelog for new GLR parsing features.
6692
6693 * src/conflicts.c (count_total_conflicts): Change name to
6694 conflicts_total_count.
6695 * src/conflicts.h: Ditto.
6696 * src/output.c (token_actions): Use the new name.
6697 (output_conflicts): Change conflp => conflict_list_heads, and
6698 confl => conflict_list for better readability.
6699 * data/glr.c: Use the new names.
6700 * NEWS: Add self to GLR announcement.
6701
6702 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
6703
6704 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
6705 Akim Demaille.
6706
6707 * data/bison.glr: Change name to glr.c
6708 * data/glr.c: Renamed from bison.glr.
6709 * data/Makefile.am: Add glr.c
6710
6711 * src/getargs.c:
6712
6713 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
6714 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
6715
6716 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6717
6718 * data/bison.glr: Be sure to restore the
6719 current #line when returning to the skeleton contents after having
6720 exposed the input file's #line.
6721
6722 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6723
6724 * data/bison.glr: Bring up to date with changes to bison.simple.
6725
6726 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6727
6728 * data/bison.glr: Correct definitions that use b4_prefix.
6729 Various reformatting.
6730 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
6731 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
6732 yytokenp argument; now part of stack.
6733 (yychar): Define to behave as documented.
6734 (yyclearin): Ditto.
6735
6736 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6737
6738 * src/reader.h: Add declaration for free_merger_functions.
6739
6740 * src/reader.c (merge_functions): New variable.
6741 (get_merge_function): New function.
6742 (free_merger_functions): New function.
6743 (readgram): Check for %prec that is not followed by a symbol.
6744 Handle %dprec and %merge declarations.
6745 (packgram): Initialize dprec and merger fields in rules array.
6746
6747 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
6748 conflict_list_cnt, conflict_list_free): New variables.
6749 (table_grow): Also grow conflict_table.
6750 (prepare_rules): Output dprec and merger tables.
6751 (conflict_row): New function.
6752 (action_row): Output conflict lists for GLR parser. Don't use
6753 default reduction in conflicted states for GLR parser so that there
6754 are spaces for the conflict lists.
6755 (save_row): Also save conflict information.
6756 (token_actions): Allocate conflict list.
6757 (merger_output): New function.
6758 (pack_vector): Pack conflict table, too.
6759 (output_conflicts): New function to output yyconflp and yyconfl.
6760 (output_check): Allocate conflict_tos.
6761 (output_actions): Output conflict tables, also.
6762 (output_skeleton): Output b4_mergers definition.
6763 (prepare): Output b4_max_rhs_length definition.
6764 Use 'bison.glr' as default skeleton for GLR parsers.
6765
6766 * src/gram.c (glr_parser): New flag.
6767 (grammar_free): Call free_merger_functions.
6768
6769 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
6770 all pairs of conflicting reductions, rather than just all tokens
6771 causing conflicts. Needed to size conflict tables.
6772 (conflicts_output): Modify call to count_rr_conflicts for new
6773 interface.
6774 (conflicts_print): Ditto.
6775 (count_total_conflicts): New function.
6776
6777 * src/reader.h (merger_list): New type.
6778 (merge_functions): New variable.
6779
6780 * src/lex.h (tok_dprec, tok_merge): New token types.
6781
6782 * src/gram.h (rule_s): Add dprec and merger fields.
6783 (glr_parser): New flag.
6784
6785 * src/conflicts.h (count_total_conflicts): New function.
6786
6787 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
6788
6789 * doc/bison.texinfo (Generalized LR Parsing): New section.
6790 (GLR Parsers): New section.
6791 (Language and Grammar): Mention GLR parsing.
6792 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
6793 Correct typo ("tge" -> "the").
6794
6795 * data/bison.glr: New skeleton for GLR parsing.
6796
6797 * tests/cxx-gram.at: New tests for GLR parsing.
6798
6799 * tests/testsuite.at: Include cxx-gram.at.
6800
6801 * tests/Makefile.am: Add cxx-gram.at.
6802
6803 * src/parse-gram.y:
6804
6805 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
6806
6807 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
6808
68092002-06-27 Akim Demaille <akim@epita.fr>
6810
6811 * src/options.h, src/options.c: Remove.
6812 * src/getargs.c (short_options, long_options): New.
6813
68142002-06-27 Akim Demaille <akim@epita.fr>
6815
6816 * data/bison.simple, data/bison.c++: Rename as...
6817 * data/yacc.c, data/lalr1.cc: these.
6818 * doc/bison.texinfo (Environment Variables): Remove.
6819
68202002-06-25 Raja R Harinath <harinath@cs.umn.edu>
6821
6822 * src/getargs.c (report_argmatch): Initialize strtok().
6823
68242002-06-20 Akim Demaille <akim@epita.fr>
6825
6826 * data/bison.simple (b4_symbol_actions): New, replaces...
6827 (b4_symbol_destructor, b4_symbol_printer): these.
6828 (yysymprint): Be sure to call YYPRINT only for tokens, and using
6829 user token numbers.
6830
68312002-06-20 Akim Demaille <akim@epita.fr>
6832
6833 * data/bison.simple (yydestructor): Rename as...
6834 (yydestruct): this.
6835
68362002-06-20 Akim Demaille <akim@epita.fr>
6837
6838 * src/symtab.h, src/symtab.c (symbol_type_set)
6839 (symbol_destructor_set, symbol_precedence_set): The location is
6840 the last argument.
6841 Adjust all callers.
6842
68432002-06-20 Akim Demaille <akim@epita.fr>
6844
6845 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
6846 internals.
6847 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
6848 Takes a location.
6849 * src/symtab.h, src/symtab.c (symbol_class_set)
6850 (symbol_user_token_number_set): Likewise.
6851 Adjust all callers.
6852 Promote complain_at.
6853 * tests/input.at (Type Clashes): Adjust.
6854
68552002-06-20 Akim Demaille <akim@epita.fr>
6856
6857 * data/bison.simple (YYLEX): Fix the declaration when
6858 %pure-parser.
6859
68602002-06-20 Akim Demaille <akim@epita.fr>
6861
6862 * data/bison.simple (yysymprint): Don't print the token number,
6863 just its name.
6864 * tests/actions.at (Destructors): Rename as...
6865 (Printers and Destructors): this.
6866 Also exercise %printer.
6867
68682002-06-20 Akim Demaille <akim@epita.fr>
6869
6870 * data/bison.simple (YYDSYMPRINT): New.
6871 Use it to remove many of the #if YYDEBUG/if (yydebug).
6872
68732002-06-20 Akim Demaille <akim@epita.fr>
6874
6875 * src/symtab.h, src/symtab.c (symbol_t): printer and
6876 printer_location are new members.
6877 (symbol_printer_set): New.
6878 * src/parse-gram.y (PERCENT_PRINTER): New token.
6879 Handle its associated rule.
6880 * src/scan-gram.l: Adjust.
6881 (handle_destructor_at, handle_destructor_dollar): Rename as...
6882 (handle_symbol_code_at, handle_symbol_code_dollar): these.
6883 * src/output.c (symbol_printers_output): New.
6884 (output_skeleton): Call it.
6885 * data/bison.simple (yysymprint): New. Cannot be named yyprint
6886 since there are already many grammar files with a user `yyprint'.
6887 Replace the calls to YYPRINT to calls to yysymprint.
6888 * tests/calc.at: Adjust.
6889 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
6890 taking advantage of parser very internal details (stack size!).
6891
68922002-06-20 Akim Demaille <akim@epita.fr>
6893
6894 * src/scan-gram.l: Complete the scanner with the missing patterns
6895 to pacify Flex.
6896 Use `quote' and `symbol_tag_get' where appropriate.
6897
68982002-06-19 Akim Demaille <akim@epita.fr>
6899
6900 * tests/actions.at (Destructors): Augment to test locations.
6901 * data/bison.simple (yydestructor): Pass it the current location
6902 if locations are enabled.
6903 Prototype only when __STDC__ or C++.
6904 Change the argument names to move into the yy name space: there is
6905 user code here.
6906
69072002-06-19 Akim Demaille <akim@epita.fr>
6908
6909 * data/bison.simple (b4_pure_if): New.
6910 Use it instead of #ifdef YYPURE.
6911
69122002-06-19 Akim Demaille <akim@epita.fr>
6913
6914 * data/bison.simple (b4_location_if): New.
6915 Use it instead of #ifdef YYLSP_NEEDED.
6916
69172002-06-19 Akim Demaille <akim@epita.fr>
6918
6919 Prepare @$ in %destructor, but currently don't bind it in the
6920 skeleton, as %location use is not cleaned up yet.
6921
6922 * src/scan-gram.l (handle_dollar, handle_destructor_at)
6923 (handle_action_at): New.
6924 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
6925 a braced_code_t and a location as additional arguments.
6926 (handle_destructor_dollar): Instead of requiring `b4_eval', just
6927 unquote one when outputting `b4_dollar_dollar'.
6928 Adjust callers.
6929 * data/bison.simple (b4_eval): Remove.
6930 (b4_symbol_destructor): Adjust.
6931 * tests/input.at (Invalid @n): Adjust.
6932
69332002-06-19 Zack Weinberg <zack@codesourcery.com>
6934
6935 * doc/bison.texinfo: Document ability to have multiple
6936 prologue sections.
6937
69382002-06-18 Akim Demaille <akim@epita.fr>
6939
6940 * src/files.c (compute_base_names): When computing the output file
6941 names from the input file name, strip the directory part.
6942
69432002-06-18 Akim Demaille <akim@epita.fr>
6944
6945 * data/bison.simple.new: Comment changes.
6946 Reported by Andreas Schwab.
6947
69482002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
6949
6950 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
6951 there are no `label `yyoverflowlab' defined but not used' warnings
6952 when yyoverflow is defined.
6953
69542002-06-18 Akim Demaille <akim@epita.fr>
6955
6956 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
6957 new member.
6958 (symbol_destructor_set): Adjust.
6959 * src/output.c (symbol_destructors_output): Output the destructor
6960 locations.
6961 Output the symbol name.
6962 * data/bison.simple (b4_symbol_destructor): Adjust.
6963
69642002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
6965 and Akim Demaille <akim@epita.fr>
6966
6967 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
6968 what's left on the stack when the error recovery hits EOF.
6969 * tests/actions.at (Destructors): Complete to exercise this case.
6970
69712002-06-17 Akim Demaille <akim@epita.fr>
6972
6973 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
6974 arguments is really empty, not only equal to `[]'.
6975 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
6976 member.
6977 (symbol_destructor_set): New.
6978 * src/output.c (symbol_destructors_output): New.
6979 * src/reader.h (brace_code_t, current_braced_code): New.
6980 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
6981 (handle_dollar): Rename as...
6982 (handle_action_dollar): this.
6983 (handle_destructor_dollar): New.
6984 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
6985 (grammar_declaration): Use it.
6986 * data/bison.simple (yystos): Is always defined.
6987 (yydestructor): New.
6988 * tests/actions.at (Destructors): New.
6989 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
6990
69912002-06-17 Akim Demaille <akim@epita.fr>
6992
6993 * src/symlist.h, src/symlist.c (symbol_list_length): New.
6994 * src/scan-gram.l (handle_dollar, handle_at): Compute the
6995 rule_length only when needed.
6996 * src/output.c (actions_output, token_definitions_output): Output
6997 the full M4 block.
6998 * src/symtab.c: Don't access directly to the symbol tag, use
6999 symbol_tag_get.
7000 * src/parse-gram.y: Use symbol_list_free.
7001
70022002-06-17 Akim Demaille <akim@epita.fr>
7003
7004 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
7005 (symbol_list_prepend, get_type_name): Move to...
7006 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
7007 (symbol_list_prepend, symbol_list_n_type_name_get): here.
7008 Adjust all callers.
7009 (symbol_list_free): New.
7010 * src/scan-gram.l (handle_dollar): Takes a location.
7011 * tests/input.at (Invalid $n): Adjust.
7012
70132002-06-17 Akim Demaille <akim@epita.fr>
7014
7015 * src/reader.h, src/reader.c (symbol_list_new): Export it.
7016 (symbol_list_prepend): New.
7017 * src/parse-gram.y (%union): `list' is a new member.
7018 (symbols.1): New, replaces...
7019 (terms_to_prec.1, nterms_to_type.1): these.
7020 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
7021 Take a location as additional argument.
7022 Adjust all callers.
7023
70242002-06-15 Akim Demaille <akim@epita.fr>
7025
7026 * src/parse-gram.y: Move %token in the declaration section so that
7027 we don't depend upon CVS Bison.
7028
70292002-06-15 Akim Demaille <akim@epita.fr>
7030
7031 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
7032 * src/print.c (print_core): Use it.
7033
70342002-06-15 Akim Demaille <akim@epita.fr>
7035
7036 * src/conflicts.c (log_resolution): Accept the rule involved in
7037 the sr conflicts instead of the lookahead number that points to
7038 that rule.
7039 (flush_reduce): Accept the current lookahead vector as argument,
7040 instead of the index in LA.
7041 (resolve_sr_conflict): Accept the current number of lookahead
7042 bitset to consider for the STATE, instead of the index in LA.
7043 (set_conflicts): Adjust.
7044 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
7045
70462002-06-15 Akim Demaille <akim@epita.fr>
7047
7048 * src/state.h (state_t): Replace the `lookaheadsp' member, a
7049 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
7050 Adjust all dependencies.
7051 * src/lalr.c (initialize_lookaheads): Split into...
7052 (states_lookaheads_count, states_lookaheads_initialize): these.
7053 (lalr): Adjust.
7054
70552002-06-15 Akim Demaille <akim@epita.fr>
7056
7057 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
7058 out of...
7059 (grammar_rules_print): here.
7060 * src/reduce.c (reduce_output): Use it.
7061 * tests/reduce.at (Useless Rules, Reduced Automaton)
7062 (Underivable Rules): Adjust.
7063
70642002-06-15 Akim Demaille <akim@epita.fr>
7065
7066 Copy BYacc's nice way to report the grammar.
7067
7068 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
7069 New.
7070 Don't print the rules' location, it is confusing and useless.
7071 (rule_print): Use grammar_rhs_print.
7072 * src/print.c (print_grammar): Use grammar_rules_print.
7073
70742002-06-15 Akim Demaille <akim@epita.fr>
7075
7076 Complete and rationalize `useless thing' warnings.
7077
7078 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
7079 (symbol_tag_print): New.
7080 Use them everywhere in place of accessing directly the tag member.
7081 * src/gram.h, src/gram.c (rule_print): New.
7082 Use it where a rule used to be printed `by hand'.
7083 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
7084 (reduce_grammar_tables): Report the useless rules.
7085 (reduce_print): Useless things are a warning, not an error.
7086 Report it as such.
7087 * tests/reduce.at (Useless Nonterminals, Useless Rules):
7088 (Reduced Automaton, Underivable Rules): Adjust.
7089 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
7090 * tests/conflicts.at (Unresolved SR Conflicts)
7091 (Solved SR Conflicts): Adjust.
7092
70932002-06-15 Akim Demaille <akim@epita.fr>
7094
7095 Let symbols have a location.
7096
7097 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
7098 (getsym): Adjust.
7099 Adjust all callers.
7100 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
7101 Use location_t, not int.
7102 * src/symtab.c (symbol_check_defined): Take advantage of the
7103 location.
7104 * tests/regression.at (Invalid inputs): Adjust.
7105
71062002-06-15 Akim Demaille <akim@epita.fr>
7107
7108 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
7109 (input): Don't try to initialize yylloc here, do it in the
7110 scanner.
7111 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
7112 * src/gram.h (rule_t): Change line and action_line into location
7113 and action_location, of location_t type.
7114 Adjust all dependencies.
7115 * src/location.h, src/location.c (empty_location): New.
7116 * src/reader.h, src/reader.c (grammar_start_symbol_set)
7117 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
7118 (grammar_current_rule_symbol_append)
7119 (grammar_current_rule_action_append): Expect a location as argument.
7120 * src/reader.c (grammar_midrule_action): Adjust to attach an
7121 action's location as dummy symbol location.
7122 * src/symtab.h, src/symtab.c (startsymbol_location): New.
7123 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
7124 the line numbers.
7125
71262002-06-14 Akim Demaille <akim@epita.fr>
7127
7128 Grammar declarations may be found in the grammar section.
7129
7130 * src/parse-gram.y (rules_or_grammar_declaration): New.
7131 (declarations): Each declaration may end with a semicolon, not
7132 just...
7133 (grammar_declaration): `"%union"'.
7134 (grammar): Branch to rules_or_grammar_declaration.
7135
71362002-06-14 Akim Demaille <akim@epita.fr>
7137
7138 * src/main.c (main): Invoke scanner_free.
7139
71402002-06-14 Akim Demaille <akim@epita.fr>
7141
7142 * src/output.c (m4_invoke): Extracted from...
7143 (output_skeleton): here.
7144 Free tempfile.
7145
71462002-06-14 Akim Demaille <akim@epita.fr>
7147
7148 * src/parse-gram.y (directives, directive, gram)
7149 (grammar_directives, precedence_directives, precedence_directive):
7150 Rename as...
7151 (declarations, declaration, grammar, grammar_declaration)
7152 (precedence_declaration, precedence_declarator): these.
7153 (symbol_declaration): New.
7154
71552002-06-14 Akim Demaille <akim@epita.fr>
7156
7157 * src/files.c (action_obstack): Remove, unused.
7158 (output_obstack): Remove it, and all its dependencies, as it is no
7159 longer needed.
7160 * src/reader.c (epilogue_set): Build the epilogue in the
7161 muscle_obstack.
7162 * src/output.h, src/output.c (muscle_obstack): Move to...
7163 * src/muscle_tab.h, src/muscle_tab.h: here.
7164 (muscle_init): Initialize muscle_obstack.
7165 (muscle_free): New.
7166 * src/main.c (main): Call it.
7167
71682002-06-14 Akim Demaille <akim@epita.fr>
7169
7170 * src/location.h: New, extracted from...
7171 * src/reader.h: here.
7172 * src/Makefile.am (noinst_HEADERS): Merge into
7173 (bison_SOURCES): this.
7174 Add location.h.
7175 * src/parse-gram.y: Use location_t instead of Bison's.
7176 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
7177 Use location_t instead of ints.
7178
71792002-06-14 Akim Demaille <akim@epita.fr>
7180
7181 * data/bison.simple, data/bison.c++: Be sure to restore the
7182 current #line when returning to the skeleton contents after having
7183 exposed the input file's #line.
7184
71852002-06-12 Akim Demaille <akim@epita.fr>
7186
7187 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
7188 eager.
7189 * tests/actions.at (Exotic Dollars): New.
7190
71912002-06-12 Akim Demaille <akim@epita.fr>
7192
7193 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
7194 ['"/] too eagerly.
7195 * tests/input.at (Torturing the Scanner): New.
7196
71972002-06-11 Akim Demaille <akim@epita.fr>
7198
7199 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
7200 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
7201 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
7202 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
7203 * src/reader.c (reader): Use it.
7204
72052002-06-11 Akim Demaille <akim@epita.fr>
7206
7207 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
7208 Adjust all callers.
7209 (scanner_last_string_free): New.
7210
72112002-06-11 Akim Demaille <akim@epita.fr>
7212
7213 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
7214 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
7215 (last_string, YY_OBS_FREE): New.
7216 Use them when returning an ID.
7217
72182002-06-11 Akim Demaille <akim@epita.fr>
7219
7220 Have Bison grammars parsed by a Bison grammar.
7221
7222 * src/reader.c, src/reader.h (prologue_augment): New.
7223 * src/reader.c (copy_definition): Remove.
7224
7225 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
7226 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
7227 (grammar_current_rule_prec_set, grammar_current_rule_check)
7228 (grammar_current_rule_symbol_append)
7229 (grammar_current_rule_action_append): Export.
7230 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
7231 (symbol_list_action_append): Remove.
7232 Hook the routines from reader.
7233 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
7234 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
7235
7236 * src/reader.c (read_declarations): Remove, unused.
7237
7238 * src/parse-gram.y: Handle the epilogue.
7239 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
7240 (grammar_start_symbol_set): this.
7241 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
7242 * src/reader.c (readgram): Remove, unused.
7243 (reader): Adjust to insert eoftoken and axiom where appropriate.
7244
7245 * src/reader.c (copy_dollar): Replace with...
7246 * src/scan-gram.h (handle_dollar): this.
7247 * src/parse-gram.y: Remove `%thong'.
7248
7249 * src/reader.c (copy_at): Replace with...
7250 * src/scan-gram.h (handle_at): this.
7251
7252 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
7253 New.
7254
7255 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
7256 time being.
7257
7258 * src/reader.h, src/reader.c (grammar_rule_end): New.
7259
7260 * src/parse.y (current_type, current_class): New.
7261 Implement `%nterm', `%token' support.
7262 Merge `%term' into `%token'.
7263 (string_as_id): New.
7264 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
7265 type name.
7266
7267 * src/parse-gram.y: Be sure to handle properly the beginning of
7268 rules.
7269
7270 * src/parse-gram.y: Handle %type.
7271 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
7272
7273 * src/parse-gram.y: More directives support.
7274 * src/options.c: No longer handle source directives.
7275
7276 * src/parse-gram.y: Fix %output.
7277
7278 * src/parse-gram.y: Handle %union.
7279 Use the prologue locations.
7280 * src/reader.c (parse_union_decl): Remove.
7281
7282 * src/reader.h, src/reader.c (epilogue_set): New.
7283 * src/parse-gram.y: Use it.
7284
7285 * data/bison.simple, data/bison.c++: b4_stype is now either not
7286 defined, then default to int, or to the contents of %union,
7287 without `union' itself.
7288 Adjust.
7289 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
7290
7291 * src/output.c (actions_output): Don't output braces, as they are
7292 already handled by the scanner.
7293
7294 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
7295 characters to themselves.
7296
7297 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
7298 that the epilogue has a proper #line.
7299
7300 * src/parse-gram.y: Handle precedence/associativity.
7301
7302 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
7303 a terminal.
7304 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
7305 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
7306 at all to define terminals that cannot be emitted.
7307
7308 * src/scan-gram.l: Escape M4 characters.
7309
7310 * src/scan-gram.l: Working properly with escapes in user
7311 strings/characters.
7312
7313 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
7314 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
7315 grammar.
7316 Use more modest sizes, as for the time being the parser does not
7317 release memory, and therefore the process swallows a huge amount
7318 of memory.
7319
7320 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
7321 stricter %token grammar.
7322
7323 * src/symtab.h (associativity): Add `undef_assoc'.
7324 (symbol_precedence_set): Do nothing when passed an undef_assoc.
7325 * src/symtab.c (symbol_check_alias_consistence): Adjust.
7326
7327 * tests/regression.at (Invalid %directive): Remove, as it is now
7328 meaningless.
7329 (Invalid inputs): Adjust to the new error messages.
7330 (Token definitions): The new grammar doesn't allow too many
7331 eccentricities.
7332
7333 * src/lex.h, src/lex.c: Remove.
7334 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
7335 (copy_character, copy_string2, copy_string, copy_identifier)
7336 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
7337 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
7338 (parse_action): Remove.
7339 * po/POTFILES.in: Adjust.
7340
73412002-06-11 Akim Demaille <akim@epita.fr>
7342
7343 * src/reader.c (parse_action): Don't store directly into the
7344 rule's action member: return the action as a string.
7345 Don't require `rule_length' as an argument: compute it.
7346 (grammar_current_rule_symbol_append)
7347 (grammar_current_rule_action_append): New, eved out from
7348 (readgram): here.
7349 Remove `action_flag', `rulelength', unused now.
7350
73512002-06-11 Akim Demaille <akim@epita.fr>
7352
7353 * src/reader.c (grammar_current_rule_prec_set).
7354 (grammar_current_rule_check): New, eved out from...
7355 (readgram): here.
7356 Remove `xaction', `first_rhs': useless.
7357 * tests/input.at (Type clashes): New.
7358 * tests/existing.at (GNU Cim Grammar): Adjust.
7359
73602002-06-11 Akim Demaille <akim@epita.fr>
7361
7362 * src/reader.c (grammar_midrule_action): New, Eved out from
7363 (readgram): here.
7364
73652002-06-11 Akim Demaille <akim@epita.fr>
7366
7367 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
7368 New.
7369 (readgram): Use them as replacement of inlined code, crule and
7370 crule1.
7371
73722002-06-11 Akim Demaille <akim@epita.fr>
7373
7374 * src/reader.c (grammar_end, grammar_symbol_append): New.
7375 (readgram): Use them.
7376 Make the use of `p' as local as possible.
7377
73782002-06-10 Akim Demaille <akim@epita.fr>
7379
7380 GCJ's parser requires the tokens to be defined before the prologue.
7381
7382 * data/bison.simple: Output the token definition before the user's
7383 prologue.
7384 * tests/regression.at (Braces parsing, Duplicate string)
7385 (Mixing %token styles): Check the output from bison.
7386 (Early token definitions): New.
7387
73882002-06-10 Akim Demaille <akim@epita.fr>
7389
7390 * src/symtab.c (symbol_user_token_number_set): Don't complain when
7391 assigning twice the same user number to a token, so that we can
7392 use it in...
7393 * src/lex.c (lex): here.
7394 Also use `symbol_class_set' instead of hand written code.
7395 * src/reader.c (parse_assoc_decl): Likewise.
7396
73972002-06-10 Akim Demaille <akim@epita.fr>
7398
7399 * src/symtab.c, src/symtab.c (symbol_class_set)
7400 (symbol_user_token_number_set): New.
7401 * src/reader.c (parse_token_decl): Use them.
7402 Use a switch instead of ifs.
7403 Use a single argument.
7404
74052002-06-10 Akim Demaille <akim@epita.fr>
7406
7407 Remove `%thong' support as it is undocumented, unused, duplicates
7408 `%token's job, and creates useless e-mail traffic with people who
7409 want to know what it is, why it is undocumented, unused, and
7410 duplicates `%token's job.
7411
7412 * src/reader.c (parse_thong_decl): Remove.
7413 * src/options.c (option_table): Remove "thong".
7414 * src/lex.h (tok_thong): Remove.
7415
74162002-06-10 Akim Demaille <akim@epita.fr>
7417
7418 * src/symtab.c, src/symtab.c (symbol_type_set)
7419 (symbol_precedence_set): New.
7420 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
7421 (value_components_used): Remove, unused.
7422
74232002-06-09 Akim Demaille <akim@epita.fr>
7424
7425 Move symbols handling code out of the reader.
7426
7427 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
7428 (axiom): Move to...
7429 * src/symtab.h, src/symtab.c: here.
7430
7431 * src/gram.c (start_symbol): Remove: use startsymbol->number.
7432 * src/reader.c (startval): Rename as...
7433 * src/symtab.h, src/symtab.c (startsymbol): this.
7434 * src/reader.c: Adjust.
7435
7436 * src/reader.c (symbol_check_defined, symbol_make_alias)
7437 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
7438 (token_translations_init)
7439 Move to...
7440 * src/symtab.c: here.
7441 * src/reader.c (packsymbols): Move to...
7442 * src/symtab.h, src/symtab.c (symbols_pack): here.
7443 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
7444 argument.
7445
74462002-06-03 Akim Demaille <akim@epita.fr>
7447
7448 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
7449 then statements.
7450
74512002-06-03 Akim Demaille <akim@epita.fr>
7452
7453 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
7454 structs with non literals.
7455 * src/scan-skel.l: never-interactive.
7456 * src/conflicts.c (enum conflict_resolution_e): No trailing
7457 comma.
7458 * src/getargs.c (usage): Split long literal strings.
7459 Reported by Hans Aberg.
7460
74612002-05-28 Akim Demaille <akim@epita.fr>
7462
7463 * data/bison.c++: Use C++ ostreams.
7464 (cdebug_): New member.
7465
74662002-05-28 Akim Demaille <akim@epita.fr>
7467
7468 * src/output.c (output_skeleton): Be sure to allocate enough room
7469 for `/' _and_ for `\0' in full_skeleton.
7470
74712002-05-28 Akim Demaille <akim@epita.fr>
7472
7473 * data/bison.c++: Catch up with bison.simple:
7474 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7475 and Paul Eggert <eggert@twinsun.com>: `error' handing.
7476 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
7477 and popping traces.
7478
74792002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7480
7481 * src/output.c (output_skeleton): Put an explicit path in front of
7482 the skeleton file name, rather than relying on the -I directory,
7483 to partially alleviate effects of having a skeleton file lying around
7484 in the current directory.
7485
74862002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7487
7488 * src/conflicts.c (log_resolution): Correct typo:
7489 obstack_printf should be obstack_fgrow1.
7490
74912002-05-26 Akim Demaille <akim@epita.fr>
7492
7493 * src/state.h (state_t): `solved_conflicts' is a new member.
7494 * src/LR0.c (new_state): Set it to 0.
7495 * src/conflicts.h, src/conflicts.c (print_conflicts)
7496 (free_conflicts, solve_conflicts): Rename as...
7497 (conflicts_print, conflicts_free, conflicts_solve): these.
7498 Adjust callers.
7499 * src/conflicts.c (enum conflict_resolution_e)
7500 (solved_conflicts_obstack): New, used by...
7501 (log_resolution): this.
7502 Adjust to attach the conflict resolution to each state.
7503 Complete the description with the precedence/associativity
7504 information.
7505 (resolve_sr_conflict): Adjust.
7506 * src/print.c (print_state): Output its solved_conflicts.
7507 * tests/conflicts.at (Unresolved SR Conflicts)
7508 (Solved SR Conflicts): Exercise --report=all.
7509
75102002-05-26 Akim Demaille <akim@epita.fr>
7511
7512 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
7513 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
7514 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
7515 (token_number_t, item_number_as_token_number)
7516 (token_number_as_item_number, muscle_insert_token_number_table):
7517 Rename as...
7518 (symbol_number_t, item_number_as_symbol_number)
7519 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
7520 these, since it is more appropriate.
7521
75222002-05-26 Akim Demaille <akim@epita.fr>
7523
7524 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
7525 `Error:' lines.
7526 * data/bison.simple (yystos) [YYDEBUG]: New.
7527 (yyparse) [YYDEBUG]: Display the symbols which are popped during
7528 error recovery.
7529 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
7530
75312002-05-25 Akim Demaille <akim@epita.fr>
7532
7533 * doc/bison.texinfo (Debugging): Split into...
7534 (Tracing): this new section, its former contents, and...
7535 (Understanding): this new section.
7536 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
7537 by...
7538 (report_flag): this.
7539 Adjust all dependencies.
7540 (report_args, report_types, report_argmatch): New.
7541 (usage, getargs): Report/support -r, --report.
7542 * src/options.h
7543 (struct option_table_struct): Rename as..,
7544 (struct option_table_s): this.
7545 Rename the `set_flag' member to `flag' to match with getopt_long's
7546 struct.
7547 * src/options.c (option_table): Split verbose into an entry for
7548 %verbose, and another for --verbose.
7549 Support --report/-r, so remove -r from the obsolete --raw.
7550 * src/print.c: Attach full item sets and lookaheads reports to
7551 report_flag instead of trace_flag.
7552 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
7553
75542002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7555 and Paul Eggert <eggert@twinsun.com>
7556
7557 * data/bison.simple (yyparse): Correct error handling to conform to
7558 POSIX and yacc. Specifically, after syntax error is discovered,
7559 do not reduce further before shifting the error token.
7560 Clean up the code a bit by removing the labels yyerrdefault,
7561 yyerrhandle, yyerrpop.
7562 * NEWS: Document the above.
7563
75642002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7565
7566 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
7567 type; it isn't always big enough, since it doesn't necessarily
7568 include non-terminals.
7569 (yytranslate): Expand definition of yy_token_number_type, so that
7570 the latter can be removed.
7571 (yy_token_number_type): Remove, only one use.
7572 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
7573 don't use TokenNumberType as element type.
7574
7575 * tests/regression.at: Modify expected output to agree with change
7576 to yyr1 and yytranslate.
7577
75782002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
7579
7580 * src/reader.c (parse_action): Use copy_character instead of
7581 obstack_1grow.
7582
75832002-05-13 Akim Demaille <akim@epita.fr>
7584
7585 * tests/regression.at (Token definitions): Prototype yylex and
7586 yyerror.
7587
75882002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7589
7590 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
7591 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
7592 32-bit arithmetic.
7593 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
7594
75952002-05-07 Akim Demaille <akim@epita.fr>
7596
7597 * tests/synclines.at: Be sure to prototype yylex and yyerror to
7598 avoid GCC warnings.
7599
76002002-05-07 Akim Demaille <akim@epita.fr>
7601
7602 Kill GCC warnings.
7603
7604 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
7605 over the RHS of each rule.
7606 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
7607 * src/state.h (state_t): Member `nitems' is unsigned short.
7608 * src/LR0.c (get_state): Adjust.
7609 * src/reader.c (packgram): Likewise.
7610 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
7611 `Type'.
7612 (muscle_insert_int_table): Remove, unused.
7613 (prepare_rules): Remove `max'.
7614
76152002-05-06 Akim Demaille <akim@epita.fr>
7616
7617 * src/closure.c (print_firsts): Display of the symbol tags.
7618 (bitmatrix_print): Move to...
7619 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
7620 here.
7621 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
7622
76232002-05-06 Akim Demaille <akim@epita.fr>
7624
7625 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
7626 hash_do_for_each.
7627
76282002-05-06 Akim Demaille <akim@epita.fr>
7629
7630 * src/LR0.c (new_state, get_state): Instead of using the global
7631 `kernel_size' and `kernel_base', have two new arguments:
7632 `core_size' and `core'.
7633 Adjust callers.
7634
76352002-05-06 Akim Demaille <akim@epita.fr>
7636
7637 * src/reader.c (packgram): No longer end `ritem' with a 0
7638 sentinel: it is not used.
7639
76402002-05-05 Akim Demaille <akim@epita.fr>
7641
7642 New experimental feature: display the lookaheads in the report and
7643 graph.
7644
7645 * src/print (print_core): When --trace-flag, display the rules
7646 lookaheads.
7647 * src/print_graph.c (print_core): Likewise.
7648 Swap the arguments.
7649 Adjust caller.
7650
76512002-05-05 Akim Demaille <akim@epita.fr>
7652
7653 * tests/torture.at (Many lookaheads): New test.
7654
76552002-05-05 Akim Demaille <akim@epita.fr>
7656
7657 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
7658 (GENERATE_MUSCLE_INSERT_TABLE): this.
7659 (output_int_table, output_unsigned_int_table, output_short_table)
7660 (output_token_number_table, output_item_number_table): Replace with...
7661 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
7662 (muscle_insert_short_table, muscle_insert_token_number_table)
7663 (muscle_insert_item_number_table): these.
7664 Adjust all callers.
7665 (prepare_tokens): Don't free `translations', since...
7666 * src/reader.h, src/reader.c (grammar_free): do it.
7667 Move to...
7668 * src/gram.h, src/gram.c (grammar_free): here.
7669 * data/bison.simple, data/bison.c++: b4_token_number_max is now
7670 b4_translate_max.
7671
76722002-05-05 Akim Demaille <akim@epita.fr>
7673
7674 * src/output.c (output_unsigned_int_table): New.
7675 (prepare_rules): `i' is unsigned.
7676 `prhs', `rline', `r2' are unsigned int.
7677 Rename muscle `rhs_number_max' as `rhs_max'.
7678 Output muscles `prhs_max', `rline_max', and `r2_max'.
7679 Free rline and r1.
7680 * data/bison.simple, data/bison.c++: Adjust to use these muscles
7681 to compute types instead of constant types.
7682 * tests/regression.at (Web2c Actions): Adjust.
7683
76842002-05-04 Akim Demaille <akim@epita.fr>
7685
7686 * src/symtab.h (SALIAS, SUNDEF): Rename as...
7687 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
7688 Adjust dependencies.
7689 * src/output.c (token_definitions_output): Be sure not to output a
7690 `#define 'a'' when fed with `%token 'a' "a"'.
7691 * tests/regression.at (Token definitions): New.
7692
76932002-05-03 Paul Eggert <eggert@twinsun.com>
7694
7695 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
7696 for K&R C.
7697
76982002-05-03 gettextize <bug-gnu-gettext@gnu.org>
7699
7700 * Makefile.am (SUBDIRS): Remove intl.
7701 (EXTRA_DIST): Add config/config.rpath.
7702
77032002-05-03 Akim Demaille <akim@epita.fr>
7704
7705 * data/bison.simple (m4_if): Don't output empty enums.
7706 And actually, output valid enum definitions :(.
7707
77082002-05-03 Akim Demaille <akim@epita.fr>
7709
7710 * configure.bat: Remove, completely obsolete.
7711 * Makefile.am (EXTRA_DIST): Adjust.
7712 Don't distribute config.rpath...
7713 * config/Makefile.am (EXTRA_DIST): Do it.
7714
77152002-05-03 Akim Demaille <akim@epita.fr>
7716
7717 * configure.in (GETTEXT_VERSION): New.
7718 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
7719
77202002-05-03 Akim Demaille <akim@epita.fr>
7721
7722 * data/bison.simple (b4_token_enum): New.
7723 (b4_token_defines): Use it to output tokens both as #define and
7724 enums.
7725 Suggested by Paul Eggert.
7726 * src/output.c (token_definitions_output): Don't output spurious
7727 white spaces.
7728
77292002-05-03 Akim Demaille <akim@epita.fr>
7730
7731 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
7732
77332002-05-02 Robert Anisko <robert@lrde.epita.fr>
7734
7735 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
7736 Update the stack class, give a try to deque as the default container.
7737
77382002-05-02 Akim Demaille <akim@epita.fr>
7739
7740 * data/bison.simple (yyparse): Do not implement @$ = @1.
7741 (YYLLOC_DEFAULT): Adjust to do it.
7742 * doc/bison.texinfo (Location Default Action): Fix.
7743
77442002-05-02 Akim Demaille <akim@epita.fr>
7745
7746 * src/reader.c (parse_braces): Merge into...
7747 (parse_action): this.
7748
77492002-05-02 Akim Demaille <akim@epita.fr>
7750
7751 * configure.in (ALL_LINGUAS): Remove.
7752 * po/LINGUAS, hr.po: New.
7753
77542002-05-02 Akim Demaille <akim@epita.fr>
7755
7756 Remove the so called hairy (semantic) parsers.
7757
7758 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
7759 * src/gram.h, src/gram.c (semantic_parser): Remove.
7760 (rule_t): Remove the guard and guard_line members.
7761 * src/lex.h (token_t): remove tok_guard.
7762 * src/options.c (option_table): Remove %guard and %semantic_parser
7763 support.
7764 * src/output.c, src/output.h (guards_output): Remove.
7765 (prepare): Adjust.
7766 (token_definitions_output): Don't output the `T'
7767 tokens (???).
7768 (output_skeleton): Don't output the guards.
7769 * src/files.c, src/files.c (attrsfile): Remove.
7770 * src/reader.c (symbol_list): Remove the guard and guard_line
7771 members.
7772 Adjust dependencies.
7773 (parse_guard): Remove.
7774 * data/bison.hairy: Remove.
7775 * doc/bison.texinfo (Environment Variables): Remove occurrences of
7776 BISON_HAIRY.
7777
77782002-05-02 Akim Demaille <akim@epita.fr>
7779
7780 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
7781 (parse_guard): Rename the formal argument `stack_offset' as
7782 `rule_length', which is more readable.
7783 Adjust callers.
7784 (copy_at, copy_dollar): Instead of outputting the hard coded
7785 values of $$, $n and so forth, output invocation to b4_lhs_value,
7786 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
7787 Note: this patch partially drops `semantic-parser' support: it
7788 always does `rule_length - n', where semantic parsers ought to
7789 always use `-n'.
7790 * data/bison.simple, data/bison.c++ (b4_lhs_value)
7791 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
7792
77932002-05-02 Akim Demaille <akim@epita.fr>
7794
7795 * configure.in (AC_INIT): Bump to 1.49b.
7796 (AM_INIT_AUTOMAKE): Short invocation.
7797
77982002-05-02 Akim Demaille <akim@epita.fr>
7799
7800 Version 1.49a.
7801
78022002-05-01 Akim Demaille <akim@epita.fr>
7803
7804 * src/skeleton.h: Remove.
7805
78062002-05-01 Akim Demaille <akim@epita.fr>
7807
7808 * src/skeleton.h: Fix the #endif.
7809 Reported by Magnus Fromreide.
7810
78112002-04-26 Paul Eggert <eggert@twinsun.com>
7812
7813 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
7814 Define if we define YYSTYPE and YYLTYPE, respectively.
7815 (YYCOPY): Fix [] quoting problem in the non-GCC case.
7816
78172002-04-25 Robert Anisko <robert@lrde.epita.fr>
7818
7819 * src/scan-skel.l: Postprocess quadrigraphs.
7820
7821 * src/reader.c (copy_character): New function, used to output
7822 single characters while replacing `[' and `]' with quadrigraphs, to
7823 avoid troubles with M4 quotes.
7824 (copy_comment): Output characters with copy_character.
7825 (read_additionnal_code): Likewise.
7826 (copy_string2): Likewise.
7827 (copy_definition): Likewise.
7828
7829 * tests/calc.at: Exercise M4 quoting.
7830
78312002-04-25 Akim Demaille <akim@epita.fr>
7832
7833 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
7834 between `!' and the command.
7835 Reported by Paul Eggert.
7836
78372002-04-24 Robert Anisko <robert@lrde.epita.fr>
7838
7839 * tests/calc.at: Exercise prologue splitting.
7840
7841 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
7842 `b4_post_prologue' instead of `b4_prologue'.
7843
7844 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
7845 muscles.
7846 (output): Free pre_prologue_obstack and post_prologue_obstack.
7847 * src/files.h, src/files.c (attrs_obstack): Remove.
7848 (pre_prologue_obstack, post_prologue_obstack): New.
7849 * src/reader.c (copy_definition): Add a parameter to specify the
7850 obstack to fill, instead of using attrs_obstack unconditionally.
7851 (read_declarations): Pass pre_prologue_obstack to copy_definition if
7852 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
7853
78542002-04-23 Paul Eggert <eggert@twinsun.com>
7855
7856 * data/bison.simple: Remove unnecessary commentary and white
7857 space differences from 1_29-branch.
7858 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
7859
7860 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
7861 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
7862 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
7863 constructors or destructors.
7864
7865 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
7866
78672002-04-23 Akim Demaille <akim@epita.fr>
7868
7869 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
7870 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
7871 location with columns.
7872 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
7873 All reported by Paul Eggert.
7874
78752002-04-22 Akim Demaille <akim@epita.fr>
7876
7877 * src/reduce.c (dump_grammar): Move to...
7878 * src/gram.h, src/gram.c (grammar_dump): here.
7879 Be sure to separate long item numbers.
7880 Don't read the members of a rule's prec if its nil.
7881
78822002-04-22 Akim Demaille <akim@epita.fr>
7883
7884 * src/output.c (table_size, table_grow): New.
7885 (MAXTABLE): Remove, replace uses with table_size.
7886 (pack_vector): Instead of dying when the table is too big, grow it.
7887
78882002-04-22 Akim Demaille <akim@epita.fr>
7889
7890 * data/bison.simple (yyr1): Its type is that of a token number.
7891 * data/bison.c++ (r1_): Likewise.
7892 * tests/regression.at (Web2c Actions): Adjust.
7893
78942002-04-22 Akim Demaille <akim@epita.fr>
7895
7896 * src/reader.c (token_translations_init): 256 is now the default
7897 value for the error token, i.e., it will be assigned another
7898 number if the user assigned 256 to one of her tokens.
7899 (reader): Don't force 256 to error.
7900 * doc/bison.texinfo (Symbols): Adjust.
7901 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
7902 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
7903 etc. instead of 10, 20, 30 (which was used to `jump' over error
7904 (256) and undefined (2)).
7905
79062002-04-22 Akim Demaille <akim@epita.fr>
7907
7908 Propagate more token_number_t.
7909
7910 * src/gram.h (token_number_as_item_number)
7911 (item_number_as_token_number): New.
7912 * src/output.c (GENERATE_OUTPUT_TABLE): New.
7913 Use it to create output_item_number_table and
7914 output_token_number_table.
7915 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
7916 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
7917 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
7918 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
7919
79202002-04-22 Akim Demaille <akim@epita.fr>
7921
7922 * src/output.h, src/output.c (get_lines_number): Remove.
7923
79242002-04-19 Akim Demaille <akim@epita.fr>
7925
7926 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
7927 as Lex/Flex'.
7928 (Debugging): More details about enabling the debugging features.
7929 (Table of Symbols): Describe $$, $n, @$, and @n.
7930 Suggested by Tim Josling.
7931
79322002-04-19 Akim Demaille <akim@epita.fr>
7933
7934 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
7935
79362002-04-10 Akim Demaille <akim@epita.fr>
7937
7938 * src/system.h: Rely on HAVE_LIMITS_H.
7939 Suggested by Paul Eggert.
7940
79412002-04-09 Akim Demaille <akim@epita.fr>
7942
7943 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
7944 full stderr, and strip it according to the bison options, instead
7945 of composing the error message from different bits.
7946 This makes it easier to check for several error messages.
7947 Adjust all the invocations.
7948 Add an invocation exercising the error token.
7949 Add an invocation demonstrating a stupid error message.
7950 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
7951 Adjust the tests.
7952 Error message are for stderr, not stdout.
7953
79542002-04-09 Akim Demaille <akim@epita.fr>
7955
7956 * src/gram.h, src/gram.c (error_token_number): Remove, use
7957 errtoken->number.
7958 * src/reader.c (reader): Don't specify the user token number (2)
7959 for $undefined, as it uselessly prevents using it.
7960 * src/gram.h (token_number_t): Move to...
7961 * src/symtab.h: here.
7962 (state_t.number): Is a token_number_t.
7963 * src/print.c, src/reader.c: Use undeftoken->number instead of
7964 hard coded 2.
7965 (Even though this 2 is not the same as above: the number of the
7966 undeftoken remains being 2, it is its user token number which
7967 might not be 2).
7968 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
7969 `user_token_number_max'.
7970 Output `undef_token_number'.
7971 * data/bison.simple, data/bison.c++: Use them.
7972 Be sure to map invalid yylex return values to
7973 `undef_token_number'. This saves us from gratuitous SEGV.
7974
7975 * tests/conflicts.at (Solved SR Conflicts)
7976 (Unresolved SR Conflicts): Adjust.
7977 * tests/regression.at (Web2c Actions): Adjust.
7978
79792002-04-08 Akim Demaille <akim@epita.fr>
7980
7981 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
7982 Adding #line.
7983 Remove the duplicate `typedefs'.
7984 (RhsNumberType): Fix the declaration and various other typos.
7985 Use __ofile__.
7986 * data/bison.simple: Use __ofile__.
7987 * src/scan-skel.l: Handle __ofile__.
7988
79892002-04-08 Akim Demaille <akim@epita.fr>
7990
7991 * src/gram.h (item_number_t): New, the type of item numbers in
7992 RITEM. Note that it must be able to code symbol numbers as
7993 positive number, and the negation of rule numbers as negative
7994 numbers.
7995 Adjust all dependencies (pretty many).
7996 * src/reduce.c (rule): Remove this `short *' pointer: use
7997 item_number_t.
7998 * src/system.h (MINSHORT, MAXSHORT): Remove.
7999 Include `limits.h'.
8000 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
8001 (shortcpy): Remove.
8002 (MAXTABLE): Move to...
8003 * src/output.c (MAXTABLE): here.
8004 (prepare_rules): Use output_int_table to output rhs.
8005 * data/bison.simple, data/bison.c++: Adjust.
8006 * tests/torture.at (Big triangle): Move the limit from 254 to
8007 500.
8008 * tests/regression.at (Web2c Actions): Ajust.
8009
8010 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
8011 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
8012 passes, but produces negative #line number, once fixed, GCC is
8013 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
8014 C), it passes.
8015 * src/state.h (state_h): Code input lines on ints, not shorts.
8016
80172002-04-08 Akim Demaille <akim@epita.fr>
8018
8019 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
8020 and then the grammar.
8021
80222002-04-08 Akim Demaille <akim@epita.fr>
8023
8024 * src/system.h: No longer using strndup.
8025
80262002-04-07 Akim Demaille <akim@epita.fr>
8027
8028 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
8029 * src/output.c (output_table_data): Return the longest number.
8030 (prepare_tokens): Output `token_number_max').
8031 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
8032 New.
8033 Use them to define yy_token_number_type/TokenNumberType.
8034 Use this type for yytranslate.
8035 * tests/torture.at (Big triangle): Push the limit from 124 to
8036 253.
8037 * tests/regression.at (Web2c Actions): Adjust.
8038
80392002-04-07 Akim Demaille <akim@epita.fr>
8040
8041 * tests/torture.at (Big triangle): New.
8042 (GNU AWK Grammar, GNU Cim Grammar): Move to...
8043 * tests/existing.at: here.
8044
80452002-04-07 Akim Demaille <akim@epita.fr>
8046
8047 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
8048 nritems.
8049 Adjust dependencies.
8050
80512002-04-07 Akim Demaille <akim@epita.fr>
8052
8053 * src/reader.c: Normalize increments to prefix form.
8054
80552002-04-07 Akim Demaille <akim@epita.fr>
8056
8057 * src/reader.c, symtab.c: Remove debugging code.
8058
80592002-04-07 Akim Demaille <akim@epita.fr>
8060
8061 Rename all the `bucket's as `symbol_t'.
8062
8063 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
8064 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
8065 * src/symtab.c, src/symtab.h (bucket): Rename as...
8066 (symbol_t): this.
8067 (symbol_list_new, bucket_check_defined, bucket_make_alias)
8068 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
8069 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8070 (buckets_new, buckets_free, buckets_do): Rename as...
8071 (symbol_list_new, symbol_check_defined, symbol_make_alias)
8072 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
8073 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
8074 (symbols_new, symbols_free, symbols_do): these.
8075
80762002-04-07 Akim Demaille <akim@epita.fr>
8077
8078 Use lib/hash for the symbol table.
8079
8080 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
8081 EOF.
8082 * src/lex.c (lex): Set the `number' member of new terminals.
8083 * src/reader.c (bucket_check_defined, bucket_make_alias)
8084 (bucket_check_alias_consistence, bucket_translation): New.
8085 (reader, grammar_free, readgram, token_translations_init)
8086 (packsymbols): Adjust.
8087 (reader): Number the predefined tokens.
8088 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
8089 for predefined tokens.
8090 * src/symtab.h (bucket): Remove all the hash table related
8091 members.
8092 * src/symtab.c (symtab): Replace by...
8093 (bucket_table): this.
8094 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
8095 (buckets_new, buckets_do): New.
8096
80972002-04-07 Akim Demaille <akim@epita.fr>
8098
8099 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
8100 (start_symbol, max_user_token_number, semantic_parser)
8101 (error_token_number): Initialize.
8102 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
8103 Initialize.
8104 (reader): Don't.
8105 (errtoken, eoftoken, undeftoken, axiom): Extern.
8106
81072002-04-07 Akim Demaille <akim@epita.fr>
8108
8109 * src/gram.h (rule_s): prec and precsym are now pointers
8110 to the bucket giving the priority/associativity.
8111 Member `associativity' removed: useless.
8112 * src/reduce.c, src/conflicts.c: Adjust.
8113
81142002-04-07 Akim Demaille <akim@epita.fr>
8115
8116 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
8117 Properly escape the symbols' TAG when outputting them.
8118
81192002-04-07 Akim Demaille <akim@epita.fr>
8120
8121 * src/lalr.h (LA): Is a bitsetv, not bitset*.
8122
81232002-04-07 Akim Demaille <akim@epita.fr>
8124
8125 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
8126 (LArule): this, which is an array to rule_t*.
8127 * src/print.c, src/conflicts.c: Adjust.
8128
81292002-04-07 Akim Demaille <akim@epita.fr>
8130
8131 * src/gram.h (rule_t): Rename `number' as `user_number'.
8132 `number' is a new member.
8133 Adjust dependencies.
8134 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
8135
81362002-04-07 Akim Demaille <akim@epita.fr>
8137
8138 As a result of the previous patch, it is no longer needed
8139 to reorder ritem itself.
8140
8141 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
8142
81432002-04-07 Akim Demaille <akim@epita.fr>
8144
8145 Be sure never to walk through RITEMS, but use only data related to
8146 the rules themselves. RITEMS should be banished.
8147
8148 * src/output.c (output_token_translations): Rename as...
8149 (prepare_tokens): this.
8150 In addition to `translate', prepare the muscles `tname' and
8151 `toknum', which were handled by...
8152 (output_rule_data): this.
8153 Remove, and move the remainder of its outputs into...
8154 (prepare_rules): this new routines, which also merges content from
8155 (output_gram): this.
8156 (prepare_rules): Be sure never to walk through RITEMS.
8157 (output_stos): Rename as...
8158 (prepare_stos): this.
8159 (output): Always invoke prepare_states, after all, just don't use it
8160 in the output if you don't need it.
8161
81622002-04-07 Akim Demaille <akim@epita.fr>
8163
8164 * src/LR0.c (new_state): Display `nstates' as the name of the
8165 newly created state.
8166 Adjust to initialize first_state and last_state if needed.
8167 Be sure to distinguish the initial from the final state.
8168 (new_states): Create the itemset of the initial state, and use
8169 new_state.
8170 * src/closure.c (closure): Now that the initial state has its
8171 items properly set, there is no need for a special case when
8172 creating `ruleset'.
8173
8174 As a result, now the rule 0, reducing to $axiom, is visible in the
8175 outputs. Adjust the test suite.
8176
8177 * tests/conflicts.at (Solved SR Conflicts)
8178 (Unresolved SR Conflicts): Adjust.
8179 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
8180 * tests/conflicts.at (S/R in initial): New.
8181
81822002-04-07 Akim Demaille <akim@epita.fr>
8183
8184 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
8185 the RHS of the rules.
8186 * src/output.c (output_gram): Likewise.
8187
81882002-04-07 Akim Demaille <akim@epita.fr>
8189
8190 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
8191 bucket.
8192 Adjust all dependencies.
8193 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
8194 `number' of the buckets too.
8195 * src/gram.h: Include `symtab.h'.
8196 (associativity): Move to...
8197 * src/symtab.h: here.
8198 No longer include `gram.h'.
8199
82002002-04-07 Akim Demaille <akim@epita.fr>
8201
8202 * src/gram.h, src/gram.c (rules_rhs_length): New.
8203 (ritem_longest_rhs): Use it.
8204 * src/gram.h (rule_t): `number' is a new member.
8205 * src/reader.c (packgram): Set it.
8206 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
8207 the end of `rules', and count them out of `nrules'.
8208 (reduce_output, dump_grammar): Adjust.
8209 * src/print.c (print_grammar): It is no longer needed to check for
8210 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
8211 * tests/reduce.at (Reduced Automaton): New test.
8212
82132002-04-07 Akim Demaille <akim@epita.fr>
8214
8215 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
8216 lacking `+ 1' to nrules, Bison reported as useless a token if it
8217 was used solely to set the precedence of the last rule...
8218
82192002-04-07 Akim Demaille <akim@epita.fr>
8220
8221 * data/bison.c++, data/bison.simple: Don't output the current file
8222 name in #line, to avoid useless diffs between two identical
8223 outputs under different names.
8224
82252002-04-07 Akim Demaille <akim@epita.fr>
8226
8227 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
8228 Normalize loops to using `< nrules + 1', not `<= nrules'.
8229
82302002-04-07 Akim Demaille <akim@epita.fr>
8231
8232 * TODO: Update.
8233
82342002-04-07 Akim Demaille <akim@epita.fr>
8235
8236 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
8237 bucket.value as bucket.number.
8238
82392002-04-07 Akim Demaille <akim@epita.fr>
8240
8241 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
8242 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
8243 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
8244 RHS, instead of being an index in RITEMS.
8245
82462002-04-04 Paul Eggert <eggert@twinsun.com>
8247
8248 * doc/bison.texinfo: Update copyright date.
8249 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
8250 (Symbols): Warn about running Bison in one character set,
8251 but compiling and/or running in an incompatible one.
8252 Warn about character code 256, too.
8253
82542002-04-03 Paul Eggert <eggert@twinsun.com>
8255
8256 * src/bison.data (YYSTACK_ALLOC): Depend on whether
8257 YYERROR_VERBOSE is nonzero, not whether it is defined.
8258
8259 Merge changes from bison-1_29-branch.
8260
82612002-03-20 Paul Eggert <eggert@twinsun.com>
8262
8263 Merge fixes from Debian bison_1.34-1.diff.
8264
8265 * configure.in (AC_PREREQ): 2.53.
8266
82672002-03-20 Akim Demaille <akim@epita.fr>
8268
8269 * src/conflicts.c (log_resolution): Argument `resolution' is const.
8270
82712002-03-19 Paul Eggert <eggert@twinsun.com>
8272
8273 * src/bison.simple (YYCOPY): New macro.
8274 (YYSTACK_RELOCATE): Use it.
8275 Remove Type arg; no longer needed. All callers changed.
8276 (yymemcpy): Remove; no longer needed.
8277
8278 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
8279 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
8280
82812002-03-19 Akim Demaille <akim@epita.fr>
8282
8283 Test and fix the #line outputs.
8284
8285 * tests/atlocal.at (GCC): New.
8286 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
8287 (Prologue synch line, %union synch line, Postprologue synch line)
8288 (Action synch line, Epilogue synch line): New tests.
8289 * src/reader.c (parse_union_decl): Define the muscle stype_line.
8290 * data/bison.simple, data/bison.c++: Use it.
8291
82922002-03-19 Akim Demaille <akim@epita.fr>
8293
8294 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
8295 (Solved SR Conflicts, %expect not enough, %expect right)
8296 (%expect too much): Move to...
8297 * tests/conflicts.at: this new file.
8298
82992002-03-19 Akim Demaille <akim@epita.fr>
8300
8301 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8302 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
8303 that we can move to enums for instance.
8304 * src/output.c (token_definitions_output): Output a list of
8305 `token-name, token-number' instead of the #define.
8306 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
8307
83082002-03-14 Akim Demaille <akim@epita.fr>
8309
8310 Use Gettext 0.11.1.
8311
83122002-03-09 Robert Anisko <robert@lrde.epita.fr>
8313
8314 * data/bison.c++: Make the user able to add members to the generated
8315 parser by subclassing.
8316
83172002-03-05 Robert Anisko <robert@lrde.epita.fr>
8318
8319 * src/reader.c (read_additionnal_code): `c' should be an integer, not
8320 a character.
8321 Reported by Nicolas Tisserand and Nicolas Burrus.
8322
83232002-03-04 Robert Anisko <robert@lrde.epita.fr>
8324
8325 * src/reader.c: Warn about lacking semi-colons, do not complain.
8326
83272002-03-04 Robert Anisko <robert@lrde.epita.fr>
8328
8329 * data/bison.c++: Remove a debug line.
8330
83312002-03-04 Robert Anisko <robert@lrde.epita.fr>
8332
8333 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
8334 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
8335 provide a default implementation.
8336
83372002-03-04 Akim Demaille <akim@epita.fr>
8338
8339 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
8340 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
8341 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
8342 * tests/semantic.at (Parsing Guards): Similarly.
8343 * src/reader.at (readgram): Complain if the last rule is not ended
8344 with a semi-colon.
8345
83462002-03-04 Akim Demaille <akim@epita.fr>
8347
8348 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
8349 * src/closure.c: here.
8350 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
8351 RTC.
8352 * src/warshall.h, src/warshall.c: Remove.
8353 * tests/sets.at (Broken Closure): Adjust.
8354
83552002-03-04 Akim Demaille <akim@epita.fr>
8356
8357 * src/output.c (output_skeleton): tempdir is const.
8358 bytes_read is unused.
8359
83602002-03-04 Akim Demaille <akim@epita.fr>
8361
8362 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
8363 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
8364 Update.
8365 From Michael Hayes.
8366
83672002-03-04 Akim Demaille <akim@epita.fr>
8368
8369 * src/closure.c (closure): `r' is unused.
8370
83712002-03-04 Akim Demaille <akim@epita.fr>
8372
8373 * tests/sets.at (Broken Closure): Add the ending `;'.
8374 * src/reader.at (readgram): Complain if a rule is not ended with a
8375 semi-colon.
8376
83772002-03-04 Akim Demaille <akim@epita.fr>
8378
8379 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
8380 (count_sr_conflicts): Use bitset_count.
8381 * src/reduce.c (inaccessable_symbols): Ditto.
8382 (bits_size): Remove.
8383 * src/warshall.h, src/warshall.c: Convert to bitsetv.
8384
83852002-03-04 Akim Demaille <akim@epita.fr>
8386
8387 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
8388 * src/reduce.c: Remove the `bitset_zero's following the
8389 `bitset_create's, as now it is performed by the latter.
8390
83912002-03-04 Akim Demaille <akim@epita.fr>
8392
8393 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
8394 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
8395 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
8396 latest sources from Michael.
8397
83982002-03-04 Akim Demaille <akim@epita.fr>
8399
8400 * src/output.c (output): Don't free the grammar.
8401 * src/reader.c (grammar_free): New.
8402 * src/main.c (main): Call it and don't free symtab here.
8403
84042002-03-04 Akim Demaille <akim@epita.fr>
8405
8406 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
8407 before returning.
8408 Reported by Benoit Perrot.
8409
84102002-03-04 Akim Demaille <akim@epita.fr>
8411
8412 Use bitset operations when possible, not loops over bits.
8413
8414 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
8415 bitset_or.
8416 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
8417 * src/reduce.c (useless_nonterminals): Formatting changes.
8418 * src/warshall.c (TC): Use bitset_or.
8419
84202002-03-04 Akim Demaille <akim@epita.fr>
8421
8422 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
8423 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
8424 Ditto.
8425
84262002-03-04 Akim Demaille <akim@epita.fr>
8427
8428 * src/lalr.c (F): Now a bitset*.
8429 Adjust all dependencies.
8430
84312002-03-04 Akim Demaille <akim@epita.fr>
8432
8433 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
8434 Adjust all dependencies.
8435
84362002-03-04 Akim Demaille <akim@epita.fr>
8437
8438 * src/L0.c, src/LR0.h (nstates): Be size_t.
8439 Adjust comparisons (signed vs unsigned).
8440 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
8441 bitset*.
8442 Adjust all dependencies.
8443
84442002-03-04 Akim Demaille <akim@epita.fr>
8445
8446 * src/closure.c (firsts): Now, also a bitset.
8447 Adjust all dependencies.
8448 (varsetsize): Remove, now unused.
8449 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
8450
84512002-03-04 Akim Demaille <akim@epita.fr>
8452
8453 * src/print.c: Convert to use bitset.h, not hand coded iterations
8454 over ints.
8455
84562002-03-04 Akim Demaille <akim@epita.fr>
8457
8458 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
8459
84602002-03-04 Akim Demaille <akim@epita.fr>
8461
8462 * src/closure.c (ruleset): Be a bitset.
8463 (rulesetsize): Remove.
8464
84652002-03-04 Akim Demaille <akim@epita.fr>
8466
8467 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
8468 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
8469 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
8470 * src/closure.c (fderives): Be an array of bitsets.
8471
84722002-02-28 Robert Anisko <robert@lrde.epita.fr>
8473
8474 * data/bison.c++: Merge the two generated headers. Insert a copyright
8475 notice in each output file.
8476
84772002-02-28 Akim Demaille <akim@epita.fr>
8478
8479 * data/bison.c++: Copy the prologue of bison.simple to fetch
8480 useful M4 definitions, such as b4_header_guard.
8481
84822002-02-25 Akim Demaille <akim@epita.fr>
8483
8484 * src/getargs.c (version): Give the name of the authors, and use a
8485 translator friendly scheme for the bgr
8486 copyright notice.
8487
84882002-02-25 Akim Demaille <akim@epita.fr>
8489
8490 * src/output.c (header_output): Remove, now handled completely via
8491 M4.
8492
84932002-02-25 Akim Demaille <akim@epita.fr>
8494
8495 * m4/m4.m4: New, from CVS Autoconf.
8496 * configure.in: Invoke it.
8497 * src/output.c (output_skeleton): Use its result instead of the
8498 hard coded name.
8499
85002002-02-25 Akim Demaille <akim@epita.fr>
8501
8502 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
8503 Fileutils 4.1.5.
8504 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
8505 * src/output.c (output_skeleton): Use mkstemp to create a real
8506 temporary file.
8507 Move the filling of `skeleton' and its muscle to...
8508 (prepare): here.
8509 (output): Move the definition of the prologue muscle to...
8510 (prepare): here.
8511 * src/system.h (DEFAULT_TMPDIR): New.
8512
85132002-02-14 Paul Eggert <eggert@twinsun.com>
8514
8515 Remove the support for C++ namespace cleanliness; it was
8516 causing more problems than it was curing, since it didn't work
8517 properly on some nonstandard C++ compilers. This can wait
8518 for a proper C++ parser.
8519
8520 * NEWS: Document this.
8521 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
8522 of C++, as it's treated like C now.
8523 * src/bison.simple (YYSTD): Remove.
8524 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
8525 Treat C++ just like Standard C instead of trying to support
8526 namespace cleanliness.
8527
85282002-02-14 Akim Demaille <akim@epita.fr>
8529
8530 * tests/regression.at (else): Adjust to Andreas' change.
8531
85322002-02-14 Akim Demaille <akim@epita.fr>
8533
8534 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
8535
85362002-02-13 Andreas Schwab <schwab@suse.de>
8537
8538 * src/output.c (output_rule_data): Don't output NULL, it might
8539 not be defined yet.
8540
85412002-02-11 Robert Anisko <robert@lrde.epita.fr>
8542
8543 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
8544 (Copyright notice): Update.
8545
85462002-02-11 Akim Demaille <akim@epita.fr>
8547
8548 * tests/regression.at (%nonassoc and eof): Don't include
8549 nonportable headers.
8550
85512002-02-08 Robert Anisko <robert@lrde.epita.fr>
8552
8553 * data/bison.c++: Correct error recovery. Make the user able to
8554 initialize the starting location.
8555
85562002-02-07 Akim Demaille <akim@epita.fr>
8557
8558 * tests/input.at: New.
8559
85602002-02-07 Robert Anisko <robert@lrde.epita.fr>
8561
8562 * data/bison.c++: Replace some direct m4 expansions by constants. Be
8563 more consistent when naming methods and variables. Put preprocessor
8564 directives around tables only needed for debugging.
8565
85662002-02-07 Robert Anisko <robert@lrde.epita.fr>
8567
8568 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
8569 C++ parsers.
8570 (yy::b4_name::parse): Use print_.
8571
85722002-02-07 Robert Anisko <robert@lrde.epita.fr>
8573
8574 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
8575
85762002-02-07 Robert Anisko <robert@lrde.epita.fr>
8577
8578 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
8579 C++ parsers.
8580 (yy::b4_name::parse): Build verbose error messages, and use error_.
8581
85822002-02-06 Robert Anisko <robert@lrde.epita.fr>
8583
8584 * data/bison.c++: Fix m4 quoting in comments.
8585
85862002-02-06 Robert Anisko <robert@lrde.epita.fr>
8587
8588 * data/bison.c++: Adjust the parser code. Fix some muscles that were
8589 not expanded by m4.
8590
85912002-02-05 Akim Demaille <akim@epita.fr>
8592
8593 * data/bison.c++: Adjust to the M4 back end.
8594 More is certainly needed.
8595
85962002-02-05 Akim Demaille <akim@epita.fr>
8597
8598 Give a try to M4 as a back end.
8599
8600 * lib/readpipe.c: New, from wdiff.
8601 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
8602 BISON_HAIRY.
8603 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
8604 specific values. Now it is m4 that performs the lookup.
8605 * src/parse-skel.y: Remove.
8606 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
8607 * src/output.c (actions_output, guards_output)
8608 (token_definitions_output): No longer keeps track of the output
8609 line number, hence remove the second argument.
8610 (guards_output): Check against the guard member of a rule, not the
8611 action member.
8612 Adjust callers.
8613 (output_skeleton): Don't look for the skeleton location, let m4 do
8614 that.
8615 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
8616 file will be used.
8617 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
8618 (prepare): Given that for the time being changesyntax is not
8619 usable in M4, rename the muscles using `-' to `_'.
8620 Define `defines_flag', `output_parser_name' and `output_header_name'.
8621 * src/output.h (actions_output, guards_output)
8622 (token_definitions_output): Adjust prototypes.
8623 * src/scan-skel.l: Instead of scanning the skeletons, it now
8624 processes the output of m4: `__oline__' and `#output'.
8625 * data/bison.simple: Adjust to be used by M4(sugar).
8626 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
8627 to date.
8628 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
8629 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
8630 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
8631 shamelessly stolen from CVS Autoconf.
8632
86332002-02-05 Akim Demaille <akim@epita.fr>
8634
8635 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
8636 * configure.in: Check for the declarations of free and malloc.
8637 * src/muscle_tab.c: Adjust.
8638
86392002-02-05 Akim Demaille <akim@epita.fr>
8640
8641 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
8642 which have no values.
8643
86442002-02-05 Akim Demaille <akim@epita.fr>
8645
8646 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
8647 * data/: here.
8648
86492002-01-29 Paul Eggert <eggert@twinsun.com>
8650
8651 * src/bison.simple (YYSIZE_T): Do not define merely because
8652 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
8653 On some platforms, <alloca.h> does not declare YYSTD (size_t).
8654
86552002-01-27 Akim Demaille <akim@epita.fr>
8656
8657 Fix `%nonassoc and eof'.
8658
8659 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
8660 which were not properly copied! Replace
8661 memcpy (res->errs, src->errs, src->nerrs);
8662 with
8663 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
8664 !!!
8665 * tests/regression.at (%nonassoc and eof): Adjust to newest
8666 Autotest: `.' is not in the PATH.
8667
86682002-01-27 Akim Demaille <akim@epita.fr>
8669
8670 * tests/sets.at (AT_EXTRACT_SETS): New.
8671 (Nullable): Use it.
8672 (Firsts): New.
8673
86742002-01-26 Akim Demaille <akim@epita.fr>
8675
8676 * tests/actions.at, tests/calc.at, tests/headers.at,
8677 * tests/torture.at: Adjust to the newest Autotest which no longer
8678 forces `.' in the PATH.
8679
86802002-01-25 Akim Demaille <akim@epita.fr>
8681
8682 * tests/regression.at (%nonassoc and eof): New.
8683 Suggested by Robert Anisko.
8684
86852002-01-24 Akim Demaille <akim@epita.fr>
8686
8687 Bison dumps core when trying to complain about broken input files.
8688 Reported by Cris van Pelt.
8689
8690 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
8691 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
8692 into...
8693 (Invalid inputs): Strengthen: exercise parse_percent_token.
8694
86952002-01-24 Robert Anisko <robert.anisko@epita.fr>
8696
8697 * src/Makefile.am: Add bison.c++.
8698 * src/bison.c++: New skeleton.
8699
87002002-01-21 Paolo Bonzini <bonzini@gnu.org>
8701
8702 * po/it.po: New.
8703
87042002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
8705
8706 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
8707
87082002-01-20 Marc Autret <marc@gnu.org>
8709
8710 * src/files.c (compute_output_file_names): Fix
8711
87122002-01-20 Marc Autret <marc@gnu.org>
8713
8714 * tests/output.at: New test.
8715 * src/files.c (compute_base_names): Don't map extensions when
8716 the YACC flag is set, use defaults.
8717 Reported by Evgeny Stambulchik.
8718
87192002-01-20 Marc Autret <marc@gnu.org>
8720
8721 * src/system.h: Need to define __attribute__ away for non-GCC
8722 compilers as well (i.e. the vendor C compiler).
8723 Suggested by Albert Chin-A-Young.
8724
87252002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
8726
8727 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
8728 canonical definition.
8729 * src/system.h: Use the canonical definition for PARAMS (avoids
8730 a conflict with the macro from lib/hash.h).
8731
87322002-01-11 Akim Demaille <akim@epita.fr>
8733
8734 * configure.in: Use AC_FUNC_STRNLEN.
8735 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
8736
87372002-01-09 Akim Demaille <akim@epita.fr>
8738
8739 * src/files.c, src/files.h (output_infix): New.
8740 (tab_extension): Remove.
8741 (compute_base_names): Compute the former, drop the latter.
8742 * src/output.c (prepare): Insert the muscles `output-infix', and
8743 `output-suffix'.
8744 * src/parse-skel.y (string, string.1): New.
8745 (section.header): Use it.
8746 (section.yacc): Remove.
8747 (prefix): Remove too.
8748 * src/scan-skel.l: Adjust.
8749 * src/bison.simple, src/bison.hairy: Adjust.
8750
87512002-01-09 Akim Demaille <akim@epita.fr>
8752
8753 * configure.in (WERROR_CFLAGS): Compute it.
8754 * src/Makefile.am (CFLAGS): Pass it.
8755 * tests/atlocal.in (CFLAGS): Idem.
8756 * src/files.c: Fix a few warnings.
8757 (get_extension_index): Remove, unused.
8758
87592002-01-08 Akim Demaille <akim@epita.fr>
8760
8761 * src/getargs.c (AS_FILE_NAME): New.
8762 (getargs): Use it to convert DOSish file names.
8763 * src/files.c (base_name): Rename as full_base_name to avoid
8764 clashes with `base_name ()'.
8765 (filename_split): New.
8766 (compute_base_names): N-th rewrite, using filename_split.
8767
87682002-01-08 Akim Demaille <akim@epita.fr>
8769
8770 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
8771 New, stolen from the Fileutils 4.1.
8772 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8773 * configure.in: Check for the presence of memrchr, and of its
8774 prototype.
8775
87762002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
8777
8778 * lib/hash.h (__P): Added definition for this macro.
8779 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
8780 BUILT_SOURCES, to ensure they are generated first.
8781 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
8782 %error-verbose to allow bootstrapping with bison 1.30x.
8783
87842002-01-06 Akim Demaille <akim@epita.fr>
8785
8786 * src/reader.c (parse_braces): Don't fetch the next char, the
8787 convention is to fetch on entry.
8788 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
8789 'switch' without a following semicolon.
8790 * tests/regression.at (braces parsing): New.
8791
87922002-01-06 Akim Demaille <akim@epita.fr>
8793
8794 Bison is dead wrong in its RR conflict reports.
8795
8796 * tests/torture.at (GNU Cim Grammar): New.
8797 * src/conflicts.c (count_rr_conflicts): Fix.
8798
87992002-01-06 Akim Demaille <akim@epita.fr>
8800
8801 Creating package.m4 from configure.ac causes too many problems.
8802
8803 * tests/Makefile.am (package.m4): Create it by hand,
8804 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
8805
88062002-01-06 Akim Demaille <akim@epita.fr>
8807
8808 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
8809 skeleton.h.
8810
88112002-01-04 Paul Eggert <eggert@twinsun.com>
8812
8813 * doc/bison.texinfo (Debugging):
8814 Remove YYSTDERR; it's no longer defined or used.
8815 Also, s/cstdio.h/cstdio/.
8816
88172002-01-03 Akim Demaille <akim@epita.fr>
8818
8819 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
8820
88212002-01-03 Akim Demaille <akim@epita.fr>
8822
8823 * src/parse-skel.y (process_skeleton): Don't bind the parser's
8824 tracing code to --trace, wait for a better --trace option, with
8825 args.
8826
88272002-01-03 Akim Demaille <akim@epita.fr>
8828
8829 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
8830 The ISO C++ standard is extremely clear about it: stderr is
8831 considered a macro, not a regular symbol (see table 94 `Header
8832 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
8833 Therefore std:: does not apply to it. It still does with fprintf.
8834 Also, s/cstdio.h/cstdio/.
8835
88362002-01-03 Akim Demaille <akim@epita.fr>
8837
8838 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
8839 for non system headers.
8840
88412002-01-02 Akim Demaille <akim@epita.fr>
8842
8843 Equip the skeleton chain with location tracking, runtime trace,
8844 pure parser and scanner.
8845
8846 * src/parse-skel.y: Request a pure parser, locations, and prefix
8847 renaming.
8848 (%union): Having several members with the same type does not help
8849 type mismatches, simplify.
8850 (YYPRINT, yyprint): New.
8851 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
8852 (skel_error): this.
8853 Handle locations.
8854 * src/scan-skel.l: Adjust to these changes.
8855 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
8856 (LOCATION_PRINT, skel_control_t): New.
8857
88582001-12-30 Akim Demaille <akim@epita.fr>
8859
8860 * src/parse-skel.y: Get rid of the shift/reduce conflict:
8861 replace `gb' with BLANKS.
8862 * src/scan-skel.l: Adjust.
8863
88642001-12-30 Akim Demaille <akim@epita.fr>
8865
8866 * src/system.h: We don't need nor want bcopy.
8867 Throw away MS-DOS crap: we don't need getpid.
8868 * configure.in: We don't need strndup. It was even causing
8869 problems: because Flex includes the headers *before* us,
8870 _GNU_SOURCE is not defined by config.h, and therefore strndup was
8871 not visible.
8872 * lib/xstrndup.c: New.
8873 * src/scan-skel.l: Use it.
8874 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
8875 * src/parse-skel.y: Use %directives instead of #defines.
8876
88772001-12-30 Akim Demaille <akim@epita.fr>
8878
8879 * src/skeleton.h: New.
8880 * src/output.c (output_parser, output_master_parser): Remove, dead
8881 code.
8882 * src/output.h (get_lines_number, actions_output, guards_output)
8883 (token_definitions_output): Prototype them.
8884 * src/parse-skel.y: Add the license notice.
8885 Include output.h and skeleton.h.
8886 (process_skeleton): Returns void, and takes a single parameter.
8887 * src/scan-skel.l: Add the license notice.
8888 Include skeleton.h.
8889 Don't use %option yylineno: it seems that then Flex imagines
8890 REJECT has been used, and therefore it won't reallocate its
8891 buffers (which makes no other sense to me than a bug). It results
8892 in warnings for `unused: yy_flex_realloc'.
8893
88942001-12-30 Robert Anisko <robert.anisko@epita.fr>
8895
8896 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
8897 (MUSCLE_INSERT_PREFIX): ...to there.
8898 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
8899 (MUSCLE_INSERT_PREFIX): Move from here...
8900
8901 * src/bison.hairy: Add a section directive. Put braces around muscle
8902 names. This parser skeleton is still broken, but Bison should not
8903 choke on a bad muscle 'syntax'.
8904 * src/bison.simple: Add a section directive. Put braces around muscle
8905 names.
8906
8907 * src/files.h (strsuffix, stringappend): Add declarations.
8908 (tab_extension): Add declaration.
8909 (short_base_name): Add declaration.
8910
8911 * src/files.c (strsuffix, stringappend): No longer static. These
8912 functions are used in the skeleton parser.
8913 (tab_extension): New.
8914 (compute_base_names): Use the computations done in this function
8915 to guess if the generated parsers should have '.tab' in their
8916 names.
8917 (short_base_name): No longer static.
8918
8919 * src/output.c (output_skeleton): New.
8920 (output): Disable call to output_master_parser, and give a try to
8921 a new skeleton handling system.
8922 (guards_output, actions_output): No longer static.
8923 (token_definitions_output, get_lines_number): No longer static.
8924
8925 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
8926
8927 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
8928 parse-skel.y.
8929
8930 * src/parse-skel.y: New file.
8931 * src/scan-skel.l: New file.
8932
89332001-12-29 Akim Demaille <akim@epita.fr>
8934
8935 %name-prefix is broken.
8936
8937 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
8938 Adjust all dependencies.
8939 * tests/headers.at (export YYLTYPE): Strengthen this test: use
8940 %name-prefix.
8941
8942 Renaming yylval but not yylloc is not consistent. Now we do.
8943
8944 * src/bison.simple: Prefix yylloc if used.
8945 * doc/bison.texinfo (Decl Summary): Document that.
8946
89472001-12-29 Akim Demaille <akim@epita.fr>
8948
8949 * doc/bison.texinfo: Promote `%long-directive' over
8950 `%long_directive'.
8951 Remove all references to fixed-output-files, yacc is enough.
8952
89532001-12-29 Akim Demaille <akim@epita.fr>
8954
8955 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
8956 user prologue. These are defaults.
8957 * tests/actions.at (Mid-rule actions): Make sure the user can
8958 define YYDEBUG and YYERROR_VERBOSE.
8959
89602001-12-29 Akim Demaille <akim@epita.fr>
8961
8962 * src/output.c (header_output): Don't forget to export YYLTYPE and
8963 yylloc.
8964 * tests/headers.at (export YYLTYPE): New, make sure it does.
8965 * tests/regression.at (%union and --defines, Invalid CPP headers):
8966 Move to...
8967 * tests/headers.at: here.
8968
89692001-12-29 Akim Demaille <akim@epita.fr>
8970
8971 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
8972
89732001-12-29 Akim Demaille <akim@epita.fr>
8974
8975 * tests/actions.at (Mid-rule actions): Output on a single line
8976 instead of several.
8977
89782001-12-29 Akim Demaille <akim@epita.fr>
8979
8980 * doc/bison.texinfo: Formatting changes.
8981
89822001-12-29 Akim Demaille <akim@epita.fr>
8983
8984 Don't store the token defs in a muscle, just be ready to output it
8985 on command. Now possible via `symbols'. Fixes a memory leak.
8986
8987 * src/output.c (token_definitions_output): New.
8988 (output_parser, header_output): Use it.
8989 * src/reader.c (symbols_save): Remove.
8990
89912001-12-29 Akim Demaille <akim@epita.fr>
8992
8993 * src/bison.simple: Do not provide a default for YYSTYPE and
8994 YYLTYPE before the user's prologue. Otherwise it's hardly... a
8995 default.
8996
89972001-12-29 Akim Demaille <akim@epita.fr>
8998
8999 Mid-rule actions are simply... ignored!
9000
9001 * src/reader.c (readgram): Be sure to attach mid-rule actions to
9002 the empty-rule associated to the dummy symbol, not to the host
9003 rule.
9004 * tests/actions.at (Mid-rule actions): New.
9005
90062001-12-29 Akim Demaille <akim@epita.fr>
9007
9008 Memory leak.
9009
9010 * src/reader.c (reader): Free grammar.
9011
90122001-12-29 Akim Demaille <akim@epita.fr>
9013
9014 Memory leak.
9015
9016 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
9017 since it allocates it for each state, although only one is needed.
9018 (allocate_storage): Do it here.
9019
90202001-12-29 Akim Demaille <akim@epita.fr>
9021
9022 * src/options.h, src/options.c (create_long_option_table): Rename
9023 as...
9024 (long_option_table_new): this, with a clearer prototype.
9025 (percent_table): Remove, unused,
9026 * src/getargs.c (getargs): Adjust.
9027
90282001-12-29 Akim Demaille <akim@epita.fr>
9029
9030 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
9031 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
9032 as states.
9033
90342001-12-29 Akim Demaille <akim@epita.fr>
9035
9036 * src/lalr.c (build_relations): Rename `states' as `states1'.
9037 Sorry, I don't understand exactly what it is, no better name...
9038
90392001-12-29 Akim Demaille <akim@epita.fr>
9040
9041 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
9042 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
9043 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
9044 as rules.
9045
90462001-12-29 Akim Demaille <akim@epita.fr>
9047
9048 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
9049 ago.
9050
90512001-12-29 Akim Demaille <akim@epita.fr>
9052
9053 * src/reader.c, src/reader.h (user_toknums): Remove.
9054 Adjust all users to use symbols[i]->user_token_number.
9055
90562001-12-29 Akim Demaille <akim@epita.fr>
9057
9058 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
9059 Adjust all users to use symbols[i]->prec or ->assoc.
9060
90612001-12-29 Akim Demaille <akim@epita.fr>
9062
9063 * src/reader.c, src/reader.h (tags): Remove.
9064 Adjust all users to use symbols[i]->tag.
9065
90662001-12-29 Akim Demaille <akim@epita.fr>
9067
9068 * src/gram.h, src/gram.c (symbols): New, similar to state_table
9069 and rule_table.
9070 * src/reader.c (packsymbols): Fill this table.
9071 Drop sprec.
9072 * src/conflicts.c (resolve_sr_conflict): Adjust.
9073 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
9074 single table.
9075 Use symbols[i]->tag instead of tags[i].
9076
90772001-12-29 Akim Demaille <akim@epita.fr>
9078
9079 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
9080 In addition, put a comment in there, to replace...
9081 * tests/regression.at (%union and C comments): Remove.
9082
90832001-12-29 Akim Demaille <akim@epita.fr>
9084
9085 * tests/regression.at (Web2c Actions): Blindly move the actual
9086 output as expected output. The contents *seem* right to me, but I
9087 can't pretend reading perfectly parser tables... Nonetheless, all
9088 the other tests pass correctly, the table look OK, even though the
9089 presence of `$axiom' is to be noted: AFAICS it is useless (but
9090 harmless).
9091
90922001-12-29 Akim Demaille <akim@epita.fr>
9093
9094 * src/reader.c (readgram): Don't add the rule 0 if there were no
9095 rules read. In other words, add it _after_ having performed
9096 grammar sanity checks.
9097 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
9098
90992001-12-29 Akim Demaille <akim@epita.fr>
9100
9101 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
9102 visible, and some states have now a different number.
9103
91042001-12-29 Akim Demaille <akim@epita.fr>
9105
9106 * src/reader.c (readgram): Bind the initial rule's lineno to that
9107 of the first rule.
9108 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
9109 (Solved SR Conflicts): Adjust rule 0's line number.
9110
91112001-12-29 Akim Demaille <akim@epita.fr>
9112
9113 Fix the `GAWK Grammar' failure.
9114
9115 * src/LR0.c (final_state): Initialize to -1 so that we do compute
9116 the reductions of the first state which was mistakenly confused
9117 with the final state because precisely final_state was initialized
9118 to 0.
9119 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
9120 now noticed by Bison.
9121 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
9122 have a reduction on $default.
9123
91242001-12-29 Akim Demaille <akim@epita.fr>
9125
9126 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
9127 rule line numbers.
9128 * src/closure.c (print_closure): Likewise.
9129 * src/derives.c (print_derives): Likewise.
9130 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
9131 now.
9132
91332001-12-29 Akim Demaille <akim@epita.fr>
9134
9135 * src/lalr.c (lookaheads_print): New.
9136 (lalr): Call it when --trace-flag.
9137 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
9138 are dumped.
9139
91402001-12-29 Akim Demaille <akim@epita.fr>
9141
9142 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
9143 when walking through ritem, even via rule->rhs.
9144 * src/reduce.c (dump_grammar, useful_production, reduce_output)
9145 (useful_production, useless_nonterminals): Likewise.
9146 (reduce_grammar_tables): Likewise, plus update nritems.
9147 * src/nullable.c (set_nullable): Likewise.
9148 * src/lalr.c (build_relations): Likewise.
9149 * tests/sets.at (Nullable): Adjust.
9150 Fortunately, now, the $axiom is no longer nullable.
9151
91522001-12-29 Akim Demaille <akim@epita.fr>
9153
9154 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
9155 the 0-sentinel.
9156 * src/gram.c (ritem_longest_rhs): Likewise.
9157 * src/reduce.c (nonterminals_reduce): Likewise.
9158 * src/print_graph.c (print_graph): Likewise.
9159 * src/output.c (output_rule_data): Likewise.
9160 * src/nullable.c (set_nullable): Likewise.
9161
91622001-12-29 Akim Demaille <akim@epita.fr>
9163
9164 * src/output.c: Comment changes.
9165
91662001-12-27 Paul Eggert <eggert@twinsun.com>
9167
9168 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
9169 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
9170 Sparc, as they were causing more porting problems than the
9171 (minor) performance improvement was worth.
9172
9173 Also, catch up with 1.31's YYSTD.
9174
91752001-12-27 Akim Demaille <akim@epita.fr>
9176
9177 * src/output.c (output_gram): Rely on nritems, not the
9178 0-sentinel. See below.
9179 Use -1 as separator, not 0.
9180 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
9181 Rely on -1 as separator in yyrhs, instead of 0.
9182 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
9183 twice `Now at end of input', therefore there are two lines less to
9184 expect.
9185
91862001-12-27 Akim Demaille <akim@epita.fr>
9187
9188 * tests/regression.at (Unresolved SR Conflicts):
9189 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
9190 below.
9191
91922001-12-27 Akim Demaille <akim@epita.fr>
9193
9194 * src/LR0.c (new_state): Recognize the final state by the fact it
9195 is reached by eoftoken.
9196 (insert_start_shifting_state, insert_eof_shifting_state)
9197 (insert_accepting_state, augment_automaton): Remove, since now
9198 these states are automatically computed from the initial state.
9199 (generate_states): Adjust.
9200 * src/print.c: When reporting a rule number to the user, substract
9201 1, so that the axiom rule is rule 0, and the first user rule is 1.
9202 * src/reduce.c: Likewise.
9203 * src/print_graph.c (print_core): For the time being, just as for
9204 the report, depend upon --trace-flags to dump the full set of
9205 items.
9206 * src/reader.c (readgram): Once the grammar read, insert the rule
9207 0: `$axiom: START-SYMBOL $'.
9208 * tests/set.at: Adjust: rule 0 is now displayed, and since the
9209 number of the states has changed (the final state is no longer
9210 necessarily the last), catch up.
9211
92122001-12-27 Akim Demaille <akim@epita.fr>
9213
9214 Try to make the use of the eoftoken valid. Given that its value
9215 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
9216 is used instead of > 0 where appropriate, (ii), depend upon nritems
9217 instead of the 0-sentinel.
9218
9219 * src/gram.h, src/gram.c (nritems): New.
9220 Expected to be duplication of nitems, but for the time being...
9221 * src/reader.c (packgram): Assert nritems and nitems are equal.
9222 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
9223 * src/closure.c (print_closure, print_fderives): Likewise.
9224 * src/gram.c (ritem_print): Likewise.
9225 * src/print.c (print_core, print_grammar): Likewise.
9226 * src/print_graph.c: Likewise.
9227
92282001-12-27 Akim Demaille <akim@epita.fr>
9229
9230 * src/main.c (main): If there are complains after grammar
9231 reductions, then output the report anyway if requested, then die.
9232 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
9233 * src/reader.c (eoftoken): New.
9234 (parse_token_decl): If the token being defined has value `0', it
9235 is the eoftoken.
9236 (packsymbols): No longer hack `tags' to insert `$' by hand.
9237 Be sure to preserve the value of the eoftoken.
9238 (reader): Make sure eoftoken is defined.
9239 Initialize nsyms to 0: now eoftoken is created just like the others.
9240 * src/print.c (print_grammar): Don't special case the eof token.
9241 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
9242 lie anyway, albeit pleasant.
9243 * tests/calc.at: Exercise error messages with eoftoken.
9244 Change the grammar so that empty input is invalid.
9245 Adjust expectations.
9246 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
9247
92482001-12-27 Akim Demaille <akim@epita.fr>
9249
9250 * configure.in: Check the protos of strchr ans strspn.
9251 Replace strchr if needed.
9252 * src/system.h: Provide the protos of strchr, strspn and memchr if
9253 missing.
9254 * lib/strchr.c: New.
9255 * src/reader.c (symbols_save): Use strchr.
9256
92572001-12-27 Akim Demaille <akim@epita.fr>
9258
9259 * src/print.c, src/print_graph.c (escape): New.
9260 Use it to quote the TAGS outputs.
9261 * src/print_graph.c (print_state): Now errors are in red, and
9262 reductions in green.
9263 Prefer high to wide: output the state number on a line of its own.
9264
92652001-12-27 Akim Demaille <akim@epita.fr>
9266
9267 * src/state.h, src/state.c (reductions_new): New.
9268 * src/LR0.c (set_state_table): Let all the states have a
9269 `reductions', even if reduced to 0.
9270 (save_reductions): Adjust.
9271 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
9272 * src/print.c (print_reductions, print_actions): Adjust.
9273 * src/output.c (action_row): Adjust.
9274
92752001-12-27 Akim Demaille <akim@epita.fr>
9276
9277 * src/state.h, src/state.c (errs_new, errs_dup): New.
9278 * src/LR0.c (set_state_table): Let all the states have an errs,
9279 even if reduced to 0.
9280 * src/print.c (print_errs, print_reductions): Adjust.
9281 * src/output.c (output_actions, action_row): Adjust.
9282 * src/conflicts.c (resolve_sr_conflict): Adjust.
9283
92842001-12-27 Akim Demaille <akim@epita.fr>
9285
9286 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
9287
92882001-12-27 Akim Demaille <akim@epita.fr>
9289
9290 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
9291 * src/print.c: here.
9292 (lookaheadset, shiftset): New, used as additional storage by
9293 print_reductions.
9294 (print_results): Adjust.
9295 (print_shifts, print_gotos, print_errs): New, extracted from...
9296 (print_actions): here.
9297 * src/print_graph.c (print_actions): Remove dead code.
9298
92992001-12-27 Akim Demaille <akim@epita.fr>
9300
9301 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
9302 `$n' and `@n'.
9303
93042001-12-27 Akim Demaille <akim@epita.fr>
9305
9306 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
9307 (build_relations): Adjust.
9308
93092001-12-27 Akim Demaille <akim@epita.fr>
9310
9311 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
9312 duplication.
9313
93142001-12-27 Akim Demaille <akim@epita.fr>
9315
9316 * src/reader.c (packgram): Catch nitems overflows.
9317
93182001-12-27 Akim Demaille <akim@epita.fr>
9319
9320 * src/files.c, src/files.h (guard_obstack): Remove.
9321 * src/output.c (output): Adjust.
9322 * src/reader.c (parse_braces): New, factoring...
9323 (copy_action, copy_guard): these two which are renamed as...
9324 (parse_action, parse_guard): these.
9325 As a voluntary consequence, using braces around guards is now
9326 mandatory.
9327
93282001-12-27 Akim Demaille <akim@epita.fr>
9329
9330 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
9331 * src/reader.c (symbol_list): `guard' and `guard_line' are new
9332 members.
9333 (symbol_list_new): Adjust.
9334 (copy_action): action_line is the first line, not the last.
9335 (copy_guard): Just as for actions, store the `action' only, not
9336 the switch/case/break flesh.
9337 Don't parse the user action that might follow the guard, let...
9338 (readgram): do it, i.e., now, there can be an action after a
9339 guard.
9340 In other words the guard is just explicitly optional.
9341 (packgram): Adjust.
9342 * src/output.c (guards_output): New.
9343 (output_parser): Call it when needed.
9344 (output): Also free the guard and attrs obstacks.
9345 * src/files.c, src/files.h (obstack_save): Remove.
9346 (output_files): Remove.
9347 As a result, if one needs the former `.act' file, using an
9348 appropriate skeleton which requires actions and guards is now
9349 required.
9350 * src/main.c (main): Adjust.
9351 * tests/semantic.at: New.
9352 * tests/regression.at: Use `input.y' as input file name.
9353 Avoid 8+3 problems by requiring input.c when the test needs the
9354 parser.
9355
93562001-12-27 Akim Demaille <akim@epita.fr>
9357
9358 * src/reader.c (symbol_list_new): Be sure to initialize all the
9359 fields.
9360
93612001-12-27 Akim Demaille <akim@epita.fr>
9362
9363 All the hacks using a final pseudo state are now useless.
9364
9365 * src/LR0.c (set_state_table): state_table holds exactly nstates.
9366 * src/lalr.c (nLA): New.
9367 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
9368 instead of lookaheadsp from the pseudo state (nstate + 1).
9369
93702001-12-27 Akim Demaille <akim@epita.fr>
9371
9372 * src/output.c (action_row, token_actions): Use a state_t instead
9373 of a integer, and nlookaheads instead of the following state's
9374 lookaheadsp.
9375
93762001-12-27 Akim Demaille <akim@epita.fr>
9377
9378 * src/conflicts.c (log_resolution, flush_shift)
9379 (resolve_sr_conflict, set_conflicts, solve_conflicts)
9380 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
9381 (conflicts_print, print_reductions): Use a state_t instead of an
9382 integer when referring to a state.
9383 As much as possible, depend upon nlookaheads, instead of the
9384 `lookaheadsp' member of the following state (since lookaheads of
9385 successive states are successive, the difference between state n + 1
9386 and n served as the number of lookaheads for state n).
9387 * src/lalr.c (add_lookback_edge): Likewise.
9388 * src/print.c (print_core, print_actions, print_state)
9389 (print_results): Likewise.
9390 * src/print_graph.c (print_core, print_actions, print_state)
9391 (print_graph): Likewise.
9392 * src/conflicts.h: Adjust.
9393
93942001-12-27 Akim Demaille <akim@epita.fr>
9395
9396 * src/bison.hairy: Formatting/comment changes.
9397 ANSIfy.
9398 Remove `register' indications.
9399 Add plenty of `static'.
9400
94012001-12-27 Akim Demaille <akim@epita.fr>
9402
9403 * src/output.c (prepare): Drop the muscle `ntbase' which
9404 duplicates ntokens.
9405 * src/bison.simple: Formatting/comment changes.
9406 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
9407 is an undocumented synonym.
9408
94092001-12-22 Akim Demaille <akim@epita.fr>
9410
9411 * src/output.c (output_table_data): Change the prototype to use
9412 `int' for array ranges: some invocations do pass an int, not a
9413 short.
9414 Reported by Wayne Green.
9415
94162001-12-22 Akim Demaille <akim@epita.fr>
9417
9418 Some actions of web2c.y are improperly triggered.
9419 Reported by Mike Castle.
9420
9421 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
9422 * tests/regression.at (Web2c): Rename as...
9423 (Web2c Report): this.
9424 (Web2c Actions): New.
9425
94262001-12-22 Akim Demaille <akim@epita.fr>
9427
9428 Reductions in web2c.y are improperly reported.
9429 Reported by Mike Castle.
9430
9431 * src/conflicts.c (print_reductions): Fix.
9432 * tests/regression.at (Web2c): New.
9433
94342001-12-18 Akim Demaille <akim@epita.fr>
9435
9436 Some host fail on `assert (!"foo")', which expands to
9437 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
9438 Reported by Nelson Beebee.
9439
9440 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
9441 `#define it_succeeded 0' and `assert (it_succeeded)'.
9442
94432001-12-17 Marc Autret <autret_m@epita.fr>
9444
9445 * src/bison.simple: Don't hard code the skeleton line and filename.
9446 * src/output.c (output_parser): Rename 'line' as 'output_line'.
9447 New line counter 'skeleton_line' (skeleton-line muscle).
9448
94492001-12-17 Paul Eggert <eggert@twinsun.com>
9450
9451 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
9452 YYDEBUG must be defined to a nonzero value.
9453
9454 * src/bison.simple (yytname): Do not assume that the user defines
9455 YYDEBUG to a properly parenthesized expression.
9456
94572001-12-17 Akim Demaille <akim@epita.fr>
9458
9459 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
9460 nlookaheads is a new member.
9461 Adjust all users.
9462 * src/lalr.h (nlookaheads): Remove this orphan declaration.
9463 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
9464 state.
9465
94662001-12-17 Akim Demaille <akim@epita.fr>
9467
9468 * src/files.h, src/files.c (open_files, close_files): Remove.
9469 * src/main.c (main): Don't open/close files, nor invoke lex_free,
9470 let...
9471 * src/reader.c (reader): Do it.
9472
94732001-12-17 Akim Demaille <akim@epita.fr>
9474
9475 * src/conflicts.c (print_reductions): Formatting changes.
9476
94772001-12-17 Akim Demaille <akim@epita.fr>
9478
9479 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
9480 (flush_reduce): New.
9481 (resolve_sr_conflict): Adjust.
9482
94832001-12-17 Akim Demaille <akim@epita.fr>
9484
9485 * src/output.c (output_obstack): Be static and rename as...
9486 (format_obstack): this, to avoid any confusion with files.c's
9487 output_obstack.
9488 * src/reader.h (muscle_obstack): Move to...
9489 * src/output.h: here, since it's defined in output.c.
9490
94912001-12-17 Akim Demaille <akim@epita.fr>
9492
9493 * src/output.c (action_row, save_column, default_goto)
9494 (sort_actions, matching_state, pack_vector): Better variable
9495 locality.
9496
94972001-12-17 Akim Demaille <akim@epita.fr>
9498
9499 * src/output.c: Various formatting changes.
9500
95012001-12-17 Akim Demaille <akim@epita.fr>
9502
9503 * src/files.c (output_files): Free the output_obstack.
9504 * src/main.c (main): Call print and print_graph conditionally.
9505 * src/print.c (print): Work unconditionally.
9506 * src/print_graph.c (print_graph): Work unconditionally.
9507 * src/conflicts.c (log_resolution): Output only if verbose_flag.
9508
95092001-12-16 Marc Autret <autret_m@epita.fr>
9510
9511 * src/output.c (actions_output): Fix. When we use %no-lines,
9512 there is one less line per action.
9513
95142001-12-16 Marc Autret <autret_m@epita.fr>
9515
9516 * src/bison.simple: Remove a useless #line directive.
9517 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
9518 * src/output.c (get_lines_number): New.
9519 (output_parser): Adjust, now takes care about the lines of a
9520 output muscles.
9521 Fix line numbering.
9522 (actions_output): Computes the number of lines taken by actions.
9523 (output_master_parser): Insert new skeleton which is the name of
9524 the output parser file name.
9525
95262001-12-15 Marc Autret <autret_m@epita.fr>
9527
9528 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
9529
95302001-12-15 Marc Autret <autret_m@epita.fr>
9531
9532 * src/output.c (output_gram): Keep track of the hairy one.
9533
95342001-12-15 Akim Demaille <akim@epita.fr>
9535
9536 Make `make distcheck' work.
9537
9538 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
9539 system.h which uses libgettext.h.
9540
95412001-12-15 Akim Demaille <akim@epita.fr>
9542
9543 * src/nullable.c (set_nullable): Useless rules must be skipped,
9544 otherwise, since we range over their symbols, we might look at a
9545 nonterminal which no longer ``exists'', i.e., it is not counted in
9546 `nvars', hence we overflow our arrays.
9547
95482001-12-15 Akim Demaille <akim@epita.fr>
9549
9550 The header can also be produced directly, without any obstack!
9551 Yahoo!
9552
9553 * src/files.c, src/files.h (defines_obstack): Remove.
9554 (compute_header_macro): Global.
9555 (defines_obstack_save): Remove.
9556 * src/reader.c (parse_union_decl): No longer output to
9557 defines_obstack: its content can be found in the `stype' muscle
9558 anyway.
9559 (output_token_translations): Merge into...
9560 (symbols_output): this.
9561 Rename as...
9562 (symbols_save): this.
9563 (reader): Adjust.
9564 * src/output.c (header_output): New.
9565 (output): Call it.
9566
95672001-12-15 Akim Demaille <akim@epita.fr>
9568
9569 * src/reader.c (parse_union_decl): Instead of handling two obstack
9570 simultaneously, use one to define the `stype' muscle, and use the
9571 value of the latter to fill defines_obstack.
9572 (copy_comment): Remove.
9573 (copy_comment2): Work for a single obstack.
9574 Rename as...
9575 (copy_comment): this.
9576
95772001-12-15 Akim Demaille <akim@epita.fr>
9578
9579 * src/lex.c, src/lex.h (xgetc): No longer static.
9580 * src/reader.c (parse_union_decl): Revamp.
9581
95822001-12-15 Akim Demaille <akim@epita.fr>
9583
9584 Still making progress in separating Bison into (i) input, (ii)
9585 process, (iii) output: now we can directly output the parser file
9586 without using table_obstack at all.
9587
9588 * src/files.c, src/files.h (table_obstack): Bye bye.
9589 (parser_file_name): New.
9590 * src/files.c (compute_output_file_names): Compute it.
9591 * src/output.c (actions_output, output_parser)
9592 (output_master_parser): To a file instead of an obstack.
9593
95942001-12-15 Akim Demaille <akim@epita.fr>
9595
9596 Attach actions to rules, instead of pre-outputting them to
9597 actions_obstack.
9598
9599 * src/gram.h (rule_t): action and action_line are new members.
9600 * src/reader.c (symbol_list): Likewise.
9601 (copy_action): Save the actions within the rule.
9602 (packgram): Save them in rule_table.
9603 * src/output.c (actions_output): New.
9604 (output_parser): Use it on `%%actions'.
9605 (output_rule_data): Don't free rule_table.
9606 (output): Do it.
9607 (prepare): Don't save the `action' muscle.
9608 * src/bison.simple: s/%%action/%%actions/.
9609
96102001-12-15 Akim Demaille <akim@epita.fr>
9611
9612 * src/reader.c (copy_action): When --yacc, don't append a `;'
9613 to the user action: let it fail if lacking.
9614 Suggested by Arnold Robbins and Tom Tromey.
9615
96162001-12-14 Akim Demaille <akim@epita.fr>
9617
9618 * src/lex.c (literalchar): Simply return the char you decoded, non
9619 longer mess around with obstacks and int pointers.
9620 Adjust all callers.
9621
96222001-12-14 Akim Demaille <akim@epita.fr>
9623
9624 * src/lex.c (literalchar): Don't escape the special characters,
9625 just decode them, and keep them as char (before, eol was output as
9626 the 2 char string `\n' etc.).
9627 * src/output.c (output_rule_data): Use quotearg to output the
9628 token strings.
9629
96302001-12-13 Paul Eggert <eggert@twinsun.com>
9631
9632 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
9633 Do not infringe on the global user namespace when using C++.
9634 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
9635 All uses of `fprintf' and `stderr' changed.
9636
9637 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
9638
96392001-12-13 Akim Demaille <akim@epita.fr>
9640
9641 The computation of nullable is broken: it doesn't handle empty
9642 RHS's properly.
9643
9644 * tests/torture.at (GNU AWK Grammar): New.
9645 * tests/sets.at (Nullable): New.
9646 * src/nullable.c (set_nullable): Instead of blindly looping over
9647 `ritems', loop over the rules, and then over their rhs's.
9648
9649 Work around Autotest bugs.
9650
9651 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
9652 frame, because Autotest understand lines starting with a `+' as
9653 traces from the shell. Then, they are not processed properly.
9654 Admittedly an Autotest bug, but we don't have time to wait for
9655 Autotest to catch up.
9656 * tests/regression.at (Broken Closure): Adjust to the new table
9657 frames.
9658 Move to...
9659 * tests/sets.at: here.
9660
96612001-12-13 Akim Demaille <akim@epita.fr>
9662
9663 * src/closure.c (closure): Use nrules instead of playing tricks
9664 with BITS_PER_WORD.
9665
96662001-12-13 Akim Demaille <akim@epita.fr>
9667
9668 * src/print.c (print_actions): Output the handling of `$' as the
9669 traces do: shifting the token EOF. Before EOF was treated as a
9670 nonterminal.
9671 * tests/regression.at: Adjust some tests.
9672 * src/print_graph.c (print_core): Complete the set of items via
9673 closure. The next-to-final and final states are still unsatisfying,
9674 but that's to be addressed elsewhere.
9675 No longer output the rule numbers, but do output the state number.
9676 A single loop for the shifts + gotos is enough, but picked a
9677 distinct color for each.
9678 (print_graph): Initialize and finalize closure.
9679
96802001-12-13 Akim Demaille <akim@epita.fr>
9681
9682 * src/reader.c (readgram): Remove dead code, an strip useless
9683 braces.
9684 (get_type): Remove, unused.
9685
96862001-12-12 Akim Demaille <akim@epita.fr>
9687
9688 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
9689 on that of lib/error.c.
9690
96912001-12-12 Akim Demaille <akim@epita.fr>
9692
9693 Some hosts don't like `/' in includes.
9694
9695 * src/system.h: Include libgettext.h without qualifying the path.
9696 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
9697 $(top_srcdir).
9698
96992001-12-11 Marc Autret <autret_m@epita.fr>
9700
9701 * src/output.c (output_parser): Remove useless muscle.
9702
97032001-12-11 Marc Autret <autret_m@epita.fr>
9704
9705 * src/bison.simple: Remove #line just before %%epilogue. It
9706 is now handled in ...
9707 * src/reader.c (read_additionnal_code): Add the output of a
9708 #line for the epilogue.
9709
97102001-12-10 Marc Autret <autret_m@epita.fr>
9711
9712 * src/reader.c (copy_definition): Re-use CPP-outed code which
9713 replace precedent remove.
9714 * src/bison.simple: Remove #line before %%prologue because
9715 %%input-line is wrong at this time.
9716
97172001-12-10 Marc Autret <autret_m@epita.fr>
9718
9719 * src/reader.c (symbols_output): Clean up.
9720 * src/output.c (output_gram, output): Clean up.
9721
97222001-12-10 Akim Demaille <akim@epita.fr>
9723
9724 * src/lalr.c (initialize_lookaheads): New. Extracted from...
9725 * src/LR0.c (set_state_table): here.
9726 * src/lalr.c (lalr): Call it.
9727
97282001-12-10 Akim Demaille <akim@epita.fr>
9729
9730 * src/state.h (shifts): Remove the `number' member: shifts are
9731 attached to state, hence no longer need to be labelled with a
9732 state number.
9733
97342001-12-10 Akim Demaille <akim@epita.fr>
9735
9736 Now that states have a complete set of members, the linked list of
9737 shifts is useless: just fill directly the state's shifts member.
9738
9739 * src/state.h (shifts): Remove the `next' member.
9740 * src/LR0.c (first_state, last_state): Remove.
9741 Adjust the callers.
9742 (augment_automaton): Don't look for the shifts that must be added
9743 a shift on EOF: it is those of the state we looked for! But now,
9744 since shifts are attached, it is no longer needed to looking
9745 merely by its id: its number.
9746
97472001-12-10 Akim Demaille <akim@epita.fr>
9748
9749 * src/LR0.c (augment_automaton): Better variable locality.
9750 Remove an impossible branch: if there is a state corresponding to
9751 the start symbol being shifted, then there is shift for the start
9752 symbol from the initial state.
9753
97542001-12-10 Akim Demaille <akim@epita.fr>
9755
9756 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
9757 only when appropriate: when insert_start_shifting_state' is not
9758 invoked.
9759 * tests/regression.at (Rule Line Numbers): Adjust.
9760
97612001-12-10 Akim Demaille <akim@epita.fr>
9762
9763 * src/LR0.c (augment_automaton): Now that all states have shifts,
9764 merge the two cases addition shifts to the initial state.
9765
97662001-12-10 Akim Demaille <akim@epita.fr>
9767
9768 * src/lalr.c (set_state_table): Move to...
9769 * src/LR0.c: here.
9770 * src/lalr.c (lalr): Don't call it...
9771 * src/LR0.c (generate_states): do it.
9772 * src/LR0.h (first_state): Remove, only the table is used.
9773
97742001-12-10 Akim Demaille <akim@epita.fr>
9775
9776 * src/LR0.h (first_shift, first_reduction): Remove.
9777 * src/lalr.c: Don't use first_shift: find shifts through the
9778 states.
9779
97802001-12-10 Akim Demaille <akim@epita.fr>
9781
9782 * src/LR0.c: Attach shifts to states as soon as they are
9783 computed.
9784 * src/lalr.c (set_state_table): Instead of assigning shifts to
9785 state, just assert that the mapping was properly done.
9786
97872001-12-10 Akim Demaille <akim@epita.fr>
9788
9789 * src/LR0.c (insert_start_shift): Rename as...
9790 (insert_start_shifting_state): this.
9791 (insert_eof_shifting_state, insert_accepting_state): New.
9792 (augment_automaton): Adjust.
9793 Better locality of the variables.
9794 When looking if the start_symbol is shifted from the initial
9795 state, using `while (... symbol != start_symbol ...)' sounds
9796 better than `while (... symbol < start_symbol ...)': If fail
9797 to see how the order between symbols could be relevant!
9798
97992001-12-10 Akim Demaille <akim@epita.fr>
9800
9801 * src/getargs.h: Don't declare `spec_name_prefix' and
9802 `spec_file_prefix', declared by src/files.h.
9803 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
9804 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
9805 * src/output.c (prepare): Adjust.
9806 * src/reader.c (symbols_output): Likewise.
9807 * src/vmsgetargs.c: Vaguely adjust, but who cares?
9808
98092001-12-10 Akim Demaille <akim@epita.fr>
9810
9811 * src/muscle_tab.c (muscle_init): NULL is a better default than
9812 `"0"'.
9813
98142001-12-10 Akim Demaille <akim@epita.fr>
9815
9816 * src/reader.c (reader): Calling symbols_output once is enough.
9817
98182001-12-10 Akim Demaille <akim@epita.fr>
9819
9820 Now that states have a complete set of members, the linked list of
9821 reductions is useless: just fill directly the state's reductions
9822 member.
9823
9824 * src/state.h (struct reductions): Remove member `number' and
9825 `next'.
9826 * src/LR0.c (first_reduction, last_reduction): Remove.
9827 (save_reductions): Don't link the new reductions, store them in
9828 this_state.
9829 * src/lalr.c (set_state_table): No need to attach reductions to
9830 states, it's already done.
9831 * src/output.c (output_actions): No longer free the shifts, then
9832 the reductions, then the states: free all the states and their
9833 members.
9834
98352001-12-10 Akim Demaille <akim@epita.fr>
9836
9837 * src/options.c (OPTN, DRTV, BOTH): New.
9838 (option_table): Use them.
9839
9840 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
9841 the job of system.h.
9842 * src/options.c: Don't include stdio.h and xalloc.h for the same
9843 reasons.
9844
98452001-12-10 Akim Demaille <akim@epita.fr>
9846
9847 * src/output.c (output, prepare): Make sure the values of the
9848 muscles `action' and `prologue' are 0-terminated.
9849
98502001-12-10 Akim Demaille <akim@epita.fr>
9851
9852 Clean up GCC warnings.
9853
9854 * src/reader.c (copy_action): `buf' is not used.
9855 (parse_skel_decl): Be static.
9856 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
9857 * src/options.h (create_long_option_table): Have a real prototype.
9858 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
9859 (hash_delete_at): Return const void *.
9860 Adjust casts to preserve the const.
9861
98622001-12-10 Akim Demaille <akim@epita.fr>
9863
9864 * configure.in: Require 2.52g.
9865 M4 is not needed, but AUTOM4TE is.
9866 * m4/m4.m4: Remove.
9867 * tests/Makefile.am: Adjust.
9868
98692001-12-10 Akim Demaille <akim@epita.fr>
9870
9871 One structure for states is enough, even though theoretically
9872 there are LR(0) states and LALR(1) states.
9873
9874 * src/lalr.h (state_t): Remove.
9875 (state_table): Be state_t **, not state_t *.
9876 * src/state.h (core, CORE_ALLOC): Rename as...
9877 (state_t, STATE_ALLOC): this.
9878 Add the LALR(1) members: shifts, reductions, errs.
9879 * src/LR0.c (state_table): Rename as...
9880 (state_hash): this, to avoid name clashes with the global
9881 `state_table'.
9882 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
9883 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
9884
98852001-12-10 Akim Demaille <akim@epita.fr>
9886
9887 Bison dumps core on bash.y.
9888 Reported by Pascal Bart.
9889
9890 * src/warshall.c (bitmatrix_print): New.
9891 (TC): Use it.
9892 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
9893 j must be the outer loop.
9894 * tests/regression.at (Broken Closure): New.
9895
98962001-12-05 Akim Demaille <akim@epita.fr>
9897
9898 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
9899 its argument.
9900 Reported by Peter Hamorsky.
9901
99022001-12-05 Akim Demaille <akim@epita.fr>
9903
9904 * src/conflicts.c (err_table): Remove.
9905 (resolve_sr_conflict): Adjust.
9906 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
9907 Rename as...
9908 (state_t.reductions, state_t.shifts): this.
9909
99102001-12-05 Akim Demaille <akim@epita.fr>
9911
9912 * src/reduce.c (reduce_grammar_tables): No longer disable the
9913 removal of useless rules via CPP but via `if (0)', so that the
9914 compiler still check the code is valid.
9915 For instance, it should have noticed `rline' no longer exists: use
9916 the `line' member of rule_t.
9917 * src/gram.c (dummy, rline): Remove, unused.
9918
99192001-12-05 Akim Demaille <akim@epita.fr>
9920
9921 * src/output.c (pack_vector): Use assert, not berror.
9922 * src/main.c (berror): Remove, unused.
9923
99242001-12-05 Akim Demaille <akim@epita.fr>
9925
9926 New experimental feature: if --verbose --trace output all the
9927 items of a state, not only its kernel.
9928
9929 * src/print.c (print_core): If `trace_flag', then invoke closure
9930 before outputting the items of the state (print_core is no longer
9931 a correct name them).
9932 (print_results): Invoke new_closure/free_closure if needed.
9933
99342001-12-05 Akim Demaille <akim@epita.fr>
9935
9936 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
9937 * src/closure.c, src/closure.h (itemsetsize): Rename as...
9938 (nitemset): for consistency with the rest of the project.
9939
99402001-12-05 Akim Demaille <akim@epita.fr>
9941
9942 * src/closure.c (print_closure): Improve.
9943 (closure): Use it for printing input and output.
9944
99452001-12-05 Akim Demaille <akim@epita.fr>
9946
9947 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
9948 indexed by nonterminals.
9949
99502001-12-05 Akim Demaille <akim@epita.fr>
9951
9952 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
9953 what it was!).
9954 * src/warshall.h: Remove accidental duplication of the content.
9955
99562001-12-05 Akim Demaille <akim@epita.fr>
9957
9958 * src/closure.c (set_fderives): De-obfuscate.
9959
99602001-12-05 Akim Demaille <akim@epita.fr>
9961
9962 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
9963
99642001-12-05 Akim Demaille <akim@epita.fr>
9965
9966 * src/closure.c (set_firsts): De-obfuscate.
9967
99682001-12-05 Akim Demaille <akim@epita.fr>
9969
9970 * src/output.c (action_row): De-obfuscate
9971 using the good o' techniques: arrays not pointers, variable
9972 locality, BITISSET, RESETBIT etc.
9973
99742001-12-05 Akim Demaille <akim@epita.fr>
9975
9976 Pessimize the code to simplify it: from now on, all the states
9977 have a valid SHIFTS, which NSHIFTS is possibly 0.
9978
9979 * src/LR0.c (shifts_new): Be global and move to..
9980 * src/state.c, src/state.h: here.
9981 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
9982 * src/print_graph: Adjust.
9983
99842001-12-05 Akim Demaille <akim@epita.fr>
9985
9986 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
9987 * src/conflicts.c: Use it.
9988 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
9989 incorrectly ``simplified''.
9990
99912001-12-05 Akim Demaille <akim@epita.fr>
9992
9993 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
9994 using the good o' techniques: arrays not pointers, variable
9995 locality, BITISSET, RESETBIT etc.
9996
99972001-12-05 Akim Demaille <akim@epita.fr>
9998
9999 * src/state.h (SHIFT_SYMBOL): New.
10000 * src/conflicts.c: Use it to deobfuscate.
10001
100022001-12-05 Akim Demaille <akim@epita.fr>
10003
10004 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
10005 (print_reductions): De-obfuscate using the good o' techniques:
10006 arrays not pointers, variable locality, BITISSET.
10007
100082001-12-05 Akim Demaille <akim@epita.fr>
10009
10010 * src/conflicts.c (print_reductions): Arrays, not pointers.
10011 Use BITISSET.
10012
100132001-12-05 Akim Demaille <akim@epita.fr>
10014
10015 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10016
100172001-12-05 Akim Demaille <akim@epita.fr>
10018
10019 * src/conflicts.c (print_reductions): Improve variable locality.
10020
100212001-12-05 Akim Demaille <akim@epita.fr>
10022
10023 * src/conflicts.c (print_reductions): Pessimize, but clarify.
10024
100252001-12-05 Akim Demaille <akim@epita.fr>
10026
10027 * src/conflicts.c (print_reductions): Improve variable locality.
10028
100292001-12-05 Akim Demaille <akim@epita.fr>
10030
10031 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
10032 * src/lalr.c: Use them.
10033
100342001-12-05 Akim Demaille <akim@epita.fr>
10035
10036 * src/LR0.c (augment_automaton): Formatting changes.
10037 Better variable locality.
10038
100392001-12-05 Akim Demaille <akim@epita.fr>
10040
10041 * src/lalr.c (matrix_print): New.
10042 (transpose): Use it.
10043 Use arrays instead of pointers.
10044
100452001-12-05 Akim Demaille <akim@epita.fr>
10046
10047 * src/lalr.c (maxrhs): Move to...
10048 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
10049 * src/lalr.c (build_relations): Adjust.
10050
100512001-12-05 Akim Demaille <akim@epita.fr>
10052
10053 * src/lalr.c (transpose): Free the memory allocated to the
10054 argument, as it is replaced by the results by the unique caller.
10055 (build_relations): Merely invoke transpose: it handles the memory
10056 deallocation.
10057 Improve variable locality.
10058 Avoid variables used as mere abbreviations.
10059 (compute_lookaheads): Use arrays instead of pointers.
10060
100612001-12-05 Akim Demaille <akim@epita.fr>
10062
10063 * src/lalr.c (initialize_F): Improve variable locality.
10064 Avoid variables used as mere abbreviations.
10065
100662001-12-05 Akim Demaille <akim@epita.fr>
10067
10068 * src/derives.c (print_derives): Display the ruleno.
10069 * src/lalr.c (initialize_F, transpose): Better variable locality
10070 to improve readability.
10071 Avoid variables used as mere abbreviations.
10072
100732001-12-05 Akim Demaille <akim@epita.fr>
10074
10075 * src/lalr.c (traverse): Use arrays instead of pointers.
10076
100772001-12-05 Akim Demaille <akim@epita.fr>
10078
10079 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
10080 the handling of squeue.
10081 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10082
100832001-12-05 Akim Demaille <akim@epita.fr>
10084
10085 Because useless nonterminals are now kept alive (instead of being
10086 `destroyed'), we now sometimes examine them, and store information
10087 related to them. Hence we need to know their number, and adjust
10088 memory allocations.
10089
10090 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
10091 static.
10092 * src/LR0.c (allocate_itemsets): The memory allocated to
10093 `symbol_count' was used for two different purpose: once to count
10094 the number of occurrences of each symbol, and later reassigned to
10095 `shift_symbol', containing the symbol that can be shifted from a
10096 given state.
10097 Deobfuscate, i.e., allocate, use and free `symbol_count' here
10098 only, and...
10099 (new_itemsets): Allocate `shift_symbol' here.
10100 (allocate_itemsets): symbol_count includes useless nonterminals.
10101 Make room for them.
10102 (free_storage): Use `free', not `XFREE', for pointers that cannot
10103 be null.
10104
101052001-12-05 Akim Demaille <akim@epita.fr>
10106
10107 * src/nullable.c (set_nullable): Deobfuscate the handling of
10108 ritem.
10109 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
10110
101112001-12-05 Akim Demaille <akim@epita.fr>
10112
10113 * src/gram.c, src/gram.h (ritem_print): New.
10114 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
10115 (This useless function was defined only to work around VMS linkers
10116 that can't handle compilation units with variables only).
10117 * src/reduce.c (dump_grammar): Use it to trace the construction of
10118 ritem.
10119
101202001-12-04 Paul Eggert <eggert@twinsun.com>
10121
10122 * src/bison.simple (union yyalloc): Change member names
10123 to be the same as the stack names.
10124 (yyparse): yyptr is now union yyalloc *, not char *.
10125 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
10126 and may generate better code on some machines.
10127 (yystpcpy): Use prototype if __STDC__ is defined, not just
10128 if __cplusplus is defined.
10129
101302001-11-30 Akim Demaille <akim@epita.fr>
10131
10132 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
10133 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
10134 Gettext doesn't compile cleanly, and dies with -Werror.
10135 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
10136 Include WARNING_CFLAGS here.
10137 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
10138 before being defined.
10139
101402001-11-27 Paul Eggert <eggert@twinsun.com>
10141
10142 * lib/quotearg.h (quotearg_n, quotearg_n_style):
10143 First arg is int, not unsigned.
10144 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
10145 (SIZE_MAX, UINT_MAX): New macros.
10146 (quotearg_n_options): Abort if N is negative.
10147 Avoid overflow check on hosts where size_t is 64 bits and int
10148 is 32 bits, as overflow is impossible there.
10149 Fix off-by-one typo that caused unnecessary reallocation.
10150
101512001-11-29 Paul Eggert <eggert@twinsun.com>
10152
10153 Name space cleanup in generated parser.
10154
10155 * doc/bison.texinfo (Bison Parser): Discuss system headers
10156 and their effect on the user name space.
10157
10158 * src/bison.simple:
10159 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
10160 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
10161 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
10162
10163 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
10164 on user names when possible.
10165
10166 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
10167 Simplify test for whather <alloca.h> exists.
10168
10169 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
10170
10171 (<stdio.h>): Include if YYDEBUG.
10172
10173 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
10174 ! defined (yyoverflow) && ! defined (yymemcpy).
10175
10176 (yymemcpy, yyparse): Rename local variables as needed so that
10177 they all begin with 'yy'.
10178
10179 (yystrlen, yystpcpy): New functions.
10180
10181 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
10182 All uses changed.
10183
10184 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
10185 instead of relying on string.h functions. Use YYSTACK_ALLOC
10186 and YYSTACK_FREE instead of malloc and free.
10187
101882001-11-30 Akim Demaille <akim@epita.fr>
10189
10190 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
10191 before their first uses.
10192 (YYBISON, YYPURE): Move to the top of the output.
10193
101942001-11-30 Akim Demaille <akim@epita.fr>
10195
10196 * tests/reduce.at (Useless Nonterminals): Fix.
10197
101982001-11-30 Akim Demaille <akim@epita.fr>
10199
10200 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
10201 if body instead of `;' to pacify GCC's warnings.
10202
102032001-11-30 Akim Demaille <akim@epita.fr>
10204
10205 Instead of mapping the LHS of unused rules to -1, keep the LHS
10206 valid, but flag the rules as invalid.
10207
10208 * src/gram.h (rule_t): `useful' is a new member.
10209 * src/print.c (print_grammar): Adjust.
10210 * src/derives.c (set_derives): Likewise.
10211 * src/reader.c (packgram, reduce_output): Likewise.
10212 * src/reduce.c (reduce_grammar_tables): Likewise.
10213 * tests/reduce.at (Underivable Rules, Useless Rules): New.
10214
102152001-11-30 Akim Demaille <akim@epita.fr>
10216
10217 * src/reduce.c (reduce_output): Formatting changes.
10218 * src/print.c (print_results, print_grammar): Likewise.
10219 * tests/regression.at (Rule Line Numbers)
10220 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
10221
102222001-11-30 Akim Demaille <akim@epita.fr>
10223
10224 * src/reduce.c (nonterminals_reduce): Instead of throwing away
10225 useless nonterminals, move them at the end of the symbol arrays.
10226 (reduce_output): Adjust.
10227 * tests/reduce.at (Useless Nonterminals): Adjust.
10228
102292001-11-30 Akim Demaille <akim@epita.fr>
10230
10231 * src/reduce.c: Various comment/formatting changes.
10232 (nonterminals_reduce): New, extracted from...
10233 (reduce_grammar_tables): here.
10234 (reduce_grammar): Call nonterminals_reduce.
10235
102362001-11-29 Paul Eggert <eggert@twinsun.com>
10237
10238 * src/bison.simple (YYSTACK_REALLOC): Remove.
10239 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
10240 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
10241 New macros.
10242 (union yyalloc): New type.
10243 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
10244 an arbitrary restriction on hosts where size_t is wider than int.
10245
10246 (yyparse): Don't dump core if alloca or malloc fails; instead, report
10247 a parser stack overflow. Allocate just one block of memory for all
10248 three stacks, instead of allocating three blocks; this typically is
10249 faster and reduces fragmentation.
10250
10251 Do not limit the number of items in the stack to a value that fits
10252 in 'int', as this is an arbitrary limit on hosts with 64-bit
10253 size_t and 32-bit int.
10254
102552001-11-29 Marc Autret <autret_m@epita.fr>
10256
10257 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
10258 of defining YYERROR_VERBOSE.
10259 [AT_DATA]: $4 is now out of C declarations in the prologue.
10260
102612001-11-28 Marc Autret <autret_m@epita.fr>
10262
10263 * src/reader.c (parse_dquoted_param): New.
10264 (parse_skel_decl): Use it.
10265 * src/lex.h: Add its prototype.
10266 * src/lex.c (literalchar): Become not static.
10267
102682001-11-28 Marc Autret <autret_m@epita.fr>
10269
10270 * src/output.h: And put its extern declaration here.
10271 * src/output.c (error_verbose): Define here.
10272 (prepare): Echo name modification.
10273 * src/getargs.h: Clean its extern declaration.
10274 * src/getargs.c (error_verbose_flag): Remove.
10275 (getargs): Remove case 'e'.
10276 * src/options.c (option_table): 'error-verbose' is now seen as simple
10277 percent option.
10278 Include output.h.
10279
10280 * src/reader.c (read_declarations): Remove case tok_include.
10281 (parse_include_decl): Remove.
10282 * src/lex.h (token_t): Remove tok_include.
10283 * src/options.c (option_table): 'include' is now a simple command line
10284 option.
10285
102862001-11-28 Marc Autret <autret_m@epita.fr>
10287
10288 * src/bison.simple: Adjust muscle names.
10289 * src/muscle_tab.c (muscle_init): Also rename the muscles.
10290 * src/output.c (prepare): s/_/-/ for the muscles names.
10291 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
10292
102932001-11-28 Marc Autret <autret_m@epita.fr>
10294
10295 * src/bison.simple: Fix debug.
10296 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
10297
102982001-11-28 Akim Demaille <akim@epita.fr>
10299
10300 * src/LR0.c (shifts_new): New.
10301 (save_shifts, insert_start_shift, augment_automaton): Use it.
10302
103032001-11-28 Akim Demaille <akim@epita.fr>
10304
10305 * src/closure.c (closure): `b' and `ruleno' denote the same value:
10306 keep ruleno only.
10307
103082001-11-28 Akim Demaille <akim@epita.fr>
10309
10310 * src/closure.c (closure): Instead of looping over word in array
10311 then bits in words, loop over bits in array.
10312
103132001-11-28 Akim Demaille <akim@epita.fr>
10314
10315 * src/closure.c (closure): No longer optimize the special case
10316 where all the bits of `ruleset[r]' are set to 0, to make the code
10317 clearer.
10318
103192001-11-28 Akim Demaille <akim@epita.fr>
10320
10321 * src/closure.c (closure): `r' and `c' are new variables, used to
10322 de-obfuscate accesses to RULESET and CORE.
10323
103242001-11-28 Akim Demaille <akim@epita.fr>
10325
10326 * src/reduce.c (reduce_print): Use ngettext.
10327 (dump_grammar): Improve the trace accuracy.
10328
103292001-11-28 Akim Demaille <akim@epita.fr>
10330
10331 * src/reduce.c (dump_grammar): Don't translate trace messages.
10332
103332001-11-28 Akim Demaille <akim@epita.fr>
10334
10335 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
10336 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
10337 as all tags are free'ed afterwards.
10338 From Enrico Scholz.
10339
103402001-11-27 Paul Eggert <eggert@twinsun.com>
10341
10342 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
10343 use alloca when we didn't want to, and vice versa.
10344
103452001-11-27 Marc Autret <autret_m@epita.fr>
10346
10347 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
10348 initialization.
10349 * src/output.c (prepare): Remove its update.
10350
103512001-11-27 Marc Autret <autret_m@epita.fr>
10352
10353 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
10354 Use %error-verbose.
10355
103562001-11-27 Marc Autret <autret_m@epita.fr>
10357
10358 * src/bison.simple: Remove YYERROR_VERBOSE using.
10359 Use %%error_verbose.
10360 (yyparse): Likewise.
10361 * src/output.c (prepare): Give its final value.
10362 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
10363 * src/getargs.h: Add its extern declaration.
10364 * src/getargs.c (error_verbose_flag): New int.
10365 (getargs): Update to catch new case.
10366 * src/options.c (option_table): 'error-verbose' is a new option.
10367 (shortopts): Update.
10368
103692001-11-27 Akim Demaille <akim@epita.fr>
10370
10371 * src/system.h: Use intl/libgettext.h.
10372 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
10373
103742001-11-27 Akim Demaille <akim@epita.fr>
10375
10376 * tests/torture.at (Exploding the Stack Size with Malloc):
10377 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
10378
103792001-11-27 Akim Demaille <akim@epita.fr>
10380
10381 * src/files.c: Include error.h.
10382 Reported by Hans Aberg.
10383
103842001-11-26 Marc Autret <autret_m@epita.fr>
10385
10386 * src/reader.c (parse_include_decl): New, not yet implemented.
10387 (read_declarations): Add case tok_include.
10388 * src/getargs.h (include): Add its extern definition.
10389 * src/getargs.c (include): New const char *.
10390 (getargs): Add case '-I'.
10391 * src/options.c (option_table): Add include as command line and
10392 percent option.
10393 * src/lex.h (token_t): Add tok_include.
10394
103952001-11-26 Akim Demaille <akim@epita.fr>
10396
10397 * src/reader.c (readgram): Make sure rules for mid-rule actions
10398 have a lineno equal to that of their host rule.
10399 Reported by Hans Aberg.
10400 * tests/regression.at (Rule Line Numbers): New.
10401
104022001-11-26 Akim Demaille <akim@epita.fr>
10403
10404 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
10405 size_ts.
10406
104072001-11-26 Akim Demaille <akim@epita.fr>
10408
10409 * src/complain.c, src/complain.h (error): Remove, provided by
10410 lib/error.[ch].
10411
104122001-11-26 Akim Demaille <akim@epita.fr>
10413
10414 * src/reader.c (read_declarations): Don't abort on tok_illegal,
10415 issue an error message.
10416 * tests/regression.at (Invalid %directive): New.
10417 Reported by Hans Aberg.
10418
104192001-11-26 Akim Demaille <akim@epita.fr>
10420
10421 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
10422 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
10423
104242001-11-26 Akim Demaille <akim@epita.fr>
10425
10426 * src/conflicts.c (conflicts_print): Don't complain at all when
10427 there are no reduce/reduce conflicts, and as many shift/reduce
10428 conflicts as expected.
10429 * tests/regression.at (%expect right): Adjust.
10430
104312001-11-23 Akim Demaille <akim@epita.fr>
10432
10433 * lib/alloca.c: Update, from fileutils.
10434
104352001-11-23 Akim Demaille <akim@epita.fr>
10436
10437 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
10438
104392001-11-23 Akim Demaille <akim@epita.fr>
10440
10441 * src/system.h: Include alloca.h.
10442 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
10443
104442001-11-23 Akim Demaille <akim@epita.fr>
10445
10446 * src/print_graph.c (print_actions): Remove `rule', unused.
10447 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
10448 pacify GCC's signed < unsigned warnings.
10449 * src/closure.c (itemsetsize): Likewise.
10450 * src/reader.c (symbol_list_new): Static.
10451
104522001-11-23 Akim Demaille <akim@epita.fr>
10453
10454 Attaching lineno to buckets is stupid, since only one copy of each
10455 symbol is kept, only the line of the first occurrence is kept too.
10456
10457 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
10458 * src/reader.c (rline_allocated): Remove, unused.
10459 (symbol_list): Have a `line' member.
10460 (symbol_list_new): New.
10461 (readgram): Use it.
10462 * src/print.c (print_grammar): Output the rule line numbers.
10463 * tests/regression.at (Solved SR Conflicts)
10464 (Unresolved SR Conflicts): Adjust.
10465 Reported by Hans Aberg.
10466
104672001-11-22 Marc Autret <autret_m@epita.fr>
10468
10469 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
10470
104712001-11-22 Marc Autret <autret_m@epita.fr>
10472
10473 * src/muscle_tab.c (muscle_init): Remove initialization of
10474 skeleton muscle.
10475 * src/output.c (output_master_parser): Do it here.
10476
104772001-11-20 Akim Demaille <akim@epita.fr>
10478
10479 * po/sv.po: New.
10480 * configure.in (ALL_LINGUAS): Adjust.
10481 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
10482 longer contains strings to translate.
10483
104842001-11-19 Akim Demaille <akim@epita.fr>
10485
10486 * src/conflicts.c (conflicts_print): Add a missing \n.
10487
104882001-11-19 Akim Demaille <akim@epita.fr>
10489
10490 * src/nullable.c (nullable_print): New.
10491 (set_nullable): Call it when tracing.
10492 Better locality of variables.
10493
104942001-11-19 Akim Demaille <akim@epita.fr>
10495
10496 * src/print.c (print_actions): Better locality of variables.
10497
104982001-11-19 Akim Demaille <akim@epita.fr>
10499
10500 * src/derives.c (print_derives): Fix and enrich.
10501 * src/closure.c (print_fderives): Likewise.
10502
105032001-11-19 Akim Demaille <akim@epita.fr>
10504
10505 * src/closure.c (itemsetend): Remove, replaced with...
10506 (itemsetsize): new.
10507
105082001-11-19 Akim Demaille <akim@epita.fr>
10509
10510 * src/LR0.c (kernel_end): Remove, replaced with...
10511 (kernel_size): new.
10512
105132001-11-19 Akim Demaille <akim@epita.fr>
10514
10515 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
10516 to clarify.
10517
105182001-11-19 Akim Demaille <akim@epita.fr>
10519
10520 * src/closure.c (closure): Use arrays instead of pointers to clarify.
10521
105222001-11-19 Akim Demaille <akim@epita.fr>
10523
10524 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
10525 trace messages.
10526 * src/LR0.c: Likewise.
10527 (allocate_itemsets): Use arrays instead of pointers to clarify.
10528
105292001-11-19 Akim Demaille <akim@epita.fr>
10530
10531 * src/getargs.c (statistics_flag): Replace with...
10532 (trace_flag): New.
10533 (longopts): Accept --trace instead of --statistics.
10534 * src/getargs.h, src/options.c: Adjust.
10535 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
10536 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
10537
105382001-11-19 Akim Demaille <akim@epita.fr>
10539
10540 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
10541 pointers to clarify the code.
10542 (save_reductions, save_shifts): Factor common parts of alternatives.
10543
105442001-11-19 Akim Demaille <akim@epita.fr>
10545
10546 * src/LR0.c (new_state, get_state): Complete TRACE code.
10547 * src/closure.c: Include `reader.h' to get `tags', needed by the
10548 trace code.
10549 Rename the conditional DEBUG as TRACE.
10550 Output consistently TRACEs to stderr, not stdout.
10551 * src/derives.c: Likewise.
10552 * src/reduce.c: (inaccessable_symbols): Using if is better style
10553 than goto.
10554 Use `#if TRACE' instead of `#if 0' for tracing code.
10555
105562001-11-19 Akim Demaille <akim@epita.fr>
10557
10558 * src/system.h (LIST_FREE, shortcpy): New.
10559 * src/LR0.c: Use them.
10560 * src/output.c (free_itemsets, free_reductions, free_shifts):
10561 Remove, replaced by LIST_FREE.
10562
105632001-11-19 Akim Demaille <akim@epita.fr>
10564
10565 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
10566 (REDUCTIONS_ALLOC): New.
10567 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
10568 allocation.
10569
105702001-11-19 Akim Demaille <akim@epita.fr>
10571
10572 * src/LR0.c (new_state): Complete trace code.
10573 * src/nullable.c (set_nullable): Don't translate traces.
10574
105752001-11-19 Akim Demaille <akim@epita.fr>
10576
10577 * src/print_graph.c (print_core): Better locality of variables.
10578 * src/print.c (print_core): Likewise.
10579
105802001-11-19 Akim Demaille <akim@epita.fr>
10581
10582 * src/vcg.c: You do the output, so you are responsible of the
10583 handling of VCG syntax, in particular: use quotearg.
10584 * src/print_graph.c: Don't.
10585 (print_actions): Don't output the actions as part of the nodes,
10586 since that's the job of the edges.
10587 (print_state): Don't output by hand: fill the node description,
10588 and ask for its output.
10589
105902001-11-19 Akim Demaille <akim@epita.fr>
10591
10592 * src/bison.simple (yyparse): When verbosely reporting an error,
10593 no longer put additional quotes around token names.
10594 * tests/calc.at: Adjust.
10595
105962001-11-19 Akim Demaille <akim@epita.fr>
10597
10598 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
10599 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
10600 * src/output.c: Adjust.
10601
106022001-11-19 Akim Demaille <akim@epita.fr>
10603
10604 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
10605 (rule_t): this.
10606 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
10607
106082001-11-19 Akim Demaille <akim@epita.fr>
10609
10610 * src/gram.h (rule_t): New.
10611 (rule_table): New.
10612 (rrhs, rlhs): Remove, part of state_t.
10613 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
10614 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
10615 * src/reader.c, src/reduce.c: Adjust.
10616
106172001-11-19 Akim Demaille <akim@epita.fr>
10618
10619 * src/reader.c (symbols_output): New, extracted from...
10620 (packsymbols): Here.
10621 (reader): Call it.
10622
106232001-11-19 Akim Demaille <akim@epita.fr>
10624
10625 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
10626 (maxrhs): this new function.
10627
106282001-11-19 Akim Demaille <akim@epita.fr>
10629
10630 * src/lalr.c (F): New macro to access the variable F.
10631 Adjust.
10632
106332001-11-19 Akim Demaille <akim@epita.fr>
10634
10635 * src/lalr.h (LA): New macro to access the variable LA.
10636 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10637 * src/lalr.c: Adjust.
10638
106392001-11-19 Akim Demaille <akim@epita.fr>
10640
10641 * src/lalr.c (initialize_LA): Only initialize LA. Let...
10642 (set_state_table): handle the `lookaheads' members.
10643
106442001-11-19 Akim Demaille <akim@epita.fr>
10645
10646 * src/lalr.h (lookaheads): Removed array, whose contents is now
10647 a member of...
10648 (state_t): this structure.
10649 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10650 Adjust.
10651
106522001-11-19 Akim Demaille <akim@epita.fr>
10653
10654 * src/lalr.h (consistent): Removed array, whose contents is now
10655 a member of...
10656 (state_t): this structure.
10657 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10658 Adjust.
10659
106602001-11-19 Akim Demaille <akim@epita.fr>
10661
10662 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
10663 contents are now members of...
10664 (state_t): this structure.
10665 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10666 Adjust.
10667
106682001-11-19 Akim Demaille <akim@epita.fr>
10669
10670 * src/lalr.h (state_t): New.
10671 (state_table): Be a state_t * instead of a core **.
10672 (accessing_symbol): Remove, part of state_t.
10673 * src/lalr.c: Adjust.
10674 (set_accessing_symbol): Merge into...
10675 (set_state_table): this.
10676 * src/print_graph.c, src/conflicts.c: Adjust.
10677
106782001-11-14 Akim Demaille <akim@epita.fr>
10679
10680 * tests/calc.at, tests/output.at, tests/regression.at,
10681 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
10682 now the tests are run in private dirs, therefore AC_CLEANUP and
10683 family can be simplified to 0-ary.
10684 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
10685 use abs. path to find config.h.
10686 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
10687 stderr, there can be way too much random noise.
10688 Instead pass -Werror to GCC and rely on the exit status.
10689 Reported by Wolfram Wagner.
10690
106912001-11-14 Akim Demaille <akim@epita.fr>
10692
10693 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
10694 defined only if yyoverflow is defined, to avoid `warning: unused
10695 variable `yyvs1''.
10696 Reported by The Test Suite.
10697
106982001-11-14 Akim Demaille <akim@epita.fr>
10699
10700 * src/print.c: Include reduce.h.
10701 Reported by Hans Aberg.
10702
107032001-11-14 Akim Demaille <akim@epita.fr>
10704
10705 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
10706 Revert a previous patch: these are really const.
10707 * src/conflicts.c (conflict_report): Additional useless pair of
10708 braces to pacify GCC's warnings for `if () if () {} else {}'.
10709 * src/lex.c (parse_percent_token): Replace equal_offset with
10710 arg_offset.
10711 arg is const.
10712 Be sure to strdup `arg' when used, since there is no reason for
10713 token_buffer not to change.
10714
107152001-11-14 Akim Demaille <akim@epita.fr>
10716
10717 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
10718 definition.
10719 * src/main.c (main): Use them.
10720 Suggested by Hans Aberg.
10721
107222001-11-12 Akim Demaille <akim@epita.fr>
10723
10724 * src/system.h (ngettext): Now that we use ngettext, be sure to
10725 provide a default definition when NLS are not used.
10726
107272001-11-12 Akim Demaille <akim@epita.fr>
10728
10729 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
10730 Use @kbd to denote user input.
10731 (Language and Grammar): ANSIfy the example.
10732 Adjust its layout for info/notinfo.
10733 (Location Tracking Calc): Output error messages to stderr.
10734 Output locations in a more GNUtically correct way.
10735 Fix a couple of Englishos.
10736 Adjust @group/@end group pairs.
10737
107382001-11-12 Akim Demaille <akim@epita.fr>
10739
10740 %expect was not functioning at all.
10741
10742 * src/conflicts.c (expected_conflicts): Set to -1.
10743 (conflict_report): Use ngettext.
10744 (conflicts_print): Check %expect and make its violation an error.
10745 * doc/bison.texinfo (Expect Decl): Adjust.
10746 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
10747 * tests/regression.at (%expect not enough, %expect right)
10748 (%expect too much): New.
10749
107502001-11-12 Akim Demaille <akim@epita.fr>
10751
10752 * tests/regression.at (Conflicts): Rename as...
10753 (Unresolved SR Conflicts): this.
10754 (Solved SR Conflicts): New.
10755
107562001-11-12 Akim Demaille <akim@epita.fr>
10757
10758 * src/reduce.c (print_results): Rename as...
10759 (reduce_output): This.
10760 Output to OUT, passed as argument, instead of output_obstack.
10761 (dump_grammar): Likewise.
10762 (reduce_free): New.
10763 Also free V1.
10764 (reduce_grammar): No longer call reduce_output, since...
10765 * src/print.c (print_results): do it.
10766 * src/main.c (main): Call reduce_free;
10767
107682001-11-12 Akim Demaille <akim@epita.fr>
10769
10770 * src/conflicts.c (print_reductions): Accept OUT as argument.
10771 Output to it, not to output_obstack.
10772 * src/print.c (print_actions): Adjust.
10773
107742001-11-12 Akim Demaille <akim@epita.fr>
10775
10776 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
10777 the result instead of using...
10778 (src_total, rrc_total, src_count, rrc_count): Remove.
10779 (any_conflicts): Remove.
10780 (print_conflicts): Split into...
10781 (conflicts_print, conflicts_output): New.
10782 * src/conflicts.h: Adjust.
10783 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
10784 * src/print.c (print_grammar): Issue `\n' between two rules.
10785 * tests/regression.at (Conflicts): New.
10786 Reported by Tom Lane.
10787
107882001-11-12 Akim Demaille <akim@epita.fr>
10789
10790 * tests/regression.at (Invalid input): Remove, duplicate with
10791 ``Invalid input: 1''.
10792
107932001-11-12 Akim Demaille <akim@epita.fr>
10794
10795 * tests/torture.at (AT_DATA_STACK_TORTURE)
10796 (Exploding the Stack Size with Alloca)
10797 (Exploding the Stack Size with Malloc): New.
10798
107992001-11-12 Akim Demaille <akim@epita.fr>
10800
10801 * src/bison.simple (YYSTACK_REALLOC): New.
10802 (yyparse) [!yyoverflow]: Use it and free the old stack.
10803 Reported by Per Allansson.
10804
108052001-11-12 Pascal Bart <pascal.bart@epita.fr>
10806
10807 * src/bison.simple: Define type yystype instead of YYSTYPE, and
10808 define CPP macro, which substitute YYSTYPE by yystype.
10809 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
10810 with yyltype/YYLTYPE. This allows inclusion of the generated
10811 header within the parser if the compiler, such as GGC, accepts
10812 multiple equivalent #defines.
10813 From Akim.
10814
108152001-11-05 Akim Demaille <akim@epita.fr>
10816
10817 * src/reader.c (symbols_output): New, extracted from...
10818 (packsymbols): here.
10819 (reader): Adjust.
10820
108212001-11-05 Akim Demaille <akim@epita.fr>
10822
10823 * src/lex.c (parse_percent_token): s/quotearg/quote/.
10824
108252001-11-05 Akim Demaille <akim@epita.fr>
10826
10827 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
10828 pattern.
10829
108302001-11-05 Akim Demaille <akim@epita.fr>
10831
10832 * src/options.h (struct option_table_struct): set_flags is void*.
10833 * src/options.c (longopts): Support `--output' and `%output'.
10834 (usage): Adjust.
10835 * src/lex.h (tok_setopt): Remove, replaced with...
10836 (tok_intopt, tok_stropt): these new guys.
10837 * src/lex.c (getopt.h): Not needed.
10838 (token_buffer, unlexed_token_buffer): Not const.
10839 (percent_table): Promote `-' over `_' in directive names.
10840 Active `%name-prefix', `file-prefix', and `output'.
10841 (parse_percent_token): Accept possible arguments to directives.
10842 Promote `-' over `_' in directive names.
10843
108442001-11-04 Akim Demaille <akim@epita.fr>
10845
10846 * doc/bison.texinfo (Decl Summary): Split the list into
10847 `directives for grammars' and `directives for bison'.
10848 Sort'em.
10849 Add description of `%name-prefix', `file-prefix', and `output'.
10850 Promote `-' over `_' in directive names.
10851 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
10852 Simplify the description of `--name-prefix'.
10853 Promote `-' over `_' in directive names.
10854 Promote `--output' over `--output-file'.
10855 Fix the description of `--defines'.
10856 * tests/output.at: Exercise %file-prefix and %output.
10857
108582001-11-02 Akim Demaille <akim@epita.fr>
10859
10860 * doc/refcard.tex: Update.
10861
108622001-11-02 Akim Demaille <akim@epita.fr>
10863
10864 * src/symtab.h (SUNDEF): New.
10865 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
10866 stand for `uninitialized', instead of 0.
10867 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
10868 * src/lex.c (lex): Adjust.
10869
10870 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
10871 Number it 0.
10872 Let yylex return it instead of a plain 0.
10873 Reported by Dick Streefland.
10874
108752001-11-02 Akim Demaille <akim@epita.fr>
10876
10877 * tests/regression.at (Mixing %token styles): New test.
10878
108792001-11-02 Akim Demaille <akim@epita.fr>
10880
10881 * src/reader.c (parse_thong_decl): Formatting changes.
10882 (token_translations_init): New, extracted from...
10883 (packsymbols): Here.
10884 Adjust.
10885
108862001-11-01 Akim Demaille <akim@epita.fr>
10887
10888 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
10889 Check that `9foo.y' produces correct cpp guards.
10890 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
10891 guards.
10892 Reported by Wwp.
10893
108942001-11-01 Akim Demaille <akim@epita.fr>
10895
10896 * tests/regression.at (Invalid input: 2): New.
10897 * src/lex.c (unlexed_token_buffer): New.
10898 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
10899 too.
10900 Reported by Wwp.
10901
109022001-11-01 Akim Demaille <akim@epita.fr>
10903
10904 * tests/calc.at: Catch up with 1.30.
10905 * configure.in: Bump to 1.49a.
10906 Adjust to newer Autotest.
10907
109082001-10-19 Pascal Bart <pascal.bart@epita.fr>
10909
10910 * src/conflicts.c: Move global variables rrc_total and src_total ...
10911 (print_conflicts): here.
10912 * src/output.c (output): Free global variable user_toknums.
10913 * src/lex.c (token_obstack): Become static.
10914
109152001-10-18 Akim Demaille <akim@epita.fr>
10916
10917 * tests/atlocal.in (GCC): Add.
10918 * tests/calc.at: s/m4_match/m4_bmatch/.
10919 s/m4_patsubst/m4_bpatsubst/.
10920 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
10921 * configure.in: AC_SUBST(GCC).
10922
109232001-10-14 Marc Autret <autret_m@epita.fr>
10924
10925 * src/options.c (create_long_option_table): Fix.
10926
109272001-10-10 Akim Demaille <akim@epita.fr>
10928
10929 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
10930
109312001-10-04 Akim Demaille <akim@epita.fr>
10932
10933 * src/reader.c (parse_union_decl): Push the caracters in
10934 union_obstack, not attrs_obstack.
10935
109362001-10-04 Akim Demaille <akim@epita.fr>
10937
10938 Merge in the branch 1.29.
10939
10940 * src/reader.c (packsymbols): Use a temporary obstack for
10941 `%%tokendef', since output_stack is already used elsewhere.
10942
10943 2001-10-02 Akim Demaille <akim@epita.fr>
10944
10945 Bump 1.29d.
10946
10947 2001-10-02 Akim Demaille <akim@epita.fr>
10948
10949 Version 1.29c.
10950
10951 2001-10-02 Akim Demaille <akim@epita.fr>
10952
10953 * tests/regression.at (Invalid CPP headers): New.
10954 From Alexander Belopolsky.
10955 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
10956
10957 2001-10-02 Akim Demaille <akim@epita.fr>
10958
10959 * tests/regression.at (Invalid input): New.
10960 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
10961 Reported by Shura.
10962
10963 2001-10-02 Akim Demaille <akim@epita.fr>
10964
10965 * tests/calc.at: Now that --debug works, the tests must be adjusted.
10966
10967 2001-10-02 Akim Demaille <akim@epita.fr>
10968
10969 * src/output.c (output_parser): Assert `skeleton'.
10970 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
10971 systems.
10972 From Shura.
10973
10974 2001-10-01 Marc Autret <autret_m@epita.fr>
10975
10976 * src/lex.h: Echo modifications.
10977 * src/lex.c (unlex): Parameter is now token_t.
10978 From Hans Aberg.
10979
10980 2001-10-01 Marc Autret <autret_m@epita.fr>
10981
10982 * src/main.c: Include lex.h.
10983 From Hans Aberg.
10984
10985 2001-09-29 Akim Demaille <akim@epita.fr>
10986
10987 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
10988
10989 2001-09-28 Akim Demaille <akim@epita.fr>
10990
10991 * tests/testsuite.at: Update to newer Autotest.
10992 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
10993
10994 2001-09-27 Akim Demaille <akim@epita.fr>
10995
10996 Position independent wrapper.
10997
10998 * tests/bison: Remove.
10999 * tests/bison.in: New.
11000 * configure.in: Adjust.
11001
11002 2001-09-27 Paul Eggert <eggert@twinsun.com>
11003
11004 Port quotearg fixes from tar 1.13.24.
11005
11006 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
11007 tm to be declared.
11008 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
11009 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
11010
11011 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
11012 * m4/mbrtowc.m4: New file.
11013 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
11014 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
11015
11016 2001-09-27 Akim Demaille <akim@epita.fr>
11017
11018 Bump to 1.29c.
11019
11020 2001-09-27 Akim Demaille <akim@epita.fr>
11021
11022 Version 1.29b.
11023
11024 2001-09-25 Akim Demaille <akim@epita.fr>
11025
11026 * src/system.h: Include `xalloc.h'.
11027 Remove it from the C files.
11028 * src/files.c (output_files): Free the obstacks.
11029 * src/lex.c (init_lex): Rename as...
11030 (lex_init): this.
11031 (lex_free): New.
11032 * src/main.c (main): Use it.
11033
11034 2001-09-24 Marc Autret <autret_m@epita.fr>
11035
11036 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
11037 to output informations in fout (FILE*).
11038 (open_graph, close_graph): Likewise.
11039 (output_graph, output_edge, output_node): Likewise.
11040 * src/vcg.h: Update function prototypes.
11041 * src/print_graph.c (print_graph): Open output graph file.
11042 (print_actions): Adjust.
11043 * src/files.h: Remove extern declaration.
11044 * src/files.c: Remove graph_obstack declaration.
11045 (open_files): Remove graph_obstack initialization.
11046 (output_files): Remove graph_obstack saving.
11047
11048 2001-09-24 Marc Autret <autret_m@epita.fr>
11049
11050 * src/files.c (compute_output_file_names): Fix.
11051
11052 2001-09-24 Marc Autret <autret_m@epita.fr>,
11053 Akim Demaille <akim@epita.fr>
11054
11055 * src/reader.c (reader): Remove call to free_symtab ().
11056 * src/main.c (main): Call it here.
11057 Include symtab.h.
11058 * src/conflicts.c (initialize_conflicts): Rename as...
11059 (solve_conflicts): this.
11060 * src/print.c (print_core, print_actions, print_state)
11061 (print_grammar): Dump to a file instead a `output_obstack'.
11062 (print_results): Dump `output_obstack', and then proceed with the
11063 FILE *.
11064 * src/files.c (compute_output_file_names, close_files): New.
11065 (output_files): Adjust.
11066 * src/main.c (main): Adjust.
11067
11068 2001-09-23 Marc Autret <autret_m@epita.fr>
11069
11070 * src/files.c (compute_header_macro): Computes header macro name
11071 from spec_defines_file when given.
11072
11073 2001-09-23 Marc Autret <autret_m@epita.fr>
11074
11075 * src/files.c (output_files): Add default extensions.
11076
11077 2001-09-22 Akim Demaille <akim@epita.fr>
11078
11079 * src/conflicts.c (finalize_conflicts): Rename as...
11080 (free_conflicts): this.
11081
11082 2001-09-22 Akim Demaille <akim@epita.fr>
11083
11084 * src/gram.c (gram_free): Rename back as...
11085 (dummy): this.
11086 (output_token_translations): Free `token_translations'.
11087 * src/symtab.c (free_symtab): Free the tag field.
11088
11089 2001-09-22 Akim Demaille <akim@epita.fr>
11090
11091 Remove `translations' as it is always set to true.
11092
11093 * src/gram.h: Adjust.
11094 * src/reader.c (packsymbols, parse_token_decl): Adjust
11095 * src/print.c (print_grammar): Adjust.
11096 * src/output.c (output_token_translations): Adjust.
11097 * src/lex.c (lex): Adjust.
11098 * src/gram.c: Be sure the set pointers to NULL.
11099 (dummy): Rename as...
11100 (gram_free): this.
11101
11102 2001-09-22 Akim Demaille <akim@epita.fr>
11103
11104 * configure.in: Invoke AM_LIB_DMALLOC.
11105 * src/system.h: Use dmalloc.
11106 * src/LR0.c: Be sure to have pointers initialized to NULL.
11107 (allocate_itemsets): Allocate kernel_items only if needed.
11108
11109 2001-09-22 Akim Demaille <akim@epita.fr>
11110
11111 * configure.in: Bump to 1.29b.
11112 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
11113 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
11114 need xmalloc.c in calc.y.
11115 From Pascal Bart.
11116
11117 2001-09-21 Akim Demaille <akim@epita.fr>
11118
11119 Version 1.29a.
11120 * Makefile.maint, config/config.guess, config/config.sub,
11121 * config/missing: Update from masters.
11122 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
11123 upon package.m4.
11124 * configure.in (ALL_LINGUAS): Add `tr'.
11125
11126 2001-09-21 Akim Demaille <akim@epita.fr>
11127
11128 * tests/Makefile.am (package.m4): Move to...
11129 ($(srcdir)/$(TESTSUITE)): here.
11130
11131 2001-09-20 Akim Demaille <akim@epita.fr>
11132
11133 * src/complain.c: No longer try to be standalone: use system.h.
11134 Don't assume __STDC__ is defined to 1. Just test if it is defined.
11135 * src/complain.h: Likewise.
11136 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
11137 Remove the unused variable `n'.
11138 From Albert Chin-A-Young.
11139
11140 2001-09-18 Marc Autret <autret_m@epita.fr>
11141
11142 * doc/bison.1: Update.
11143 * doc/bison.texinfo (Bison Options): Update --defines and --graph
11144 descriptions.
11145 (Option Cross Key): Update.
11146 Add --graph.
11147
11148 2001-09-18 Marc Autret <autret_m@epita.fr>
11149
11150 * tests/regression.at: New test (comment in %union).
11151
11152 2001-09-18 Marc Autret <autret_m@epita.fr>
11153
11154 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
11155 do that.
11156 Reported by Keith Browne.
11157
11158 2001-09-18 Marc Autret <autret_m@epita.fr>
11159
11160 * tests/output.at: Add tests for --defines and --graph.
11161
11162 2001-09-18 Marc Autret <autret_m@epita.fr>
11163
11164 * tests/output.at: Removes tests of %{header,src}_extension features.
11165
11166 2001-09-18 Akim Demaille <akim@epita.fr>
11167
11168 * tests/Makefile.am (package.m4): New.
11169 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
11170 (_AT_CHECK_CALC_ERROR): Likewise.
11171 Factor the `, ' part of verbose error messages.
11172
11173 2001-09-18 Marc Autret <autret_m@epita.fr>
11174
11175 * src/getargs.c (longopts): Declare --defines and --graph as options
11176 with optional arguments.
11177 * src/files.h: Add extern declarations.
11178 * src/files.c (spec_graph_file, spec_defines_file): New.
11179 (output_files): Update.
11180 Remove CPP-outed code.
11181
11182 2001-09-18 Marc Autret <autret_m@epita.fr>
11183
11184 Turn off %{source,header}_extension feature.
11185
11186 * src/files.c (compute_exts_from_gf): Update.
11187 (compute_exts_from_src): Update.
11188 (output_files): CPP-out useless code.
11189 * src/files.h: Remove {header,source}_extension extern declarations.
11190 * src/reader.c (parse_dquoted_param): CPP-out.
11191 (parse_header_extension_decl): Remove.
11192 (parse_source_extension_decl): Remove.
11193 (read_declarations): Remove cases tok_{hdrext,srcext}.
11194 * src/lex.c (percent_table): Remove {header,source}_extension entries.
11195 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
11196
11197 2001-09-10 Akim Demaille <akim@epita.fr>
11198
11199 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
11200 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
11201 (AT_CHECK_OUTPUT): this.
11202 Merely check ls' exit status, its output is useless.
11203
11204 2001-09-10 Akim Demaille <akim@epita.fr>
11205
11206 * tests/calc.at: Use m4_match.
11207 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
11208
11209 2001-09-10 Marc Autret <autret_m@epita.fr>,
11210 Akim Demaille <akim@epita.fr>
11211
11212 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
11213 enum color_e.
11214 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
11215 to `normal'.
11216 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
11217 * src/lex.h: Adjust prototype.
11218 (token_t): Add `tok_undef'.
11219 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
11220 (parse_percent_token): Now returns token_t.
11221 Add default statement in switch.
11222 (lex): Separate `c' as an input variable, from the token_t result
11223 part.
11224 (unlexed): Is a token_t.
11225
11226 2001-09-10 Akim Demaille <akim@epita.fr>
11227
11228 * configure.in: Bump to 1.29a.
11229
11230 2001-09-07 Akim Demaille <akim@epita.fr>
11231
11232 Version 1.29.
11233
11234 2001-08-30 Akim Demaille <akim@epita.fr>
11235
11236 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
11237 * m4/atconfig.m4: Remove.
11238 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
11239 * tests/bison: New.
11240 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
11241 m4_if, m4_patsubst, and m4_regexp.
11242 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
11243 `input' file instead of echo.
11244
11245 2001-08-29 Akim Demaille <akim@epita.fr>
11246
11247 Bump to 1.28e.
11248
11249 2001-08-29 Akim Demaille <akim@epita.fr>
11250
11251 Version 1.28d.
11252
11253 2001-08-29 Paul Eggert <eggert@twinsun.com>
11254
11255 * src/bison.simple (yyparse): Don't take the address of an
11256 item before the start of an array, as that doesn't conform to
11257 the C Standard.
11258
11259 2001-08-29 Robert Anisko <anisko_r@epita.fr>
11260
11261 * doc/bison.texinfo (Location Tracking Calc): New node.
11262
11263 2001-08-29 Paul Eggert <eggert@twinsun.com>
11264
11265 * src/output.c (output): Do not define const, as this now
11266 causes more problems than it cures.
11267
11268 2001-08-29 Akim Demaille <akim@epita.fr>
11269
11270 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
11271 the nodes.
11272 Be sure to tag the `detailmenu'.
11273
11274 2001-08-29 Akim Demaille <akim@epita.fr>
11275
11276 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
11277 download in a tmp dir.
11278
11279 2001-08-28 Marc Autret <autret_m@epita.fr>
11280
11281 * config/depcomp: New file.
11282
11283 2001-08-28 Marc Autret <autret_m@epita.fr>
11284
11285 * doc/bison.1 (mandoc): Adjust.
11286 From Juan Manuel Guerrero.
11287
11288 2001-08-28 Marc Autret <autret_m@epita.fr>
11289
11290 * src/print_graph.c (print_state): Fix.
11291
11292 2001-08-27 Marc Autret <autret_m@epita.fr>
11293
11294 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
11295 char * members.
11296 Echo modifications to the functions prototypes.
11297 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
11298
11299 2001-08-27 Marc Autret <autret_m@epita.fr>
11300
11301 * src/vcg.c: Include `xalloc.h'.
11302 (add_colorentry): New.
11303 (add_classname): New.
11304 (add_infoname): New.
11305 * src/vcg.h: Add new prototypes.
11306
11307 2001-08-27 Akim Demaille <akim@epita.fr>
11308
11309 * Makefile.maint: Sync. again with CVS Autoconf.
11310
11311 2001-08-27 Akim Demaille <akim@epita.fr>
11312
11313 * Makefile.maint: Formatting changes.
11314 (po-update, cvs-update, update): New targets.
11315 (AMTAR): Remove.
11316
11317 2001-08-27 Akim Demaille <akim@epita.fr>
11318
11319 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
11320 * Makefile.maint: Sync. with CVS Autoconf.
11321
11322 2001-08-27 Marc Autret <autret_m@epita.fr>
11323
11324 * src/vcg.h (struct infoname_s): New.
11325 (struct colorentry_s): New.
11326 (graph_s): New fields {vertical,horizontal}_order in structure.
11327 Add `infoname' field.
11328 Add `colorentry' field;
11329 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
11330 (G_HORIZONTAL_ORDER): New.
11331 (G_INFONAME): New.
11332 (G_COLORENTRY): New.
11333 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
11334 Add output of `infoname'.
11335 Add output of `colorentry'.
11336
11337 2001-08-27 Marc Autret <autret_m@epita.fr>
11338
11339 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
11340 This one shadowed a global parameter.
11341
11342 2001-08-24 Marc Autret <autret_m@epita.fr>
11343
11344 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
11345 instead of `unsigned'.
11346 (print_state): Do not call obstack_object_size () in obstack_grow ()
11347 to avoid macro variables shadowing.
11348
11349 2001-08-23 Marc Autret <autret_m@epita.fr>
11350
11351 * src/lex.c (percent_table): Typo: s/naem/name/.
11352 Add graph option.
11353 Normalize new options declarations.
11354
11355 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
11356
11357 * tests/suite.at: Exercise %header_extension and %source_extension.
11358
11359 2001-08-16 Marc Autret <autret_m@epita.fr>
11360
11361 * src/reader.c (parse_dquoted_param): New.
11362 (parse_header_extension_decl): Use it.
11363 (parse_source_extension_decl): Likewise.
11364
11365 2001-08-16 Marc Autret <autret_m@epita.fr>
11366
11367 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
11368 (get_xxxx_str): Use assert () instead of complain ().
11369 Remove return invokations in default cases.
11370 (get_decision_str): Modify default behaviour. Remove second argument.
11371 Echo modifications on calls.
11372 (output_graph): Fix.
11373
11374 2001-08-16 Marc Autret <autret_m@epita.fr>
11375
11376 * src/getargs.c (usage): Update with ``-g, --graph''.
11377
11378 2001-08-16 Marc Autret <autret_m@epita.fr>
11379
11380 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
11381 (Option Cross Key): Likewise.
11382 * doc/bison.1: Update.
11383
113842001-09-25 Pascal Bart <pascal.bart@epita.fr>
11385
11386 * src/output.c (output_master_parser): Don't finish action_obstack.
11387 (output_parser): Don't care about the muscle action, here.
11388 (prepare): Copy the action_obstack in the action muscle.
11389 (output): Free action_obstack.
11390
113912001-09-23 Pascal Bart <pascal.bart@epita.fr>
11392
11393 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
11394 will contain `%union' declaration.
11395 (parse_union_decl): Delete #line directive output.
11396 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
11397 informations about %union.
11398 (parse_union_decl): Copy the union_obstack in the muscle stype.
11399 * src/bison.simple: Add new #line directive.
11400 Add typdef %%stype YYSTYPE.
11401
114022001-09-23 Pascal Bart <pascal.bart@epita.fr>
11403
11404 * src/bison.simple: Add new `#line' directive.
11405
114062001-09-22 Pascal Bart <pascal.bart@epita.fr>
11407
11408 * src/bison.simple: New `#line' directive.
11409 * src/output.c (output_parser): Support new dynamic muscle input_line.
11410
114112001-09-22 Marc Autret <autret_m@epita.fr>
11412
11413 * src/output.c (output_master_parser): New.
11414 (output_parser): Be more re-entrant.
11415
114162001-09-21 Marc Autret <autret_m@epita.fr>
11417
11418 * src/reader.c (copy_definition, parse_union_decl): Update and use
11419 `linef' muscle.
11420 (copy_action): Likewise.
11421 Use obstack_1grow ().
11422 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
11423
114242001-09-21 Marc Autret <autret_m@epita.fr>
11425
11426 * src/options.c (option_table): Adjust.
11427 * src/lex.c (parse_percent_token): Fix.
11428
114292001-09-20 Pascal Bart <pascal.bart@epita.fr>
11430
11431 * src/options.c (symtab.h): Include it, need by lex.h.
11432
114332001-09-20 Pascal Bart <pascal.bart@epita.fr>
11434
11435 * src/lex.c (parse_percent_token): Change type of variable `tx', which
11436 is now an option_table_struct*.
11437 (option_strcmp): New function option_strcmp.
11438 (parse_percent_token): Call option_strcmp.
11439 * src/getargs.c (xalloc.h, options.h): Include it.
11440 (getargs): Call create_long_option_table.
11441 (getargs): Free longopts at the end of the function.
11442 (shortopts): Move in options.c.
11443 * src/options.c (create_long_option_table): New function. Convert
11444 information from option_table to option structure.
11445 * src/reader.c (options.h): Include it.
11446
11447 * src/Makefile.am: Adjust.
11448 * src/options.c (option_table): Create from longopts and percent_table.
11449 * src/getargs.c (longopts): Delete.
11450 * src/lex.c (struct percent_table_struct): Delete.
11451 (percent_table): Delete.
11452 (options.h): Include it.
11453 * src/options.c: Create.
11454 * src/options.h: Create.
11455 Declare enum opt_access_e.
11456 Define struct option_table_struct.
11457
114582001-09-20 Marc Autret <autret_m@epita.fr>
11459
11460 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
11461 sections of Bison.
11462
114632001-09-19 Pascal Bart <pascal.bart@epita.fr>
11464
11465 * src/bison.simple: s/%%filename/%%skeleton.
11466 * src/muscle_tab.c (getargs.h): Include it.
11467 (muscle_init): Insert new muscle skeleton.
11468
114692001-09-18 Pascal Bart <pascal.bart@epita.fr>
11470
11471 * src/output.c (output_parser): Delete unused variable actions_dumped.
11472
114732001-09-07 Pascal Bart <pascal.bart@epita.fr>
11474
11475 * src/output.c (output): Delete call to reader_output_yylsp.
11476 * src/reader.c (reader): Likewise.
11477 * src/reader.h: Delete declaration of reader_output_yylsp.
11478
114792001-09-02 Marc Autret <autret_m@epita.fr>
11480
11481 * src/reader.c: Include muscle_tab.h.
11482 (parse_union_decl): Update.
11483 (parse_macro_decl): Rename parse_muscle_decl.
11484 Update to use renamed functions and variable.
11485 (read_declarations, copy_action, read_additionnal_code, : Updated
11486 with correct variables and functions names.
11487 (packsymbols, reader): Likewise.
11488
11489 * src/reader.h (muscle_obstack): Extern declaration update.
11490
11491 * src/output.c: Include muscle_tab.h
11492 In all functions using macro_insert, change by using muscle_insert ().
11493 (macro_obstack): Rename muscle_obstack.
11494 Echo modifications in the whole file.
11495 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
11496 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
11497 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
11498
11499 * src/muscle_tab.h: Update double inclusion macros.
11500 (macro_entry_s): Rename muscle_entry_s.
11501 Update prototypes.
11502
11503 * src/muscle_tab.c: Include muscle_tab.h.
11504 Rename macro_tabble to muscle_table.
11505 (mhash1, mhash2, mcmp): Use muscle_entry.
11506 (macro_init): Rename muscle_init. Update.
11507 (macro_insert): Rename muscle_insert. Update.
11508 (macro_find): Rename muscle_find. Update.
11509
11510 * src/main.c: Include muscle_tab.h.
11511 (main): Call muscle_init ().
11512 * src/Makefile.am (bison_SOURCES): Echo modifications.
11513
115142001-09-02 Marc Autret <autret_m@epita.fr>
11515
11516 Now the files macro_tab.[ch] are named muscle_tab.[ch].
11517
11518 * src/muscle_tab.c, src/muscle_tab.h: Add files.
11519
115202001-09-02 Marc Autret <autret_m@epita.fr>
11521
11522 * src/macrotab.c, src/macrotab.h: Remove.
11523
115242001-09-01 Pascal Bart <pascal.bart@epita.fr>
11525
11526 * src/reader.c (copy_guard): Use muscle to specify the `#line'
11527 filename.
11528
115292001-09-01 Marc Autret <autret_m@epita.fr>
11530
11531 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
11532 to an explicit value to activate the feature. We do it here.
11533
115342001-08-31 Pascal Bart <pascal.bart@epita.fr>
11535
11536 * src/output.c (prepare): Delete the `filename' muscule insertion.
11537 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
11538 (parse_union_decl): Likewise.
11539 * src/macrotab.c (macro_init): Initialize filename by infile.
11540
115412001-08-31 Marc Autret <autret_m@epita.fr>
11542
11543 * src/bison.simple (YYLSP_NEEDED): New definition.
11544 * src/output.c (prepare): Add macro insertion of `locations_flag'
11545
115462001-08-31 Pascal Bart <pascal.bart@epita.fr>
11547
11548 * src/output.c (prepare): Delete insertion of previous muscles,
11549 and insert the `prefix' muscles.
11550 * src/macrotab.c (macro_init): Likewise.
11551 (macro_init): Initialization prefix directive by `yy'.
11552 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
11553 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
11554 yylval, yydebug, yyerror, yynerrs and yyparse.
11555 New directive `#define' to substitute yydebug, ... with option
11556 name_prefix.
11557
115582001-08-31 Pascal Bart <pascal.bart@epita.fr>
11559
11560 * src/main.c (main): Standardize.
11561 * src/output.c (output_table_data, output_parser): Likewise.
11562 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
11563
115642001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
11565
11566 * src/reader.c (read_additionnal_code): Rename %%user_code to
11567 %%epilogue.
11568 * src/output.c (output): Rename %%declarations to %%prologue.
11569 * src/bison.simple: Echo modifications.
11570
115712001-08-31 Marc Autret <autret_m@epita.fr>
11572
11573 * src/reader.c (readgram): CleanUp.
11574 (output_token_defines): Likewise.
11575 (packsymbols): Likewise.
11576 (reader): Likewise.
11577 * src/output.c (output): CPP-out useless code.
11578
115792001-08-31 Pascal Bart <pascal.bart@epita.fr>
11580
11581 * src/reader.c (reader): Delete obsolete call to function
11582 output_trailers and output_headers.
11583 * src/output.h: Remove obsolete functions prototypes of output_headers
11584 and output_trailers.
11585
115862001-08-30 Pascal Bart <pascal.bart@epita.fr>
11587
11588 * src/main.c: Include macrotab.h.
11589 * src/macrotab.h (macro_entry_s): Constify fields.
11590 Adjust functions prototypes.
11591 * src/macrotab.c (macro_insert): Constify key and value.
11592 (macro_find): Constify key.
11593 (macro_insert): Include 'xalloc.h'
11594 (macro_insert): Use XMALLOC.
11595 (macro_find): Constify return value.
11596 * src/output.c (output_table_data): Rename table to table_data.
11597 (output_parser): Constify macro_key, macro_value.
11598
115992001-08-30 Marc Autret <autret_m@epita.fr>
11600
11601 * src/reader.c (parse_skel_decl): New.
11602 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
11603 * src/lex.h (token_t): New token `tok_skel'.
11604 * src/lex.c (percent_table): Add skeleton option entry.
11605 Standardize.
11606
116072001-08-29 Marc Autret <autret_m@epita.fr>
11608
11609 * src/bison.simple: Add %%user_code directive at the end.
11610 * src/reader.c (read_additionnal_code): New.
11611 (reader): Use it.
11612 * src/output.c (output_program): Remove.
11613 (output): Update.
11614
116152001-08-28 Marc Autret <autret_m@epita.fr>
11616
11617 * src/output.c (output_actions): Clean up.
11618 (output_gram): CPP-out useless code.
11619 * src/reader.c (reader): Clean up, CPP-out useless code.
11620
116212001-08-28 Pascal Bart <pascal.bart@epita.fr>
11622
11623 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
11624 directive.
11625 * src/bison.simple: Add `%%definitions'.
11626
116272001-08-28 Marc Autret <autret_m@epita.fr>
11628
11629 * config/depcomp: New file.
11630
116312001-08-27 Paul Eggert <eggert@twinsun.com>
11632
11633 * src/bison.simple (yyparse): Don't take the address of an
11634 item before the start of an array, as that doesn't conform to
11635 the C Standard.
11636
116372001-08-27 Robert Anisko <robert.anisko@epita.fr>
11638
11639 * src/output.c (output): Remove the initialization of the macro
11640 obstack. It was done too late here.
11641
11642 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
11643 completely wrong.
11644 (reader): Initialize the macro obstack here, since we need it to grow
11645 '%define' directives.
11646
11647 * src/reader.h: Declare the macro obstack as extern.
11648
116492001-08-27 Robert Anisko <robert.anisko@epita.fr>
11650
11651 * src/output.c (output_parser): Fix. Store single '%' characters in
11652 the output obstack instead of throwing them away.
11653
116542001-08-27 Akim Demaille <akim@epita.fr>
11655
11656 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
11657
116582001-08-25 Robert Anisko <robert.anisko@epita.fr>
11659
11660 * lib/Makefile.am: Adjust.
11661
116622001-08-25 Robert Anisko <robert.anisko@epita.fr>
11663
11664 * src/bison.simple: Update and add '%%' directives.
11665
116662001-08-25 Robert Anisko <robert.anisko@epita.fr>
11667
11668 * src/reader.c (reader): Remove calls to 'output_headers' and
11669 'output_trailers'. Remove some C output.
11670 (readgram): Disable a piece of code that was writing a default
11671 definition for 'YYSTYPE'.
11672 (reader_output_yylsp): Remove.
11673 (packsymbols): Output token defintions to a macro.
11674 (copy_definition): Disable C output.
11675
11676 * src/reader.c (parse_macro_decl): New function used to parse macro
11677 declarations.
11678 (copy_string2): Put the body of copy_string into this new function.
11679 Add a parameter to let the caller choose whether he wants to copy the
11680 string delimiters or not.
11681 (copy_string): Be a simple call to copy_string2 with the last argument
11682 bound to true.
11683 (read_declarations): Add case for macro definition.
11684 (copy_identifier): New.
11685 (parse_macro_decl): Read macro identifiers using copy_identifier
11686 rather than lex.
11687
116882001-08-25 Robert Anisko <robert.anisko@epita.fr>
11689
11690 * src/output.c (prepare): Add prefixed names.
11691 (output_parser): Output semantic actions.
11692 (output_parser): Fix bug on '%%line' directives.
11693
11694 * src/output.c (output_headers): Remove. The C code printed by this
11695 function should now be in the skeletons.
11696 (output_trailers): Remove.
11697 (output): Disable call to 'reader_output_yylsp'.
11698 (output_rule_data): Do not output tables to the table obstack.
11699
11700 * src/output.c: Remove some C dedicated output.
11701 Improve the use of macro and output obstacks.
11702 (output_defines): Remove.
11703
11704 * src/output.c (output_token_translations): Associate 'translate'
11705 table with a macro. No output to the table obstack.
11706 (output_gram): Same for 'rhs' and 'prhs'.
11707 (output_stos): Same for 'stos'.
11708 (output_rule_data): Same for 'r1' and 'r2'.
11709 (token_actions): Same for 'defact'.
11710 (goto_actions): Same for 'defgoto'.
11711 (output_base): Same for 'pact' and 'pgoto'.
11712 (output_table): Same for 'table'.
11713 (output_check): Same for 'check'.
11714
11715 * src/output.c (output_table_data): New function.
11716 (output_short_table): Remove.
11717 (output_short_or_char_table): Remove.
11718
11719 * src/output.c (output_parser): Replace most of the skeleton copy code
11720 with something new. Skeletons are now processed character by character
11721 rather than line by line, and Bison looks for '%%' macros. This is the
11722 first step in making Bison's output process (a lot) more flexible.
11723 (output_parser): Use the macro table.
11724
117252001-08-25 Robert Anisko <robert.anisko@epita.fr>
11726
11727 * src/main.c (main): Initialize the macro table.
11728
117292001-08-25 Robert Anisko <robert.anisko@epita.fr>
11730
11731 * src/lex.c (percent_table): Add tok_define.
11732 * src/lex.h: Add tok_define.
11733
117342001-08-25 Robert Anisko <robert.anisko@epita.fr>
11735
11736 * src/macrotab.c: New file.
11737 * src/macrotab.h: New file.
11738 * src/Makefile.am: Update.
11739
117402001-08-25 Robert Anisko <robert.anisko@epita.fr>
11741
11742 * lib/hash.c: New file.
11743 * lib/hash.h: New file.
11744 * lib/Makefile.am: Update.
11745
117462001-08-15 Akim Demaille <akim@epita.fr>
11747
11748 Version 1.28c.
11749
117502001-08-15 Marc Autret <autret_m@epita.fr>
11751
11752 * src/reader.c (readgram): Indent output macro YYSTYPE.
11753 (packsymbols): Likewise.
11754 (output_token_defines): Likewise.
11755 * src/files.c: Standardize.
11756 (compute_header_macro): New.
11757 (defines_obstack_save): New. Use compute_header_macro.
11758 (output_files): Update. Use defines_obstack_save.
11759
117602001-08-15 Akim Demaille <akim@epita.fr>
11761
11762 * doc/bison.texinfo (Table of Symbols): Document
11763 YYSTACK_USE_ALLOCA.
11764
117652001-08-15 Akim Demaille <akim@epita.fr>
11766
11767 * missing: Update from CVS Automake.
11768 * config/config.guess, config/config.sub, config/texinfo.tex:
11769 Update from gnu.org.
11770
117712001-08-15 Akim Demaille <akim@epita.fr>
11772
11773 * Makefile.maint: Sync with CVS Autoconf.
11774
117752001-08-14 Pascal Bart <pascal.bart@epita.fr>
11776
11777 * doc/bison.texinfo: Include GNU Free Documentation License from
11778 `fdl.texi'.
11779 * doc/fdl.texi: Add to package.
11780
117812001-08-14 Marc Autret <autret_m@epita.fr>
11782
11783 Turn on %{source,header}_extension features.
11784
11785 * src/lex.c (percent_table): Un-CPP out header_extension and
11786 source_extension.
11787 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
11788 (compute_exts_from_src): Remove conditions. It restores priorities
11789 between options.
11790
117912001-08-14 Marc Autret <autret_m@epita.fr>
11792
11793 * src/files.c (compute_base_names): Add extensions computing when
11794 `--file-prefix' used.
11795 Standardize function calls.
11796
117972001-08-13 Marc Autret <autret_m@epita.fr>
11798
11799 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
11800 defining it (defined but null disables alloca).
11801
118022001-08-13 Marc Autret <autret_m@epita.fr>
11803
11804 * src/bison.simple (_yy_memcpy): CPP reformat.
11805
118062001-08-13 Pascal Bart <pascal.bart@epita.fr>
11807
11808 * tests/atconfig.in (CPPFLAGS): Fix.
11809
118102001-08-10 Pascal Bart <pascal.bart@epita.fr>
11811
11812 * doc/bison.texinfo: Include GNU General Public License from
11813 `gpl.texi'.
11814 * doc/gpl.texi: Add to package.
11815
118162001-08-10 Marc Autret <autret_m@epita.fr>
11817
11818 * src/print_graph.h: Fix.
11819 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
11820
118212001-08-10 Akim Demaille <akim@epita.fr>
11822
11823 * src/system.h: Provide default declarations for stpcpy, strndup,
11824 and strnlen.
11825
118262001-08-10 Robert Anisko <anisko_r@epita.fr>
11827
11828 * doc/bison.texinfo (Locations): Update @$ stuff.
11829
118302001-08-09 Robert Anisko <anisko_r@epita.fr>
11831
11832 * src/bison.simple (YYLLOC_DEFAULT): Update.
11833 (yyparse): Adjust.
11834
118352001-08-08 Marc Autret <autret_m@epita.fr>
11836
11837 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
11838 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
11839 Reported by Fabrice Bauzac.
11840
118412001-08-08 Marc Autret <autret_m@epita.fr>
11842
11843 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
11844 * src/vcg.c (output_node): Fix.
11845 * src/vcg.h: Cleanup.
11846 * src/print_graph.c: Add comments.
11847 (node_output_size): New global variable. Simplify the formatting of
11848 the VCG graph output.
11849 (print_actions): Unused code is now used. It notifies the final state
11850 and no action states in the VCG graph. It also give the reduce actions.
11851 The `shift and goto' edges are red and the `go to state' edges are
11852 blue.
11853 Get the current node name and node_obstack by argument.
11854 (node_obstack): New variable.
11855 (print_state): Manage node_obstack.
11856 (print_core): Use node_obstack given by argument.
11857 A node is not only computed here but in print_actions also.
11858 (print_graph): CPP out useless code instead of commenting it.
11859
118602001-08-07 Pascal Bart <pascal.bart@epita.fr>
11861
11862 * tests/atconfig.in (CPPFLAGS): Fix.
11863
118642001-08-07 Akim Demaille <akim@epita.fr>
11865
11866 * src/print_graph.c (quote): New.
11867 (print_core): Use it.
11868
118692001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
11870
11871 * src/vcg.c (complain.h): Include it.
11872 Unepitaize `return' invocations.
11873 [NDEBUG] (main): Remove.
11874 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
11875 * src/files.c (open_files): Initialize graph_obstack.
11876 * src/print_graph.c (print_actions): CPP out useless code.
11877 (print_core): Don't output the last `\n' in labels.
11878 Use `quote'.
11879 * src/files.c (output_files): Output the VCG file.
11880 * src/main.c (main): Invoke print_graph ();
11881
118822001-08-06 Marc Autret <autret_m@epita.fr>
11883
11884 Automaton VCG graph output.
11885 Using option ``-g'' or long option ``--graph'', you can generate
11886 a gram_filename.vcg file containing a VCG description of the LALR (1)
11887 automaton of your grammar.
11888
11889 * src/main.c: Call to print_graph() function.
11890 * src/getargs.h: Update.
11891 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
11892 (graph_flag): New flag.
11893 (longopts): Update.
11894 (getargs): Add case `g'.
11895 * src/files.c (graph_obstack): New obstack struct.
11896 (open_files): Initialize new obstack.
11897 (output_files): Saves graph_obstack if required.
11898 * src/files.h (graph_obstack): New extern declaration.
11899 * src/Makefile.am: Add new source files.
11900
119012001-08-06 Marc Autret <autret_m@epita.fr>
11902
11903 * src/print_graph.c, src/print_graph.h (graph): New.
11904 * src/vcg.h: New file.
11905 * src/vcg.c: New file, VCG graph handling.
11906
119072001-08-06 Marc Autret <autret_m@epita.fr>
11908
11909 Add of %source_extension and %header_extension which specify
11910 the source or/and the header output file extension.
11911
11912 * src/files.c (compute_base_names): Remove initialisation of
11913 src_extension and header_extension.
11914 (compute_exts_from_gf): Update.
11915 (compute_exts_from_src): Update.
11916 (output_files): Update.
11917 * src/reader.c (parse_header_extension_decl): New.
11918 (parse_source_extension_decl): New.
11919 (read_declarations): New case statements for the new tokens.
11920 * src/lex.c (percent_table): Add entries for %source_extension
11921 and %header_extension.
11922 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
11923
119242001-08-06 Marc Autret <autret_m@epita.fr>
11925
11926 * configure.in: Bump to 1.28c.
11927 * doc/bison.texinfo: Texinfo thingies.
11928
119292001-08-04 Pascal Bart <pascal.bart@epita.fr>
11930
11931 * tests/atconfig.in (CPPFLAGS): Add.
11932 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
11933
119342001-08-03 Akim Demaille <akim@epita.fr>
11935
11936 Version 1.28b.
11937
119382001-08-03 Akim Demaille <akim@epita.fr>
11939
11940 * tests/Makefile.am (check-local): Ship testsuite.
11941 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
11942 Include `string.h'.
11943
119442001-08-03 Akim Demaille <akim@epita.fr>
11945
11946 * configure.in: Try using -Wformat when compiling.
11947
119482001-08-03 Akim Demaille <akim@epita.fr>
11949
11950 * configure.in: Bump to 1.28b.
11951
119522001-08-03 Akim Demaille <akim@epita.fr>
11953
11954 * src/complain.c: Adjust strerror_r portability issues.
11955
119562001-08-03 Akim Demaille <akim@epita.fr>
11957
11958 Version 1.28a.
11959
119602001-08-03 Akim Demaille <akim@epita.fr>
11961
11962 * src/getargs.c, src/getarg.h (skeleton)): Constify.
11963 * src/lex.c (literalchar): Avoid name clashes on `buf'.
11964 * src/getargs.c: Include complain.h.
11965 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
11966 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
11967
119682001-08-03 Akim Demaille <akim@epita.fr>
11969
11970 * src/reader.c (readgram): Display hidden chars in error messages.
11971
119722001-08-03 Akim Demaille <akim@epita.fr>
11973
11974 Update to gettext 0.10.39.
11975
119762001-08-03 Akim Demaille <akim@epita.fr>
11977
11978 * lib/strspn.c: New.
11979
119802001-08-01 Marc Autret <autret_m@epita.fr>
11981
11982 * doc/bison.texinfo: Update.
11983 * doc/bison.1 (mandoc): Update.
11984 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
11985 * src/files.c: Support output files extensions computing.
11986 (src_extension): New static variable.
11987 (header_extension): New static variable.
11988 (tr): New function.
11989 (get_extension_index): New function, gets the index of an extension
11990 filename in a string.
11991 (compute_exts_from_gf): New function, computes extensions from the
11992 grammar file extension.
11993 (compute_exts_from_src): New functions, computes extensions from the
11994 C source file extension, file given by ``-o'' option.
11995 (compute_base_names): Update.
11996 (output_files): Update.
11997
119982001-08-01 Robert Anisko <anisko_r@epita.fr>
11999
12000 * doc/bison.texi: Document @$.
12001 (Locations): New section.
12002
120032001-07-18 Akim Demaille <akim@epita.fr>
12004
12005 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
12006 * config/prev-version.txt, config/move-if-change: New.
12007 * Makefile.am: Adjust.
12008
120092001-07-08 Pascal Bart <pascal.bart@epita.fr>
12010
12011 * src/bison.simple (yyparse): Suppress warning `comparaison
12012 between signed and unsigned'.
12013
120142001-07-05 Pascal Bart <pascal.bart@epita.fr>
12015
12016 * src/getargs.h (raw_flag): Remove.
12017 * src/getargs.c: Die on `-r'/`--raw'.
12018 * src/lex.c (parse_percent_token): Die on `%raw'.
12019 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
12020 * tests/calc.at: Suppress test with option `--raw'.
12021
120222001-07-14 Akim Demaille <akim@epita.fr>
12023
12024 * config/: New.
12025 * configure.in: Require Autoconf 2.50.
12026 Update to gettext 0.10.38.
12027
120282001-03-16 Akim Demaille <akim@epita.fr>
12029
12030 * doc/bison.texinfo: ANSIfy the examples.
12031
120322001-03-16 Akim Demaille <akim@epita.fr>
12033
12034 * getargs.c (skeleton): New variable.
12035 (longopts): --skeleton is a new option.
12036 (shortopts, getargs): -S is a new option.
12037 * getargs.h: Declare skeleton.
12038 * output.c (output_parser): Use it.
12039
120402001-03-16 Akim Demaille <akim@epita.fr>
12041
12042 * m4/strerror_r.m4: New.
12043 * m4/error.m4: Run AC_FUNC_STRERROR_R.
12044 * lib/error.h, lib/error.c: Update.
12045
120462001-03-16 Akim Demaille <akim@epita.fr>
12047
12048 * src/getargs.c (longopts): Clean up.
12049
120502001-02-21 Akim Demaille <akim@epita.fr>
12051
12052 * src/reader.c (gensym): `gensym_count' is your own.
12053 Use a static buf to create the symbol name, as token_buffer is no
12054 longer a buffer.
12055
120562001-02-08 Akim Demaille <akim@epita.fr>
12057
12058 * src/conflicts.c (conflict_report): Be sure not to append to res
12059 between two calls, which could happen if both first sprintf were
12060 skipped, but not the first cp += strlen.
12061
120622001-02-08 Akim Demaille <akim@epita.fr>
12063
12064 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
12065 New, from fileutils 4.0.37.
12066 * configure.in: Require Autoconf 2.49c. I took some time before
12067 making this decision. This is the only way out for portability
12068 issues in Bison, it would mean way too much duplicate effort to
12069 import in Bison features implemented in 2.49c since 2.13.
12070 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
12071
120722001-02-02 Akim Demaille <akim@epita.fr>
12073
12074 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
12075 * lib/xalloc.h, lib/xmalloc.c: Update.
12076
120772001-01-19 Akim Demaille <akim@epita.fr>
12078
12079 Get rid of the ad hoc handling of token_buffer in the scanner: use
12080 the obstacks.
12081
12082 * src/lex.c (token_obstack): New.
12083 (init_lex): Initialize it. No longer call...
12084 (grow_token_buffer): this. Remove it.
12085 Adjust all the places which used it to use the obstack.
12086
120872001-01-19 Akim Demaille <akim@epita.fr>
12088
12089 * src/lex.h: Rename all the tokens:
12090 s/\bENDFILE\b/tok_eof/g;
12091 s/\bIDENTIFIER\b/tok_identifier/g;
12092 etc.
12093 Let them be enums, not #define, to ease debugging.
12094 Adjust all the code.
12095
120962001-01-18 Akim Demaille <akim@epita.fr>
12097
12098 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
12099 * src/lex.c (maxtoken, grow_token_buffer): Static.
12100
121012001-01-18 Akim Demaille <akim@epita.fr>
12102
12103 Since we now use obstacks, more % directives can be enabled.
12104
12105 * src/lex.c (percent_table): Also accept `%yacc',
12106 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
12107 `%debug'.
12108 Handle the actions for `%semantic_parser' and `%pure_parser' here,
12109 instead of returning a token.
12110 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
12111 * src/reader.c (read_declarations): Adjust.
12112 * src/files.c (open_files): Don't call `compute_base_names', don't
12113 compute `attrsfile' since they depend upon data which might be
12114 *in* the input file now.
12115 (output_files): Do it here.
12116 * src/output.c (output_headers): Document the fact that this patch
12117 introduces a guaranteed SEGV for semantic parsers.
12118 * doc/bison.texinfo: Document them.
12119 * tests/suite.at: Exercise these %options.
12120
121212000-12-20 Akim Demaille <akim@epita.fr>
12122
12123 Also handle the output file (--verbose) with obstacks.
12124
12125 * files.c (foutput): Remove.
12126 (output_obstack): New.
12127 Adjust all dependencies.
12128 * src/conflicts.c: Return a string.
12129 * src/system.h (obstack_grow_string): Rename as...
12130 (obstack_sgrow): this. Be ready to work with non literals.
12131 (obstack_fgrow4): New.
12132
121332000-12-20 Akim Demaille <akim@epita.fr>
12134
12135 * src/files.c (open_files): Fix the computation of short_base_name
12136 in the case of `-o foo.tab.c'.
12137
121382000-12-20 Akim Demaille <akim@epita.fr>
12139
12140 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
12141 (copy_dollar): Now that everything uses obstacks, get rid of the
12142 FILE * parameters.
12143
121442000-12-20 Akim Demaille <akim@epita.fr>
12145
12146 * src/files.c (open_files): Actually the `.output' file is based
12147 on the short_base_name, not base_name.
12148 * tests/suite.at (Checking output file names): Adjust.
12149
121502000-12-20 Akim Demaille <akim@epita.fr>
12151
12152 * src/bison.s1: Remove, we now use directly...
12153 * src/bison.simple: this.
12154 * src/Makefile.am: Use pkgdata instead of data.
12155
121562000-12-20 Akim Demaille <akim@epita.fr>
12157
12158 * src/files.c (guard_obstack): New.
12159 (open_files): Initialize it.
12160 (output_files): Dump it...
12161 * src/files.h: Export it.
12162 * src/reader.c (copy_guard): Use it.
12163
121642000-12-19 Akim Demaille <akim@epita.fr>
12165
12166 * src/files.c (outfile, defsfile, actfile): Removed as global
12167 vars.
12168 (open_files): Don't compute them.
12169 (output_files): Adjust.
12170 (base_name, short_base_name): Be global.
12171 Adjust dependencies.
12172
121732000-12-19 Akim Demaille <akim@epita.fr>
12174
12175 * src/files.c (strsuffix): New.
12176 (stringappend): Be just like strcat but allocate.
12177 (base_names): Eve out from open_files.
12178 Try to simplify the rather hairy computation of base_name and
12179 short_base_name.
12180 (open_files): Use it.
12181 * tests/suite.at (Checking output file names): New test.
12182
121832000-12-19 Akim Demaille <akim@epita.fr>
12184
12185 * src/system.h (obstack_grow_literal_string): Rename as...
12186 (obstack_grow_string): this.
12187 * src/output.c (output_parser): Recognize `%% actions' instead of
12188 `$'.
12189 * src/bison.s1: s/$/%% actions/.
12190 * src/bison.hairy: Likewise.
12191
121922000-12-19 Akim Demaille <akim@epita.fr>
12193
12194 * src/output.c (output_parser): Compute the `#line' lines when
12195 there are.
12196 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
12197 Suggested by Hans Aberg.
12198
121992000-12-19 Akim Demaille <akim@epita.fr>
12200
12201 Let the handling of the skeleton files be local to the procedures
12202 that use it.
12203
12204 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
12205 longer static.
12206 (fparser, open_extra_files): Remove.
12207 (open_files, output_files): Don't take care of fparser.
12208 * src/files.h: Adjust.
12209 * src/output.c (output_parser): Open and close the file to the
12210 skeleton.
12211 * src/reader.c (read_declarations): When %semantic_parser, open
12212 fguard.
12213
122142000-12-19 Akim Demaille <akim@epita.fr>
12215
12216 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
12217 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
12218
122192000-12-19 Akim Demaille <akim@epita.fr>
12220
12221 * src/files.c (open_files): Yipee! We no longer need all the code
12222 looking for `/tmp' since we have no tmp file.
12223
122242000-12-19 Akim Demaille <akim@epita.fr>
12225
12226 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
12227 New macros.
12228 * src/files.c (open_files): Less dependency on MSDOS etc.
12229
122302000-12-14 Akim Demaille <akim@epita.fr>
12231
12232 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
12233 Provide a default definition.
12234 Use it when executing the default @ action.
12235 * src/reader.c (reader_output_yylsp): No longer include
12236 `timestamp' and `text' in the default YYLTYPE.
12237
122382000-12-12 Akim Demaille <akim@epita.fr>
12239
12240 * src/reader.c (copy_definition, parse_union_decl, copy_action)
12241 (copy_guard): Quote the file names.
12242 Reported by Laurent Mascherpa.
12243
122442000-12-12 Akim Demaille <akim@epita.fr>
12245
12246 * src/output.c (output_headers, output_program, output): Be sure
12247 to escape special characters when outputting filenames.
12248 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
12249 (output_headers): Don't depend on them, Use ACTSTR.
12250
122512000-11-17 Akim Demaille <akim@epita.fr>
12252
12253 * lib/obstack.h: Formatting changes.
12254 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
12255 prevents type checking.
12256 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
12257 cast the value to (void *): assigning a `foo *' to a `void *'
12258 variable is valid.
12259 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
12260 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
12261 append characters.
12262
122632000-11-17 Akim Demaille <akim@epita.fr>
12264
12265 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
12266 as...
12267 (suite.m4, regression.m4, calc.m4): these.
12268 * tests/atgeneral.m4: Update from CVS Autoconf.
12269
122702000-11-17 Akim Demaille <akim@epita.fr>
12271
12272 * tests/regression.m4 (%union and --defines): New test,
12273 demonstrating a current bug in the obstack implementation.
12274
122752000-11-17 Akim Demaille <akim@epita.fr>
12276
12277 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
12278 macros.
12279 Use them to declare the variables which are global or local to
12280 `yyparse'.
12281
122822000-11-17 Akim Demaille <akim@epita.fr>
12283
12284 * acconfig.h: Remove, no longer used.
12285
122862000-11-07 Akim Demaille <akim@epita.fr>
12287
12288 * src: s/Copyright (C)/Copyright/g.
12289
122902000-11-07 Akim Demaille <akim@epita.fr>
12291
12292 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
12293 defining.
12294 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
12295
122962000-11-07 Akim Demaille <akim@epita.fr>
12297
12298 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
12299 Merge in a single CPP if/else.
12300
123012000-11-07 Akim Demaille <akim@epita.fr>
12302
12303 * src/output.c (output): Remove useless variables.
12304 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
12305 argument `data' for consistency with the prototypes.
12306 Qualify it `const'.
12307 (obstack_copy, obstack_copy0): Rename the second argument as
12308 `address' for consistency. Qualify it `const'.
12309 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
12310 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
12311 `const' their input argument (`data' or `address').
12312 Adjust the corresponding macros to include `const' in casts.
12313
123142000-11-03 Akim Demaille <akim@epita.fr>
12315
12316 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
12317 s/PFILE1/BISON_HAIRY/.
12318 Adjust dependencies.
12319
123202000-11-03 Akim Demaille <akim@epita.fr>
12321
12322 For some reason, this was not applied.
12323
12324 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12325 `unlink': it's no longer used.
12326
123272000-11-03 Akim Demaille <akim@epita.fr>
12328
12329 * src/files.c (skeleton_find): New function, eved out of...
12330 (open_files, open_extra_files): here.
12331
123322000-11-03 Akim Demaille <akim@epita.fr>
12333
12334 Don't use `atexit'.
12335
12336 * src/files.c (obstack_save): New function.
12337 (done): Rename as...
12338 (output_files): this.
12339 Use `obstack_save'.
12340 * src/main.c (main): Don't use `atexit' to register `done', since
12341 it no longer has to remove tmp files, just call `output_files'
12342 when there are no errors.
12343
123442000-11-02 Akim Demaille <akim@epita.fr>
12345
12346 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12347 `unlink': it's no longer used.
12348 * src/files.h: Formatting changes.
12349
123502000-11-02 Akim Demaille <akim@epita.fr>
12351
12352 Remove the last uses of mktemp and unlink/delete.
12353
12354 * src/files.c (fdefines, ftable): Removed.
12355 (defines_ostack, table_obstack): New.
12356 Adjust dependencies of the former into uses of the latter.
12357 * src/output.c (output_short_or_char_table, output_short_table):
12358 Convert to using obstacks.
12359 * src/reader.c (copy_comment2): Accept one FILE * and two
12360 obstacks.
12361 (output_token_defines, reader_output_yylsp): Use obstacks.
12362 * src/system.h (obstack_fgrow3): New.
12363 * po/POTFILES.in: Adjust.
12364
123652000-11-01 Akim Demaille <akim@epita.fr>
12366
12367 Change each use of `fattrs' into a use of `attrs_obstack'.
12368
12369 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
12370 * src/files.c (fattrs): Remove.
12371 (attrs_obstack): New.
12372 Adjust all dependencies.
12373 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
12374
123752000-11-01 Akim Demaille <akim@epita.fr>
12376
12377 Introduce obstacks.
12378 Change each use of `faction' into a use of `action_obstack'.
12379
12380 * lib/obstack.h, lib/obstack.c: New files.
12381 * src/files.c (faction): Remove.
12382 (action_obstack): New.
12383 Adjust all dependencies.
12384
123852000-10-20 Akim Demaille <akim@epita.fr>
12386
12387 * lib/quote.h (PARAMS): New macro. Use it.
12388
123892000-10-16 Akim Demaille <akim@epita.fr>
12390
12391 * src/output.c (output_short_or_char_table): New function.
12392 (output_short_table, output_token_translations): Use it.
12393 (goto_actions): Use output_short_table.
12394
123952000-10-16 Akim Demaille <akim@epita.fr>
12396
12397 * src/symtab.c (bucket_new): New function.
12398 (getsym): Use it.
12399
12400 * src/output.c (output_short_table): New argument to display the
12401 comment associated with the table.
12402 Adjust dependencies.
12403 (output_gram): Use it.
12404 (output_rule_data): Nicer output layout for YYTNAME.
12405
124062000-10-16 Akim Demaille <akim@epita.fr>
12407
12408 * src/lex.c (read_typename): New function.
12409 (lex): Use it.
12410 * src/reader.c (copy_dollar): Likewise.
12411
124122000-10-16 Akim Demaille <akim@epita.fr>
12413
12414 * src/reader.c (copy_comment2): Expect the input stream to be on
12415 the `/' which is suspected to open a comment, instead of being
12416 called after `//' or `/*' was read.
12417 (copy_comment, copy_definition, parse_union_decl, copy_action)
12418 (copy_guard): Adjust.
12419
124202000-10-16 Akim Demaille <akim@epita.fr>
12421
12422 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
12423 `read_signed_integer'.
12424
124252000-10-16 Akim Demaille <akim@epita.fr>
12426
12427 * src/reader.c (copy_dollar): New function.
12428 (copy_guard, copy_action): Use it.
12429
124302000-10-16 Akim Demaille <akim@epita.fr>
12431
12432 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
12433 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
12434 New files, from Fileutils 4.0.27.
12435 * src/main.c (printable_version): Remove.
12436 * src/lex.c, src/reader.c: Use `quote'.
12437
124382000-10-04 Akim Demaille <akim@epita.fr>
12439
12440 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
12441
124422000-10-04 Akim Demaille <akim@epita.fr>
12443
12444 * doc/bison.texinfo: Various typos spotted by Neil Booth.
12445
124462000-10-04 Akim Demaille <akim@epita.fr>
12447
12448 When a literal string is used to define two different tokens,
12449 `bison -v' segfaults.
12450 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
12451
12452 * tests/regression.m4: New file.
12453 Include the core of the sample provided by Piotr Gackiewicz.
12454 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
12455 properly.
12456
124572000-10-04 Akim Demaille <akim@epita.fr>
12458
12459 * src/reader.c (parse_expect_decl): Keep `count' within the size
12460 of `buffer'.
12461 From Neil Booth.
12462
124632000-10-02 Paul Eggert <eggert@twinsun.com>
12464
12465 * bison.s1 (yyparse): Assign the default value
12466 unconditionally, to avoid a GCC warning and make the parser a
12467 tad smaller.
12468
124692000-10-02 Akim Demaille <akim@epita.fr>
12470
12471 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
12472 options.
12473
124742000-10-02 Akim Demaille <akim@epita.fr>
12475
12476 * src/derives.c, src/print.c, src/reduce.c: To ease the
12477 translation, move some `\n' out of the translated strings.
12478
124792000-10-02 Akim Demaille <akim@epita.fr>
12480
12481 The location tracking mechanism is precious for parse error
12482 messages. Nevertheless, it is enabled only when `@n' is used in
12483 the grammar, which is a different issue (you can use it in error
12484 message, but not in the grammar per se). Therefore, there should
12485 be another means to enable it.
12486
12487 * src/getargs.c (getargs): Support `--locations'.
12488 (usage): Report it.
12489 * src/getargs.h (locationsflag): Export it.
12490 * src/lex.c (percent_table): Support `%locations'.
12491 * src/reader.c (yylsp_needed): Remove this variable, now replaced
12492 with `locationsflag'.
12493 * doc/bison.texinfo: Document `--locations' and `%locations'.
12494 Sort the options.
12495 * tests/calc.m4: Test it.
12496
12497 For regularity of the names, replace each
12498 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
12499 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
12500 In addition replace each `flag' with `_flag'.
12501
125022000-10-02 Akim Demaille <akim@epita.fr>
12503
12504 Also test parse error messages, including with YYERROR_VERBOSE.
12505
12506 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
12507 associative).
12508 Use it to check the computations.
12509 Use it to check `nonassoc' is honored.
12510 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
12511 `--yyerror-verbose'.
12512 (_AT_CHECK_CALC): Adjust to this option.
12513 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
12514
125152000-10-02 Akim Demaille <akim@epita.fr>
12516
12517 Test also `--verbose', `--defines' and `--name-prefix'. Testing
12518 the latter demonstrates a flaw in the handling of non debugging
12519 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
12520 was used in order to simplify:
12521
12522 #if YYDEBUG
12523 if (yydebug)
12524 {
12525 ...
12526 }
12527 #endif
12528
12529 into
12530
12531 if (yydebug)
12532 {
12533 ...
12534 }
12535
12536 unfortunately this leads to a CPP conflict when
12537 `--name-prefix=foo' is used since it produces `#define yydebug
12538 foodebug'.
12539
12540 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
12541 (YYDPRINTF): New macro.
12542 Spread its use.
12543 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
12544 the bison options.
12545 Also test `--verbose', `--defines' and `--name-prefix'.
12546
125472000-10-02 Akim Demaille <akim@epita.fr>
12548
12549 Improve the readability of the produced parsers.
12550
12551 * src/bison.s1: Formatting changes.
12552 Improve the comment related to the `$' mark.
12553 (yydefault): Don't fall through to `yyresume': `goto' there.
12554 * src/output.c (output_parser): When the `$' is met, skip the end
12555 of its line.
12556 New variable, `number_of_dollar_signs', to check there's exactly
12557 one `$' in the parser skeleton.
12558
125592000-10-02 Akim Demaille <akim@epita.fr>
12560
12561 * lib/xstrdup.c: New file, from the fileutils.
12562 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
12563 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
12564 instead of strlen + xmalloc + strcpy.
12565 * src/symtab.c (copys): Remove, use xstrdup instead.
12566
125672000-10-02 Akim Demaille <akim@epita.fr>
12568
12569 * src/gram.h (associativity): New enum type which replaces the
12570 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
12571 `right_assoc', `left_assoc' and `non_assoc'.
12572 Adjust all dependencies.
12573 * src/reader.c: Formatting changes.
12574 (LTYPESTR): Don't define it, use it as a literal in
12575 `reader_output_yylsp'.
12576 * src/symtab.h (symbol_class): New enum type which replaces the
12577 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
12578 `sunknown', `stoken and `snterm'.
12579
125802000-10-02 Akim Demaille <akim@epita.fr>
12581
12582 * src/getargs.c (fixed_outfiles): Rename as...
12583 (yaccflag): for consistency and accuracy.
12584 Adjust dependencies.
12585
125862000-10-02 Akim Demaille <akim@epita.fr>
12587
12588 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
12589 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
12590 difficult and introduced a lot of core dump. It turns out that
12591 Bison used an implementation of `xmalloc' based on `calloc', and
12592 at various places it does depend upon the initialization to 0. I
12593 have not tried to isolate the pertinent places, and all the former
12594 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
12595 someone should address this issue.
12596
12597 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
12598 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
12599 files.
12600 Adjust dependencies.
12601 * src/warshall.h: New file.
12602 Propagate.
12603
126042000-10-02 Akim Demaille <akim@epita.fr>
12605
12606 Various anti-`extern in *.c' changes.
12607
12608 * src/system.h: Include `assert.h'.
12609
126102000-10-02 Akim Demaille <akim@epita.fr>
12611
12612 * src/state.h (nstates, final_state, first_state, first_shift)
12613 (first_reduction): Move their exportation from here...
12614 * src/LR0.h: to here.
12615 Adjust dependencies.
12616 * src/getargs.c (statisticsflag): New variable.
12617 Add support for `--statistics'.
12618 Adjust dependencies.
12619
12620 Remove a lot of now useless `extern' statements in most files.
12621
126222000-10-02 Akim Demaille <akim@epita.fr>
12623
12624 * src/LR0.h: New file.
12625 Propagate its use.
12626
126272000-10-02 Akim Demaille <akim@epita.fr>
12628
12629 * src/print.h: New file.
12630 Propagate its use.
12631 * src/print.c: Formatting and ordering changes.
12632 (verbose, terse): Replace with...
12633 (print_results): this new function.
12634 Adjust dependencies.
12635
126362000-10-02 Akim Demaille <akim@epita.fr>
12637
12638 * src/conflicts.c (conflict_report): New function.
12639 (conflict_log, verbose_conflict_log): Replace with...
12640 (print_conflicts): this function.
12641 Adjust dependencies.
12642 * src/conflicts.h: New file.
12643 Propagate its inclusion.
12644
126452000-10-02 Akim Demaille <akim@epita.fr>
12646
12647 * src/nullable.h: New file.
12648 Propagate its inclusion.
12649 * src/nullable.c: Formatting changes.
12650
126512000-10-02 Akim Demaille <akim@epita.fr>
12652
12653 * src/reduce.h: New file.
12654 Propagate its inclusion.
12655 * src/reduce.c: Topological sort and other formatting changes.
12656 (bool, TRUE, FALSE): Move their definition to...
12657 * src/system.h: here.
12658
126592000-10-02 Akim Demaille <akim@epita.fr>
12660
12661 * src/files.c: Formatting changes.
12662 (tryopen, tryclose, openfiles): Rename as...
12663 (xfopen, xfclose, open_files): this.
12664 (stringappend): static.
12665 * src/files.h: Complete the list of exported symbols.
12666 Propagate its use.
12667
126682000-10-02 Akim Demaille <akim@epita.fr>
12669
12670 * src/reader.h: New file.
12671 Propagate its use instead of tedious list of `extern' and
12672 prototypes.
12673 * src/reader.c: Formatting changes, topological sort,
12674 s/register//.
12675
126762000-10-02 Akim Demaille <akim@epita.fr>
12677
12678 * src/lex.h: Prototype `lex.c' exported functions.
12679 * src/reader.c: Adjust.
12680 * src/lex.c: Formatting changes.
12681 (safegetc): Rename as...
12682 (xgetc): this.
12683
126842000-10-02 Akim Demaille <akim@epita.fr>
12685
12686 * src/lalr.h: New file.
12687 Propagate its inclusion instead of prototypes and `extern'.
12688 * src/lalr.c: Formatting changes, topological sorting etc.
12689
126902000-10-02 Akim Demaille <akim@epita.fr>
12691
12692 * src/output.c (token_actions): Introduce a temporary array,
12693 YYDEFACT, that makes it possible for this function to use
12694 output_short_table.
12695
126962000-10-02 Akim Demaille <akim@epita.fr>
12697
12698 `user_toknums' is output as a `short[]' in `output.c', while it is
12699 defined as a `int[]' in `reader.c'. For consistency with the
12700 other output tables, `user_toknums' is now defined as a table of
12701 shorts.
12702
12703 * src/reader.c (user_toknums): Be a short table instead of an int
12704 table.
12705 Adjust dependencies.
12706
12707 Factor the short table outputs.
12708
12709 * src/output.c (output_short_table): New function.
12710 * src/output.c (output_gram, output_stos, output_rule_data)
12711 (output_base, output_table, output_check): Use it.
12712
127132000-10-02 Akim Demaille <akim@epita.fr>
12714
12715 * src/output.c (output): Topological sort of the functions, in
12716 order to get rid of the `static' prototypes.
12717 No longer use `register'.
12718 * src/output.h: New file.
12719 Propagate its inclusion in files explicitly prototyping functions
12720 from output.c.
12721
127222000-09-21 Akim Demaille <akim@epita.fr>
12723
12724 * src/atgeneral.m4: Update from Autoconf.
12725
127262000-09-21 Akim Demaille <akim@epita.fr>
12727
12728 * src/closure.h: New file.
12729 * src/closure.c: Formatting changes, topological sort over the
12730 functions, use of closure.h.
12731 (initialize_closure, finalize_closure): Rename as...
12732 (new_closure, free_closure): these. Adjust dependencies.
12733 * src/LR0.c: Formatting changes, topological sort, use of
12734 cloture.h.
12735 (initialize_states): Rename as...
12736 (new_states): this.
12737 * src/Makefile.am (noinst_HEADERS): Adjust.
12738
127392000-09-20 Akim Demaille <akim@epita.fr>
12740
12741 * src/acconfig.h: Don't protect config.h against multiple
12742 inclusion.
12743 Don't define PARAMS.
12744 * src/system.h: Define PARAMS.
12745 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
12746 purpose of config.h. system.h must not try to fix wrong
12747 definitions in config.h.
12748
127492000-09-20 Akim Demaille <akim@epita.fr>
12750
12751 * src/derives.h: New file.
12752 * src/main.c, src/derives.h: Use it.
12753 Formatting changes.
12754 * src/Makefile.am (noinst_HEADERS): Adjust.
12755
127562000-09-20 Akim Demaille <akim@epita.fr>
12757
12758 * tests/atgeneral.m4: Update from Autoconf.
12759 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
12760 (AT_CHECK_CALC): New macros.
12761 Use these macros to test bison with options `', `--raw',
12762 `--debug', `--yacc', `--yacc --debug'.
12763
127642000-09-19 Akim Demaille <akim@epita.fr>
12765
12766 * src/output.c: Formatting changes.
12767 * src/machine.h: Remove, leaving its contents in...
12768 * src/system.h: here.
12769 Include stdio.h.
12770 Adjust all dependencies on stdio.h and machine.h.
12771 * src/getargs.h: New file.
12772 Let all `extern' declarations about getargs.c be replaced with
12773 inclusion of `getargs.h'.
12774 * src/Makefile.am (noinst_HEADERS): Adjust.
12775
12776 * tests/calc.m4 (yyin): Be initialized in main, not on the global
12777 scope.
12778 (yyerror): Returns void, not int.
12779 * doc/bison.texinfo: Formatting changes.
12780
127812000-09-19 Akim Demaille <akim@epita.fr>
12782
12783 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
12784 portable.
12785
127862000-09-18 Akim Demaille <akim@epita.fr>
12787
12788 * configure.in: Append WARNING_CFLAGS to CFLAGS.
12789 * src/Makefile.am (INCLUDES): Don't.
12790 Be ready to fetch headers in lib/.
12791
127922000-09-18 Akim Demaille <akim@epita.fr>
12793
12794 * doc/bison.texinfo: Update the copyright.
12795 ANSIfy and GNUify the examples.
12796 Remove the old menu.
12797
127982000-09-18 Akim Demaille <akim@epita.fr>
12799
12800 First set of tests: use the `calc' example from the documentation.
12801
12802 * src/bison.s1 (yyparse): Condition the code using `yytname' which
12803 is defined only when YYDEBUG is.
12804 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
12805 * src/files.c (tryopen, tryclose): Formatting changes.
12806 Move to the top and be static.
12807 * src/reader.c (read_signed_integer): Likewise.
12808 * tests/calc.m4: New file.
12809 * Makefile.am, suite.m4: Adjust.
12810 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
12811
128122000-09-18 Akim Demaille <akim@epita.fr>
12813
12814 Add support for an Autotest test suite for Bison.
12815
12816 * m4/m4.m4, m4/atconfig.m4: New files.
12817 * m4/Makefile.am (EXTRA_DIST): Adjust.
12818 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
12819 files.
12820 * src/getargs.c: Display a more standard --version message.
12821 * src/reader.c (reader): Formatting changes.
12822 No longer depend upon VERSION_STRING.
12823 * configure.in: No longer use `dnl'.
12824 Set up the test suite and the new directory `tests/.
12825 (VERSION_STRING): Remove.
12826
128272000-04-14 Akim Demaille <akim@epita.fr>
12828
12829 * src/reader.c (copy_comment2): New function, same as former
12830 `copy_comment', but outputs into two FILE *.
12831 (copy_comment): Use it.
12832 (parse_union_decl): Use it.
12833 (get_type, parse_start_decl): Use the same `invalid' message.
12834 (parse_start_decl, parse_union_decl): Use the same `multiple'
12835 message.
12836 (parse_union_decl, copy_guard, copy_action): Use the same
12837 `unmatched' message.
12838 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
12839
128402000-03-31 Akim Demaille <akim@epita.fr>
12841
12842 * src/files.c (tryopen, tryclose): Move to the top.
12843 Be static.
12844
128452000-03-31 Akim Demaille <akim@epita.fr>
12846
12847 * src/main.c (main): Don't call `done', exit does it.
12848
128492000-03-31 Akim Demaille <akim@epita.fr>
12850
12851 * allocate.c: s/return (foo)/return foo/.
12852 * lalr.c: Likewise.
12853 * LR0.c: Likewise.
12854 * output.c: Likewise.
12855 * reader.c: Likewise.
12856 * symtab.c: Likewise.
12857 * vmsgetargs.c: Likewise.
12858
128592000-03-31 Akim Demaille <akim@epita.fr>
12860
12861 Clean up the error reporting functions.
12862
12863 * src/report.c: New file.
12864 * src/report.h: Likewise.
12865 * src/Makefile.am: Adjust.
12866 * m4/error.m4: New file.
12867 * m4/Makefile.am: Adjust.
12868 * configure.in (jm_PREREQ_ERROR): Call it.
12869 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
12870 Remove.
12871 (fatal, fatals): Remove. All callers use complain.c::fatal.
12872 (warn, warni, warns, warnss, warnss): Remove. All callers use
12873 complain.c::complain.
12874 (toomany): Remove, use fatal instead.
12875 * src/files.c (done): No argument, use complain_message_count.
12876 * src/main.c (main): Register `done' to `atexit'.
12877
12878 * src/getargs.c (usage): More `fputs', less `fprintf'.
12879
128802000-03-28 Akim Demaille <akim@epita.fr>
12881
12882 * lib/: New directory.
12883 * Makefile.am (SUBDIRS): Adjust.
12884 * configure.in: Adjust.
12885 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
12886 useless.
12887 * src/alloca.c: Moved to lib/.
12888 * src/getopt.c: Likewise.
12889 * src/getopt1.c: Likewise.
12890 * src/getopt.h: Likewise.
12891 * src/ansi2knr.c: Likewise.
12892 * src/ansi2knr.1: Likewise.
12893 * src/Makefile.am: Adjust.
12894 * lib/Makefile.am: New file.
12895
128962000-03-28 Akim Demaille <akim@epita.fr>
12897
12898 * src/getargs.c (usage): Refresh the help message.
12899
129002000-03-17 Akim Demaille <akim@epita.fr>
12901
12902 * src/getopt1.c: Updated from textutils 2.0e
12903 * src/getopt.c: Likewise.
12904 * src/getopt.h: Likewise.
12905
129062000-03-17 Akim Demaille <akim@epita.fr>
12907
12908 * src/Makefile.am (bison.simple): Fix the awk program: quote only
12909 the file name, not the whole `#line LINE FILE'.
12910
129112000-03-17 Akim Demaille <akim@epita.fr>
12912
12913 On syntax errors, report the token on which we choked.
12914
12915 * src/bison.s1 (yyparse): In the label yyerrlab, when
12916 YYERROR_VERBOSE, add yychar in msg.
12917
129182000-03-17 Akim Demaille <akim@epita.fr>
12919
12920 * src/reader.c (copy_at): New function.
12921 (copy_guard): Use it.
12922 (copy_action): Use it.
12923
129242000-03-17 Akim Demaille <akim@epita.fr>
12925
12926 Be kind to translators, save some useless translations.
12927
12928 * src/main.c (banner): New function.
12929 (fatal_banner): Use it.
12930 (warn_banner): Use it.
12931
129322000-03-17 Akim Demaille <akim@epita.fr>
12933
12934 * src/reader.c (copy_definition): Use copy_string and
12935 copy_comment. Removed now unused `match', `ended',
12936 `cplus_comment'.
12937 (copy_comment, copy_string): Moved, to be visible from
12938 copy_definition.
12939
129402000-03-17 Akim Demaille <akim@epita.fr>
12941
12942 * src/reader.c (copy_string): Declare `static inline'. No
12943 problems with inline, since it is checked by configure.
12944 (copy_comment): Likewise.
12945
129462000-03-17 Akim Demaille <akim@epita.fr>
12947
12948 * src/reader.c (packsymbols): Formatting changes.
12949
129502000-03-17 Akim Demaille <akim@epita.fr>
12951
12952 * src/reader.c (copy_comment): New function, factored out from:
12953 (copy_action): Use it. Removed now unused `match', `ended',
12954 `cplus_comment'.
12955 (copy_guard): Likewise.
12956
129572000-03-17 Akim Demaille <akim@epita.fr>
12958
12959 * src/reader.c (copy_string): New function, factored out from:
12960 (copy_action): Use it.
12961 (copy_guard): Likewise.
12962
129632000-03-17 Akim Demaille <akim@epita.fr>
12964
12965 Change the handling of @s so that they behave exactly like $s.
12966 There is now a pseudo variable @$ (readble and writable), location
12967 of the lhs of the rule (by default ranging from the location of
12968 the first symbol of the rhs, to the location of the last symbol,
12969 or, if the rhs is empty, YYLLOC).
12970
12971 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
12972 yyval.
12973 (yyparse): When providing a default semantic action, provide a
12974 default location action.
12975 (after the $): No longer change `*YYLSP', just stack YYLOC the
12976 same way you stack YYVAL.
12977 * src/reader.c (read_declarations): Use warns.
12978 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
12979 (copy_action, case '@'): Likewise.
12980 Use a standard error message, to save useless work from
12981 translators.
12982
129832000-03-17 Akim Demaille <akim@epita.fr>
12984
12985 * src/bison.s1: Formatting and cosmetics changes.
12986 * src/reader.c: Likewise.
12987 Update the Copyright notice.
12988
129892000-03-17 Akim Demaille <akim@epita.fr>
12990
12991 * src/bison.s1 (#line): All set to `#line' only, since the
12992 Makefile now handles them.
12993
129942000-03-16 Akim Demaille <akim@epita.fr>
12995
12996 * src/output.c (output_rule_data): Output the documentation of
12997 some of the tables.
12998 (Copyright notice): Update.
12999 Formatting changes.
13000
130012000-03-16 Akim Demaille <akim@epita.fr>
13002
13003 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
13004 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
13005 One `#if YYDEBUG' remains, since it uses variables which are
13006 defined only if `YYDEBUG != 0'.
13007
130082000-03-16 Akim Demaille <akim@epita.fr>
13009
13010 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
13011 and related variables so that the similarities are highlighted.
13012
130132000-03-16 Akim Demaille <akim@epita.fr>
13014
13015 * src/bison.s1: Properly indent CPP directives.
13016
130172000-03-16 Akim Demaille <akim@epita.fr>
13018
13019 * src/bison.s1: Properly indent the `alloca' CPP section.
13020
130212000-03-16 Akim Demaille <akim@epita.fr>
13022
13023 Do not hard code values of directories in `configure.in'.
13024 Update the `configure' tool chain.
13025
13026 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
13027 src/makefile.am.
13028 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
13029 (AC_OUTPUT): Add m4/Makefile.
13030 Bump to bison 1.28a, 1.29 has never been released.
13031 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
13032 handled via src/Makefile.am.
13033 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
13034 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
13035 autoheader.
13036 * Makefile.am (SUBDIRS): Add m4.
13037 (ACLOCAL_AM_FLAGS): New variable.
13038 (AUTOMAKE_OPTIONS): Add check-news.
13039 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
13040 the proper line number and file name.
13041 (DEFS): Propagate the location of bison library files and of the
13042 locale files.
13043 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
13044 builddir.
13045 * acinclude.m4: Remove, replaced by the directory m4.
13046 * m4/Makefile.am (EXTRA_DIST): New variable.
13047 * m4/gettext.m4: New file, from the fileutils.
13048 * m4/lcmessage.m4: Likewise
13049 * m4/progtest.m4: Likewise.
13050 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
13051
130522000-03-10 Akim Demaille <akim@epita.fr>
13053
13054 * src/closure.c:
13055 Formatting changes of various comments.
13056 Respect the GNU coding standards at various places.
13057 Don't use `_()' when no translation is needed.
13058
130591999-12-13 Jesse Thilo <jthilo@gnu.org>
13060
13061 * src/files.c:
13062 OS/2 honors TMPDIR environment variable.
13063
130641999-12-13 Jesse Thilo <jthilo@gnu.org>
13065
13066 * doc/bison.texinfo: Tweaked spelling and grammar.
13067 Updated ISBN.
13068 Removed reference to price of printed copy.
13069 Mention BISON_SIMPLE and BISON_HAIRY.
13070
130711999-12-13 Jesse Thilo <jthilo@gnu.org>
13072
13073 * configure.in, NEWS:
13074 Bison 1.29 released.
13075
130761999-10-27 Jesse Thilo <jthilo@gnu.org>
13077
13078 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
13079 Added reference card.
13080
130811999-07-26 Jesse Thilo <jthilo@gnu.org>
13082
13083 * po/ru.po: Added Russian translation.
13084
130851999-07-26 Jesse Thilo <jthilo@gnu.org>
13086
13087 * configure.in: Added Russian translation.
13088
130891999-07-06 Jesse Thilo <jthilo@gnu.org>
13090
13091 * configure.in, NEWS, README:
13092 Released version 1.28.
13093
130941999-06-14 Jesse Thilo <jthilo@gnu.org>
13095
13096 * src/system.h:
13097 Squashed redefinition warning on some systems.
13098
13099 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
13100 Have configure build version string instead of relying on ANSI string
13101 concatentation.
13102
131031999-06-14 Jesse Thilo <jthilo@gnu.org>
13104
13105 * po/POTFILES.in: Got rid of version.c.
13106
131071999-06-14 Jesse Thilo <jthilo@gnu.org>
13108
13109 * acconfig.h, configure.in:
13110 Have configure build version string instead of relying on ANSI string
13111 concatentation.
13112
131131999-06-08 Jesse Thilo <jthilo@gnu.org>
13114
13115 * doc/bison.1:
13116 Dropped mention of `+' for long-named options.
13117
131181999-05-30 Jesse Thilo <jthilo@gnu.org>
13119
13120 * src/files.c: Added <unistd.h> for unlink().
13121
13122 * src/Makefile.am, src/system.h:
13123 I18n fixes.
13124
131251999-05-30 Jesse Thilo <jthilo@gnu.org>
13126
13127 * README: Added a FAQ list.
13128
13129 * configure.in, acconfig.h:
13130 I18n fixes.
13131
131321999-05-30 Jesse Thilo <jthilo@gnu.org>
13133
13134 * doc/FAQ, doc/Makefile.am:
13135 Added a FAQ list.
13136
131371999-05-19 Jesse Thilo <jthilo@gnu.org>
13138
13139 * src/alloc.h, src/symtab.h, src/version.c:
13140 Protected inclusion of "config.h" with HAVE_CONFIG_H.
13141
131421999-04-18 Jesse Thilo <jthilo@gnu.org>
13143
13144 * src/.cvsignore, src/Makefile.am:
13145 Reorganized: sources in `src', documentation in `doc'.
13146
13147 * src/lex.c (literalchar):
13148 fixed the code for escaping double quotes (thanks
13149 Jonathan Czisny.)
13150
131511999-04-18 Jesse Thilo <jthilo@gnu.org>
13152
13153 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
13154 Adjusted paths to reflect directory reorganization.
13155
131561999-04-18 Jesse Thilo <jthilo@gnu.org>
13157
13158 * doc/.cvsignore, doc/Makefile.am:
13159 Reorganized: sources in `src', documentation in `doc'.
13160
131611999-04-18 Jesse Thilo <jthilo@gnu.org>
13162
13163 * configure.in:
13164 Updated AC_INIT file to reflect directory reorganization.
13165
13166 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
13167 Reorganized: sources in `src', documentation in `doc'.
13168
131691999-04-13 Jesse Thilo <jthilo@gnu.org>
13170
13171 * src/allocate.c:
13172 Don't declare calloc() and realloc() if not necessary.
13173
131741999-04-13 Jesse Thilo <jthilo@gnu.org>
13175
13176 * configure.in, acconfig.h, acinclude.m4:
13177 Don't declare calloc() and realloc() if not necessary.
13178
131791999-03-23 Jesse Thilo <jthilo@gnu.org>
13180
13181 * po/.cvsignore: Added i18n support.
13182
131831999-03-23 Jesse Thilo <jthilo@gnu.org>
13184
13185 * acconfig.h, configure.in, Makefile.am:
13186 Added i18n support.
13187
131881999-03-22 Jesse Thilo <jthilo@gnu.org>
13189
13190 * src/bison.s1: Fixed #line numbers.
13191
131921999-03-15 Jesse Thilo <jthilo@gnu.org>
13193
13194 * po/es.po, po/fr.po, po/nl.po, po/de.po:
13195 Added PO files from Translation Project.
13196
131971999-03-03 Jesse Thilo <jthilo@gnu.org>
13198
13199 * Makefile.am:
13200 Added support for non-ANSI compilers (ansi2knr).
13201
132021999-02-16 Jesse Thilo <jthilo@gnu.org>
13203
13204 * configure.in: Bumped version number to 1.27.
13205
13206 * Makefile.am:
13207 Added `bison.simple' to list of files removed by `make distclean'.
13208
132091999-02-12 Jesse Thilo <jthilo@gnu.org>
13210
13211 * src/files.c, src/files.h:
13212 Defined locations of parser files in config.h instead of Makefile.
13213
132141999-02-12 Jesse Thilo <jthilo@gnu.org>
13215
13216 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
13217 Defined locations of parser files in config.h instead of Makefile.
13218
132191999-02-09 Jesse Thilo <jthilo@gnu.org>
13220
13221 * Makefile.am:
13222 Removed inappropriate use of $< macro.
13223
132241999-02-05 Jesse Thilo <jthilo@gnu.org>
13225
13226 * po/Makefile.in.in, po/POTFILES.in:
13227 Add `po' directory skeleton.
13228
132291999-01-27 Jesse Thilo <jthilo@gnu.org>
13230
13231 * README: Document help-bison list.
13232
13233 * configure.in: Add check for mkstemp().
13234
132351999-01-20 Jesse Thilo <jthilo@gnu.org>
13236
13237 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
13238 Hush a few compiler warnings.
13239
13240 * src/files.c:
13241 Add tryclose(), which verifies that fclose was successful.
13242 Hush a couple of compiler warnings.
13243
132441999-01-20 Jesse Thilo <jthilo@gnu.org>
13245
13246 * Makefile.am, OChangeLog:
13247 ChangeLog is now automatically generated. Include the old version as
13248 OChangeLog.
13249
132501999-01-14 Jesse Thilo <jthilo@gnu.org>
13251
13252 * 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:
13253 Update FSF address.
13254
132551999-01-14 Jesse Thilo <jthilo@gnu.org>
13256
13257 * doc/bison.texinfo: Fix formatting glitch.
13258
13259 * doc/bison.texinfo: Update FSF address.
13260
132611999-01-14 Jesse Thilo <jthilo@gnu.org>
13262
13263 * acconfig.h: Update FSF address.
13264
132651999-01-08 Jesse Thilo <jthilo@gnu.org>
13266
13267 * src/system.h:
13268 Don't define PACKAGE here, since config.h defines it.
13269
132701998-12-30 Jesse Thilo <jthilo@gnu.org>
13271
13272 * src/reader.c: Update copyright date.
13273
13274 * src/main.c:
13275 Ditch sprintf to statically-sized buffers in fatal/warn functions in
13276 favor of output directly to stderr (avoids buffer overruns).
13277
13278 * src/reader.c: Some checks for premature EOF.
13279
13280 * 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:
13281 Use prototypes if the compiler understands them.
13282
13283 * src/files.c: Honor TMPDIR on Unix hosts.
13284 Use prototypes if the compiler understands them.
13285
13286 * src/reader.c:
13287 Fix a couple of buffer overrun bugs.
13288 Use prototypes if the compiler understands them.
13289
13290 * src/system.h: Include unistd.h and ctype.h.
13291 Use #ifdef instead of #if for NLS symbols.
13292
132931998-12-30 Jesse Thilo <jthilo@gnu.org>
13294
13295 * doc/bison.texinfo:
13296 Delete comment "consider using @set for edition number, etc..." since
13297 we now are doing so.
13298
132991998-12-30 Jesse Thilo <jthilo@gnu.org>
13300
13301 * configure.in:
13302 Use prototypes if the compiler understands them.
13303
13304 * NEWS: Document 1.26 highlights.
13305
13306 * Makefile.am: Require Automake 1.3 or later.
13307
13308 * acconfig.h:
13309 Use prototypes if the compiler understands them.
13310
133111998-12-29 Jesse Thilo <jthilo@gnu.org>
13312
13313 * src/version.c:
13314 Use VERSION symbol from automake for version number.
13315
133161998-12-29 Jesse Thilo <jthilo@gnu.org>
13317
13318 * acconfig.h, configure.in, version.cin:
13319 Use VERSION symbol from automake for version number.
13320
133211998-11-28 Jesse Thilo <jthilo@gnu.org>
13322
13323 * Makefile.am:
13324 Distribute original version of simple parser (bison.s1), not built
13325 version (bison.simple).
13326
133271998-11-28 Jesse Thilo <jthilo@gnu.org>
13328
13329 * doc/bison.texinfo: Add info dir entry.
13330
13331 * doc/bison.texinfo:
13332 Let automake put version number into documentation.
13333
133341998-11-26 Jesse Thilo <jthilo@gnu.org>
13335
13336 * src/bison.cld, src/build.com, src/vmshlp.mar:
13337 Add non-RCS files from /gd/gnu/bison.
13338
133391998-11-26 Jesse Thilo <jthilo@gnu.org>
13340
13341 * doc/bison.1:
13342 Document the BISON_HAIRY and BISON_SIMPLE variables.
13343
133441998-11-25 Jesse Thilo <jthilo@gnu.org>
13345
13346 * src/version.c: Build version.c automatically.
13347
13348 * src/reader.c:
13349 Fix token numbering (used to start at 258, not 257).
13350
13351 * src/system.h: Include config.h.
13352
13353 * src/getargs.c: Update bug report address.
13354
13355 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
13356 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
13357
133581998-11-25 Jesse Thilo <jthilo@gnu.org>
13359
13360 * Makefile.am:
13361 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13362
13363 * configure.in, version.cin:
13364 Build version.c automatically.
13365
13366 * AUTHORS: Add AUTHORS file.
13367
13368 * README: Update bug report address.
13369
13370 * bison.simple:
13371 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13372
13373 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
13374 Add automake stuff.
13375
133761998-11-25 Jesse Thilo <jthilo@gnu.org>
13377
13378 * doc/bison.texinfo: Clean up some formatting.
13379
133801998-05-05 Richard Stallman <rms@gnu.org>
13381
13382 * doc/bison.texinfo:
13383 Explain better why to make a pure parser.
13384
133851998-01-05 Richard Stallman <rms@gnu.org>
13386
13387 * src/files.c (openfiles):
13388 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
13389 find a temporary directory, if possible. Do not unlink files while
13390 they are open.
13391
133921997-08-25 Richard Stallman <rms@gnu.org>
13393
13394 * src/reader.c (stack_offset;):
13395 Change some warni to warns.
13396
13397 * src/lex.c (literalchar): Use warns, not warni.
13398
133991997-06-28 Richard Stallman <rms@gnu.org>
13400
13401 * src/bison.s1: Add a Bison version comment.
13402
13403 * src/main.c (fatal, warn, berror):
13404 Use program_name.
13405
134061997-06-28 Richard Stallman <rms@gnu.org>
13407
13408 * Makefile.in (bison_version): New variable.
13409 (dist): Use that variable.
13410 (bison.s1): Substitute the Bison version into bison.simple.
13411
13412 * bison.simple: Add a Bison version comment.
13413
134141997-06-18 Richard Stallman <rms@gnu.org>
13415
13416 * src/main.c (fatal, warn, berror):
13417 Make error messages standard.
13418 (toomany): Improve error message text.
13419
13420 * 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:
13421 new.h renamed to alloc.h.
13422
134231997-06-18 Richard Stallman <rms@gnu.org>
13424
13425 * Makefile.in: new.h renamed to alloc.h.
13426
134271997-05-24 Richard Stallman <rms@gnu.org>
13428
13429 * src/lex.c (literalchar):
13430 Fix the code for escaping \, " and '.
13431
13432 (lex): Avoid trouble when there are many chars
13433 to discard in a char literal with just several chars in it.
13434
134351997-05-17 Richard Stallman <rms@gnu.org>
13436
13437 * src/bison.s1:
13438 Use malloc, if using alloca is troublesome.
13439 (YYSTACK_USE_ALLOCA): New flag macro.
13440 Define it for some systems and compilers.
13441 (YYSTACK_ALLOC): New macro.
13442 (yyparse): Use YYSTACK_ALLOC to allocate stack.
13443 If it was malloc'd, free it.
13444
134451997-05-17 Richard Stallman <rms@gnu.org>
13446
13447 * bison.simple:
13448 Use malloc, if using alloca is troublesome.
13449 (YYSTACK_USE_ALLOCA): New flag macro.
13450 Define it for some systems and compilers.
13451 (YYSTACK_ALLOC): New macro.
13452 (yyparse): Use YYSTACK_ALLOC to allocate stack.
13453 If it was malloc'd, free it.
13454
134551997-04-23 Richard Stallman <rms@gnu.org>
13456
13457 * src/bison.s1:
13458 (alloca) [__hpux]: Always define as __builtin_alloca.
13459
134601997-04-23 Richard Stallman <rms@gnu.org>
13461
13462 * bison.simple:
13463 (alloca) [__hpux]: Always define as __builtin_alloca.
13464
134651997-04-22 Richard Stallman <rms@gnu.org>
13466
13467 * src/bison.s1:
13468 [__hpux]: Include alloca.h (right for HPUX 10)
13469 instead of declaring alloca (right for HPUX 9).
13470
13471 * src/bison.s1 (__yy_memcpy):
13472 Declare arg `count' as unsigned int.
13473 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
13474
134751997-04-22 Richard Stallman <rms@gnu.org>
13476
13477 * bison.simple:
13478 [__hpux]: Include alloca.h (right for HPUX 10)
13479 instead of declaring alloca (right for HPUX 9).
13480
13481 * bison.simple (__yy_memcpy):
13482 Declare arg `count' as unsigned int.
13483 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
13484
134851997-01-03 Richard Stallman <rms@gnu.org>
13486
13487 * src/allocate.c: [__STDC__ or _MSC_VER]:
13488 Declare calloc and realloc to return void *.
13489
134901997-01-02 Richard Stallman <rms@gnu.org>
13491
13492 * src/system.h:
13493 [_MSC_VER]: Include stdlib.h and process.h.
13494 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
13495
13496 * src/main.c (main): Return FAILURE as a value.
13497 (printable_version): Declare arg as int, not char.
13498
134991997-01-02 Richard Stallman <rms@gnu.org>
13500
13501 * Makefile.in (dist):
13502 Explicitly check for symlinks, and copy them.
13503
135041996-12-19 Richard Stallman <rms@gnu.org>
13505
13506 * src/files.c:
13507 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
13508
135091996-12-18 Paul Eggert <eggert@gnu.org>
13510
13511 * src/bison.s1 (yyparse):
13512 If __GNUC__ and YYPARSE_PARAM are both defined,
13513 declare yyparse to have a void * argument.
13514
135151996-12-18 Paul Eggert <eggert@gnu.org>
13516
13517 * bison.simple (yyparse):
13518 If __GNUC__ and YYPARSE_PARAM are both defined,
13519 declare yyparse to have a void * argument.
13520
135211996-12-17 Richard Stallman <rms@gnu.org>
13522
13523 * src/reduce.c (nbits): Add some casts.
13524
135251996-08-12 Richard Stallman <rms@gnu.org>
13526
13527 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
13528
135291996-08-12 Richard Stallman <rms@gnu.org>
13530
13531 * bison.simple: Test _MSDOS as well as _MSDOS_.
13532
135331996-07-31 Richard Stallman <rms@gnu.org>
13534
13535 * src/bison.s1:
13536 [__sun && __i386]: Include alloca.h.
13537
135381996-07-31 Richard Stallman <rms@gnu.org>
13539
13540 * bison.simple:
13541 [__sun && __i386]: Include alloca.h.
13542
135431996-07-30 Richard Stallman <rms@gnu.org>
13544
13545 * src/bison.s1: Comment change.
13546
13547 * src/bison.s1: Test _MSDOS_, not MSDOS.
13548
135491996-07-30 Richard Stallman <rms@gnu.org>
13550
13551 * bison.simple: Comment change.
13552
13553 * bison.simple: Test _MSDOS_, not MSDOS.
13554
135551996-06-01 Richard Stallman <rms@gnu.org>
13556
13557 * 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:
13558 Insert `_' macro around many string constants.
13559
13560 * src/main.c:
13561 Insert `_' macro around many string constants.
13562
13563 (main): Call setlocale, bindtextdomain and textdomain.
13564
13565 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
13566 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
13567 [ENABLE_NLS]: Include libintl.h.
13568 [ENABLE_NLS] (gettext): Define.
13569 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
13570 (N_, PACKAGE, LOCALEDIR): New macros.
13571
135721996-06-01 Richard Stallman <rms@gnu.org>
13573
13574 * POTFILES.in: New file.
13575
13576 * Makefile.in (allocate.o):
13577 Define target explicitly.
13578
13579 * Makefile.in (CFLAGS): Set to @CFLAGS@.
13580 (LDFLAGS): Set to @LDFLAGS@.
13581 (configure): Run autoconf only if preceding `cd' succeeds.
13582 (bison.s1): Redirect output to temporary file then move the
13583 temporary to the target, rather than redirecting directly to bison.s1.
13584 (clean): Remove config.status and config.log.
13585 (distclean): Don't remove config.status here.
13586
135871996-05-12 Richard Stallman <rms@gnu.org>
13588
13589 * src/bison.s1:
13590 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
13591
135921996-05-12 Richard Stallman <rms@gnu.org>
13593
13594 * bison.simple:
13595 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
13596
135971996-05-11 Richard Stallman <rms@gnu.org>
13598
13599 * src/bison.s1 (__yy_memcpy):
13600 Really reorder the args, as was supposedly done on Feb 14 1995.
13601 (yyparse): Calls changed accordingly.
13602
136031996-05-11 Richard Stallman <rms@gnu.org>
13604
13605 * Makefile.in (dist): Don't use $(srcdir).
13606
13607 * bison.simple (__yy_memcpy):
13608 Really reorder the args, as was supposedly done on Feb 14 1995.
13609 (yyparse): Calls changed accordingly.
13610
136111996-01-27 Richard Stallman <rms@gnu.org>
13612
13613 * src/output.c (output_rule_data):
13614 Test YYERROR_VERBOSE in the conditional
13615 around the definition of ttyname.
13616
136171995-12-29 Richard Stallman <rms@gnu.org>
13618
13619 * src/bison.s1:
13620 Fix line numbers in #line commands.
13621
136221995-12-29 Richard Stallman <rms@gnu.org>
13623
13624 * bison.simple:
13625 Fix line numbers in #line commands.
13626
136271995-12-27 Richard Stallman <rms@gnu.org>
13628
13629 * src/bison.s1 (YYPARSE_PARAM_DECL):
13630 In C++, make it always null.
13631 (YYPARSE_PARAM_ARG): New macro.
13632 (yyparse): Use YYPARSE_PARAM_ARG.
13633
136341995-12-27 Richard Stallman <rms@gnu.org>
13635
13636 * bison.simple (YYPARSE_PARAM_DECL):
13637 In C++, make it always null.
13638 (YYPARSE_PARAM_ARG): New macro.
13639 (yyparse): Use YYPARSE_PARAM_ARG.
13640
136411995-11-29 Richard Stallman <rms@gnu.org>
13642
13643 * doc/bison.texinfo:
13644 Describe literal string tokens, %raw, %no_lines, %token_table.
13645
136461995-11-29 Daniel Hagerty <hag@gnu.org>
13647
13648 * doc/bison.texinfo: Fixed update date
13649
136501995-10-16 Richard Stallman <rms@gnu.org>
13651
13652 * src/version.c: Version 1.25.
13653
136541995-10-16 Richard Stallman <rms@gnu.org>
13655
13656 * NEWS: *** empty log message ***
13657
136581995-10-16 Richard Stallman <rms@gnu.org>
13659
13660 * doc/bison.1, doc/bison.rnh:
13661 Add new options.
13662
136631995-10-15 Richard Stallman <rms@gnu.org>
13664
13665 * src/vmsgetargs.c, src/getargs.c:
13666 Added -n, -k, and -raw switches.
13667 (noparserflag, toknumflag, rawtoknumflag): New variables.
13668
13669 * src/symtab.h (SALIAS):
13670 New #define for adding aliases to %token.
13671 (struct bucket): Added `alias' field.
13672
13673 * src/reduce.c (reduce_grammar):
13674 Revise error message.
13675 (print_notices): Remove final `.' from error message.
13676
13677 * src/reader.c (reader_output_yylsp):
13678 New function.
13679 (readgram): Use `#if 0' around code that accepted %command
13680 inside grammar rules: The documentation doesn't allow it,
13681 and it will fail since the %command processors scan for the next %.
13682 (parse_token_decl): Extended the %token
13683 declaration to allow a multi-character symbol as an alias.
13684 (parse_thong_decl): New function.
13685 (read_declarations): Added %thong declarations.
13686 (read_declarations): Handle NOOP to deal with allowing
13687 % declarations as another means to specify the flags.
13688 (readgram): Allow %prec prior to semantics embedded in a rule.
13689 (skip_to_char, read_declarations, copy_definition)
13690 (parse_token_decl, parse_start_decl, parse_type_decl)
13691 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
13692 (get_type_name, copy_guard, copy_action, readgram)
13693 (get_type, packsymbols): Revised most error messages.
13694 Changed `fatal' to `warnxxx' to avoid aborting for error.
13695 Revised and use multiple warnxxx functions to avoid using VARARGS1.
13696 (read_declarations): Improve the error message for
13697 an invalid character. Do not abort.
13698 (read_declarations, copy_guard, copy_action): Use
13699 printable_version to avoid unprintable characters in printed output.
13700 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
13701 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
13702 Allow the type of a non-terminal can be given
13703 more than once, as long as all specifications give the same type.
13704
13705 * src/output.c:
13706 (output_headers, output_trailers, output, output_gram)
13707 (output_rule_data): Implement noparserflag variable.
13708 Implement toknumflag variable.
13709 (output): Call reader_output_yylsp to output LTYPESTR.
13710
13711 * src/main.c (main):
13712 If reader sees an error, don't process the grammar.
13713 (fatals): Updated to not use VARARGS1.
13714 (printable_version, int_to_string, warn, warni, warns, warnss)
13715 (warnsss): New error reporting functions. Avoid abort for error.
13716
13717 * src/lex.h:
13718 Added THONG and NOOP for alias processing.
13719 Added SETOPT for the new code that allows setting options with %flags.
13720
13721 * src/lex.c:
13722 Include getopt.h. Add some extern decls.
13723 (safegetc): New function to deal with EOF gracefully.
13724 (literalchar); new function to deal with reading \ escapes.
13725 (lex): Use literalchar.
13726 (lex): Implemented "..." tokens.
13727 (literalchar, lex, parse_percent_token): Made tokenbuffer
13728 always contain the token. This includes growing the token
13729 buffer while reading an integer.
13730 (parse_percent_token): Replaced if-else statement with percent_table.
13731 (parse_percent_token): Added % declarations as another
13732 way to specify the flags -n, -l, and -r. Also added hooks for
13733 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
13734 major changes to files.c.
13735 (lex) Retain in the incoming stream a character following
13736 an incorrect '/'.
13737 (skip_white_space, lex): Revised most error messages
13738 and changed fatal to warn to avoid aborting.
13739 (percent_table): Added %thong declarations.
13740
13741 * src/gram.h: Comment changes.
13742
13743 * src/files.c (openfiles, open_extra_files, done):
13744 Add faction flag
13745 and actfile file. Handle noparserflag. Both for -n switch.
13746
13747 * src/conflicts.c (resolve_sr_conflict):
13748 Remove use of alloca.
13749
137501995-06-01 Jim Meyering <meyering@gnu.org>
13751
13752 * doc/bison.texinfo: *** empty log message ***
13753
137541995-05-06 Richard Stallman <rms@gnu.org>
13755
13756 * src/bison.s1: Comment change.
13757
137581995-05-06 Richard Stallman <rms@gnu.org>
13759
13760 * bison.simple: Comment change.
13761
137621995-05-03 Richard Stallman <rms@gnu.org>
13763
13764 * src/version.c: Version now 1.24.
13765
13766 * src/bison.s1: Change distribution terms.
13767
13768 * src/version.c: Version now 1.23.
13769
137701995-05-03 Richard Stallman <rms@gnu.org>
13771
13772 * doc/bison.texinfo:
13773 Rewrite "Conditions for Using Bison".
13774 Update version to 1.24.
13775
137761995-05-03 Richard Stallman <rms@gnu.org>
13777
13778 * bison.simple: Change distribution terms.
13779
137801995-02-23 Richard Stallman <rms@gnu.org>
13781
13782 * src/files.c: Test __VMS_POSIX as well as VMS.
13783
137841995-02-14 Jim Meyering <meyering@gnu.org>
13785
13786 * src/bison.s1 (__yy_memcpy):
13787 Renamed from __yy_bcopy to avoid
13788 confusion. Reverse FROM and TO arguments to be consistent with
13789 those of memcpy.
13790
137911995-02-14 Jim Meyering <meyering@gnu.org>
13792
13793 * bison.simple (__yy_memcpy):
13794 Renamed from __yy_bcopy to avoid
13795 confusion. Reverse FROM and TO arguments to be consistent with
13796 those of memcpy.
13797
137981994-11-10 David J. MacKenzie <djm@gnu.org>
13799
13800 * NEWS: reformat
13801
13802 * NEWS: New file.
13803
13804 * Makefile.in (DISTFILES): Include NEWS.
13805
13806 * Makefile.in (DISTFILES):
13807 Include install-sh, not install.sh.
13808
13809 * configure.in: Update to Autoconf v2 macro names.
13810
138111994-10-05 David J. MacKenzie <djm@gnu.org>
13812
13813 * Makefile.in: fix typo
13814
13815 * Makefile.in (prefix, exec_prefix):
13816 Let configure set them.
13817
138181994-09-28 David J. MacKenzie <djm@gnu.org>
13819
13820 * Makefile.in: Set datadir to $(prefix)/share.
13821
138221994-09-15 Richard Stallman <rms@gnu.org>
13823
13824 * src/bison.s1:
13825 Update copyright notice and GPL version.
13826
138271994-09-15 Richard Stallman <rms@gnu.org>
13828
13829 * bison.simple:
13830 Update copyright notice and GPL version.
13831
138321994-07-12 Richard Stallman <rms@gnu.org>
13833
13834 * src/reduce.c, src/reader.c:
13835 entered into RCS
13836
138371994-05-05 David J. MacKenzie <djm@gnu.org>
13838
13839 * Makefile.in: entered into RCS
13840
138411994-03-26 Richard Stallman <rms@gnu.org>
13842
13843 * src/bison.s1: entered into RCS
13844
138451994-03-26 Richard Stallman <rms@gnu.org>
13846
13847 * bison.simple: entered into RCS
13848
138491994-03-25 Richard Stallman <rms@gnu.org>
13850
13851 * src/main.c: entered into RCS
13852
138531994-03-24 Richard Stallman <rms@gnu.org>
13854
13855 * src/conflicts.c: entered into RCS
13856
138571994-01-02 Richard Stallman <rms@gnu.org>
13858
13859 * Makefile.in: *** empty log message ***
13860
138611993-11-21 Richard Stallman <rms@gnu.org>
13862
13863 * src/bison.s1: *** empty log message ***
13864
138651993-11-21 Richard Stallman <rms@gnu.org>
13866
13867 * doc/bison.texinfo: entered into RCS
13868
13869 * doc/bison.texinfo: *** empty log message ***
13870
138711993-11-21 Richard Stallman <rms@gnu.org>
13872
13873 * bison.simple: *** empty log message ***
13874
138751993-10-25 David J. MacKenzie <djm@gnu.org>
13876
13877 * doc/bison.texinfo: *** empty log message ***
13878
138791993-10-19 Richard Stallman <rms@gnu.org>
13880
13881 * src/bison.s1: *** empty log message ***
13882
138831993-10-19 Richard Stallman <rms@gnu.org>
13884
13885 * bison.simple: *** empty log message ***
13886
138871993-10-14 Richard Stallman <rms@gnu.org>
13888
13889 * src/bison.s1: *** empty log message ***
13890
138911993-10-14 Richard Stallman <rms@gnu.org>
13892
13893 * bison.simple: *** empty log message ***
13894
138951993-09-14 David J. MacKenzie <djm@gnu.org>
13896
13897 * doc/bison.texinfo: *** empty log message ***
13898
138991993-09-13 Noah Friedman <friedman@gnu.org>
13900
13901 * Makefile.in: *** empty log message ***
13902
139031993-09-10 Richard Stallman <rms@gnu.org>
13904
13905 * src/conflicts.c: *** empty log message ***
13906
13907 * src/system.h: entered into RCS
13908
139091993-09-10 Richard Stallman <rms@gnu.org>
13910
13911 * doc/bison.1: entered into RCS
13912
139131993-09-06 Noah Friedman <friedman@gnu.org>
13914
13915 * src/version.c: entered into RCS
13916
139171993-09-06 Noah Friedman <friedman@gnu.org>
13918
13919 * Makefile.in: *** empty log message ***
13920
139211993-07-30 David J. MacKenzie <djm@gnu.org>
13922
13923 * Makefile.in: *** empty log message ***
13924
139251993-07-24 Richard Stallman <rms@gnu.org>
13926
13927 * src/bison.s1: *** empty log message ***
13928
139291993-07-24 Richard Stallman <rms@gnu.org>
13930
13931 * bison.simple: *** empty log message ***
13932
139331993-07-08 David J. MacKenzie <djm@gnu.org>
13934
13935 * Makefile.in: *** empty log message ***
13936
139371993-07-04 Richard Stallman <rms@gnu.org>
13938
13939 * src/bison.s1: *** empty log message ***
13940
139411993-07-04 Richard Stallman <rms@gnu.org>
13942
13943 * bison.simple: *** empty log message ***
13944
139451993-06-26 David J. MacKenzie <djm@gnu.org>
13946
13947 * src/getargs.c: entered into RCS
13948
139491993-06-26 David J. MacKenzie <djm@gnu.org>
13950
13951 * doc/bison.texinfo: *** empty log message ***
13952
13953 * doc/bison.1: New file.
13954
139551993-06-25 Richard Stallman <rms@gnu.org>
13956
13957 * src/getargs.c: New file.
13958
139591993-06-16 Richard Stallman <rms@gnu.org>
13960
13961 * src/bison.s1: *** empty log message ***
13962
139631993-06-16 Richard Stallman <rms@gnu.org>
13964
13965 * bison.simple: *** empty log message ***
13966
139671993-06-03 Richard Stallman <rms@gnu.org>
13968
13969 * src/bison.s1: New file.
13970
139711993-06-03 Richard Stallman <rms@gnu.org>
13972
13973 * doc/bison.texinfo: *** empty log message ***
13974
139751993-06-03 Richard Stallman <rms@gnu.org>
13976
13977 * bison.simple: New file.
13978
139791993-05-19 Richard Stallman <rms@gnu.org>
13980
13981 * doc/bison.texinfo: New file.
13982
139831993-05-07 Noah Friedman <friedman@gnu.org>
13984
13985 * Makefile.in: *** empty log message ***
13986
139871993-04-28 Noah Friedman <friedman@gnu.org>
13988
13989 * src/reader.c: *** empty log message ***
13990
139911993-04-23 Noah Friedman <friedman@gnu.org>
13992
13993 * src/alloc.h: entered into RCS
13994
139951993-04-20 David J. MacKenzie <djm@gnu.org>
13996
13997 * src/version.c: *** empty log message ***
13998
13999 * src/files.c, src/allocate.c:
14000 entered into RCS
14001
14002 * src/reader.c: *** empty log message ***
14003
14004 * src/lex.c: entered into RCS
14005
14006 * src/conflicts.c: New file.
14007
14008 * src/symtab.c: entered into RCS
14009
14010 * src/alloc.h: New file.
14011
14012 * src/LR0.c: entered into RCS
14013
140141993-04-18 Noah Friedman <friedman@gnu.org>
14015
14016 * src/reader.c: New file.
14017
14018 * src/version.c: *** empty log message ***
14019
140201993-04-18 Noah Friedman <friedman@gnu.org>
14021
14022 * Makefile.in: *** empty log message ***
14023
140241993-04-17 Noah Friedman <friedman@gnu.org>
14025
14026 * Makefile.in: *** empty log message ***
14027
140281993-04-15 Richard Stallman <rms@gnu.org>
14029
14030 * src/main.c, src/files.c:
14031 New file.
14032
140331993-04-15 Noah Friedman <friedman@gnu.org>
14034
14035 * configure.in: entered into RCS
14036
14037 * configure.in: *** empty log message ***
14038
14039 * configure.in: New file.
14040
140411993-04-14 Richard Stallman <rms@gnu.org>
14042
14043 * Makefile.in: New file.
14044
140451993-04-13 Richard Stallman <rms@gnu.org>
14046
14047 * src/version.c: New file.
14048
140491993-03-25 Richard Stallman <rms@gnu.org>
14050
14051 * src/output.c: entered into RCS
14052
140531992-09-25 Richard Stallman <rms@gnu.org>
14054
14055 * configure.bat: entered into RCS
14056
140571992-06-22 Richard Stallman <rms@gnu.org>
14058
14059 * src/vmsgetargs.c: entered into RCS
14060
140611992-06-22 Richard Stallman <rms@gnu.org>
14062
14063 * doc/bison.rnh: entered into RCS
14064
140651992-04-20 David J. MacKenzie <djm@gnu.org>
14066
14067 * README: entered into RCS
14068
140691992-01-22 Richard Stallman <rms@gnu.org>
14070
14071 * src/machine.h: entered into RCS
14072
140731991-12-21 Richard Stallman <rms@gnu.org>
14074
14075 * src/lalr.c, src/closure.c:
14076 entered into RCS
14077
140781991-12-20 Richard Stallman <rms@gnu.org>
14079
14080 * src/state.h: entered into RCS
14081
140821991-12-18 Richard Stallman <rms@gnu.org>
14083
14084 * src/print.c, src/nullable.c, src/derives.c:
14085 entered into RCS
14086
140871991-11-03 David J. MacKenzie <djm@gnu.org>
14088
14089 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
14090 entered into RCS
14091
140921988-09-09 Richard Stallman <rms@gnu.org>
14093
14094 * src/bison.hairy: entered into RCS
14095
140961987-12-16 Richard Stallman <rms@gnu.org>
14097
14098 * REFERENCES: entered into RCS
14099
14100
14101 -----
14102
14103 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
14104 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
14105 Foundation, Inc.
14106
14107 Copying and distribution of this file, with or without
14108 modification, are permitted provided the copyright notice and this
14109 notice are preserved.