]> git.saurik.com Git - bison.git/blob - ChangeLog
(_AT_TEST_GLR_CXXTYPES): Don't try to have yyerror return 0, now that
[bison.git] / ChangeLog
1 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
2
3 * NEWS: Document minor wording changes in diagnostics of
4 Bison-generated parsers.
5 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
6 Remove unused formals. All uses changed.
7 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
8 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10 Rename yyoverflowab to yyexhaustedlab.
11 When memory exhaustion occurs during syntax-error reporting,
12 report it separately rather than in a single diagnostic; this
13 eases translation.
14 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
15 (Memory Exhausted): Renamed from Parser Stack Overflow.
16 Revamp wording slightly to prefer "memory exhaustion".
17 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
18
19 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
20
21 Add i18n support to the GLR skeleton. Partially fix the C++
22 skeleton; a C++ expert needs to finish this. Remove debugging
23 msgids; there's little point to having them translated, since they
24 can be understood only by someone who can read the
25 (English-language) source code.
26
27 Generate runtime-po/bison-runtime.pot automatically, so that we
28 don't have to worry about garbage getting in that file. We'll
29 make sure after the next official release that old msgids don't
30 get lost. See
31 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
32
33 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
34 Now auto-generated.
35 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
36 Fix typos in explanations of the runtime file.
37 * bootstrap: Change gettext keyword from YYI18N to YY_.
38 Use standard Makefile.in.in in runtime-po, since we'll arrange
39 for backward-compatible bison-runtime.po files in a different way.
40 * data/glr.c (YY_): New macro, from yacc.c.
41 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
42 Translate messages intended for users.
43 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
44 the wording in the other skeletons. We don't know that the memory
45 is virtual.
46 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
47 Use same method that yacc.c uses.
48 Don't translate debugging messages.
49 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
50 it doesn't work (yet), and requires C++ expertise to fix.
51 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
52 Move defn to a more logical place, to be consistent with other
53 skeletons.
54 Don't translate debugging messages.
55 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
56 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
57 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
58 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
59
60 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
61 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
62 void, not int.
63 * tests/glr-regression.at (Badly Collapsed GLR States):
64 Likewise.
65 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
66 yylex should return 0 at EOF rather than aborting.
67
68 Improve tests for stack overflow in GLR parser.
69 Problem reported by twlevo@xs4all.nl.
70 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
71 All uses removed.
72 (yyStackOverflow): Just longjmp, but with value 2 so that caller
73 can handle the problem.
74 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
75 (yyparse): New local variable yyresult to record the result.
76 Use result of setjmp to set it, rather than storing itinto
77 struct.
78 (yyDone): Remove label.
79 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
80 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
81 if YYABORT is used).
82 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
83 yyparse status; put status > 1 into diagnostic.
84 Check that status==2 works.
85 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
86 Use exit status 3 for failure to open (which shouldn't happen).
87
88 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
89
90 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
91 1 on syntax error; just let yyparse do its thing.
92 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
93 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
94 (Exploding the Stack Size with Alloca):
95 (Exploding the Stack Size with Malloc):
96 Expect exit status 2, not 1, since the parser is supposed to blow
97 its stack. Problem reported by twlevo@xs4all.nl.
98
99 * data/glr.c (yyparse): Don't assume that the initial calls
100 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
101 Print a stack-overflow message and fail instead.
102 Initialize the line-number information before creating the stack,
103 so that the stack-overflow message can report line zero safely.
104
105 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
106
107 Fix problems reported by twlevo@xs4all.nl.
108 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
109 (yyuserMerge): Provide a default case if b4_mergers is empty.
110 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
111 * tests/glr-regression.at
112 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
113 Add casts to pacify C++ compilers.
114 * tests/glr-regression.at (Improper merging of GLR delayed action
115 sets): Declare yylex before using it.
116 * tests/Makefile.am (maintainer-check-g++): Fix a stray
117 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
118 test for valgrind; valgrind is independent of g++.
119 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
120 for compatibility with POSIX 1003.1-2001 (if running coreutils).
121 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
122 Use a destructor, so that we can expand the stack. Change
123 YYSTYPE to char * so that we can free it. Cast result of malloc.
124
125 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
126
127 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
128 a valgrind failure. Problem reported by twlevo@xs4all.nl.
129
130 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
131
132 * PACKAGING: New file, suggested by Bruno Haible and taken from
133 similar wording in gettext's PACKAGING file.
134 * NEWS: Mention PACKAGING.
135 * Makefile.am (EXTRA_DIST): Add PACKAGING.
136
137 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
138
139 * NEWS: Document recent i18n improvements.
140 * bootstrap: Get runtime translations into runtime-po.
141 Create runtime-po files automatically, if possible.
142 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
143 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
144 does not infringe on the user's name space.
145 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
146 * doc/bison.texinfo (Internationalization): Revamp the English
147 and Texinfo syntax a bit, to try to make it clearer.
148 (Bison Options, Option Cross Key): Mention --print-localedir.
149 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
150 YYENABLE_NLS. Quote a bit more.
151 * runtime-po/.cvsignore: New file.
152 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
153 * runtime-po/Rules-quot: Remove; now created by bootstrap.
154 * runtime-po/quot.sed: Likewise.
155 * runtime-po/boldquot.sed: Likewise.
156 * runtime-po/en@quot.header: Likewise.
157 * runtime-po/en@boldquot.header: Likewise.
158 * runtime-po/insert-header.sin: Likewise.
159 * runtime-po/remove-potcdate.sin: Likewise.
160 * runtime-po/Makevars: Likewise.
161 * runtime-po/LINGUAS: Likewise.
162 * runtime-po/de.po: Likewise; we will rely on the translation project
163 to maintain this, so "bootstrap" should get it.
164 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
165 its value.
166 * src/main.c (main): Bind the bison-runtime domain, too.
167
168 2005-07-12 Bruno Haible <bruno@clisp.org>
169
170 * data/yacc.c: Include <libintl.h> when NLS is enabled.
171 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
172 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
173 * runtime-po: New directory.
174 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
175 $(DOMAIN).pot-update rule, so that old messages are never dropped.
176 * runtime-po/Rules-quot: New file, copied from po/.
177 * runtime-po/quot.sed: Likewise.
178 * runtime-po/boldquot.sed: Likewise.
179 * runtime-po/en@quot.header: Likewise.
180 * runtime-po/en@boldquot.header: Likewise.
181 * runtime-po/insert-header.sin: Likewise.
182 * runtime-po/remove-potcdate.sin: Likewise.
183 * runtime-po/Makevars: New file.
184 * runtime-po/POTFILES.in: New file.
185 * runtime-po/LINGUAS: New file.
186 * runtime-po/bison-runtime.pot: New file.
187 * runtime-po/de.po: New file.
188 * m4/bison.m4: New file.
189 * Makefile.am (SUBDIRS): Add runtime-po.
190 (aclocaldir, aclocal_DATA): New variables.
191 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
192 Define aclocaldir.
193 * src/getargs.c (usage): Document --print-localedir option.
194 (PRINT_LOCALEDIR_OPTION): New enum item.
195 (long_options): Add --print-localedir option.
196 (getargs): Handle --print-localedir option.
197 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
198 (Internationalization): New section.
199
200 2005-07-12 Akim Demaille <akim@epita.fr>
201
202 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
203 for consistency with the rest of the code.
204 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
205 Add separators.
206
207 2005-07-12 Akim Demaille <akim@epita.fr>
208
209 * src/parse-gram.y: Use %printer instead of YYPRINT.
210
211 2005-07-12 Akim Demaille <akim@epita.fr>
212
213 * src/symtab.h, src/symtab.c (symbol_print): New.
214 * src/symlist.h, src/symlist.c (symbol_list_print): New.
215 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
216
217 2005-07-12 Akim Demaille <akim@epita.fr>
218
219 * data/glr.c (b4_syncline): Fix (swap) the definitions of
220 b4_at_dollar and b4_dollar_dollar.
221
222 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
223
224 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
225 and Pennello's paper.
226
227 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
228
229 * data/yacc.c (yyparse): Undo previous patch. Instead,
230 set yylsp[0] and yyvsp[0] only if the initial action
231 sets yylloc and yylval, respectively.
232
233 * data/yacc.c (yyparse): In the initial action, set
234 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
235 This avoids the use of undefined variables if the initial
236 action does not set yylloc and/or yylval.
237
238 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
239
240 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
241 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
242 Remove from CVS. These files are automatically generated.
243 * examples/extexi: Clarify that this file is now part of Bison,
244 not GNU M4, and that it works with any POSIX-compatible Awk.
245 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
246 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
247 so that we also get calc++-parser.yy. Geneate it.
248 Use $(AWK), not gawk, since any conforming Awk will do.
249 Put comment before action, since older 'make' can't handle comment
250 in action.
251 $(BUILT_SOURCES): List all built sources, not just some of them.
252 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
253 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
254 $($(calc_sources_generated)): Remove unnecessary test for existence
255 of target. (This had a shell syntax error anyway; a stray "x".)
256 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
257 calc++-parser.yy.
258 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
259
260 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
261 implied by the other modules.
262
263 2005-07-06 Akim Demaille <akim@epita.fr>
264
265 Bind examples/calc++ to the package.
266 * examples/calc++/Makefile: Remove, replaced by...
267 * examples/calc++/Makefile.am: ... this new file.
268 * examples/calc++/test: Remove input.
269 * examples/calc++/compile: Remove.
270 * examples/Makefile.am: New.
271 * configure.ac, Makefile.am: Adjust.
272 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
273
274 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
275
276 * data/glr.c (yyFail): Drastically simplify; since the format argument
277 never had any % directives, we can simply pass it to yyerror.
278 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
279 be modified later, as that is the usual style in glr.c.
280 Problems reported by Paul Hilfinger.
281
282 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
283 and size overflow errors.
284 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
285 in case the user prolog sets feature-test macros like _GNU_SOURCE.
286 (YYSIZEMAX): New macro.
287 (yystpcpy): New function, taken from yacc.c.
288 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
289 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
290 so that we don't have to maintain their signatures.
291 (yyFail): Check for buffer overflow, by using vsnprintf rather
292 than vsprintf. Allocate a bigger buffer if possible.
293 Report an error if buffer allocation fails.
294 (yyStackOverflow): New function.
295 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
296 the initialization was successful. It might fail if storage was
297 exhausted.
298 (yyexpandGLRStack): Add more checks for storage allocation failure.
299 Use yyStackOverflow to report failures.
300 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
301 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
302 Don't assume stack number fits in int.
303 (yysplitStack): Check for storage allocation failure.
304 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
305 can print diagnostics on storage allocation failure. All callers
306 changed.
307 (yyresolveValue): Use yybool for boolean.
308 (yyreportSyntaxError): Check for size-calculation overflow.
309 This code is taken from yacc.c.
310 (yyparse): Check for storage allocation errors when allocating
311 the initial stack.
312
313 2005-07-05 Akim Demaille <akim@epita.fr>
314
315 Extract calc++ from the documentation.
316 * doc/bison.texinfo (Calc++): Add the extraction marks.
317 * examples/extexi: New, from the aborted GNU Programming 2E.
318 Separate the different paragraph of a file with empty lines.
319 * examples/Makefile: Use it to extract the whole calc++ example.
320
321 2005-06-24 Akim Demaille <akim@epita.fr>
322
323 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
324 class typedefs.
325
326 2005-06-22 Akim Demaille <akim@epita.fr>
327
328 * doc/bison.texinfo (C++ Language Interface): First stab.
329 (C++ Parsers): Remove.
330
331 2005-06-22 Akim Demaille <akim@epita.fr>
332
333 * data/lalr1.cc (yylex_): Honor %lex-param.
334
335 2005-06-22 Akim Demaille <akim@epita.fr>
336
337 Start a set of simple examples.
338 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
339 * examples/calc++/calc++-driver.hh,
340 * examples/calc++/calc++-parser.yy,
341 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
342 * examples/calc++/compile, examples/calc++/test: New.
343
344 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
345
346 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
347 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
348 which stems from the 2005-05-27 patch.
349
350 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
351
352 * data/glr.c: Modify treatment of unused parameters to permit use
353 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
354
355 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
356
357 Fix infringement on user name space reported by Janos Zoltan Szabo.
358 * data/yacc.c (yyparse): strlen -> yystrlen.
359
360 2005-05-30 Akim Demaille <akim@epita.fr>
361
362 * data/lalr1.cc (_): New.
363 Translate the various messages.
364
365 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
366
367 Fix infringement on user name space reported by Bruno Haible.
368 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
369 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
370 the user's name space.
371 (alloca): Include <stdlib.h> to get it, if it's not built in.
372 (YYMALLOC, YYFREE): Define only if needed.
373 (malloc, free): Declare, but only if needed, as this infringes on
374 the user name space.
375
376 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
377
378 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
379 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
380 with %d format.
381 * lib/ebitset.c (min, max): Undef before defining.
382 * lib/vbitset.c (min, max): Likewise.
383 * lib/subpipe.c (create_subpipe): Save local variables in case
384 vfork clobbers them.
385
386 2005-05-24 Bruno Haible <bruno@clisp.org>
387
388 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
389 error message syntax used by gcc-4.0.
390
391 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
392
393 * README: Mention m4 1.4.3. Remove obsolete advice about
394 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
395
396 * bootstrap: Remove workaround for problem I encountered with
397 gettext 0.14.1; it seems to be fixed now.
398
399 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
400
401 * NEWS: Version 2.0a.
402
403 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
404 the previous change.
405
406 Various maintainer cleanups.
407 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
408 conftest*, for benefit of CVS commands run at the same time as
409 "configure". Add build-aux, since "bootstrap" now creates it and
410 its subfiles.
411 * Makefile.cfg (move_if_change): Remove.
412 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
413 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
414 (po_repo, do-po-update, po-update, wget_files, get-targets):
415 (config.guess-url_prefix, config.sub-url_prefix):
416 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
417 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
418 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
419 Remove.
420 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
421 this is now the recommended name.
422 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
423 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
424 ylwrap. These files now go into build-aux.
425 * config/move-if-change: Remove.
426 * config/prev-version.txt: Bump from 1.75 to 2.0.
427
428 * bootstrap: Add stdio-safer, unistd-safer modules.
429 Remove m4/glibc2.m4 (introduced by latest gnulib, but
430 we don't need it).
431 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
432 fopen-safer.c, stdio-safer.h, unistd-safer.h.
433 * lib/subpipe.c: Include "unistd-safer.h".
434 (create_subpipe): Make sure all the newly-created
435 file descriptors are > 2, so that diagnostics don't
436 get sent down them (which might cause Bison to hang, in theory).
437 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
438 * src/files.c (xfopen): Use fopen_safer, not fopen.
439
440 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
441 yesterday's yacc.c fix.
442
443 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
444
445 * data/glr.c, data/lalr1.cc: Update copyright date.
446
447 Fix a destructor bug reported by Wolfgang Spraul in
448 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
449 * data/yacc.c (yyabortlab): Don't call destructor, and
450 don't set yychar to EMPTY.
451 (yyoverflowlab): Don't call destructor.
452 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
453 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
454 since we no longer output the message "discarding lookahead token
455 end of input ()".
456
457 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
458
459 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
460 fix a small glitch in debugging output.
461 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
462 after YY_SYMBOL_PRINT where needed.
463
464 (struct yyGLRState): Add some comments.
465 (struct yySemanticOption): Add some comments.
466 (union yyGLRStackItem): Add comment.
467
468 (yymergeOptionSets): Correct this to properly perform the union,
469 avoiding infinite reported by Michael Rosien.
470 Update comment.
471
472 * tests/glr-regression.at: Add test for GLR merging error reported
473 by M. Rosien.
474
475 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
476
477 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
478 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
479 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
480 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
481 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
482 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
483 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
484 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
485 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
486 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
487 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
488 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
489 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
490 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
491 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
492 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
493 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
494 src/derives.h, src/files.c, src/files.h, src/getargs.c,
495 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
496 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
497 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
498 src/output.h, src/parse-gram.c, src/parse-gram.h,
499 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
500 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
501 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
502 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
503 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
504 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
505 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
506 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
507 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
508 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
509 tests/reduce.at, tests/regression.at, tests/sets.at,
510 tests/synclines.at, tests/testsuite.at, tests/torture.at:
511 Update FSF postal mail address.
512
513 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
514
515 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
516 Problem reported by Ralf Menzel.
517
518 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
519
520 * tests/actions.at: Test that stack overflow invokes destructors.
521 From Marcus Holland-Moritz.
522 * data/yacc.c (yyerrlab): Move the code that destroys the stack
523 from here....
524 (yyreturn): to here. That way, destructors are called properly
525 even if the stack overflows, or the user calls YYACCEPT or
526 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
527 (yyoverflowlab): Destroy the lookahead.
528
529 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
530
531 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
532
533 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
534
535 * NEWS: Bison-generated C parsers no longer quote literal strings
536 associated with tokens.
537 * src/output.c (prepare_symbols): Don't escape strings,
538 since users don't want to see C escapes.
539 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
540 in diagnostics.
541 * tests/input.at (Torturing the Scanner): Likewise.
542 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
543
544 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
545
546 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
547 the data size is known to be too small and we can't increase it.
548 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
549
550 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
551
552 * src/parse-gram.y: Include quotearg.h.
553 (string_as_id): Quote $1 before using it as a key, since the
554 lexer no longer quotes it for us.
555 (string_content): Don't strip quotes, since lexer no longer
556 quotes it for us.
557 * src/scan-gram.l: Include quotearg.h.
558 ("\""): Omit quote.
559 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
560 a key, since the rest of the lexer doesn't quote it.
561 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
562 * tests/regression.at (Token definitions): Check for backslashes
563 in token strings.
564
565 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
566 (YYSIZE_T): Define to unsigned long int when using an older compiler.
567 (yyparse): Revamp code to generate long syntax error message, to
568 make it easier to translate, and to avoid problems with arithmetic
569 overflow. Change "virtual memory" to "memory" in diagnostic, since
570 we don't know whether the memory is virtual.
571
572 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
573
574 * NEWS: Bison-generated C parsers now use the _ macro to
575 translate strings.
576 * data/yacc.c (_) [!defined _]: New macro.
577 All English strings wrapped inside this macro.
578 * doc/bison.texinfo (Bison Parser): Document _.
579 * po/POTFILES.in: Include src/parse-gram.c, since it now
580 includes translateable strings that parse-gram.y doesn't.
581
582 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
583
584 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
585 reverting the 2004-10-11 change to this function.
586 (symbol_check_alias_consistency): Don't call symbol_type_set
587 if the type name is already correct.
588 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
589
590 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
591
592 * tests/regression.at (Token definitions): Don't use a token named
593 c, as that generates a "#define c ..." that runs afoul of buggy
594 stdlib.h that uses the identifier c as a member of struct
595 drand48_data. Problem reported by Horst Wente.
596
597 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
598
599 * bootstrap: Change translation URL from
600 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
601 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
602 redirection glitches. Problem reported by twlevo@xs4all.nl.
603
604 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
605
606 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
607 after operands; POSIX says this isn't portable for the c99 command.
608
609 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
610
611 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
612 immediately if a data overrun has occurred; this may help us track
613 down what may be a spurious failure on MacOS.
614
615 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
616
617 Respond to problems reported by twlevo@xs4all.nl.
618
619 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
620
621 * src/vcg.h: Comment fix.
622 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
623 (G_CMAX): Change to -1 instead of INT_MAX.
624
625 * data/yacc.c (yyparse): Omit spaces before #line.
626
627 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
628
629 * src/tables.c (state_number_to_vector_number): Put it inside an
630 "#if 0", since it's not currently used. Problem reported by
631 Roland McGrath.
632
633 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
634
635 * src/output.c (escaped_output): Renamed from
636 escaped_file_name_output, since we now use it for symbol tags as
637 well. All uses changed.
638 (symbol_destructors_output, symbol_printers_output):
639 Escape symbol tags too.
640 Problem reported by Matyas Forstner in
641 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
642
643 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
644 not needed.
645 * src/output.c (user_actions_output, token_definitions_output,
646 symbol_destructors_output, symbol_printers_output): Likewise.
647 * src/reader.c (prologue_augment): Likewise.
648 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
649
650 * src/vcg.c (output_edge): Don't quote linestyle arg.
651 Problem reported by twlevo@xs4all.nl.
652
653 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
654
655 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
656 example, reported by Derek M Jones. Also, make the example even
657 more outrageous, to better illustrate how bad the problem is.
658
659 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
660
661 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
662 putsym. Typo reported by Sebastian Piping.
663
664 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
665
666 * doc/bison.texinfo (Language and Grammar): some -> same
667 (Epilogue): int he -> in the
668 Typos reported by Sebastian Piping via Justin Pence.
669
670 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
671
672 * tests/glr-regression.at (Improper handling of embedded actions
673 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
674 embedded actions and $-N in GLR parsers", work around an Autoconf bug
675 with dollar signs in test names.
676 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
677 for a similar reason.
678
679 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
680
681 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
682 wants to redefine G_VIEW.
683
684 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
685
686 * src/vcg.c (get_view_str): Remove case for normal_view.
687 Problem reported by twlevo@xs4all.nl.
688
689 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
690
691 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
692 Problem reported by twlevo@xs4all.nl.
693
694 * doc/bison.texinfo: Change @dircategory from "GNU programming
695 tools" to "Software development". Requested by Richard Stallman
696 via Karl Berry.
697
698 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
699
700 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
701 Problem reported by twlevo@xs4all.nl.
702
703 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
704
705 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
706 keyword; it's not needed with modern compilers, and it doesn't
707 affect correctness with older compilers. Suggested by
708 twlevo@xs4all.nl.
709
710 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
711
712 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
713 gcc -Wswitch-default.
714 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
715 * data/yacc.c (yyparse): Likewise.
716
717 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
718
719 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
720 already. Let config.h define any nonstandard values.
721
722 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
723
724 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
725 for the benefit of slower hosts. Problem reported by
726 Nelson H. F. Beebe.
727
728 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
729
730 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
731 being defined and not used.
732 * data/lalr1.cc (yyparse): Likewise.
733 Use "if (false)" rather than "if (0)".
734
735 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
736
737 * TODO: Mention that we should allow NUL bytes in tokens.
738
739 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
740
741 * src/scan-skel.l (<<EOF>>): Don't close standard output.
742 Problem reported by Hans Aberg.
743
744 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
745
746 * src/getargs.c (version): Happy new year; update overall
747 program copyright date from 2004 to 2005.
748
749 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
750 Problem reported by Hans Aberg.
751 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
752 (Output file names.): Add a test for the case when standard output
753 is closed.
754
755 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
756
757 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
758 to fix an oversight in the Bison 2.0 manual.
759
760 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
761
762 * NEWS: Version 2.0. Reformat the existing news items since
763 1.875, so that related items are grouped together.
764 * configure.ac (AC_INIT): Bump version to 2.0.
765 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
766
767 * tests/torture.at (Exploding the Stack Size with Alloca): Set
768 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
769 otherwise, we're not testing alloca. Unfortunately there's no
770 simple way to consult HAVE_ALLOCA here.
771
772 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
773 for yymsg, too.
774
775 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
776 hand. This avoids a warning about comparing int to size_t when
777 GCC warnings are enabled.
778
779 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
780
781 * NEWS: Bison-generated parsers no longer default to using the
782 alloca function (when available) to extend the parser stack, due
783 to widespread problems in unchecked stack-overflow detection.
784 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
785 responsibility to set it to a positive value. This lets the user
786 specify a value that is not a preprocessor constant.
787 * data/yacc.c (YYMAXDEPTH): Likewise.
788 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
789 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
790 to be a compile-time constant. However, explain the constraints on it.
791 Also, explain the constraints on YYINITDEPTH.
792 (Table of Symbols): Explain that alloca is no longer the default.
793 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
794 to 1.
795
796 * doc/bison.texinfo (Location Default Action): Mention that n must
797 be zero when k is zero. Suggested by Frank Heckenbach.
798
799 2004-12-22 Akim Demaille <akim@epita.fr>
800
801 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
802 (parser::state_type, parser::semantic_type, parser::location_type):
803 Private, not public.
804 (parser::parse): Return ints, not bool.
805 Returning a bool introduces a problem: 0 corresponds to false, and
806 it seems weird to return false on success. Returning true changes
807 the conventions for yyparse.
808 Alternatively we could return void and send an exception.
809 There is no clear consensus (yet?).
810 (state_stack, semantic_stack, location_stack): Rename as...
811 (state_stack_type, semantic_stack_type, location_stack_type): these.
812 Private, not public.
813 * tests/c++.at: New.
814 * tests/testsuite.at, tests/Makefile.am: Adjust.
815
816 2004-12-21 Akim Demaille <akim@epita.fr>
817
818 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
819
820 2004-12-21 Akim Demaille <akim@epita.fr>
821
822 Don't impose std::string for filenames.
823
824 * data/lalr1.cc (b4_filename_type): New.
825 (position::filename): Use it.
826 (parser.hh): Move the inclusion of stack.hh and location.hh below
827 the user code, so that needed headers for the filename type can be
828 included first.
829 Forward declare them before the user code.
830 * tests/Makefile.am (check-local, installcheck-local): Pass
831 TESTSUITEFLAGS to the TESTSUITE.
832
833 2004-12-20 Akim Demaille <akim@epita.fr>
834
835 Use more STL like names: my_class instead of MyClass.
836
837 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
838 (SemanticStack, SemanticType, StateStack, StateType)
839 (TokenNumberType, Stack, Slice, Traits, Parser::location)
840 (Parser::value): Rename as...
841 (location_stack, location_type, rhs_number_type, semantic_stack)
842 (semantic_type, state_stack, state_type, token_number_type, stack)
843 (slice, traits, parser::yylloc, parser::yylval): these.
844
845 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
846
847 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
848
849 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
850 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
851
852 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
853
854 Remove uses of 'short int' and 'unsigned short int'. This raises
855 some arbitrary limits. It uses more memory but nowadays that's
856 not much of an issue.
857
858 This change does not affect the generated parsers; that's a different
859 task, as some users will want to conserve memory there.
860
861 Ideally we should use size_t to represent all object counts, and
862 something like ptrdiff_t to represent signed differences of object
863 counts; but that will require more code-cleanup than I have the
864 time to do right now.
865
866 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
867 Use size_t, not int or short int, to count objects.
868 * src/closure.c (nritemset, closure): Likewise.
869 * src/closure.h (nritemset, closure): Likewise.
870 * src/nullable.c (nullable_compute): Likewise.
871 * src/print.c (print_core): Likewise.
872 * src/print_graph.c (print_core): Likewise.
873 * src/state.c (state_compare, state_hash): Likewise.
874 * src/state.h (struct state): Likewise.
875 * src/tables.c (default_goto, goto_actions): Likewise.
876
877 * src/gram.h (rule_number, rule): Use int, not short int.
878 * src/output.c (prepare_rules): Likewise.
879 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
880 errs, reductions): Likewise.
881 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
882 Likewise.
883 * src/tables.c (vector_number, tally, action_number,
884 ACTION_NUMBER_MINIMUM): Likewise.
885 * src/output.c (muscle_insert_short_int_table): Remove.
886
887 2004-12-17 Akim Demaille <akim@epita.fr>
888
889 * data/lalr1.cc: Extensive Doxygenation.
890 (error_): Rename as...
891 (error): this, since it is visible to the user.
892 Adjust callers.
893 (Parser::message): Now an automatic variable from...
894 (Parser::yyreport_syntax_error_): here.
895 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
896 Parser::error.
897 * tests/input.at: Escape $.
898
899 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
900
901 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
902 Parenthesize rhs to avoid obscure problems with mistakes like
903 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
904 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
905 b4_rhs_location): Likewise.
906 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
907 b4_rhs_location): Likewise.
908
909 2004-12-16 Akim Demaille <akim@epita.fr>
910
911 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
912 yacc.c: be sure to stay within yycheck_.
913 * tests/actions.at: Re-enable C++ tests.
914
915 2004-12-16 Akim Demaille <akim@epita.fr>
916
917 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
918 real.
919
920 2004-12-16 Akim Demaille <akim@epita.fr>
921
922 Use #define to handle the %name-prefix.
923
924 * data/glr.c, data/yacc.c: Comment changes.
925 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
926 so that one can refer to yylex in the parser file, and have it
927 renamed, as is the case with other skeletons.
928
929 2004-12-16 Akim Demaille <akim@epita.fr>
930
931 Move lalr1.cc internals into yy*.
932
933 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
934 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
935 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
936 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
937 (empty_, final_, terror_, errcode_, ntokens_)
938 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
939 (looka_, ilooka_, error_range_, nerrs_):
940 Rename as...
941 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
942 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
943 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
944 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
945 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
946 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
947 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
948 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
949 these.
950
951 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
952
953 Fix some problems reported by twlevo at xs4all.
954 * src/symtab.c (symbol_new): Report an error if the input grammar
955 contains too many symbols. This is better than calling abort() later.
956 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
957 (struct node, struct graph):
958 Rename member expand to stretch. All uses changed.
959 (struct graph): Remove member layoutalgorithm. All uses removed.
960 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
961 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
962 All uses changed.
963 (N_STRETCH): Rename from N_EXPAND. All uses changed.
964
965 2004-12-15 Akim Demaille <akim@epita.fr>
966
967 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
968 Add more Doxygen comments.
969 (symprint_, stack_print_, reduce_print_, destruct_, pop)
970 (report_syntax_error_, translate_): Rename as...
971 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
972 (yypop_, yyreport_syntax_error_, yytranslate_): this.
973
974 2004-12-15 Akim Demaille <akim@epita.fr>
975
976 * data/lalr1.cc (lex_): Rename as...
977 (yylex_): this.
978 Move the trace here.
979 Take the %name-prefix into account.
980 Reported by Alexandre Duret-Lutz.
981
982 2004-12-15 Akim Demaille <akim@epita.fr>
983
984 Simplify the C++ parser constructor.
985
986 * data/lalr1.cc (debug_): Rename as...
987 (yydebug_): so that the parser's internals are always in the yy*
988 pseudo namespace.
989 Adjust uses.
990 (b4_parse_param_decl): Remove the leading comma as it is now only
991 called as unique argument list.
992 (Parser::Parser): Remove the constructor accepting a location and
993 an initial debugging level.
994 Remove from the other ctor the argument for the debugging level.
995 (debug_level_type, debug_level, set_debug_level): New.
996
997 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
998 constructor calls.
999
1000 2004-12-15 Akim Demaille <akim@epita.fr>
1001
1002 Remove b4_root related material: failure experiment
1003 (which goal was to allow to derive from a class).
1004
1005 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
1006 definitions and uses.
1007
1008 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
1009
1010 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
1011 not 2, since it's not portable to subtract 1 from the start of an
1012 array. The new item 0 is never set or used. All uses changed.
1013
1014 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
1015 the default definition of YYLLOC_DEFAULT. Problem reported
1016 by Frank Heckenbach.
1017
1018 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
1019
1020 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
1021 the normal case and one for the error case. Just use the
1022 first one uniformly. Problem reported by Frank Heckenbach.
1023 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
1024 use exactly the same macro in both places.
1025 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
1026 so that the normal-case YYRHSLOC works for the error case too.
1027 All uses changed.
1028 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
1029 (YYLLOC_DEFAULT): Use the same macro as glr.c.
1030 * doc/bison.texinfo (Location Default Action): Don't claim that
1031 we have an array of locations. Use the same macro for both glr
1032 and lalr parsers. Mention YYRHSLOC. Mention what happens when
1033 the index is 0.
1034
1035 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1036
1037 * HACKING: Update email addresses to send announcements to.
1038
1039 * configure.ac (AC_INIT): Bump version to 1.875f.
1040
1041 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
1042
1043 * NEWS: Version 1.875e.
1044 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
1045
1046 * src/scan-skel.l: Include "complain.h", for "fatal".
1047
1048 * src/relation.h (relation_print, relation_digraph):
1049 Relation sizes are of type relation_node, not size_t (this is
1050 merely a doc fix, since the two types are equivalent).
1051 (relation_transpose): Relation sizes are of type relation_node,
1052 not int.
1053 * src/relation.c: Likewise.
1054 (top, infinity): Now of type relation_node, not int.
1055 (traverse, relation_transpose): Use relation_node, not int.
1056
1057 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
1058 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
1059 (yyparse): Remove unused local introduced in 2004-10-25 patch.
1060
1061 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
1062 specifying whether the test should be skipped. Use it tp
1063 specify that the [%defines %skeleton "lalr1.cc"] tests currently
1064 fail on some hosts, and should be skipped.
1065
1066 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
1067
1068 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
1069 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
1070 unless otherwise specified below.
1071
1072 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
1073 to allocate kernel_base, kernel_items, kernel_size, since
1074 they needn't be initialized to 0.
1075 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
1076 * src/closure.c (new_closure): Likewise, for itemset.
1077 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
1078 * src/lalr.c (set_goto_map): Likewise, for temp_map.
1079 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
1080 (build_relations): Likewise for edge, states1, includes.
1081 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
1082 * src/reader.c (packgram): Likewise, for ritem, rules.
1083 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
1084 * src/relation.c (relation_digraph): Likewise for VERTICES.
1085 (relation_transpose): Likewise for new_R, end_R.
1086 * src/symtab.c (symbols_token_translations_init): Likewise for
1087 token_translations.
1088 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
1089 (token_actions): Likewise for yydefact, actrow, conflrow,
1090 conflict_list.
1091 (save_column): Likewise for froms[symno], tos[symno].
1092 (goto_actions): Likewise for state_count.
1093 (pack_table): Likewise for base, pos, check.
1094 (tables_generate): Likewise for width.
1095
1096 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
1097 for initial core. Just have a separate core, so we needn't worry
1098 about whether kernel_size and kernel_base are initialized.
1099
1100 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
1101 kernel_size, kernel_items): Remove unnecessary initialization.
1102 * src/conflicts.c (conflicts): Likewise.
1103 * src/derives.c (derives): Likewise.
1104 * src/muscle_tablc (muscle_insert): Likewise.
1105 * src/relation.c (relation_digraph): Likewise.
1106 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
1107 conflrow, conflict_table, conflict_list, table, check):
1108 Likewise.
1109
1110 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
1111 This is because all callers pass unsigned int.
1112 * src/closure.h (new_closure): Likewise.
1113
1114 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
1115 (build_relations): Initialize includes[i] in all cases.
1116 * src/reader.c (packgram): Always initialize rules[ruleno].prec
1117 and rules[ruleno].precsym. Initialize members in order.
1118 * src/relation.c (relation_transpose): Always initialize new_R[i]
1119 and end_R[i].
1120 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
1121
1122 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
1123 conflict_list[0] was always 0, but now it isn't initialized.
1124
1125 * src/table.c (table_grow): When conflict_table grew, the grown
1126 area wasn't cleared. Fix this.
1127
1128 * lib/.cvsignore: Add strdup.c, strdup.h.
1129 * m4/.cvsignore: Add strdup.m4.
1130
1131 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
1132
1133 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
1134 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
1135 GOTO_NUMBER_MAXIMUM, since we occasionally compute
1136 ngotos + 1 without checking for overflow.
1137 (build_relations): Use END_NODE, not -1, to denote end of edges.
1138 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
1139 build_relations): Use goto_number, not int, for goto numbers.
1140 * src/tables.c (save_column, default_goto): Likewise.
1141
1142 2004-11-23 Akim Demaille <akim@epita.fr>
1143
1144 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
1145 of #defining from yystype.
1146 Don't typedef yystype, C++ does not need it.
1147 This lets it possible to forward declare it as union.
1148
1149 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
1150
1151 * bootstrap (gnulib_modules): Add extensions.
1152 Problem reported by Jim Meyering.
1153
1154 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
1155
1156 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
1157 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
1158 src/system.h, src/tables.c: XFREE -> free, to accommodate
1159 recent change to gnulib xalloc.h.
1160 Problem reported by Jim Meyering.
1161
1162 2004-11-17 Akim Demaille <akim@epita.fr>
1163
1164 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
1165
1166 2004-10-28 Akim Demaille <akim@epita.fr>,
1167 Alexandre Duret-Lutz <adl@gnu.org>
1168
1169 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
1170 changes.
1171 (YYCDEBUG): Adjust.
1172 Use it instead of cdebug_.
1173 (Parser::debug_stream, Parser::set_debug_stream): New.
1174 (Parser::symprint_): Define cdebug_ for temporary backward
1175 compatibility.
1176 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
1177 debug_stream ().
1178
1179 2004-11-17 Akim Demaille <akim@epita.fr>
1180
1181 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
1182 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
1183 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
1184 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
1185
1186 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
1187
1188 * data/glr.c (yyloc_default): Remove; not used.
1189 Problem reported by Frank Heckenbach.
1190
1191 2004-10-25 Akim Demaille <akim@epita.fr>
1192
1193 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
1194 Introduce another definition to address simple location arrays.
1195 (yyGLRStack): New member: yyerror_range.
1196 (yyrecoverSyntaxError, yyparse): Update it.
1197 (yyrecoverSyntaxError): Use it when shifting the error token to
1198 have an accurate range, equivalent to the one computed by both
1199 yacc.c and lalr1.cc.
1200 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
1201 that column numbers start at column 0, as per GNU Coding
1202 Standards, the others tests, and the doc.
1203 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
1204 Adjust to the above change (first column is 0).
1205 And adjust the location of the "<error>", now covering the whole
1206 line.
1207
1208 2004-10-22 Akim Demaille <akim@epita.fr>
1209 and Paul Eggert <eggert@cs.ucla.edu>
1210
1211 Remove some arbitrary limits on goto numbers and relations.
1212 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
1213 initial values, since they're never used.
1214 (set_goto_map): ngotos is now unsigned, so test for overflow
1215 by seeing whether it wraps around to zero.
1216 * src/lalr.h (goto_number): Now size_t, not short int.
1217 (GOTO_NUMBER_MAXIMUM): Remove.
1218 * src/relation.c (relation_print, traverse, relation_transpose):
1219 Check for END_NODE rather than looking at sign.
1220 * src/relation.h (END_NODE): New macro.
1221 (relation_node): Now size_t, not short int.
1222
1223 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
1224
1225 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
1226 keyword, not an identifier. Problem reported by Baron Schwartz in
1227 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
1228
1229 2004-10-11 Akim Demaille <akim@epita.fr>
1230
1231 * src/symtab.c (symbol_check_alias_consistency): Also check
1232 type names, destructors, and printers.
1233 Reported by Alexandre Duret-Lutz.
1234 Recode the handling of associativity and precedence in terms
1235 of symbol_precedence_set.
1236 Accept no redeclaration at all, not even equal to the previous
1237 value.
1238 (redeclaration): New.
1239 Use it to factor redeclaration complaints.
1240 (symbol_make_alias): Don't set the type of the alias, let
1241 symbol_check_alias_consistency do it as for other features.
1242 * src/symtab.h (symbol): Add new member prec_location, and
1243 type_location.
1244 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
1245 * tests/input.at (Incompatible Aliases): New.
1246
1247 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
1248
1249 .cvsignore fixes to accommodate gnulib changes,
1250 and the practice of naming build directories "_build".
1251 * .cvsignore: Add "_*". Sort.
1252 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
1253 * m4/.cvsignore: Add "*_gl.m4".
1254
1255 2004-10-06 Akim Demaille <akim@epita.fr>
1256
1257 * src/parse-gram.y (add_param): Fix the truncation of trailing
1258 spaces.
1259
1260 2004-10-05 Akim Demaille <akim@epita.fr>
1261
1262 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
1263 whether the reducion was empty or not. This leaves room to
1264 improve the use of YYLLOC_DEFAULT in such a case.
1265 lalr1.cc is still experimental, so changing this is acceptable.
1266 And finally, there are probably not many users who changed the
1267 handling of locations in GLR, so changing is admissible too.
1268
1269 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
1270 empty reduction, set @$ to an empty location ending the previously
1271 stacked symbol.
1272 Adjust uses to make sure the code is triggered on empty
1273 reductions.
1274 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
1275 expected output: empty reductions have empty locations.
1276
1277 2004-09-29 Akim Demaille <akim@epita.fr>
1278
1279 * data/lalr1.cc: Move towards a more standard C++ coding style
1280 for templates: Class < T > -> Class<T>.
1281
1282 2004-09-29 Akim Demaille <akim@epita.fr>
1283
1284 * data/lalr1.cc: Reinstall the former ctor, for sake of
1285 compatibility, but warn it will be removed.
1286 Move towards a more standard C++ coding style (i.e., type *var ->
1287 type* var).
1288
1289 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
1290
1291 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
1292 since it's less likely to work if NULs are involved in the future.
1293
1294 2004-09-27 Akim Demaille <akim@epita.fr>
1295
1296 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
1297
1298 2004-09-27 Akim Demaille <akim@epita.fr>
1299
1300 * data/lalr1.cc (b4_parse_param_decl_1): New.
1301 (b4_parse_param_decl): Use it to have different names between attribute
1302 and argument names.
1303 (b4_cc_constructor_call): Likewise.
1304
1305 2004-09-24 Akim Demaille <akim@epita.fr>
1306
1307 * src/parse-gram.y (add_param): Strip the leading and trailing
1308 blanks from a formal argument declaration.
1309 (YY_LOCATION_PRINT): New.
1310
1311 2004-09-24 Akim Demaille <akim@epita.fr>
1312
1313 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
1314 after the location.
1315
1316 2004-09-24 Akim Demaille <akim@epita.fr>
1317
1318 * doc/bison.texinfo (Table of Symbols): Sort.
1319
1320 2004-09-21 Akim Demaille <akim@epita.fr>
1321
1322 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
1323 the useless parentheses.
1324 Suggested by Paul Eggert.
1325
1326 2004-09-20 Akim Demaille <akim@epita.fr>
1327
1328 Let the initial-action act on the look-ahead, and use it for the
1329 "initial push" (corresponding to an hypothetical beginning-of-file).
1330 And let lalr1.cc honor %initial-action.
1331
1332 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
1333 example.
1334 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
1335 (Parser::Parser): Remove the ctor that used to initialize it.
1336 (Parser::parse): Like in the other skeletons, issue the "starting
1337 parse" message before any action.
1338 Honor %initial-action.
1339 Initialize the stacks with the lookahead.
1340 * data/yacc.c: Let $$ and @$ in %initial-action designate the
1341 look-ahead.
1342 Push them in the stacks.
1343 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
1344
1345 2004-09-20 Akim Demaille <akim@epita.fr>
1346
1347 * doc/bison.texinfo (Initial Action Decl): New.
1348
1349 2004-09-20 Akim Demaille <akim@epita.fr>
1350
1351 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
1352 clearer criterion to define it.
1353 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
1354 When reducing on an empty RHS, use the latest stacked location as
1355 location.
1356 yylloc is not always available.
1357 * data/glr.c: Likewise.
1358 Also, honor initial-actions.
1359
1360 2004-09-20 Akim Demaille <akim@epita.fr>
1361
1362 * data/yacc.c (YY_LOCATION_PRINT): New.
1363 Define when we know YYLTYPE's structure, i.e., when the default
1364 YYLLOC_DEFAULT is used.
1365 * data/c.m4 (b4_yysymprint_generate): Use it.
1366 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
1367 value of the result.
1368 (error_start_): Replace with...
1369 (error_range_): this location array.
1370 This allows to replace code relying on the implementation of
1371 locations by portable code.
1372 * data/yacc.c (yylerrsp): Replace with...
1373 (yyerror_range): this.
1374 Every time a token is popped, update yyerror_range[0], to have an
1375 accurate location for the error token.
1376 * data/glr.c (YY_LOCATION_PRINT): New.
1377 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
1378 deference a pointer.
1379 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
1380 report the location in %printers.
1381
1382 * src/scan-skel.l: Instead of abort, report error messages to ease
1383 understanding skeleton scanning failures.
1384
1385 2004-09-16 Akim Demaille <akim@epita.fr>
1386
1387 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
1388 (iterator, const_iterator): these, to be more in the C++ spirit.
1389 Also, return reverse iterators so that when displaying the stack
1390 we display its bottom first.
1391 (Parser::stack_print_, Parser::reduce_print_): Match the messages
1392 from yacc.c.
1393 We should probably use vector here though.
1394
1395 2004-09-16 Akim Demaille <akim@epita.fr>
1396
1397 Have more complete shift traces.
1398
1399 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
1400 to report Shifts instead of ad hoc YYDPRINTF invocations,
1401 including for the error token.
1402 * data/lalr1.cc (symprint_): Output the location.
1403 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
1404 output the location within the %printer.
1405 Activate GLR tests, at least to make sure they compile properly.
1406 They still don't pass though.
1407 * tests/calc.at: Adjust expect verbose output, since now "Entering
1408 state..." is on a different line than the "Shifting" message.
1409
1410 2004-09-08 Akim Demaille <akim@epita.fr>
1411
1412 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
1413 Bison directive from the Bison file to the invocation of this
1414 macro, so that these directives are passed to
1415 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
1416 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
1417 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
1418 the extra Bison directives instead of the whole series.
1419 Change the grammar so that there are recoverable errors, and
1420 unrecoverable errors. Now we can have the parser give up before
1421 consuming the whole input. As a result we now can observe that
1422 the lookahead is freed when needed.
1423 Change the parser source to parse argv[1] instead of a hard coded
1424 string.
1425 Simplify yylex, and give a value and location to EOF.
1426 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
1427 passed directives already coded in the file.
1428 Add some tests to check the location of "error".
1429 For some tests, the C++ parser is correct, and not yacc.c.
1430 For other tests, they provide different, but unsatisfying, values,
1431 so keep the C++ value so that at least one parser is "correct"
1432 according to the test suite.
1433 (Actions after errors): Remove, this is subsumed by the
1434 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
1435
1436 2004-09-06 Akim Demaille <akim@epita.fr>
1437
1438 * data/lalr1.cc: Adjust the indentation of the labels.
1439 (Parser::pop): New.
1440 Use it.
1441
1442 2004-09-06 Akim Demaille <akim@epita.fr>
1443
1444 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
1445 argument, an informative message.
1446 Call YY_SYMBOL_PRINT.
1447 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
1448 * data/lalr1.cc (destruct_): Likewise.
1449 In addition, no longer depend on b4_yysymprint_generate and
1450 b4_yydestruct_generate to generate these functions, do it "by
1451 hand".
1452
1453 2004-09-03 Akim Demaille <akim@epita.fr>
1454
1455 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
1456 invoked, yydestruct the lookahead.
1457 * tests/calc.at (Calculator $1): Update the expected lengths of
1458 traces: there is an added line for the discarded lookahead.
1459 * doc/bison.texinfo (Destructor Decl): Some rewording.
1460 Define "discarded" symbols.
1461
1462 2004-09-02 Akim Demaille <akim@epita.fr>
1463
1464 * data/lalr1.cc (translate_, destruct_): No reason to be static.
1465
1466 2004-09-02 Akim Demaille <akim@epita.fr>
1467
1468 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
1469 (YYDSYMPRINTF): Rename as...
1470 (YY_SYMBOL_PRINT): this.
1471 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
1472 two.
1473 Use it instead of direct symprint_ calls.
1474 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
1475 one.
1476
1477 2004-09-02 Akim Demaille <akim@epita.fr>
1478
1479 * data/lalr1.cc (b4_yysymprint_generate): New.
1480 (symprint_): New member function, defined when YYDEBUG.
1481 Use it consistently instead of token/nterm debugging output by
1482 hand.
1483 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
1484 %printer calls to use cdebug_ when using lalr1.cc.
1485
1486 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
1487
1488 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
1489 with #ifdef YYDEBUG.
1490
1491 2004-08-26 Akim Demaille <akim@epita.fr>
1492
1493 * doc/bison.texinfo (Implementing Loops): Rename as...
1494 (Implementing Gotos/Loops): this.
1495
1496 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
1497
1498 Adjust to latest gnulib.
1499 * bootstrap (gnulib_modules): Add xalloc-die.
1500 Set LC_ALL=C so that file names sort consistently.
1501 Prefer the gnulib copies of gettext.m4, glibc21.m4,
1502 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
1503 uintmax_t.m4, ulonglong.m4.
1504 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
1505 po.m4 since we are now using _gl.m4 instead.
1506
1507 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
1508
1509 * src/scan-action.l: Remove. Scanning of semantic actions is
1510 handled in scan-gram.l.
1511
1512 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
1513
1514 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
1515
1516 * src/location.h (struct): The file member is a uniqstr.
1517 (equal_boundaries): Use UNIQSTR_EQ for comparison.
1518
1519 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
1520
1521 Fix bug with non-%union parsers that have printers or destructors,
1522 which led to a Bison core dump. Reported by Peter Fales in
1523 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
1524
1525 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
1526 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
1527 not to our own type.
1528 * src/output.c (symbol_destructors_output, symbol_printers_output):
1529 Don't assume %union.
1530 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
1531 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
1532 UNION-FLAG. All callers changed.
1533 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
1534 Use type char, not unsigned int, when declaring an array of char;
1535 this lets us remove a cast.
1536 (Printers and Destructors): Add non-%union test cases.
1537
1538 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
1539
1540 * doc/bison.texinfo: Minor editorial changes, mostly to the new
1541 GLR writeups. E.g., avoid frenchspacing and the future tense,
1542 change "lookahead" to "look-ahead", and change "wrt" to "with
1543 respect to".
1544
1545 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1546
1547 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
1548 New sections, split off from the GLR Parsers section. Put the new
1549 Simple GLR Parser near the start of the GLR section, for clarity.
1550 Rewrite connective text.
1551
1552 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
1553
1554 * doc/bison.texinfo (Simple GLR Parsers): New section.
1555
1556 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
1557
1558 * NEWS, TODO, doc/bison.texinfo:
1559 Use "look-ahead" instead of "lookahead", to be consistent.
1560 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
1561 while we're fixing "look-ahead".
1562 * src/conflicts.c (shift_set): Renamed from shiftset.
1563 (look_ahead_set): Renamed from lookaheadset.
1564 * src/print.c: Likewise.
1565 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
1566 name for "lookahead".
1567 (report_types, usage): Likewise.
1568 * src/getargs.h (report_look_ahead_tokens): Renamed from
1569 report_lookaheads.
1570 * src/lalr.c (compute_look_ahead_tokens): Renamed from
1571 compute_lookaheads.
1572 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
1573 (look_ahead_tokens_print): Renamed from lookaheads_print.
1574 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
1575 state_rule_lookaheads_print.
1576 * src/state.h: Likewise.
1577 (reductions.look_ahead_tokens): Renamed from lookaheads.
1578 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
1579 AT_DATA_LOOKAHEADS_GRAMMAR.
1580
1581 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
1582
1583 * README: Update location of patched M4 distribution.
1584
1585 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
1586
1587 Don't assume the C++ compiler takes the same arguments as the C compiler
1588 (trivial change).
1589 * configure.ac (O0CXXFLAGS): New var.
1590 * tests/atlocal.in (CXXFLAGS): Use it.
1591
1592 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
1593
1594 Fix some "make check" problems with C++ reported by
1595 Albert Chin-A-Young for Tru64 C++ in this thread:
1596 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
1597
1598 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
1599 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1600 Output to a .cc file for C++, not to a .c file.
1601 * tests/calc.at (AT_CHECK_CALC): Likewise.
1602 * tests/regression.at (AT_CHECK_DANCER): Likewise.
1603 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
1604
1605 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
1606
1607 * tests/calc.at, tests/actions.at: Workaround for SGI
1608 C++ compiler. (trivial change)
1609
1610 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
1611
1612 Spent a few hours checking out which prerequisite versions the
1613 current sources actually require. I went all the way back to
1614 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
1615 a seemingly endless set of combinations of versions more recent
1616 than that. The bottom line is that the current sources require
1617 fairly recent versions of the build tools, and it'll be some work
1618 to change this.
1619 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
1620 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
1621 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
1622 Add comments explaining why those particular versions are
1623 currently needed.
1624
1625 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
1626 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
1627 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
1628
1629 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
1630 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
1631
1632 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
1633
1634 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
1635 0.11.5. Suggested by Bruno Haible.
1636 * bootstrap: Remove gettext version checking.
1637
1638 * doc/bison.texinfo (Decl Summary): Also mention that %union
1639 can depend on prerequisite types. Problem reported by Tim
1640 Van Holder.
1641
1642 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
1643
1644 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
1645 * README-alpha: Don't tell people not to package this.
1646
1647 * bootstrap: Don't assume $(...) works; use `...` instead.
1648 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
1649 gettext better.
1650
1651 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
1652 put into the -d output file, and mention what to do if YYSTYPE is
1653 defined as a macro.
1654
1655 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
1656
1657 Undo change made earlier today: it caused autopoint to not bring
1658 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
1659 autopoint's.
1660
1661 * bootstrap: Check that gettext version matches what's in
1662 configure.ac. Warn users to ignore robots.txt ERROR 404.
1663 * bootstrap: Undo today's earlier change (logged below).
1664 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
1665
1666 The gettext version checking is causing more trouble than it's
1667 curing; remove it. Problem reported by Paul Hilfinger.
1668
1669 * bootstrap: Issue a warning that one can expect a message
1670 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
1671 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
1672
1673 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
1674
1675 Ensure that the C++ compiler used for testing actually works on a
1676 simple test program; if not, skip the C++-related tests. Problem
1677 reported by Vin Shelton in:
1678 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
1679
1680 * m4/cxx.m4: New file.
1681 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
1682 * tests/atlocal.in (BISON_CXX_WORKS): Add.
1683 * tests/local.at (AT_COMPILE_CXX): Use it.
1684
1685 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
1686
1687 * data/glr.c (yylloc): Output this macro even if locations are not
1688 being generated, as the GLR parser needs it even in that case.
1689 Problem reported by Troy A. Johnson
1690 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
1691
1692 * configure.ac (AC_INIT): Update to 1.875e.
1693
1694 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
1695
1696 * NEWS: Version 1.875d.
1697 * configure.ac (AC_INIT): Likewise.
1698 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
1699
1700 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
1701 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
1702 lalr1.cc runs afoul of the first, and the last two are no longer
1703 supported by GCC 3.4.0.
1704 * README: Mention GNU m4 1.4 or later; mention m4 patches.
1705 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
1706
1707 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
1708
1709 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
1710 unsigned int, for compatibility with latest gnulib hash module.
1711 * src/state.c (state_hash, state_hasher): Likewise.
1712 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
1713 * src/uniqstr.c (hash_uniqstr): Likewise.
1714
1715 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
1716
1717 * NEWS: Unescaped newlines are no longer allowed in char & strings.
1718
1719 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
1720 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
1721 character and string literals.
1722 (unexpected_end): New function.
1723 (unexpected_eof): Use it.
1724 (unexpected_newline): New function.
1725 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
1726 actions.
1727
1728 * NEWS: Document %expect-rr.
1729
1730 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
1731 Fix typo by replacing $1 with $option.
1732 Remove more 'intl'-related files.
1733 Don't DEFUN AM_INTL_SUBDIR twice.
1734
1735 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
1736 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
1737 strtoul.c.
1738 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
1739 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
1740 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
1741 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
1742 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
1743 * src/.cvsignore: Add *.output.
1744
1745 * src/parse-gram.y: Put copyright notice inside %{ %} so it
1746 gets copied to the output file.
1747
1748 2004-04-28 Paul Eggert <eggert@twinsun.com>
1749
1750 Get files from the gnulib and po repositories, instead of relying
1751 on them being in our CVS. Upgrade to latest versions of gnulib
1752 and Automake.
1753
1754 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
1755 * bootstrap: Bootstrap from gnulib and po repositories.
1756 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
1757 * README-cvs: Document these changes. Remove version numbers from
1758 mentions of build tools, since they change so often. Mention Flex.
1759
1760 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
1761 (gl_USE_SYSTEM_EXTENSIONS): Add.
1762 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
1763 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1764 does this for us.
1765 (AC_ISC_POSIX): Remove; we no longer support this
1766 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1767 (AC_HEADER_STDC): Remove: we now assume C89 or better.
1768 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
1769 Do not check for C89 headers, except for locale.h which is used
1770 by the Yacc library and must port to K&R hosts.
1771 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
1772 Do not check for C89 functions, except for setlocale which is
1773 used by the Yacc library.
1774 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
1775 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
1776 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
1777 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
1778 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
1779 AM_GNU_GETTEXT): Remove; now done by:
1780 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
1781 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
1782 for us.
1783
1784 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
1785 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
1786 Define to empty, as gnulib.mk will do the rest for us.
1787 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
1788 for us.
1789 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
1790 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
1791
1792 * src/files.c: Include gnulib's xstrndup.h.
1793
1794 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
1795 (REALLOC): Use xnrealloc, for likewise.
1796 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
1797 (strnlen, memrchr): Remove decls; functions no longer used.
1798 Include <stpcpy.h>.
1799
1800 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
1801 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
1802 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
1803 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
1804 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
1805 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
1806 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
1807 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
1808 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
1809 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
1810 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
1811 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
1812 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
1813 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
1814 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
1815 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
1816 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
1817 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
1818 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
1819 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
1820 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
1821 Remove, as these files are now generated automatically
1822 by bootstrap or automake.
1823
1824 * po/ChangeLog: Remove: all but one entry was a duplicate
1825 of this file, and I moved that 2000-11-02 entry here.
1826
1827 * config/.cvsignore: Add Makefile, depcomp, install-sh.
1828 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
1829 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
1830 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
1831 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
1832 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
1833 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
1834 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
1835 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
1836 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
1837 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
1838 xstrndup.h.
1839 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
1840 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
1841 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
1842 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
1843 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
1844 * src/.cvsignore: Remove *_.c.
1845
1846
1847 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
1848 support it. (The latest stable gzip doesn't.)
1849
1850 2004-04-27 Paul Eggert <eggert@twinsun.com>
1851
1852 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
1853 case, as stos_ is now used by destructors due to the 2004-02-09
1854 change.
1855
1856 Remove more K&R C support.
1857 * lib/libiberty.y (PARAMS): Remove. All uses removed.
1858 * lib/subpipe.c (errno): Remove decl.
1859 Include <stdlib.h> unconditionally.
1860 (EXIT_FAILURE): Remove macro.
1861 * src/complain.c (vfprintf, strerror): Remove.
1862 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
1863 unconditionally.
1864 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
1865 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
1866 (strchr, strspn, memchr): Remove decls.
1867 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
1868 unconditionally. Do not declare perror.
1869 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
1870 unconditionally.
1871
1872 * src/complain.c (_): Remove useless defn, as system.h defines this.
1873
1874 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
1875 with latest obstack.h.
1876 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
1877 to procedure types, as obstack.h now does that for us.
1878 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
1879
1880 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
1881 so that this include file can stand alone.
1882 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
1883 does this now. Include subpipe.h first after config.h, to
1884 test whether it can stand alone.
1885
1886 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
1887 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
1888 unused declaration.
1889
1890 * tests/synclines.at (%union synch line): Put a dummy member in
1891 the union, because empty unions aren't allowed in C. Caught
1892 by GCC 3.4.0.
1893
1894 2004-04-13 Jim Meyering <jim@meyering.net>
1895
1896 * src/conflicts.c (conflicts_print): Correct format string typo:
1897 use `%%' to produce literal `%'. (trivial change)
1898
1899 2004-03-30 Paul Eggert <eggert@twinsun.com>
1900
1901 * src/getargs.c (version): Update copyright year to 2004.
1902
1903 * data/c.m4 (b4_int_type): Use 'short int' rather than
1904 'short', and similarly for 'long', 'unsigned', etc.
1905 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
1906 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
1907 yy_yypstack, yydumpstack): Likewise.
1908 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
1909 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
1910 Likewise.
1911 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
1912 yy_stack_print, yyparse): Likewise.
1913 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
1914 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
1915 * lib/bitset.c (bitset_print): Likewise.
1916 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
1917 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
1918 * lib/bitsetv.c (bitsetv_dump): Likewise.
1919 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
1920 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
1921 Likewise.
1922 * src/LR0.c (allocate_itemsets): Likewise.
1923 * src/gram.h (rule_number, rule): Likewise.
1924 * src/lalr.h (goto_number): Likewise.
1925 * src/nullable.c (nullable_compute): Likewise.
1926 * src/output.c (prepare_rules): Likewise.
1927 * src/relation.c (relation_print, relation_digraph): Likewise.
1928 * src/relation.h (relation_node): Likewise.
1929 * src/state.h (state_number, transitions, errs, reductions,
1930 struct state): Likewise.
1931 * src/symtab.h (symbol_number, struct symbol): Likewise.
1932 * src/tables.c (vector_number, tally, action_number,
1933 default_goto, goto_actions): Likewise.
1934 * tests/existing.at (GNU Cim Grammar): Likewise.
1935 * tests/regression.at (Web2c Actions): Likewise.
1936
1937 * src/output.c (muscle_insert_short_int_table): Renamed from
1938 muscle_insert_short_table. All uses changed.
1939
1940 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1941
1942 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
1943 (declaration): Replace expected_conflicts with expected_sr_conflicts.
1944 Add %expect-rr rule.
1945
1946 * src/scan-gram.l: Recognize %expect-rr.
1947
1948 * src/conflicts.h (expected_sr_conflicts): Rename from
1949 expected_conflicts.
1950 (expected_rr_conflicts): Declare.
1951
1952 * src/conflicts.c (expected_sr_conflicts): Rename from
1953 expected_conflicts.
1954 (expected_rr_conflicts): Define.
1955 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
1956 for GLR parsers.
1957 Use expected_sr_conflicts in place of expected_conflicts.
1958 Warn if expected_rr_conflicts used in non-GLR parser.
1959
1960 * doc/bison.texinfo: Add documentation for %expect-rr.
1961
1962 2004-03-08 Paul Eggert <eggert@gnu.org>
1963
1964 Add support for hex token numbers. Suggested by Odd Arild Olsen in
1965 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1966
1967 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
1968 in lalr1.cc.
1969 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
1970 * src/scan-gram.l (scan_integer): New function.
1971 ({int}): Use it.
1972 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
1973 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
1974 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
1975 Say "long int", not "long", for uniformity with GNU style.
1976
1977 2004-02-25 Paul Eggert <eggert@twinsun.com>
1978
1979 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
1980 compilers. This fixes a problem with Intel's C++ compiler being
1981 chatty, reported by Guido Trentalancia in
1982 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
1983
1984 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
1985
1986 Support %destructor and merge error locations in lalr1.cc.
1987
1988 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
1989 (Parser::stos_): Define unconditionally.
1990 (Parser::destruct_): New method. Generate its body with
1991 b4_yydestruct_generate.
1992 (Parser::error_start_): New attribute.
1993 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
1994 token which are discarded.
1995 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
1996 error_start_ when erroneous token are discarded.
1997 (Parser::parse) <yyerrlab1>: Compute the location of the error
1998 token so that it covers all the discarded tokens.
1999 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
2000 it can be called with `%skeleton "lalr1.cc"', and do that.
2001
2002 2004-02-02 Paul Eggert <eggert@twinsun.com>
2003
2004 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
2005 $(top_srcdir)/lib and ../lib. This fixes a bug reported
2006 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
2007 There's no need to mention top_builddir since Automake does that
2008 for us.
2009 (INCLUDES): Remove, as Automake says it's obsolescent.
2010 Contents migrated into AM_CPPFLAGS as described above.
2011 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
2012
2013 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
2014
2015 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
2016 (yyreportSyntaxError): Handle case where lookahead token is
2017 YYEMPTY.
2018
2019 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2020
2021 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
2022 resulting parsers are compilable with C++.
2023
2024 2003-12-23 Paul Eggert <eggert@twinsun.com>
2025
2026 * config/depcomp, config/install-sh: Sync with Automake 1.8.
2027 * src/output.c (output_skeleton): Rename local var.
2028 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
2029 Bison tokens, as this runs afoul of the 2003-10-07 change that
2030 disallowed NUL bytes in character constants or string literals.
2031
2032 * tests/local.at: Require Autoconf 2.59's Autotest.
2033 * tests/testsuite.at: Don't include local.at, since we now assume
2034 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
2035 including it.
2036 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
2037 multiple inclusion warnings.
2038
2039 2003-12-02 Akim Demaille <akim@epita.fr>
2040
2041 * doc/bison.texinfo (How Can I Reset the Parser): More about start
2042 conditions.
2043 From Bruno Haible.
2044
2045 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
2046
2047 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
2048
2049 2003-10-07 Paul Eggert <eggert@twinsun.com>
2050
2051 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
2052 if testsuite doesn't exist.
2053
2054 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
2055 literals, unfortunately.
2056 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
2057 Complain about NUL bytes in character constants or string literals.
2058
2059 2003-10-05 Paul Eggert <eggert@twinsun.com>
2060
2061 * NEWS: Don't document %no-default-prec, as it's still
2062 too experimental.
2063 * doc/bison.texinfo: Document %no-default-prec only if
2064 the defaultprec flag is set. Normally it's not.
2065
2066 2003-10-04 Paul Eggert <eggert@twinsun.com>
2067
2068 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
2069 non-modifiable lvalue, instead of a modifiable one.
2070 * doc/bison.texinfo (Actions): Document that $$ can
2071 be assigned to. Do not claim that $$ and $N are
2072 array element references: user code should not rely on this.
2073
2074 2003-10-01 Paul Eggert <eggert@twinsun.com>
2075
2076 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
2077 (grammar_declaration): Use it.
2078 * src/scan-gram.l: New token %no-default-prec.
2079 * tests/conflicts.at: Revamp tests to use %no-default-prec.
2080 * NEWS, doc/bison.texinfo: Document the above.
2081
2082 2003-10-01 Akim Demaille <akim@epita.fr>
2083
2084 VCG no longer supports long_straight_phase.
2085
2086 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
2087 * src/print_graph.c (print_graph): Adjust.
2088
2089 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
2090 and Paul Eggert <eggert@twinsun.com>
2091
2092 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
2093 Table of Symbols): Document %default-prec.
2094 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
2095 (grammar_declaration): Set default_prec on %default-prec.
2096 * src/scan-gram.l (%default-prec): New token.
2097 * src/reader.h (default_prec): New flag.
2098 * src/reader.c: Likewise.
2099 (packgram): Handle it.
2100 * tests/conflicts.at (%default-prec without %prec,
2101 %default-prec with %prec, %default-prec 1): New tests.
2102
2103 2003-09-30 Paul Eggert <eggert@twinsun.com>
2104
2105 * tests/testsuite.at: Include local.at, not input.at, fixing
2106 a typo in the 2003-08-25 patch.
2107
2108 2003-08-27 Akim Demaille <akim@epita.fr>
2109
2110 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
2111 GCC warnings.
2112
2113 2003-08-26 Akim Demaille <akim@epita.fr>
2114
2115 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
2116 "<\#" to avoid magic from Gnus when posting parts of this script.
2117
2118 2003-08-26 Akim Demaille <akim@epita.fr>
2119
2120 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
2121 (Parser::parse): here.
2122 Adjust: nerrs and errstatus is now replaced by...
2123 (Parser::nerrs_, Parser::errstatus_): New.
2124
2125 2003-08-25 Akim Demaille <akim@epita.fr>
2126
2127 * config/announce-gen, Makefile.cfg: New.
2128 * Makefile.am: Adjust.
2129 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
2130 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
2131
2132 2003-08-25 Akim Demaille <akim@epita.fr>
2133
2134 When reducing initial empty rules, Bison parser read an initial
2135 location that is not defined. This results in garbage, and that
2136 affects Bison's own parser. Therefore we need (i) to extend Bison
2137 to support a means to initialize this location, and (ii) to use
2138 this CVS Bison to fix CVS Bison's parser.
2139
2140 * src/reader.h, reader.c (epilogue_augment): Remove, replace
2141 with...
2142 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
2143 * src/parse-gram.y: Adjust.
2144 (%initial-action): New.
2145 (%error-verbose): Since we require CVS Bison, there is no reason
2146 not to use it.
2147 * src/scan-gram.l: Adjust.
2148 * src/Makefile.am (YACC): New, to make sure we use our own parser.
2149 * data/yacc.c (yyparse): Use b4_initial_action.
2150
2151 2003-08-25 Akim Demaille <akim@epita.fr>
2152
2153 * doc/bison.texinfo: Don't promote stdout for error messages.
2154
2155 2003-08-25 Akim Demaille <akim@epita.fr>
2156
2157 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
2158 From Alexandre Duret-Lutz.
2159
2160 2003-08-25 Akim Demaille <akim@epita.fr>
2161
2162 Version 1.875c.
2163
2164 2003-08-25 Akim Demaille <akim@epita.fr>
2165
2166 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
2167 Use them.
2168
2169 2003-08-25 Akim Demaille <akim@epita.fr>
2170
2171 * data/lalr1.cc (Parser::reduce_print_): New.
2172 Use it.
2173
2174 2003-08-25 Akim Demaille <akim@epita.fr>
2175
2176 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
2177 error recovery loops. This patch is based on
2178 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
2179 Also, augment the similarity between lalr1.cc and yacc.c.
2180 Note: the locations of error recovery rules are not correct yet.
2181
2182 * data/lalr1.cc: Comment changes to augment the similarity between
2183 lalr1.cc and yacc.c.
2184 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
2185 (yyerrlab1): Remove, but where it used to be (now the bottom part of
2186 yyerrlab), when hitting EOF, pop the whole stack here instead of
2187 merely falling thru the default error handling mechanism.
2188 (yyerrorlab): New label, with the old contents of YYERROR,
2189 plus the following change: pop the stack of rhs corresponding
2190 to the production that invoked YYERROR. That is how Yacc
2191 behaves (required by POSIX).
2192 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
2193 fail.
2194
2195 2003-08-25 Akim Demaille <akim@epita.fr>
2196
2197 Tune local.at so that people can "autom4te -l autotest calc.at -o
2198 calc" for instance, to extract a sub test suite.
2199
2200 * tests/testsuite.at: Move the initialization, Autotest version
2201 requirement, and AT_TESTED invocation into...
2202 * tests/local.at: here.
2203 * tests/testsuite.at: Include it for compatibility with Autoconf
2204 2.57.
2205 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
2206 be ignore.
2207
2208 2003-08-04 Paul Eggert <eggert@twinsun.com>
2209
2210 Rework code slightly to avoid gcc -Wtraditional warnings.
2211 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
2212 The returned value is now stored in *YY0. All callers changed.
2213 * src/output.c (merge_output): Adjust to the above change.
2214
2215 2003-07-26 Paul Eggert <eggert@twinsun.com>
2216
2217 * data/glr.c (YYASSERT): New macro.
2218 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
2219 yyresolveStates, yyprocessOneStack):
2220 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
2221 Derived from a suggestion by Frank Heckenbach.
2222
2223 2003-07-25 Paul Eggert <eggert@twinsun.com>
2224
2225 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
2226 for portability to K&R C (after ansi2knr, presumably). See
2227 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
2228 by Frank Heckenbach, though I have omitted the structure-initialization
2229 part of his glr-knr.diff patch since I recall that the Portable
2230 C Compiler didn't require that change.
2231
2232 Let the user specify how to allocate and free memory.
2233 Derived from a suggestion by Frank Heckenbach in
2234 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
2235 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
2236 All uses of free, malloc, realloc changed to use these macros,
2237 and unnecessary casts removed.
2238 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
2239
2240 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
2241
2242 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
2243 use s.empty() rather than s == "" to test for empty string; see
2244 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
2245 (trivial change)
2246
2247 2003-06-25 Akim Demaille <akim@epita.fr>
2248
2249 * config/depcomp, config/install-sh: Update from masters.
2250
2251 2003-06-20 Paul Eggert <eggert@twinsun.com>
2252
2253 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
2254 and return properly parenthesized result.
2255 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
2256 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
2257 Remove unnecessary parentheses from uses.
2258 * doc/bison.texinfo (Location Default Action): Describe the
2259 conventions for parentheses.
2260
2261 2003-06-19 Paul Eggert <eggert@twinsun.com>
2262
2263 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
2264 yyreportTree): Do not assume that size_t is the same width as int,
2265 when printing sizes. Print sizes using an unsigned format.
2266 Problem reported by Frank Heckenbach in
2267 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
2268
2269 Port to Forte Developer 7 C compiler.
2270 * data/glr.c (struct YYLTYPE): If locations are not being used,
2271 declare a single dummy member, as empty structs do not conform
2272 to the C standard.
2273 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
2274 the Forte Developer 7 C compiler complains that end-of-loop
2275 code is not reached.
2276
2277 2003-06-17 Paul Eggert <eggert@twinsun.com>
2278
2279 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
2280 avoid warnings from picky compilers about redefinition of PARAMS.
2281
2282 2003-06-17 Paul Eggert <eggert@twinsun.com>
2283
2284 Version 1.875b.
2285
2286 * NEWS: Document 1.875b.
2287
2288 * lib/bbitset.h: Do not include config.h; that's the includer's job.
2289 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
2290 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
2291 Don't use 'index' in comments, as it's a builtin fn on some hosts.
2292 * lib/bitset_stats.c: Include gettext.h unconditionally, as
2293 per recent gettext manual's suggestion.
2294 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
2295 Use prototypes, not old-style definitions.
2296 * lib/lbitset.c (lbitset_unused_clear): Likewise.
2297 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
2298 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
2299 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
2300 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
2301 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
2302 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
2303 vbitset_or_and_cmp, vbitset_copy): Likewise.
2304
2305 * lib/libiberty.h: Do not include config.h; that's the includer's job.
2306 Do not include <stdlib.h>.
2307 (PARAMS): Define unconditionally for C89.
2308 (ATTRIBUTE_NORETURN): Remove.
2309 (ATTRIBUTE_UNUSED): Define unconditionally.
2310
2311 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
2312 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
2313 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
2314 * lib/vbitset.c, lib/vbitset.h: New files.
2315 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
2316 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
2317 from libbitset.
2318
2319 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
2320 `How Can I Reset @code{yyparse}', since texinfo does not allow
2321 arbitrary @ in node names.
2322
2323 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
2324 shouldn't be needed according to the gettext 0.12.1 documentation
2325 but which seem to be needed anyway: codeset.m4 glibc21.m4
2326 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
2327 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
2328 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
2329
2330 * lib/.cvsignore: Add stdbool.h.
2331 * m4/.cvsignore: Add nls.m4, po.m4.
2332
2333 Upgrade to CVS gnulib.
2334 * stdbool_.h: File renamed from stdbool.h.in.
2335 * configure.ac (AM_STDBOOL_H): Invoke this instead of
2336 AC_HEADER_STDBOOL.
2337 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
2338 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
2339 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
2340 (MOSTLYCLEANFILES): New var.
2341 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
2342 (stdbool.h): New rule.
2343 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
2344 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
2345 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
2346 m4/quote.m4: Upgrade to today's gnulib.
2347
2348 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
2349 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
2350 the tests right now.
2351 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
2352 yyerror are declared before use; C99 requires this.
2353
2354 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2355
2356 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
2357 first.
2358 (yyrecoverSyntaxError): Correct the logic for setting and testing
2359 yyerrState.
2360 Correct comment on handling EOF.
2361 Allow states with only a default reduction, rather than failing
2362 (I can't quite reconstruct why these were not allowed before).
2363
2364 Fixes to avoid problem that $-N rules in GLR parsers can cause
2365 buffer overruns, corrupting state.
2366
2367 * src/output.c (prepare_rules): Output max_left_semantic_context
2368 definition.
2369 * src/reader.h (max_left_semantic_context): New variable declaration.
2370 * src/scan-gram.l (max_left_semantic_context): Define.
2371 (handle_action_dollar): Update max_left_semantic_context.
2372 * data/glr.c (YYMAXLEFT): New definition.
2373 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
2374 (yyresolveAction): Ditto.
2375
2376 Fixes to problems with location handling in GLR parsers reported by
2377 Frank Heckenbach (2003/06/05).
2378
2379 * data/glr.c (YYLTYPE): Make trivial if locations not used.
2380 (YYRHSLOC): Add parentheses, and define only if locations used.
2381 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
2382 locations not used.
2383 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
2384 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
2385
2386 * tests/cxx-type.at: Exercise location information; update tests
2387 to differentiate output with and without locations.
2388 Remove forward declarations of yylex and yyerror---caused errors
2389 because default YYLTYPE not yet defined.
2390 Change semantic actions to compute strings, rather than printing
2391 them directly (to test proper passing of semantics values). Change
2392 output to prefix notation and update test data and expected results.
2393 (yylex): Track locations.
2394 (stmtMerge): Return value rather than printing, and include arguments
2395 in value.
2396
2397 2003-06-03 Paul Eggert <eggert@twinsun.com>
2398
2399 Avoid warnings generated by GCC 2.95.4 when Bison is
2400 configured with --enable-gcc-warnings.
2401 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
2402 yy::]b4_parser_class_name[::translate_,
2403 yy::Stack::operator[] (unsigned),
2404 yy::Stack::operator[] (unsigned) const,
2405 yy::Slice::operator[] (unsigned),
2406 yy::Slice::operator[] (unsigned) const):
2407 Rename local vars to avoid warnings.
2408 * tests/glr-regression.at (Improper handling of embedded actions
2409 and $-N in GLR parsers): Remove unused local variable from yylex.
2410 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
2411 (void) as arg when not pure, since we now assume C89 when building
2412 Bison. Pacify GCC by using parameter.
2413
2414 2003-06-02 Paul Eggert <eggert@twinsun.com>
2415
2416 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
2417 yy::Location::lines, yy::Location::columns): Rename arguments
2418 to avoid shadowing; this removes a warning generated by GCC 3.3.
2419
2420 2003-06-01 Paul Eggert <eggert@twinsun.com>
2421
2422 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
2423 to g++, as GCC 3.3 complains if you do it.
2424 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
2425 everything that WARNING_CFLAGS has, except omit warnings
2426 not suitable for C++.
2427 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
2428 * tests/atlocal.in (CXXFLAGS): New var.
2429 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
2430
2431 Fix a GLR parser bug I reported in February; see
2432 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
2433 The problem was that GLR parsers did not conform to the C standard,
2434 because actions like { $1 = $2 + $3; } expanded to expressions
2435 that invoked YYFILL in separate subexpressions, and YYFILL assigned
2436 to a local variable. The C standard says that expressions
2437 like (var = f ()) + (var = f ()) have undefined behavior.
2438 Another problem was that GCC sometimes issues warnings that
2439 yyfill and its parameters are unused.
2440
2441 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
2442 as possibly unused.
2443 (yyfill): New function.
2444 (YYFILL): Use it.
2445 (yyuserAction): Change type of yynormal to bool, so that it matches
2446 the new yyfill signature. Mark it as possibly unused.
2447
2448
2449 Follow up on a bug I reported in February, where a Bison-generated
2450 parser can loop. Provide a test case and a fix for yacc.c. I
2451 don't have a fix for lalr1.cc or for glr.c, unfortunately.
2452 The original bug report is in:
2453 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
2454
2455 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
2456 macro's size was becoming unwieldy.
2457 (yyerrlab): Do not discard an empty lookahead symbol, as this
2458 might destroy garbage.
2459 (yyerrorlab): New label, with the old contents of YYERROR,
2460 plus the following change: pop the stack of rhs corresponding
2461 to the production that invoked YYERROR. That is how Yacc
2462 behaves, and POSIX requires this behavior.
2463 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
2464 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
2465 Define 'alarm' to do nothing if unistd.h is not available.
2466 Add a new rule "exp: '-' error;" to test the above change to
2467 data/yacc.c. Use 'alarm' to abort any test taking longer than
2468 10 seconds, as it's probably looping.
2469 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
2470 Also, the new yacc.c generates two fewer diagnostics for an
2471 existing test.
2472
2473 2003-05-24 Paul Eggert <eggert@twinsun.com>
2474
2475 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
2476 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
2477 This fixes a problem reported by John Bowman when the Compaq/HP
2478 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
2479 -ansi -Wall -gall).
2480 * data/yacc.c (union yyalloc): Likewise.
2481 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
2482
2483 Switch from 'int' to 'bool' where that makes sense.
2484
2485 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
2486 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
2487 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
2488 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
2489 Return or accept bool, not int. All callers changed.
2490 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
2491 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
2492 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
2493 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
2494 bitset_or_and_cmp_): Likewise.
2495 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
2496 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
2497 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
2498 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
2499 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
2500 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
2501 bitset_stats_or_and_cmp): Likewise.
2502 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
2503 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
2504 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
2505 ebitset_xor_cmp): Likewise.
2506 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
2507 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
2508 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
2509 lbitset_xor_cmp): Likewise.
2510 * lib/bbitset.h: Include <stdbool.h>.
2511 (struct bitset_vtable): The following members now return bool, not
2512 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
2513 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
2514 or_and_cmp).
2515 * src/conflicts.c (count_rr_conflicts): Likewise.
2516 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
2517 All uses changed.
2518 * lib/ebitset.c (ebitset_obstack_init): Likewise.
2519 * lib/lbitset.c (lbitset_obstack_init): Likewise.
2520 * src/getargs.c (debug_flag, defines_flag, locations_flag,
2521 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
2522 graph_flag): Likewise.
2523 * src/getargs.h (debug_flag, defines_flag, locations_flag,
2524 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
2525 graph_flag): Likewise.
2526 * src/output.c (error_verbose): Likewise.
2527 * src/output.h (error_verbose): Likewise.
2528 * src/reader.c (start_flag, typed): Likewise.
2529 * src/reader.h (typed): Likewise.
2530 * src/getargs.c (LOCATIONS_OPTION): New constant.
2531 (long_options, getargs): Use it.
2532 * src/lalr.c (build_relations): Use bool, not int.
2533 * src/nullable.c (nullable_compute): Likewise.
2534 * src/print.c (print_reductions): Likewise.
2535 * src/tables.c (action_row, pack_vector): Likewise.
2536 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
2537 * src/output.c (prepare): Use it.
2538 * src/output.c (token_definitions_output,
2539 symbol_destructors_output, symbol_destructors_output): Use string,
2540 not boolean integer, to keep track of whether to output separator.
2541 * src/print_graph.c (print_core): Likewise.
2542 * src/state.c (state_rule_lookaheads_print): Likewise.
2543
2544 * config/install-sh: Sync from automake 1.7.5.
2545
2546 2003-05-14 Paul Eggert <eggert@twinsun.com>
2547
2548 * src/parse-gram.y (rules_or_grammar_declaration): Require a
2549 semicolon after a grammar declaration, in the interest of possible
2550 future changes to the Bison input language.
2551 Do not allow a stray semicolon at the start of the grammar.
2552 (rhses.1): Allow one or more semicolons after any rule, including
2553 just before "|" as required by POSIX.
2554 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
2555 grammar.
2556
2557 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
2558
2559 %parse-param support for lalr1.cc.
2560
2561 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
2562 b4_cc_constructor_calls, b4_cc_constructor_call,
2563 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
2564 definitions.
2565 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
2566 parse-param arguments.
2567 (yy::b4_parser_class_name): Declare instance variables to
2568 hold parse-param arguments.
2569 * tests/calc.at: s/value/semantic_value/ because value clashes
2570 with a member of yy::b4_parser_class_name. Adjust C++ code
2571 to handle %parse-param. Enable %parse-param test in C++.
2572
2573 2003-05-12 Paul Eggert <eggert@twinsun.com>
2574
2575 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
2576 English a bit. Fix fclose typo. Change "const char" to "char
2577 const", and use ANSI C rather than K&R for "main". Suggest
2578 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
2579 and suggest yy_switch_to_buffer.
2580
2581 2003-05-05 Paul Eggert <eggert@twinsun.com>
2582
2583 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
2584 C89. This avoids a diagnostic on compilers that define __STDC__
2585 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
2586 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
2587
2588 2003-05-03 Paul Eggert <eggert@twinsun.com>
2589
2590 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
2591 Do not overrun array bounds.
2592 This should fix a bug reported today by Olatunji Oluwabukunmi in
2593 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
2594
2595 2003-04-29 Akim Demaille <akim@epita.fr>
2596
2597 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
2598 * src/getargs.c, src/getargs.h: here, as bool, not int.
2599 (nondeterministic_parser): New.
2600 * src/parse-gram.y, src/scan-gram.l: Support
2601 %nondeterministic-parser.
2602 * src/output.c (prepare): Use nondeterministic_parser instead
2603 of glr_parser where appropriate.
2604 * src/tables.c (conflict_row, action_row, save_row)
2605 (token_actions, token_actions, pack_vector): Ditto.
2606
2607 2003-04-29 Akim Demaille <akim@epita.fr>
2608
2609 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
2610
2611 2003-04-29 Akim Demaille <akim@epita.fr>
2612
2613 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
2614 with %pure-parser and %locations to exercise the patch from Yakov
2615 Markovitch below.
2616
2617 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
2618
2619 * data/yacc.c: (b4_lex_param): Corrected for the case where
2620 %lex-param is provided and %pure-parser isn't.
2621
2622 2003-04-27 Paul Eggert <eggert@twinsun.com>
2623
2624 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
2625 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
2626 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
2627 if it is not defined.
2628 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
2629
2630 2003-04-26 Paul Eggert <eggert@twinsun.com>
2631
2632 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
2633 Declare to be of type suitable for the ninf value itself, not of
2634 type suitable for the corresponding table, since the latter might
2635 be unsigned but the ninf value might be negative. This fixes a
2636 bug reported by Alexandre Duret-Lutz in
2637 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
2638
2639 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
2640 invokes it. We shouldn't invoke it twice because it will attempt
2641 to put error.o in the archive twice. This fixes a glitch reported
2642 by Martin Mokrejs in
2643 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
2644
2645 2003-04-21 Paul Eggert <eggert@twinsun.com>
2646
2647 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
2648 to gnulib.
2649
2650 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
2651
2652 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
2653 Fix obvious typo that results in uncompilable GLR parsers
2654 when both %pure-parser and %locations are used. (trivial change)
2655
2656 2003-04-17 Paul Eggert <eggert@twinsun.com>
2657
2658 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
2659 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
2660 Do not insert the expected token via unput, as this runs afoul
2661 of a POSIX-compatibility bug in flex 2.5.31.
2662 All uses changed to BEGIN the parent state,
2663 since we no longer insert the expected token via unput.
2664 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
2665 that is no longer emitted after the above change.
2666
2667 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
2668 the first one. This change is from Paul Hilfinger, and it fixes
2669 regression reported by Werner Lemberg in
2670 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2671
2672 (resolve_sr_conflict): Don't invoke state_errs_set
2673 unless one or more tokens have been explicitly made errors.
2674 Otherwise, the above change causes Bison to abort.
2675
2676 * tests/existing.at (GNU pic Grammar): New test case, taken from
2677 Lemberg's email.
2678
2679 2003-03-31 Akim Demaille <akim@epita.fr>
2680
2681 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
2682
2683 2003-03-31 Akim Demaille <akim@epita.fr>
2684
2685 * src/output.c (prepare_symbols): Avoid trailing spaces in the
2686 output.
2687
2688 2003-03-31 Akim Demaille <akim@epita.fr>
2689
2690 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
2691 From Paul Hilfinger.
2692
2693 2003-03-29 Akim Demaille <akim@epita.fr>
2694
2695 * m4/error.m4: Do not put under dynamic conditions some code which
2696 expansion is under static control.
2697
2698 2003-03-29 Akim Demaille <akim@epita.fr>
2699
2700 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
2701
2702 2003-03-29 Akim Demaille <akim@epita.fr>
2703
2704 * doc/bison.texinfo (Strings are Destroyed): New.
2705
2706 2003-03-13 Paul Eggert <eggert@twinsun.com>
2707
2708 * .cvsignore: Add configure.lineno.
2709 * src/.cvsignore: Add yacc.
2710 * tests/.cvsignore: Add testsuite.log.
2711 * doc/fdl.texi: Sync with latest FSF version.
2712
2713 2003-03-12 Paul Eggert <eggert@twinsun.com>
2714
2715 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
2716 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
2717 cursor, instead of leaving it undefined. This fixes a bug
2718 reported by Tim Van Holder in
2719 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
2720 * tests/input.at (Torturing the Scanner): Test the scanner on
2721 an empty input file, which was Tim Van Holder's test case.
2722
2723 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
2724 <sys/resource.h> can be included, include sys/time.h and
2725 sys/times.h first, if available. This works around the SunOS
2726 4.1.4 porting bug reported by Bruce Becker in
2727 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
2728
2729 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
2730 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
2731 AC_HEADER_SYS_WAIT.
2732
2733 Merge changes from gnulib. This was prompted because the CVS
2734 snapshot didn't build on Solaris 7 due to strnlen problems.
2735
2736 These changes need to be merged back into gnulib:
2737 * lib/hash.c: Include <stdbool.h> unconditionally.
2738 * m4/onceonly.m4 (m4_quote): New macro.
2739 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
2740 Quote AC_FOREACH variable-expansions properly.
2741 The 2003-01-03 obstack.h change also needs merging.
2742 {end of changes requiring merging}
2743
2744 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
2745 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
2746 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
2747 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
2748 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
2749 New files, imported from gnulib.
2750 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
2751 above.
2752
2753 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
2754 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
2755 gnulib sources.
2756
2757 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
2758 Add.
2759 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
2760 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
2761 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
2762 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
2763 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
2764 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
2765 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
2766 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
2767 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
2768 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
2769 (jm_PREREQ_ARGMATCH): Remove.
2770 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
2771 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
2772
2773 * src/system.h: Include <stdbool.h> unconditionally.
2774
2775 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
2776 assuming at least C89 in the bitset code for some time now.
2777
2778 2003-03-03 Akim Demaille <akim@epita.fr>
2779
2780 * ro.po: New.
2781
2782 2003-03-02 Akim Demaille <akim@epita.fr>
2783
2784 * doc/bison.texinfo (Table of Symbols): Reactivate the
2785 documentation for %lex-param, and %parse-param.
2786
2787 2003-03-02 Akim Demaille <akim@epita.fr>
2788
2789 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
2790 generate verbose error messages.
2791 Use the number of tokens as an upper bound in yytname, as it
2792 cannot be a non terminal.
2793
2794 2003-03-02 Akim Demaille <akim@epita.fr>
2795
2796 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
2797 message.
2798
2799 2003-03-02 Akim Demaille <akim@epita.fr>
2800
2801 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
2802 Use them to exercise yycheck overrun.
2803 Based on Andrew Suffield's grammar.
2804
2805 2003-03-02 Akim Demaille <akim@epita.fr>
2806
2807 Create tests/local.at for Bison generic testing macros.
2808
2809 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
2810 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
2811 This new file.
2812 * tests/calc.at (AT_CHECK_CALC): Adjust.
2813 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
2814 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
2815 * tests/local.at: here.
2816 (AT_COMPILE_CXX): Tags the tests using it as c++.
2817 Ignore the test if CXX is not functional.
2818
2819 2003-03-01 Paul Eggert <eggert@twinsun.com>
2820
2821 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
2822 not loc->end, since loc->end might contain garbage and this leads
2823 to undefined behavior on some platforms.
2824 (id_loc, token_start): Use (IF_LINTed) initial values that do not
2825 depend on *loc, so that the reader doesn't give the the false
2826 impression that *loc is initialized.
2827 (<INITIAL>"%%"): Do not bother setting code_start, since its value
2828 does not survive the return.
2829
2830 2003-03-01 Akim Demaille <akim@epita.fr>
2831
2832 * src/scan-gram.l (code_start): Always initialize it when entering
2833 into yylex, as SC_EPILOGUE is activated *before* the corresponding
2834 yylex invocation. An alternative would be making it static, but
2835 then it starts with the second %%'s beginning, instead of its end.
2836
2837 2003-02-28 Paul Eggert <eggert@twinsun.com>
2838
2839 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
2840 around a UnixWare 7.1.1 porting bug reported by John Hughes in
2841 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
2842
2843 2003-02-26 Paul Eggert <eggert@twinsun.com>
2844
2845 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
2846 Remove Sequent/Pyramid discussion (nobody uses them any more).
2847 Merge VMS and MS-DOS discussion; these ports may well be dead
2848 but let's keep mentioning them for now. Put <> around email
2849 addresses. Add copyright notice.
2850
2851 2003-02-24 Paul Eggert <eggert@twinsun.com>
2852
2853 * data/glr.c (yy_reduce_print): yylineno -> yylno,
2854 to avoid collision with flex use of yylineno.
2855 Problem reported by Bruce Lilly in
2856 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
2857 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
2858 * data/yacc.c (yy_reduce_print): Likewise.
2859
2860 * config/depcomp: Sync with Automake 1.7.3.
2861
2862 2003-02-21 Akim Demaille <akim@epita.fr>
2863
2864 * data/lalr1.cc: Use temporary variables instead of casts to
2865 change integer types.
2866 Suggested by Paul Eggert.
2867
2868 2003-02-21 Akim Demaille <akim@epita.fr>
2869
2870 * doc/bison.texinfo: Use "location" consistently to refer to @n,
2871 to avoid confusions with lalr1.cc's notion of Position.
2872 Suggested by Paul Eggert.
2873
2874 2003-02-20 Akim Demaille <akim@epita.fr>
2875
2876 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
2877 before initial_columns.
2878 (location.hh): Use consistent variable names when defining the
2879 operator<<.
2880 Use "last" so that we subtract from Positions, not from unsigned.
2881
2882 2003-02-20 Akim Demaille <akim@epita.fr>
2883
2884 * data/lalr1.cc (position.hh): New subfile, including the extended
2885 and Doxygen'ed documentation of class Position.
2886 (location.hh): Use it.
2887 Document a` la Doxygen.
2888 With the help of Benoit Perrot.
2889
2890 2003-02-20 Akim Demaille <akim@epita.fr>
2891
2892 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
2893 AT_YACC_IF.
2894 Redefine AT_YYERROR_SEES_LOC_IF using it.
2895 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
2896 not defined.
2897 Don't use the location in yy::Parser::error_ and
2898 yy::Parser::print_ when not %locations.
2899 Activate more lalr1.cc tests.
2900
2901 2003-02-19 Akim Demaille <akim@epita.fr>
2902
2903 * data/lalr1.cc: When displaying a line number, be sure to make it
2904 an int.
2905
2906 2003-02-19 Akim Demaille <akim@epita.fr>
2907
2908 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
2909 Remove, useless.
2910 (YYABORT, YYACCEPT, YYERROR): New.
2911 * tests/calc.at: Renable the lalr1.cc test.
2912
2913 2003-02-19 Akim Demaille <akim@epita.fr>
2914
2915 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
2916 error recovery, mixing with/without pops and discarding of the
2917 lookahead.
2918 Exercise YYERROR.
2919 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
2920
2921 2003-02-17 Paul Eggert <eggert@twinsun.com>
2922
2923 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
2924 * tests/testsuite.at (AT_COMPILE): Use them.
2925 This fixes the testsuite problem reported by Robert Lentz in
2926 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
2927
2928 2003-02-12 Paul Eggert <eggert@twinsun.com>
2929
2930 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
2931 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
2932 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
2933 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
2934 Check for malloc failure, for consistency with yacc.c.
2935 (yytname_size): Remove, for consistency with yacc.c.
2936
2937 The bug still remains in data/lalr1.cc, as I didn't have time
2938 to fix it there.
2939
2940 2003-02-06 Akim Demaille <akim@epita.fr>
2941
2942 * configure.ac (GXX): Rename as...
2943 (CXX): this, to keep the original Autoconf semantics.
2944 Require 2.57.
2945 * data/lalr1.cc: Fix b4_copyright invocations.
2946 If YYDEBUG is not defined, don't depend upon name_ being defined.
2947 (location.hh): Include string and iostream.
2948 (Position::filename): New member.
2949 (Position::Position ()): New.
2950 (operator<< (Position)): New.
2951 (operator- (Position, int)): New.
2952 (Location::first, Location::last): Rename as...
2953 (Location::begin, Location::end): these, to mock the conventional
2954 iterator names.
2955 (operator<< (Location)): New.
2956 * tests/atlocal.in (CXX): New.
2957 * tests/testsuite.at (AT_COMPILE_CXX): New.
2958 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
2959 locations in a more synthetic way.
2960 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
2961 lalr1.cc is used.
2962 Adjust the C locations to match those from Emacs: first column is
2963 column 0.
2964 Change all the expected results.
2965 Conform to the GCS: simplify the locations when applicable.
2966 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
2967 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
2968 these CPP macros with the m4 macros new defined by...
2969 (AT_CHECK_PUSHDEFS): this, i.e.:
2970 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
2971 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
2972 New macros.
2973 (AT_CHECK_POPDEFS): Undefine them.
2974 (AT_CHECK_CALC_LALR1_CC): New.
2975 Use it for the first lalr1.cc test.
2976
2977 2003-02-04 Akim Demaille <akim@epita.fr>
2978
2979 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
2980 Location as is defined.
2981
2982 2003-02-04 Akim Demaille <akim@epita.fr>
2983
2984 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
2985 name_ being defined.
2986
2987 2003-02-03 Paul Eggert <eggert@twinsun.com>
2988
2989 * src/gram.h (start_symbol): Remove unused decl.
2990
2991 Use more-consistent naming conventions for local vars.
2992
2993 * src/derives.c (derives_compute): Change type of local var from
2994 int to rule_number.
2995 * src/gram.c (grammar_rules_partial_print): Likewise.
2996 * src/print.c (print_core): Likewise.
2997 * src/reduce.c (reduce_grammar_tables): Likewise.
2998
2999 * src/gram.c (grammar_dump): Change name of item_number *
3000 local var from r to rp.
3001 * src/nullable.c (nullable_compute): Likewise.
3002
3003 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
3004
3005 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
3006 for symbol or symbol_number var.
3007 * src/reader.c (grammar_start_symbol_set): Likewise.
3008 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
3009 Likewise.
3010 * src/state.c (transitions_to): Likewise.
3011 * src/state.h: Likewise.
3012 * src/tables.c (symbol_number_to_vector_number): Likewise.
3013
3014 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
3015 char * var.
3016
3017 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
3018 var.
3019
3020 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
3021 var.
3022
3023 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
3024 Use str, not s, for char * var. Use ch, not c, for character var.
3025 Use size for size var.
3026
3027 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
3028 char * var.
3029 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
3030 uniqstr var.
3031 * src/uniqstr.h: Likewise.
3032
3033 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
3034 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
3035 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
3036 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
3037 param to have same name as that of enum, so that we don't use
3038 "s" to stand for a non-state.
3039
3040 2003-02-02 Akim Demaille <akim@epita.fr>
3041
3042 * src/scan-skel.l: Scan more than one inert character per yylex
3043 invocation.
3044
3045 2003-02-01 Paul Eggert <eggert@twinsun.com>
3046
3047 Version 1.875a.
3048
3049 * po/LINGUAS: Add ms.
3050
3051 2003-01-30 Akim Demaille <akim@epita.fr>
3052
3053 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
3054
3055 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3056
3057 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
3058 of $1.
3059
3060 Changes in response to error report by S. Eken: GLR mode does not
3061 handle negative $ indices or $ indices in embedded rules correctly.
3062 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
3063
3064 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
3065 (b4_rhs_location): Ditto.
3066 (yyfill): New function to copy from stack tree into array
3067 incrementally.
3068 (yyuserAction): Modify to allow incremental move of semantic values
3069 to rhs array when in GLR mode.
3070 Define YYFILL to use in user-defined actions to fill semantic array
3071 as needed.
3072 Remove dummy use of yystack, as there is now a guaranteed use.
3073 (yydoAction): Modify to allow incremental move of semantic values
3074 to rhs array when in GLR mode.
3075 (yyresolveAction): Ditto.
3076 (yyglrShiftDefer): Update comment.
3077 (yyresolveStates): Use X == NULL for pointers, not !X.
3078 (yyglrReduce): Ditto.
3079 (yydoAction): Ditto
3080
3081 * tests/glr-regr1.at: Rename to ...
3082 * tests/glr-regression.at: Add new regression test for the problems
3083 described above (adapted from S. Eken).
3084 Update copyright notice.
3085 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
3086 * tests/Makefile.am: Ditto.
3087
3088 2003-01-28 Paul Eggert <eggert@twinsun.com>
3089
3090 * data/lalr1.cc: Do not use @output_header_name@ unless
3091 b4_defines_flag is set. This fixes two bugs reported by
3092 Tim Van Holder in
3093 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
3094 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
3095
3096 2003-01-21 Paul Eggert <eggert@twinsun.com>
3097
3098 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
3099 we don't need to worry about yyerrlab1 being reported as an
3100 "unused label" by non-GCC C compilers. The downside is that if
3101 locations are used then a couple of statements are duplicated each
3102 time YYERROR is invoked, but the upside is that the warnings
3103 should vanish.
3104 (yyerrlab1): Move code to YERROR.
3105 (yyerrlab2): Remove. Change uses back to yyerrlab1.
3106 This reverts some of the 2002-12-27 change.
3107
3108 2003-01-17 Paul Eggert <eggert@twinsun.com>
3109
3110 * src/output.c (symbol_printers_output): Fix typo that led
3111 to core dump. Problem reported by Antonio Rus in
3112 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
3113
3114 2003-01-13 Akim Demaille <akim@epita.fr>,
3115 Quoc Peyrot <chojin@lrde.epita.fr>,
3116 Robert Anisko <anisko_r@lrde.epita.fr>
3117
3118 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
3119 when the stacks contain one element, as the loop would otherwise
3120 free the last state, and then use the top state (the one we just
3121 popped). This means that the initial elements will not be freed
3122 explicitly, as is the case in yacc.c; it is not a problem, as
3123 these elements have fake values.
3124
3125 2003-01-11 Paul Eggert <eggert@twinsun.com>
3126
3127 * NEWS: %expect-violations are now just warnings, reverting
3128 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
3129 bootstrapping problem reported by Matthias Klose; see
3130 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
3131 * src/conflicts.c (conflicts_print): Likewise.
3132 * tests/conflicts.at (%expect not enough, %expect too much,
3133 %expect with reduce conflicts): Likewise.
3134 * doc/bison.texinfo (Expect Decl): Document this. Also mention
3135 that the warning is enabled if the number of conflicts changes
3136 (not necessarily increases).
3137
3138 * src/getargs.c (version): Update copyright year.
3139
3140 2003-01-09 Akim Demaille <akim@epita.fr>
3141
3142 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
3143
3144 2003-01-08 Paul Eggert <eggert@twinsun.com>
3145
3146 * Makefile.maint (WGETFLAGS):
3147 New macro, containing "-C off" to disable proxy caches.
3148 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
3149 (rel-check): Use $(WGET) instead of wget.
3150
3151 2003-01-06 Paul Eggert <eggert@twinsun.com>
3152
3153 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
3154 the GLR paper of Scott, Johnstone and Hussain.
3155
3156 2003-01-04 Paul Eggert <eggert@twinsun.com>
3157
3158 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
3159 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
3160 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
3161 (EXTRA_LIBRARIES): New var, for liby.a.
3162 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
3163 (EXTRA_SCRIPTS): New var, for yacc.
3164
3165 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
3166 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
3167 Problem reported by Nelson H. F. Beebe.
3168
3169 2003-01-03 Paul Eggert <eggert@twinsun.com>
3170
3171 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
3172 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
3173 when compiling Bison 1.875's `bitset bset = obstack_alloc
3174 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
3175
3176 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
3177 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
3178 grow to a huge size with typical invocation.
3179
3180 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
3181 Use the pattern recommended by Autoconf 2.57, except also protect
3182 against double-definition.
3183 * src/system.h: Likewise.
3184 Portability issues reported by Nelson H. F. Beebe.
3185
3186 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
3187 All uses changed. Provide a definition in both C and C++.
3188 (yytrue, yyfalse): Define even if defined (__cplusplus).
3189
3190 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
3191 Reported by Nelson H. F. Beebe.
3192
3193 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
3194
3195 2003-01-02 Paul Eggert <eggert@twinsun.com>
3196
3197 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
3198 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
3199 Bug reported by Nelson H. F. Beebe.
3200
3201 2003-01-01 Paul Eggert <eggert@twinsun.com>
3202
3203 * Version 1.875.
3204
3205 2002-12-30 Paul Eggert <eggert@twinsun.com>
3206
3207 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
3208 Moved here from...
3209 (<INITIAL>","): Here. This causes stray "," to be treated
3210 more uniformly.
3211
3212 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
3213 last brace in braced code when not in Yacc mode, for compatibility
3214 with Bison 1.35. This resurrects the 2001-12-15 patch to
3215 src/reader.c.
3216
3217 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
3218 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
3219
3220 2002-12-28 Paul Eggert <eggert@twinsun.com>
3221
3222 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
3223 that of SYM's type. This fixes Debian bug 168069, reported by
3224 Thomas Olsson.
3225
3226 2002-12-28 Paul Eggert <eggert@twinsun.com>
3227
3228 Version 1.75f.
3229
3230 Switch back to the Yacc style of conflict reports, undoing some
3231 of the 2002-07-30 change.
3232 * doc/bison.texinfo (Understanding): Use Yacc style for
3233 conflict reports. Also, use new way of locating rules.
3234 * src/conflicts.c (conflict_report):
3235 Renamed from conflict_report_yacc, removing the old
3236 'conflict_report'. Translate the entire conflict report at once,
3237 so that we don't assume that "," has the same interpretation in
3238 all languages.
3239 (conflicts_output): Use Yacc-style conflict report for each state,
3240 instead of our more-complicated style.
3241 (conflicts_print): Use Yacc-style conflict report, except print
3242 the input file name when not emulating Yacc.
3243 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
3244 Conflicted Reduction, %expect not enough, %expect too much,
3245 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
3246 * tests/existing.at (GNU Cim Grammar): Likewise.
3247 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
3248
3249 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
3250 fatal): Don't invoke fflush; it's not needed and it might even be
3251 harmful for stdout, as stdout might not be open.
3252 * src/reduce.c (reduce_print): Likewise.
3253
3254 2002-12-27 Paul Eggert <eggert@twinsun.com>
3255
3256 Fix a bug where error locations were not being recorded correctly.
3257 This problem was originally reported by Paul Hilfinger in
3258 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
3259
3260 * data/yacc.c (yyparse): New local var yylerrsp, to record the
3261 top of the location stack's error locations.
3262 (yyerrlab): Set it. When discarding a token, push its location
3263 onto yylerrsp so that we don't lose track of the error's end.
3264 (yyerrlab1): Now is only the target of YYERROR, so that we can
3265 properly record the location of the action that failed. For GCC
3266 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
3267 GCC warning about yyerrlab1 being unused if YYERROR is unused.
3268 (yyerrlab2): New label, which yyerrlab now falls through to.
3269 Compute the error's location by applying YYLLOC_DEFAULT to
3270 the locations of all the symbols that went into the error.
3271 * doc/bison.texinfo (Location Default Action): Mention that
3272 YYLLOC_DEFAULT is also invoked for syntax errors.
3273 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
3274 Error locations include the locations of all the tokens that were
3275 discarded, not just the last token.
3276
3277 2002-12-26 Paul Eggert <eggert@twinsun.com>
3278
3279 * src/files.c: Include quote.h.
3280 (compute_output_file_names): Warn if we detect conflicting
3281 outputs to the same file. This should catch the misunderstanding
3282 exemplified by Debian Bug 165349, reported by Bruce Stephens..
3283
3284 * src/conflicts.c (conflicts_print): If the user specifies
3285 "%expect N", report an error if there are any reduce/reduce
3286 conflicts. This is what the manual says should happen.
3287 This fixes Debian bug 130890, reported by Anthony DeRobertis.
3288 * tests/conflicts.at (%expect with reduce conflicts): New test.
3289
3290 Don't use m4_include on relative file names, as it doesn't work as
3291 desired if there happens to be a file with that name under ".".
3292
3293 * m4sugar/version.m4: Remove; it was included but it wasn't used.
3294 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
3295 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
3296 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
3297 * src/output.c (output_skeleton): Use full path names when
3298 specifying a file to include; don't rely on include path, as
3299 it's unreliable when the working file contains a file with
3300 that name.
3301
3302 2002-12-25 Paul Eggert <eggert@twinsun.com>
3303
3304 Remove obsolete references to bison.simple and bison.hairy.
3305 Problem mentioned by Aubin Mahe in
3306 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
3307 * data/glr.c: Comment fix.
3308 * doc/bison.1: Remove references. Also, mention "yacc".
3309
3310 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
3311 with -g option.
3312
3313 * src/parse-gram.y (declaration): Use enum "report_states" rather
3314 than its numeric value 1.
3315
3316 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
3317 opening a new one. This fixes Debian bug 165349, reported by
3318 Bruce Stephens.
3319
3320 2002-12-24 Paul Eggert <eggert@twinsun.com>
3321
3322 Version 1.75e.
3323
3324 * Makefile.maint (cvs-update): Don't assume that the shell
3325 supports $(...), as Solaris sh doesn't.
3326
3327 * src/parse-gram.y (lloc_default): Remove test for empty
3328 nonterminals at the end, since it didn't change the result.
3329
3330 2002-12-24 Paul Eggert <eggert@twinsun.com>
3331
3332 If the user does not define YYSTYPE as a macro, Bison now declares it
3333 using typedef instead of defining it as a macro. POSIX requires this.
3334 For consistency, YYLTYPE is also declared instead of defined.
3335
3336 %union directives can now have a tag before the `{', e.g., the
3337 directive `%union foo {...}' now generates the C code
3338 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
3339 The default union tag is `YYSTYPE', for compatibility with Solaris 9
3340 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
3341 instead of `yyltype'.
3342
3343 `yystype' and `yyltype' are now obsolescent macros instead of being
3344 typedefs or tags; they are no longer documented and will be
3345 withdrawn in a future release.
3346
3347 * data/glr.c (b4_location_type): Remove.
3348 (YYSTYPE): Renamed from yystype.
3349 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
3350 (struct YYLTYPE): Renamed from struct yyltype.
3351 (YYLTYPE): Renamed from yyltype.
3352 (yyltype, yystype): New (and obsolescent) macros,
3353 for backward compatibility.
3354 * data/yacc.c: Likewise.
3355
3356 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
3357 does not specify a union tag. This is for compatibility with
3358 Solaris 9 yacc.
3359
3360 * src/parse-gram.y (add_param): 2nd arg is now char * not char
3361 const *, since it is now modified by stripping surrounding { }.
3362 (current_braced_code): Remove.
3363 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
3364 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
3365 trailing " {...}". Now of type <chars>.
3366 (grammar_declaration): Adjust to bundled tokens.
3367 (code_content): Remove; stripping is now done by add_param.
3368 (print_token_value): Print contents of bundled tokens.
3369 (token_name): New function.
3370
3371 * src/reader.h (braced_code, current_braced_code): Remove.
3372 (token_name): New decl.
3373
3374 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
3375 token_type, not braced_code code_kind. All uses changed.
3376 (SC_PRE_CODE): New state, for scanning after a keyword that
3377 has (or usually has) an immediately-following braced code.
3378 (token_type): New local var, to keep track of which token type
3379 to return when scanning braced code.
3380 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
3381 <INITIAL>"%parse-param", <INITIAL>"%printer",
3382 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
3383 instead of returning a token type immediately.
3384 (<INITIAL>"{"): Set token type.
3385 (<SC_BRACED_CODE>"}"): Use it.
3386 (handle_action_dollar, handle_action_at): Now returns bool
3387 indicating success. Fail if ! current_rule; this prevents a core dump.
3388 (handle_symbol_code_dollar, handle_symbol_code_at):
3389 Remove; merge body into caller.
3390 (handle_dollar, handle_at): Complain in invalid contexts.
3391
3392 * NEWS, doc/bison.texinfo: Document the above.
3393 * NEWS: Fix years and program names in copyright notice.
3394
3395 2002-12-17 Paul Eggert <eggert@twinsun.com>
3396
3397 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
3398 Reporting, Table of Symbols): Omit mentions of %lex-param and
3399 %parse-param from the documentation for now.
3400
3401 2002-12-15 Paul Eggert <eggert@twinsun.com>
3402
3403 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
3404 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
3405 lookahead symbol, and which sets yychar in parser actions) and it
3406 disagreed with the Bison documentation. Bug
3407 reported by Andrew Walrond.
3408
3409 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
3410 as the caller now does that.
3411 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
3412 (YYEMPTY): Parenthesize right hand side, since others use it.
3413 (yyparse): Don't assume that our generated code is the only code
3414 that sets yychar.
3415
3416 2002-12-13 Paul Eggert <eggert@twinsun.com>
3417
3418 Version 1.75d.
3419
3420 POSIX requires a "yacc" command.
3421 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
3422 (MOSTLYCLEANFILES): Add yacc.
3423 (yacc): New rule.
3424 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
3425 as an alias for bison y.
3426
3427 * po/LINGUAS: Add da.
3428
3429 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
3430 problem with latest <getopt.h>.
3431 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
3432
3433 * doc/fdl.texi: Upgrade to 1.2.
3434 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
3435 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
3436 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
3437 gnulib.
3438 * config/install-sh: Sync with autotools.
3439
3440 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
3441 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
3442 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
3443 locations are requested.
3444 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
3445 locations are requested.
3446
3447 2002-12-12 Paul Eggert <eggert@twinsun.com>
3448
3449 Remove unportable casts and storage allocation tricks.
3450 While we're at it, remove almost all casts, since they
3451 usually aren't needed and are a sign of trouble.
3452
3453 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
3454
3455 * src/derives.c (derives_compute): Do not subtract NTOKENS from
3456 the pointer DSET returned by malloc; this isn't portable.
3457 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
3458 Similarly for DERIVES.
3459 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
3460 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
3461 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
3462
3463 * src/derives.c (derives_compute): Do not bother invoking
3464 int_of_rule_number, since rule numbers are integers.
3465
3466 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
3467 rather than XMALLOC (char, N).
3468
3469 * src/files.c (filename_split): Rewrite to avoid cast.
3470
3471 * src/gram.h (symbol_number_as_item_number,
3472 item_number_as_symbol_number, rule_number_as_item_number,
3473 item_number_as_rule_number):
3474 Now inline functions rather than macros, to avoid casts.
3475 * src/state.h (state_number_as_int): Likewise.
3476 * src/tables.c (state_number_to_vector_number,
3477 symbol_number_to_vector_number): Likewise.
3478
3479 * src/gram.h (int_of_rule_number): Remove; no longer used.
3480
3481 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
3482 since the resulting storage is always stored into.
3483
3484 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
3485 where it's needed.
3486
3487 * src/muscle_tab.c (muscle_m4_output):
3488 Now inline. Return bool, not int.
3489 * src/state.c (state_compare): Likewise.
3490 * src/symtab.c (symbol_check_defined,
3491 symbol_check_alias_consistency, symbol_pack, symbol_translation,
3492 hash_compare_symbol, hash_symbol):
3493 Likewise.
3494 * src/uniqstr.c (uniqstr_print): Likewise.
3495 * src/muscle_tab.c (muscle_m4_output_processor):
3496 New function, to avoid casts.
3497 * src/state.c (state_comparator, stage_hasher): Likewise.
3498 * src/symtab.c (symbol_check_defined_processor,
3499 symbol_check_alias_consistency_processor, symbol_pack_processor,
3500 symbol_translation_processor, hash_symbol_comparator,
3501 hash_symbol_hasher): Likewise.
3502 * src/uniqstr.c (uniqstr_print_processor): Likewise.
3503 * src/muscle_tab.c (muscles_m4_output):
3504 Use new functions instead of casting old functions unportably.
3505 * src/state.c (state_hash_new): Likewise.
3506 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
3507 symbols_token_translations_init):
3508 Likewise.
3509 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
3510
3511 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
3512 var instead of casting to long, to avoid casts.
3513 (prepare_states): Use MALLOC rather than alloca, so that we don't
3514 have to worry about alloca.
3515 * src/state.c (state_hash_lookup): Likewise.
3516
3517 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
3518 local var instead of casting to unsigned char, to avoid casts.
3519
3520 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
3521 STATE_ALLOC): Remove.
3522 (transitions_new, errs_new, reductions_new, state_new): Use malloc
3523 rather than calloc, and use offsetof to avoid allocating slightly
3524 too much storage.
3525 (state_new): Initialize all members.
3526
3527 * src/state.c (state_hash): Use unsigned accumulator, not signed.
3528
3529 * src/symtab.c (symbol_free): Remove; unused.
3530 (symbol_get): Remove cast in lhs of assignment.
3531 (symbols_do): Now static. Accept generic arguments, not
3532 hashing-related ones.
3533
3534 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
3535 (symbol_processor): Remove.
3536 (symbols_do): Remove decl; now static.
3537
3538 * src/system.h (alloca): Remove; decl no longer needed.
3539 (<stddef.h>): Include, for offsetof.
3540 (<inttypes.>, <stdint.h>): Include if available.
3541 (uintptr_t): New type, if system lacks it.
3542 (CALLOC, MALLOC, REALLOC): New macros.
3543 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
3544 new macros.
3545
3546 * src/tables.c (table_size): Now int, to pacify GCC.
3547 (table_grow, table_ninf_remap): Use signed table size.
3548 (save_row): Don't bother initializing locals when not needed.
3549 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
3550 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
3551
3552 * src/vcg.h: Correct misspellings.
3553
3554 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
3555
3556
3557 * src/getargs.c (getargs): Don't assume EOF == -1.
3558
3559 2002-12-09 Paul Eggert <eggert@twinsun.com>
3560
3561 Change identifier spellings to avoid collisions with names
3562 that are reserved by POSIX.
3563
3564 Don't use names ending in _t, since POSIX reserves them.
3565 For consistency, remove _e and _s endings -- they're weren't
3566 needed to remove ambiguity. All uses changed.
3567 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
3568 turn was just renamed from struniq_t.
3569 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
3570 which in turn was just renamed from struniq_processor_t.
3571 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
3572 in turn was renamed from hash_compare_struniq_t.
3573 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
3574 (state_list): Renamed from state_list_t.
3575 * src/assoc.h (assoc): Renamed from assoc_t.
3576 * src/conflicts.c (enum conflict_resolution): Renamed from
3577 enum conflict_resolution_e.
3578 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
3579 (rule_list): Renamed from rule_list_t.
3580 * src/getargs.h (enum trace): Renamed from enum trace_e.
3581 (enum report): Renamed from enum report_e.
3582 * src/gram.h (item_number): Renamed from item_number_t.
3583 (rule_number): Renamed from rule_number_t.
3584 (struct rule_s): Remove the "rule_s" part; not used.
3585 (rule): Renamed from rule_t.
3586 (rule_filter): Renamed from rule_filter_t.
3587 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
3588 (goto_list): Renamed from goto_list_t.
3589 * src/lalr.h (goto_number): Renamed from goto_number_t.
3590 * src/location.h (location): Renamed from location_t.
3591 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
3592 and moved here from:
3593 * src/muscle_tab.h (muscle_entry_t): here.
3594 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
3595 (rule_list): Renamed from rule_list_t.
3596 * src/print_graph.c (static_graph): Renamed from graph.
3597 * src/reader.h (braced_code): Renamed from braced_code_t.
3598 Remove brace_code_e tag.
3599 * src/relation.h (relation_node): Renamed from relation_node_t.
3600 (relation_nodes): Renamed from relation_nodes_t.
3601 (relation): Renamed from relation_t.
3602 * src/state.h (state_number): Renamed from state_number_t.
3603 (struct state): Renamed from struct state_s.
3604 (state): Renamed from state_t.
3605 (transitions): Renamed from transitions_t. Unused (and
3606 misspelled) transtion_s tag removed.
3607 (errs): Renamed from errs_t. Unused errs_s tag removed.
3608 (reductions): Renamed from reductions_t. Unused tag
3609 reductions_s removed.
3610 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
3611 (struct symbol_list): Renamed from struct symbol_list_s.
3612 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
3613 (struct symbol): Renamed from struct symbol_s.
3614 (symbol): Renamed from symbol_t.
3615 * src/tables.c (vector_number): Renamed from vector_number_t.
3616 (action_number): Renamed from action_t.
3617 * src/tables.h (base_number): Renamed from base_t.
3618 * src/vcg.h (enum color): Renamed from enum color_e.
3619 (enum textmode): Renamed from enum textmode_e.
3620 (enum shape): Renamed from enum shape_e.
3621 (struct colorentry): Renamed from struct colorentry_s.
3622 (struct classname): Renamed from struct classname_s.
3623 (struct infoname): Renamed from struct infoname_s.
3624 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
3625 (enum decision): Renamed from enum decision_e.
3626 (enum orientation): Renamed from enum orientation_e.
3627 (enum alignment): Renamed from enum alignment_e.
3628 (enum arrow_mode): Renamed from enum arrow_mode_e.
3629 (enum crossing_type): Renamed from enum crossing_type_e.
3630 (enum view): Renamed from enum view_e.
3631 (struct node): Renamed from struct node_s.
3632 (node): Renamed from node_t.
3633 (enum linestyle): Renamed from enum linestyle_e.
3634 (enum arrowstyle): Renamed from enum arrowstyle_e.
3635 (struct edge): Renamed from struct edge.
3636 (edge): Renamed from edge_t.
3637 (struct graph): Renamed from struct graph_s.
3638 (graph): Renamed from graph_t.
3639 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
3640 Rename value_t -> value.
3641 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
3642 value_t_as_yystype -> value_as_yystype.
3643
3644 Don't include <errno.h> in the mainstream code, since it
3645 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
3646 * lib/get-errno.c, lib/get-errno.h: New files.
3647 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
3648 get-errno.c.
3649 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
3650 * src/output.c (output_skeleton): Likewise.
3651 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
3652 instead of errno.
3653 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
3654 Likewise.
3655 (handle_action_dollar, handle_action_at): Likewise.
3656 * src/system.h: Do not include <errno.h>.
3657 (TAB_EXT): Renamed from EXT_TAB.
3658 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
3659
3660 Avoid str[a-z]*, since <string.h> reserves that name space.
3661 Change all instances of "struniq" in names to "uniqstr", and
3662 likewise for "STRUNIQ" and "UNIQSTR".
3663 * src/uniqstr.c: Renamed from src/struniq.c.
3664 * src/uniqstr.h: Renamed from src/struniq.h.
3665 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
3666 * src/files.c (strsuffix): Remove; unused.
3667 (concat2): Renamed from stringappend. Now static.
3668 * src/files.h (strsuffix, stringappend): Remove; unused.
3669 * src/parse-gram.y (<chars>): Renamed from <string>.
3670 (<uniqstr>): Renamed from <struniq>.
3671 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
3672 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
3673 (struct graph_s.expand): Renamed from struct graph_s.stretch.
3674 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
3675 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
3676 (N_EXPAND): Renamed from N_STRETCH.
3677
3678 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
3679 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
3680 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
3681 Remove; unused.
3682 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
3683 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
3684 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
3685 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
3686 (BASE_MAXIMUM): Renamed from BASE_MAX.
3687 (BASE_MINIMUM): Renamed from BASE_MIN.
3688 (ACTION_MAX): Remove; unused.
3689 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
3690 Unnecessary casts removed from above defines.
3691
3692
3693 Fix misspelling in names.
3694 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
3695 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
3696 G_NODE_ALIGNEMENT.
3697
3698
3699 * lib/timevar.c (timevar_report): Renamed from time_report,
3700 for consistency with other names.
3701 * lib/timevar.h (timevar_report): New decl.
3702 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
3703
3704
3705 Sort include-file uses.
3706
3707 Reorder all include files under src to be in the order "system.h".
3708 then the ../lib include files in angle brackets (alphabetized),
3709 then the . include files in double-quotes (alphabetized). Fix
3710 dependency breakages encountered in this process, as follows:
3711 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
3712 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
3713 * src/state.h: Include "symtab.h".
3714
3715 2002-12-08 Paul Eggert <eggert@twinsun.com>
3716
3717 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
3718 since this causes problems when __file__ contains character
3719 sequences like "@" that are treated specially by src/scan-skel.l.
3720 Instead, just use the file's basename. This fixes the bug
3721 reported by Martin Mokrejs in
3722 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
3723
3724 2002-12-06 Paul Eggert <eggert@twinsun.com>
3725
3726 Add support for rules that do not have trailing semicolons, as
3727 POSIX requires. Improve the quality of locations in Bison
3728 diagnostics.
3729
3730 * src/location.c: Include <quotearg.h>.
3731 (empty_location): Now const.
3732 (location_print): New function. Follow the recommendation of the
3733 GNU Coding Standards for locations that span file boundaries.
3734 * src/location.h: Do not include <quotearg.h>; no longer needed.
3735 (boundary): New type.
3736 (location_t): Use it. This allows locations to span file boundaries.
3737 All member uses changed: file -> start.file or end.file (as needed),
3738 first_line -> start.line, first_column -> start.column,
3739 last_line -> end.line, last_column -> end.column.
3740 (equal_boundaries): New function.
3741 (LOCATION_RESET, LOCATION_STEP): Remove.
3742 (LOCATION_PRINT): Remove. All callers changed to use location_print.
3743 (empty_location): Now const.
3744 (location_print): New decl.
3745 * src/parse-gram.y (lloc_default): New function, which handles
3746 empty locations more accurately.
3747 (YYLLOC_DEFAULT): Use it.
3748 (%token COLON): Remove.
3749 (%token ID_COLON): New token.
3750 (rules): Use it.
3751 (declarations, rules): Remove trailing semicolon.
3752 (declaration, rules_or_grammar_declaration):
3753 Allow empty (";") declaration.
3754 (symbol_def): Remove empty actions; no longer needed.
3755 (rules_or_grammar_declaration): Remove trailing semicolon.
3756 (semi_colon.opt): Remove.
3757 * src/reader.h: Include location.h.
3758 (scanner_cursor): New decl.
3759 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
3760 rolling our own.
3761 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
3762 of *loc.
3763 (STEP): Remove. No longer needed, now that adjust_location does
3764 the work. All uses removed.
3765 (scanner_cursor): New var.
3766 (adjust_location): Renamed from extend_location. It now sets
3767 *loc and adjusts the scanner cursor. All uses changed.
3768 Don't bother testing for CR.
3769 (handle_syncline): Remove location arg; now updates scanner cursor.
3770 All callers changed.
3771 (unexpected_end_of_file): Now accepts start boundary of token or
3772 comment, not location. All callers changed. Update scanner cursor,
3773 not the location.
3774 (SC_AFTER_IDENTIFIER): New state.
3775 (context_state): Renamed from c_context. All uses changed.
3776 (id_loc, code_start, token_start): New local vars.
3777 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
3778 processing of Yacc white space and equivalents here.
3779 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
3780 instead of returning ID immediately, since we need to search for
3781 a subsequent colon.
3782 (<INITIAL>"'", "\""): Save token_start.
3783 (<INITIAL>"%{", "{", "%%"): Save code_start.
3784 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
3785 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
3786 BEGIN context_state at end, not INITIAL.
3787 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
3788 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
3789 Return correct token start.
3790 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
3791 the start of a character, string or multiline comment is found.
3792 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
3793 Reduction): Adjust reported locations to match the more-precise
3794 results now expected.
3795 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
3796 * tests/reduce.at (Useless Rules, Reduced Automaton,
3797 Underivable Rules): Likewise.
3798 * tests/regression.at (Invalid inputs): No longer `expecting ";"
3799 or "|"' now that so many other tokens are allowed by the new grammar.
3800
3801 * src/complain.h (current_file): Remove duplicate decl;
3802 current_file is now owned by files.h.
3803 * src/complain.c, src/scan-gram.l: Include files.h.
3804
3805 2002-12-06 Paul Eggert <eggert@twinsun.com>
3806
3807 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
3808 promotes to int; it might be unsigned int.
3809 * data/yacc.c (yy_reduce_print): Likewise.
3810
3811 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
3812 be #defined in the prologue, not in the Bison declarations.
3813 This fixes Debian Bug 102878, reported by Shaul Karl.
3814
3815 2002-12-02 Paul Eggert <eggert@twinsun.com>
3816
3817 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
3818 * lib/strtoul.c: New file, from gnulib.
3819 This fixes a porting bug reported by Peter Klein in
3820 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
3821
3822 2002-11-30 Paul Eggert <eggert@twinsun.com>
3823
3824 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
3825 and put only a forward declaration in the prologue. This is for
3826 consistency with the other scanner helper functions.
3827
3828 Type clashes now generate warnings, not errors, since it
3829 appears that POSIX may allow some grammars with type clashes.
3830 * src/reader.c (grammar_current_rule_check): Warn about
3831 type clashes instead of complaining.
3832 * tests/input.at (Type Clashes): Expect warnings, not complaints.
3833
3834 Add Yacc library, since POSIX requires it.
3835 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
3836 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
3837 * lib/main.c, lib/yyerror.c: New files.
3838
3839 gram_error can be static; it need not be extern.
3840 * src/reader.h (gram_error): Remove decl.
3841 * src/parse-gram.y (gram_error): Now static. Add static decl.
3842 (print_token_value): Omit parameter names from forward decl,
3843 for consistency.
3844
3845 2002-11-29 Paul Eggert <eggert@twinsun.com>
3846
3847 * doc/bison.texinfo: Emphasize that yylex and yyerror must
3848 be declared before being used. E.g., one should typically
3849 declare them in the prologue. Use GNU coding style in examples.
3850 Put "const" consistently after the type it modifies. Mention
3851 that C99 supports "inline". Mention that yyerror traditionally
3852 returns "int".
3853
3854 %parse-param and %lex-param now take just one argument, the
3855 declaration; the argument name is deduced from the declaration.
3856
3857 * doc/bison.texinfo (Parser Function, Pure Calling, Error
3858 Reporting, Table of Symbols): Document this.
3859 * src/parse-gram.y (add_param): New function.
3860 (COMMA): Remove.
3861 (declaration): Implement new rule for %parse-param and %lex-param.
3862 * src/scan-gram.l: "," now elicits a warning, rather than being
3863 a token; this is more compatible with byacc.
3864 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
3865
3866 2002-11-27 Paul Eggert <eggert@twinsun.com>
3867
3868 Rename identifiers to avoid real and potential collisions.
3869
3870 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
3871 to avoid collision with lex macro described by Bruce Lilly in
3872 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
3873 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
3874 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
3875 * src/parse-gram.y (print_token_value): Renamed from yyprint.
3876 All uses changed.
3877 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
3878 The name "yycontrol" violates the name space rules, and this stuff
3879 wasn't being used anyway.
3880 (input): Remove action; this stuff wasn't being used.
3881 (gram_error): Rename local variable yylloc -> loc.
3882 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
3883 (YY_DECL): Don't use "yy" at start of local variables.
3884 All uses changed, e.g., yylloc -> loc.
3885 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
3886 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
3887 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
3888 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
3889
3890 * src/parse-gram.y (gram_error): loc is now const *.
3891 * src/reader.h (gram_error): Likewise.
3892
3893 2002-11-24 Paul Eggert <eggert@twinsun.com>
3894
3895 Version 1.75c.
3896
3897 * tests/actions.at (Actions after errors): Use an output format
3898 more similar to that of the Printers and Destructors test.
3899 Test the position of the ';' token too.
3900 (Printers and Destructors): Likewise.
3901 (Printers and Destructors: %glr-parser): Remove for now, to avoid
3902 unnecessarily alarming people when the test fails.
3903
3904 * data/yacc.c (yyerrlab1): Move this label down, so that the
3905 parser does not discard the lookahead token if the user code
3906 invokes YYERROR. This change is required for POSIX conformance.
3907
3908 * lib/error.c: Sync with gnulib.
3909
3910 2002-11-22 Paul Eggert <eggert@twinsun.com>
3911
3912 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
3913 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
3914 * lib/xmalloc.c: Likewise.
3915
3916 2002-11-20 Paul Eggert <eggert@twinsun.com>
3917
3918 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
3919
3920 2002-11-20 Paul Eggert <eggert@twinsun.com>
3921
3922 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
3923 should use `if (! x) abort ();' rather than `assert (x);', and
3924 anyway it's one less thing to worry about configuring.
3925
3926 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
3927 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
3928 and replace all instances of assert with abort.
3929 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
3930 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
3931
3932 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
3933 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
3934 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
3935 hash_find_entry, hash_rehash, hash_insert): Likewise.
3936 * src/conflicts.c (resolve_sr_conflict): Likewise.
3937 * src/lalr.c (set_goto_map, map_goto): Likewise.
3938 * src/nullable.c (nullable_compute): Likewise.
3939 * src/output.c (prepare_rules, token_definitions_output): Likewise.
3940 * src/reader.c (packgram, reader): Likewise.
3941 * src/state.c (state_new, state_free, state_transitions_set,
3942 state_reduction_find): Likewise.
3943 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
3944 symbol_pack): Likewise.
3945 * src/tables.c (conflict_row, pack_vector): Likewise.
3946 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
3947 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
3948 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
3949 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
3950
3951 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
3952 (ARGMATCH_CONSTRAINT): New macro.
3953 (ARGMATCH_ASSERT): Use it.
3954
3955 * src/system.h (verify): New macro.
3956 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
3957 rather than assert.
3958 * src/tables.c (tables_generate): Likewise.
3959
3960 * src/struniq.c (struniq_assert): Now returns void, and aborts
3961 if the assertion is false.
3962 (struniq_assert_p): Remove.
3963 * src/struniq.h: Likewise.
3964
3965 2002-11-18 Paul Eggert <eggert@twinsun.com>
3966
3967 * data/glr.c (yygetLRActions): Replace `yyindex' with
3968 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
3969 This fixes the regression with Sun ONE Studio 7 cc that I reported in
3970 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
3971
3972 2002-11-18 Akim Demaille <akim@epita.fr>
3973
3974 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
3975 space.
3976 From Tim Van Holder.
3977
3978 2002-11-17 Paul Eggert <eggert@twinsun.com>
3979
3980 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
3981 to "SyntaxError" for consistency with my 2002-11-15 change.
3982
3983 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
3984 not define to {}, since this breaks the common use of `YYDPRINTF
3985 ((...));' if a single statement is desired (e.g. before `else').
3986 Work around GCC warnings by surrounding corresponding calls with
3987 {} if needed.
3988 (yyhasResolvedValue): Remove unused function.
3989 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
3990 loop body.
3991 (yyreportSyntaxError): Renamed from yyreportParseError.
3992 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
3993 All uses changed.
3994 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
3995 extern when possible. Remove unused initializations.
3996
3997 2002-11-16 Akim Demaille <akim@epita.fr>
3998
3999 Augment the similarity between GLR and LALR traces.
4000
4001 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
4002 (YY_REDUCE_PRINT): New.
4003 (yyparse): Use them.
4004 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
4005 YYDPRINT here.
4006 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
4007 state reached after the reduction/recovery, since...
4008 (yyparse, yyprocessOneStack): Report the state we are entering in.
4009
4010 2002-11-16 Akim Demaille <akim@epita.fr>
4011
4012 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
4013 Add support for --trace=skeleton.
4014 * src/scan-skel.l: %option debug.
4015 Scan strings of non-@ or \n instead of character by character.
4016 (scan_skel): Handle trace_skeleton.
4017 (QPUTS): New.
4018 (@output_parser_name@, @output_header_name@): ``Restore'' their
4019 support (used to be M4 macros).
4020 * data/yacc.c: Quote larger chunks, a la glr.c.
4021 * data/lalr1.cc: Likewise.
4022 The header guards are no longer available, so use some other
4023 string than `YYLSP_NEEDED'.
4024
4025 2002-11-16 Akim Demaille <akim@epita.fr>
4026
4027 Make the ``Printers and Destructors'' test more verbose, taking
4028 `yacc.c''s behavior as (possibly wrong) reference.
4029
4030 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
4031 instead of fprint on stdout.
4032 Set and report the last_line of the symbols.
4033 Consistently display values and locations.
4034
4035 2002-11-16 Paul Eggert <eggert@twinsun.com>
4036
4037 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
4038
4039 2002-11-15 Paul Eggert <eggert@twinsun.com>
4040
4041 * tests/actions.at (Actions after errors): New test case.
4042
4043 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
4044 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
4045 tests/action.at, tests/calc.at, tests/conflicts.at,
4046 tests/cxx-type.at, tests/regression.at:
4047 "parse error" -> "syntax error" for POSIX compatibility.
4048 "parsing stack overflow..." -> "parser stack overflow" so
4049 that code matches Bison documentation.
4050
4051 2002-11-15 Akim Demaille <akim@epita.fr>
4052
4053 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
4054 take two BRACED_CODE, not two string_content.
4055 Free the scanner's obstack when we are done.
4056 (code_content): New.
4057 * tests/calc.at: Adjust.
4058 * doc/bison.texinfo: Adjust.
4059 Also, make sure to include the `,' for these declarations.
4060
4061 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
4062
4063 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
4064 definition; avoids potential autoreconf problems.
4065
4066 2002-11-15 Akim Demaille <akim@epita.fr>
4067
4068 Always check the value returned by yyparse.
4069
4070 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
4071 returned by yyparse.
4072 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
4073 Adjust calls.
4074 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
4075 returned by yyparse.
4076
4077 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4078
4079 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
4080 on input.at test.
4081
4082 2002-11-14 Paul Eggert <eggert@twinsun.com>
4083
4084 * src/output.c (output_skeleton): Call xfopen instead of
4085 duplicating xfopen's body.
4086
4087 Fix bugs reported by Nelson H. F. Beebe in
4088 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
4089
4090 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
4091 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
4092 Group compiler. Instead, use "$CC -E bar.c". Include the .h
4093 file twice in the grammar, as an extra check.
4094
4095 * tests/input.at (Torturing the Scanner): Surround the
4096 backslash-newline tests with "#if 0", to make it less likely that
4097 we'll run into compiler bugs. Bring back solitary \ inside
4098 comment, but add a closing comment to work around HP C bug. Don't
4099 test backslash-newline in C character constant.
4100
4101 2002-11-14 Akim Demaille <akim@epita.fr>
4102
4103 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
4104 status of the compiler.
4105 Calling `exit 1' is no longer needed.
4106 Reported by Nelson H. F. Beebe.
4107
4108 2002-11-14 Akim Demaille <akim@epita.fr>
4109
4110 * tests/atlocal.in (CPPFLAGS): We have config.h.
4111 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
4112 New.
4113 * tests/actions.at, tests/calc.at, tests/conflicts.at,
4114 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
4115 * tests/regression.at, tests/torture.at: Use them for all the
4116 grammars that are to be compiled.
4117 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
4118 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
4119 * doc/bison.texinfo (GLR Parsers): Document `inline'.
4120
4121 2002-11-14 Akim Demaille <akim@epita.fr>
4122
4123 * doc/bison.texinfo: Various formatting changes (alignments in
4124 samples, additional @group/@end group, GCS in samples.
4125 Use @deffn instead of simple @table to define the directives,
4126 macros, variables etc.
4127
4128 2002-11-13 Paul Eggert <eggert@twinsun.com>
4129
4130 Fix some bugs reported by Albert Chin-A-Young in
4131 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
4132
4133 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
4134 -o c"; the HP C compiler chatters during compilation.
4135 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
4136 * tests/headers.at (export YYLTYPE): Likewise.
4137
4138 * tests/input.at (Torturing the Scanner): Remove lines containing
4139 solitary backslashes, as they tickle a bug in the HP C compiler.
4140
4141 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
4142 comments, since they're not portable. Use GNU coding style.
4143
4144 2002-11-13 Akim Demaille <akim@epita.fr>
4145
4146 * data/yacc.c: Leave bigger chunks of quoted text.
4147 (YYDSYMPRINTF): New.
4148 Use it to report symbol activities.
4149 * data/glr.c (YYDSYMPRINTF): New.
4150 Use it.
4151
4152 2002-11-12 Paul Eggert <eggert@twinsun.com>
4153
4154 Version 1.75b.
4155
4156 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
4157 (yyglrReduce): Return yyok, not 0.
4158 This should avoid the enumerated-type warnings reported
4159 by Nelson H. F. Beebe in
4160 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
4161
4162 * lib/bbitset.h (BITSET_INLINE): Remove.
4163 * lib/bitset.h [! BITSET_INLINE]: Remove.
4164 (bitset_set, bitset_reset, bitset_test): Rename local vars
4165 to avoid shadowing warnings by GCC.
4166
4167 * data/glr.c (inline): Remove #define. It's the user's
4168 responsibility to #define it away, just like 'const'.
4169 This fixes one of the bugs reported by Nelson H. F. Beebe in
4170 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
4171
4172 * Makefile.maint (po-check): Scan .l and .y files instead of the
4173 .c and the .h files that they generate. This fixes the bug
4174 reported by Tim Van Holder in:
4175 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
4176 Look for N_ as well as for _. Try to avoid matching #define for
4177 N_ and _.
4178 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
4179 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
4180 * src/scan-gram.l: Revamp regular expressions so that " and '
4181 do not confuse xgettext.
4182
4183 * src/struniq.h (struniq_new): Do not declare the return type
4184 to be 'const'; this violates the C standard.
4185 * src/struniq.c (struniq_new): Likewise.
4186
4187 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
4188
4189 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
4190 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
4191 linker.
4192
4193 2002-11-12 Akim Demaille <akim@epita.fr>
4194
4195 * Makefile.maint: Sync with Autoconf:
4196 (local_updates): New.
4197
4198 2002-11-12 Akim Demaille <akim@epita.fr>
4199
4200 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
4201
4202 2002-11-12 Akim Demaille <akim@epita.fr>
4203
4204 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
4205 locations.
4206
4207 2002-11-12 Akim Demaille <akim@epita.fr>
4208
4209 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
4210 not yyvalue.
4211
4212 2002-11-12 Akim Demaille <akim@epita.fr>
4213
4214 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
4215 Use it to test the GLR parser.
4216
4217 2002-11-12 Akim Demaille <akim@epita.fr>
4218
4219 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
4220 defines it.
4221 * data/glr.c (yystos): New.
4222 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
4223 (YYDSYMPRINT): New.
4224 (yyval): Don't define it, it is handled via M4.
4225 (yyrecoverParseError): Free verbosely the discarded symbols.
4226 * data/yacc.c (yysymprint): Remove, rather...
4227 (b4_yysymprint_generate): invoke.
4228 * data/c.m4 (b4_yysymprint_generate): New.
4229 Accept pointers as arguments, as opposed to the version from
4230 yacc.c.
4231 (b4_yydestruct_generate): Likewise.
4232 * tests/cations.at (Printers and Destructors): Use Bison directives
4233 instead of CPP macros.
4234 Don't rely on internal details.
4235
4236 2002-11-12 Akim Demaille <akim@epita.fr>
4237
4238 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
4239 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
4240 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
4241 it against YYEMPTY and so forth), work on yytoken (i.e., set
4242 it to YYEMPTY etc.).
4243 (yydestruct): Replace with a b4_yydestruct_generate invocation.
4244 (b4_symbol_actions): Remove.
4245 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
4246 for 0, end-of-input.
4247
4248 2002-11-12 Akim Demaille <akim@epita.fr>
4249
4250 * doc/bison.texinfo (Destructor Decl): New.
4251
4252 2002-11-12 Akim Demaille <akim@epita.fr>
4253
4254 * src/tables.c (tables_generate): Use free for pointers that
4255 cannot be NULL, not XFREE.
4256 (pack_vector): Use assert, not fatal, for bound violations.
4257 * src/state.c (state_new): Likewise.
4258 * src/reader.c (reader): Likewise.
4259 * src/lalr.c (set_goto_map): Likewise.
4260 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
4261 the file name.
4262
4263 2002-11-12 Akim Demaille <akim@epita.fr>
4264
4265 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
4266 Restore.
4267 * src/scan-gram.l (last_string): Is global to the file, not to
4268 yylex.
4269 * src/parse-gram.y (input): Don't append the epilogue here,
4270 (epilogue.opt): do it here, and free the scanner's obstack.
4271 * src/reader.c (epilogue_set): Rename as...
4272 (epilogue_augment): this.
4273 * data/c.m4 (b4_epilogue): Defaults to empty.
4274
4275 2002-11-12 Akim Demaille <akim@epita.fr>
4276
4277 * src/getargs.c (long_options): Remove duplicates.
4278 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
4279 Remove.
4280 * doc/bison.rnh: Remove.
4281 * doc/bison.texinfo (VMS Invocation): Remove.
4282
4283 2002-11-12 Akim Demaille <akim@epita.fr>
4284
4285 * src/struniq.h, src/struniq.c (struniq_t): Is const.
4286 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
4287
4288 Use struniq for symbols.
4289
4290 * src/symtab.h (symbol_t): The tag member is a struniq.
4291 (symbol_type_set): Adjust.
4292 * src/symtab.c (symbol_new): Takes a struniq.
4293 (symbol_free): Don't free the tag member.
4294 (hash_compare_symbol_t, hash_symbol_t): Rename as...
4295 (hash_compare_symbol, hash_symbol): these.
4296 Use the fact that tags as struniqs.
4297 (symbol_get): Use struniq_new.
4298 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
4299 Returns a strniq.
4300 * src/reader.h (merger_list, grammar_currentmerge_set): The name
4301 and type members are struniqs.
4302 * src/reader.c (get_merge_function)
4303 (grammar_current_rule_merge_set): Adjust.
4304 (TYPE, current_type): Are struniq.
4305
4306 Use struniq for file names.
4307
4308 * src/files.h, src/files.c (infile): Split into...
4309 (grammar_file, current_file): these.
4310 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
4311 * src/reduce.c (reduce_print): Likewise.
4312 * src/getargs.c (getargs): Likewise.
4313 * src/complain.h, src/complain.c: Likewise.
4314 * src/main.c (main): Call struniqs_new early enough to use it for
4315 file names.
4316 Don't free the input file name.
4317
4318 2002-11-12 Akim Demaille <akim@epita.fr>
4319
4320 * src/symtab.c (symbol_free): Remove dead deactivated code:
4321 type_name are properly removed.
4322 Don't use XFREE to free items that cannot be NULL.
4323 * src/struniq.h, src/struniq.c: New.
4324 * src/main.c (main): Initialize/free struniqs.
4325 * src/parse-gram.y (%union): Add astruniq member.
4326 (yyprint): Adjust.
4327 * src/scan-gram.l (<{tag}>): Return a struniq.
4328 Free the obstack bit that used to store it.
4329 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
4330
4331 2002-11-11 Paul Eggert <eggert@twinsun.com>
4332
4333 Revamp to fix many (but not all) of the C- and M4-related quoting
4334 problems. Among other things, this fixes the Bison bug reported
4335 by Jan Hubicka when processing the Bash grammar; see:
4336 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
4337
4338 Use new @ escapes consistently. Represent brackets with @{ and @}
4339 rather than @<:@ and @:>@, since this works a bit better with dumb
4340 editors like vi. Represent @ with @@, since @ is now consistently
4341 an escape. Use @oline@ and @ofile@ rather than __oline__ and
4342 __ofile__, to avoid unexpected expansions. Similarly, use @output
4343 rather than #output.
4344
4345 * data/c.m4 (b4_copyright): Omit file name from comment, since
4346 the file name could contain "*/".
4347 (b4_synclines_flag): Don't quote the 2nd argument; it should already
4348 be quoted. All uses changed.
4349
4350 * data/glr.c: Use new @ escapes consistently.
4351 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
4352 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
4353 Remove, since they couldn't handle arbitrary characters in file
4354 names.
4355 * data/lalr1.cc: Likewise.
4356 * data/yacc.c: Likewise.
4357
4358 * src/files.c (output_infix): Remove; all uses removed.
4359 * src/files.h: Likewise.
4360
4361 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
4362 mishandled funny characters in file names, and anyway it isn't
4363 needed any more.
4364 * data/yacc.c: Likewise.
4365 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
4366
4367 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
4368 * data/yacc.c: Likewise.
4369
4370 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
4371 strings now.
4372 (muscle_init): Quote filename as a C string.
4373 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
4374 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
4375 * src/output.c (escaped_file_name_output): New function.
4376 (prepare_symbols): Quote tokens for M4.
4377 (prepare): Don't insert output_infix, output_prefix,
4378 output_parser_name, output_header_name; this is now down by scan-skel.
4379 Insert skeleton as a C string.
4380
4381 * src/output.c (user_actions_output, symbol_destructors_output,
4382 symbol_printers_output): Quote filenames for C and M4.
4383 * src/reader.c (prologue_augment, epilogue_set): Likewise.
4384
4385 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
4386 escapes other than \\ and \'; this simplifies the code.
4387 (<SC_STRING>): Likewise, for \\ and \".
4388 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
4389 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
4390 Use new escapes @{ and @} for [ and ].
4391
4392 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
4393 them with auto vars.
4394 Switch to new escape scheme, where @ is the escape character uniformly.
4395 Abort if a stray escape character is found. Avoid unbounded input
4396 buffer when parsing non-escaped text.
4397
4398 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
4399 __oline__, #output, $@, and @{ do not have unintended meanings.
4400
4401 2002-11-09 Paul Eggert <eggert@twinsun.com>
4402
4403 Fix the test failure due to GCC warnings described in
4404 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
4405 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
4406 evaluate to 0 if it's impossible for NINF to be in the respective
4407 table.
4408 (yygetLRActions, yyrecoverParseError): Use them.
4409
4410 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
4411 counted in the token inserted at end of file. Now takes
4412 location_t *, not location_t, so that the location can be
4413 adjusted. All uses changed.
4414
4415 * tests/regression.at (Invalid inputs): Adjust wording in
4416 diagnostic to match the new behavior.
4417
4418 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
4419 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
4420 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
4421 abort ();'. This reduces the runtime of the "Many lookaheads"
4422 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
4423 GCC 3.2.
4424
4425 2002-11-07 Paul Eggert <eggert@twinsun.com>
4426
4427 * src/parse-gram.y (CHARACTER): Remove unused token.
4428 All uses removed.
4429
4430 * src/scan-gram.l: Remove stack option. We no longer use the
4431 stack, since the stack was never deeper than 1; instead, use the
4432 new auto var c_context to record the stacked value.
4433
4434 Remove nounput option. At an unexpected end of file, we now unput
4435 the minimal input necessary to end cleanly; this simplifies the
4436 code.
4437
4438 Avoid unbounded token sizes where this is easy.
4439
4440 (unexpected_end_of_file): New function.
4441 Use it to systematize the error message on unexpected EOF.
4442 (last-string): Now auto, not static.
4443 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
4444 (scanner_last_string_free): Remove; not used.
4445 (percent_percent_count): Move decl to just before use.
4446 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
4447 not the (never otherwised-used) CHARACTER.
4448
4449 2002-11-07 Akim Demaille <akim@epita.fr>
4450
4451 Let yyerror always receive the msg as last argument, so that
4452 yyerror can be variadic.
4453
4454 * data/yacc.c (b4_yyerror_args): New.
4455 Use it when calling yyerror.
4456 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
4457 Use it when calling yyerror.
4458 * doc/bison.texinfo (Error Reporting): Adjust.
4459 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
4460 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
4461
4462 2002-11-06 Akim Demaille <akim@epita.fr>
4463
4464 #line should have quoted strings.
4465 Ideally, this should be done by m4_quotearg.
4466
4467 * src/scan-skel.l: Include quotearg.h.
4468 Quote __ofile__.
4469 * src/output.c (symbol_printers_output)
4470 (symbol_destructors_output): Quote the file name.
4471
4472 2002-11-06 Akim Demaille <akim@epita.fr>
4473
4474 * tests/regression.at (Invalid inputs): Adjust to the recent
4475 messages.
4476
4477 2002-11-06 Akim Demaille <akim@epita.fr>
4478
4479 Restore --no-lines.
4480 Reported by Jim Kent.
4481
4482 * data/c.m4 (b4_syncline): New.
4483 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
4484 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
4485 * src/output.c (user_actions_output): Likewise.
4486 (prepare): Define 'b4_synclines_flag'.
4487 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
4488
4489 2002-11-06 Akim Demaille <akim@epita.fr>
4490
4491 * src/main.c (main): Free `infile'.
4492 * src/scan-gram.l (handle_syncline): New.
4493 Recognize `#line'.
4494 * src/output.c (user_actions_output, symbol_destructors_output)
4495 (symbol_printers_output): Use the location's file name, not
4496 infile.
4497 * src/reader.c (prologue_augment, epilogue_set): Likewise.
4498
4499 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4500
4501 * src/tables.c (matching_state): Don't allow states to match if
4502 either has GLR conflict entries.
4503
4504 2002-11-05 Paul Eggert <eggert@twinsun.com>
4505
4506 * src/scan-gram.l: Use more accurate diagnostics, e.g.
4507 "integer out of range" rather than "invalid value".
4508 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
4509 accordingly.
4510
4511 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
4512 Also, remove one static variable in the scanner.
4513
4514 * src/scan-gram.l (braces_level): Now auto, not static.
4515 Initialize to zero if the compiler is being picky.
4516 (INITIAL): Clear braces_level instead of incrementing it.
4517 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
4518 as POSIX 1003.1-2001 requires.
4519 * src/system.h (IF_LINT): New macro, taken from coreutils.
4520 * configure.ac: Define "lint" if --enable-gcc-warnings.
4521
4522 2002-11-05 Akim Demaille <akim@epita.fr>
4523
4524 * src/scan-gram.l: When it starts with `%', complain about the
4525 whole directive, not just that `invalid character: %'.
4526
4527 2002-11-04 Akim Demaille <akim@epita.fr>
4528
4529 * Makefile.maint: Update from Autoconf.
4530 (update, cvs-update, po-update, do-po-update): New.
4531
4532 2002-11-04 Akim Demaille <akim@epita.fr>
4533
4534 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
4535 and yyerror.
4536 Have yyerror `use' its arguments.
4537 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
4538 returns true when location & yacc & pure & parse-param.
4539 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
4540
4541 2002-11-04 Akim Demaille <akim@epita.fr>
4542
4543 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
4544 clashes.
4545 * src/scan-gram.l: Use [\'] instead of ['] to pacify
4546 font-lock-mode.
4547 Use complain_at.
4548 Use quote, not quote_n since LOCATION_PRINT no longer uses the
4549 slot 0.
4550
4551 2002-11-03 Paul Eggert <eggert@twinsun.com>
4552
4553 * src/reader.c (get_merge_function, grammar_current_rule_check):
4554 Use consistent diagnostics for reporting type name clashes.
4555 Quote the types with <>, for consistency with Yacc.
4556 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
4557
4558 2002-11-03 Akim Demaille <akim@epita.fr>
4559
4560 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
4561 New.
4562 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
4563 (b4_parse_param): Remove.
4564 Use b4_identification.
4565 Propagate b4_pure_args where needed to pass them to yyerror.
4566 * data/glr.m4 (b4_parse_param): Remove.
4567 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
4568 (b4_lpure_formals): New.
4569 Use b4_identification.
4570 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
4571 b4_user_formals and b4_user_args.
4572 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
4573 (yyreportAmbiguity): When using a pure parser, also need
4574 the location, and the parse-params.
4575 Adjust callers.
4576 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
4577 When using a pure parser, also need the parse-params.
4578 Adjust callers.
4579 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
4580 (%pure-parser + %parse-param) LALR and GLR parsers.
4581 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
4582 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
4583 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
4584 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
4585 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
4586 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
4587 * doc/bison.texinfo: Untabify the whole file.
4588 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
4589 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
4590 (Error Reporting): Adjust to these new directives.
4591 Document %error-verbose, deprecate YYERROR_VERBOSE.
4592
4593 2002-11-03 Akim Demaille <akim@epita.fr>
4594
4595 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
4596 AT_CHECK_CALC_GLR invocations to use % directives, instead of
4597 command line options.
4598 * tests/cxx-type.at: Formatting changes.
4599
4600 2002-11-03 Paul Eggert <eggert@twinsun.com>
4601
4602 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
4603 to count columns correctly, and to check for invalid inputs.
4604
4605 Use mbsnwidth to count columns correctly. Account for tabs, too.
4606 Include mbswidth.h.
4607 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
4608 (extend_location): New function.
4609 (YY_LINES): Remove.
4610
4611 Handle CRLF in C code rather than in Lex code.
4612 (YY_INPUT): New macro.
4613 (no_cr_read): New function.
4614
4615 Scan UCNs, even though we don't fully handle them yet.
4616 (convert_ucn_to_byte): New function.
4617
4618 Handle backslash-newline correctly in C code.
4619 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
4620 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
4621 all uses changed.
4622 (tag, splice): New EREs. Do not allow NUL or newline in tags.
4623 Use {splice} wherever C allows backslash-newline.
4624 YY_STEP after space, newline, vertical-tab.
4625 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
4626
4627 (letter, id): Don't assume ASCII; e.g., spell out a-z.
4628
4629 ({int}, handle_action_dollar, handle_action_at): Check for integer
4630 overflow.
4631
4632 (YY_STEP): Omit trailing semicolon, so that it's more like C.
4633
4634 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
4635 as well as \000. Check for UCHAR_MAX, not 255.
4636 Allow \x with an arbitrary positive number of digits, as in C.
4637 Check for overflow here.
4638 Allow \? and UCNs, for compatibility with C.
4639
4640 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
4641 with quote slot used by complain_at.
4642
4643 * tests/input.at: Add tests for backslash-newline, m4 quotes
4644 in symbols, long literals, and funny escapes in strings.
4645
4646 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
4647 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
4648 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
4649 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
4650 * m4/mbswidth.m4: New file, from GNU coreutils.
4651
4652 * doc/bison.texinfo (Grammar Outline): Document // comments.
4653 (Symbols): Document that trigraphs have no special meaning in Bison,
4654 nor is backslash-newline allowed.
4655 (Actions): Document that trigraphs have no special meaning.
4656
4657 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
4658 no longer used.
4659
4660 2002-11-02 Paul Eggert <eggert@twinsun.com>
4661
4662 * src/reader.c: Don't include quote.h; not needed.
4663 (get_merge_function): Reword warning to be consistent with
4664 type clash diagnostic in grammar_current_rule_check.
4665
4666 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
4667 bug in trigraph handling.
4668
4669 * src/output.c (prepare_symbols): When printing token names,
4670 escape "[" as "@<:@" and likewise for "]".
4671
4672 * src/system.h (errno): Remove declaration, as we are now
4673 assuming C89 or better, and C89 guarantees errno.
4674
4675 2002-10-30 Paul Eggert <eggert@twinsun.com>
4676
4677 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
4678 Check for close failures.
4679 * src/files.h (xfclose): Return void, not int, since it always
4680 returned zero.
4681 * src/files.c (xfclose): Likewise. Report I/O error if ferror
4682 indicates one.
4683 * src/output.c (output_skeleton): Use xfclose rather than fclose
4684 and ferror. xfclose now checks ferror.
4685
4686 * data/glr.c (YYLEFTMOST_STATE): Remove.
4687 (yyreportTree): Use a stack-based leftmost state. This avoids
4688 our continuing battles with bogus warnings about initializers.
4689
4690 2002-10-30 Akim Demaille <akim@epita.fr>
4691
4692 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
4693 #if.
4694
4695 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4696
4697 * tests/glr-regr1.at: New test for reported regressions.
4698 * tests/testsuite.at: Add glr-regr1.at test.
4699 * tests/Makefile.am: Add glr-regr1.at test.
4700
4701 2002-10-24 Paul Eggert <eggert@twinsun.com>
4702
4703 Version 1.75a.
4704
4705 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
4706 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
4707 we use malloc. Don't assume 'A' through 'Z' are contiguous.
4708 Don't assume strdup exists; POSIX says its an XSI extension.
4709 Check for buffer overflow on input.
4710
4711 2002-10-24 Akim Demaille <akim@epita.fr>
4712
4713 * src/output.c (output_skeleton): Don't disable M4sugar comments
4714 too soon: it results in comments being expanded.
4715 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
4716 first output.
4717
4718 2002-10-24 Akim Demaille <akim@epita.fr>
4719
4720 * data/yacc.c (m4_int_type): New.
4721 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
4722 char' as only yacc.c wants K&R portability.
4723 * data/glr.c (yysigned_char): Remove.
4724 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
4725 Reported by Quoc Peyrot.
4726
4727 2002-10-23 Paul Eggert <eggert@twinsun.com>
4728
4729 * src/main.c (main): With --trace=time, report times even if a
4730 non-fatal error occurs. Formerly, the times were reported in some
4731 such cases but not in others.
4732 * src/reader.c (reader): Just return if a complaint has been issued,
4733 instead of exiting, so that 'main' can report times.
4734
4735 2002-10-22 Akim Demaille <akim@epita.fr>
4736
4737 * src/system.h: Include sys/types.
4738 Reported by Bert Deknuydt.
4739
4740 2002-10-23 Paul Eggert <eggert@twinsun.com>
4741
4742 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
4743 Suggested by Art Haas.
4744
4745 2002-10-22 Paul Eggert <eggert@twinsun.com>
4746
4747 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
4748 decl; not needed any more.
4749 * src/main.c (main): Use return to exit, undoing yesterday's change.
4750 The last OS that we could find where this wouldn't work is
4751 SunOS 3.5, and that's too old to worry about now.
4752
4753 * data/glr.c (struct yyltype): Define members even when not
4754 doing locations. This is more consistent with yacc.c, and it
4755 works around the following bug reports:
4756 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
4757 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
4758
4759 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
4760 @acronym consistently. Standardize on "Yacc" instead of "YACC",
4761 "Algol" instead of "ALGOL". Give a bit more history about BNF.
4762
4763 2002-10-22 Akim Demaille <akim@epita.fr>
4764
4765 * data/README: New.
4766
4767 2002-10-21 Paul Eggert <eggert@twinsun.com>
4768
4769 Be consistent about 'bool'; the old code used an enum in one
4770 module and an int in another, and this violates the C standard.
4771 * m4/stdbool.m4: New file, from coreutils 4.5.3.
4772 * configure.ac (AC_HEADER_STDBOOL): Add.
4773 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
4774 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
4775 * src/symtab.c (hash_compare_symbol_t): Likewise.
4776 * src/system.h (bool, false, true): Use a definition consistent
4777 with ../lib/hash.c. All uses changed.
4778
4779 * src/complain.c (warning_issued): Renamed from warn_message_count,
4780 so that we needn't worry about integer overflow (!).
4781 Now of type bool. All uses changed.
4782 (complaint_issued): Renamed from complain_message_count; likewise.
4783
4784 * src/main.c (main): Use exit to exit with failure.
4785
4786 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
4787 rather than 1 and 0.
4788 * src/main.c (main): Likewise.
4789 * src/getargs.c (getargs): Likewise.
4790 * src/reader.c (reader): Likewise.
4791
4792 * src/getarg.c (getargs): Remove duplicate code for
4793 "Try `bison --help'".
4794
4795 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
4796 What was that "2" for?
4797
4798 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
4799 * src/getargs.c (usage): Likewise.
4800
4801 * src/getargs.c (getargs): When there are too few operands, report
4802 the last one. When there are too many, report the first extra
4803 one. This is how diffutils does it.
4804
4805 2002-10-20 Paul Eggert <eggert@twinsun.com>
4806
4807 Remove K&R vestiges.
4808 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
4809 * src/complain.c (VA_START): Remove. Assume prototypes.
4810 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
4811 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
4812 fatal): Assume prototypes.
4813 * src/complain.h: Assume prototypes.
4814 * src/system.h (PARAMS): Remove.
4815 Include <limits.h> unconditionally, since it's guaranteeed even
4816 for a freestanding C89 compiler.
4817 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
4818 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
4819
4820 2002-10-20 Akim Demaille <akim@epita.fr>
4821
4822 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
4823 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
4824 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
4825 (yyresolveStates, yyresolveAction, yyresolveStack)
4826 (yyprocessOneStack): Use them.
4827 (yy_reduce_print): New.
4828 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
4829
4830 2002-10-20 Akim Demaille <akim@epita.fr>
4831
4832 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
4833 arguments and output `void'.
4834 (b4_c_function): Rename as...
4835 (b4_c_function_def): this.
4836 (b4_c_function_decl, b4_c_ansi_function_def)
4837 (b4_c_ansi_function_decl): New.
4838 Change the interpretation of the arguments: before `int, foo', now
4839 `int foo, foo'.
4840 * data/yacc.c (yyparse): Prototype and define thanks to these.
4841 Adjust b4_c_function_def uses.
4842 * data/glr.c (yyparse): Likewise, but ANSI only.
4843
4844 2002-10-20 Akim Demaille <akim@epita.fr>
4845
4846 * src/output.c (prepare): Move the definition of `tokens_number',
4847 `nterms_number', `undef_token_number', `user_token_number_max'
4848 to...
4849 (prepare_tokens): Here.
4850 (prepare_tokens): Rename as...
4851 (prepare_symbols): this.
4852 (prepare): Move the definition of `rules_number' to...
4853 (prepare_rules): here.
4854 (prepare): Move the definition of `last', `final_state_number',
4855 `states_number' to...
4856 (prepare_states): here.
4857 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
4858
4859 2002-10-20 Akim Demaille <akim@epita.fr>
4860
4861 * src/tables.h, src/tables.c, src/output.c: Comment changes.
4862
4863 2002-10-20 Akim Demaille <akim@epita.fr>
4864
4865 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
4866 * data/c.m4: here.
4867
4868 2002-10-20 Akim Demaille <akim@epita.fr>
4869
4870 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
4871 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
4872 `pair'.
4873 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
4874 `name' to...
4875 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
4876 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
4877 These.
4878
4879 2002-10-19 Paul Eggert <eggert@twinsun.com>
4880
4881 Do not create a temporary file, as that involves security and
4882 cleanup headaches. Instead, use a pair of pipes.
4883 Derived from a suggestion by Florian Krohm.
4884 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
4885 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
4886 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
4887 (BISON_PREREQ_SUBPIPE): Add.
4888 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
4889 Add subpipe.h, subpipe.c.
4890 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
4891 * po/POTFILES.in: Add lib/subpipe.c.
4892 * src/output.c: Include "subpipe.h".
4893 (m4_invoke): Remove decl.
4894 (scan_skel): New decl.
4895 (output_skeleton): Use pipe rather than temporary file for m4 input.
4896 Check that m4sugar.m4 is readable, to avoid deadlock.
4897 Check for pipe I/O error.
4898 * src/scan-skel.l (readpipe): Remove decl.
4899 (scan_skel): New function, to be used in place of m4_invoke.
4900 Read from stream rather than file.
4901
4902 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
4903 float, as this generates a warning on Solaris 8 + GCC 3.2 with
4904 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
4905 this generates a more-accurate value anyway.
4906
4907 * lib/timevar.c (timervar_accumulate): Rename locals to
4908 avoid confusion with similarly-named more-global.
4909 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
4910
4911 * src/output.c (prepare): Use xstrdup to convert char const *
4912 to char *, to avoid GCC warning.
4913
4914 2002-10-19 Akim Demaille <akim@epita.fr>
4915
4916 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
4917 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
4918 Use them to have `calc.y' ready for %pure-parser.
4919 * data/yacc.c (YYLEX): Pass a yylex return type to
4920 b4_c_function_call.
4921
4922 2002-10-19 Akim Demaille <akim@epita.fr>
4923
4924 Prototype support of %lex-param and %parse-param.
4925
4926 * src/parse-gram.y: Add the definition of the %lex-param and
4927 %parse-param tokens, plus their rules.
4928 Drop the `_' version of %glr-parser.
4929 Add the "," token.
4930 * src/scan-gram.l (INITIAL): Scan them.
4931 * src/muscle_tab.c: Comment changes.
4932 (muscle_insert, muscle_find): Rename `pair' as `probe'.
4933 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
4934 (muscle_entry_s): The `value' member is no longer const.
4935 Adjust all dependencies.
4936 * src/muscle_tab.c (muscle_init): Adjust: use
4937 MUSCLE_INSERT_STRING.
4938 Initialize the obstack earlier.
4939 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
4940 (muscle_pair_list_grow): New.
4941 * data/c.m4 (b4_c_function_call, b4_c_args): New.
4942 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
4943 * tests/calc.at: Use %locations, not --locations.
4944 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
4945
4946 2002-10-19 Akim Demaille <akim@epita.fr>
4947
4948 * src/getargs.c (usage): Take status as argument and exit
4949 accordingly.
4950 Report the traditional `Try ... --help' message when status != 0.
4951 (usage, version): Don't take a FILE * as arg, it is pointless.
4952 (getargs): When there is an incorrect number of arguments, make it
4953 an error, and report it GNUlically thanks to `usage ()'.
4954
4955 2002-10-18 Paul Eggert <eggert@twinsun.com>
4956
4957 * data/glr.c (yyreportParseError): Don't assume that sprintf
4958 yields the length of the printed string, as this is not true
4959 on SunOS 4.1.4. Reported by Peter Klein.
4960
4961 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
4962 * tests/conflicts.at (%nonassoc and eof): Likewise.
4963 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
4964
4965 2002-10-17 Akim Demaille <akim@epita.fr>
4966
4967 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
4968 * src/getargs.c (trace_types, trace_args): Adjust.
4969 * src/reader.c (grammar_current_rule_prec_set)
4970 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
4971 Standardize error messages.
4972 And s/@prec/%prec/!
4973 (reader): Use trace_flag to enable scanner/parser debugging,
4974 instead of an adhoc scheme.
4975 * src/scan-gram.l: Remove trailing debugging code.
4976
4977 2002-10-16 Paul Eggert <eggert@twinsun.com>
4978
4979 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
4980 MUSCLE_TAB_H.
4981
4982 * NEWS: Officially drop support for building Bison with K&R C,
4983 since it didn't work anyway and it's not worth worrying about.
4984 * Makefile.maint (wget_files): Remove ansi2knr.c.
4985 (ansi2knr.c-url_prefix): Remove.
4986 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
4987 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4988 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4989
4990 2002-10-15 Paul Eggert <eggert@twinsun.com>
4991
4992 Stop using the "enum_" trick for K&R-style function definitions;
4993 it confused me, and I was the author! Instead, assume that people
4994 who want to use K&R C compilers (when using these modules in GCC,
4995 perhaps?) will run ansi2knr.
4996
4997 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
4998 All uses of "enum_" changed to "enum ".
4999 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
5000 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
5001
5002 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
5003 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
5004 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
5005 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
5006 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
5007 abitset_not, abitset_ones, abitset_or, abitset_or_and,
5008 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
5009 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
5010 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
5011 Use function prototypes; this removes the need for declaring
5012 static functions simply to provide their prototypes.
5013 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
5014 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
5015 bitset_count_, bitset_create, bitset_dump, bitset_first,
5016 bitset_free, bitset_init, bitset_last, bitset_next,
5017 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
5018 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
5019 bitset_print, bitset_release_memory, bitset_toggle_,
5020 bitset_type_choose, bitset_type_get, bitset_type_name_get,
5021 debug_bitset): Likewise.
5022 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
5023 * lib/bitset_stats.c (bitset_log_histogram_print,
5024 bitset_percent_histogram_print, bitset_stats_and,
5025 bitset_stats_and_cmp, bitset_stats_and_or,
5026 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
5027 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
5028 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
5029 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
5030 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
5031 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
5032 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
5033 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
5034 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
5035 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
5036 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
5037 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
5038 bitset_stats_zero): Likewise.
5039 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
5040 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
5041 bitsetv_dump, debug_bitsetv): Likewise.
5042 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
5043 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
5044 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
5045 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
5046 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
5047 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
5048 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
5049 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
5050 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
5051 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
5052 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
5053 Likewise.
5054 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
5055 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
5056 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
5057 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
5058 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
5059 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
5060 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
5061 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
5062 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
5063 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
5064 lbitset_xor_cmp, lbitset_zero): Likewise.
5065
5066 2002-10-14 Akim Demaille <akim@epita.fr>
5067
5068 Version 1.75.
5069
5070 2002-10-14 Akim Demaille <akim@epita.fr>
5071
5072 * tests/Makefile.am (maintainer-check-posix): New.
5073
5074 2002-10-14 Akim Demaille <akim@epita.fr>
5075
5076 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
5077 member.
5078
5079 2002-10-14 Akim Demaille <akim@epita.fr>
5080
5081 * src/tables.c (table_ninf_remap): base -> tab.
5082 Reported by Matt Rosing.
5083
5084 2002-10-14 Paul Eggert <eggert@twinsun.com>
5085
5086 * tests/action.at, tests/calc.at, tests/conflicts.at,
5087 tests/cxx-type.at, tests/headers.at, tests/input.at,
5088 tests/regression.at, tests/synclines.at, tests/torture.at:
5089 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
5090 so that the tests still work even if POSIXLY_CORRECT is set.
5091 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
5092
5093 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
5094 for portability to K&R hosts. Fix typo: signed char is guaranteed
5095 only to 127, not to 128.
5096 * data/glr.c (yysigned_char): New type.
5097 * data/yacc.c (yysigned_char): Likewise.
5098 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
5099
5100 2002-10-13 Paul Eggert <eggert@twinsun.com>
5101
5102 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
5103 true due to limited range of data type" warning from GCC.
5104
5105 * data/c.m4 (b4_token_defines): Protect against double-inclusion
5106 by wrapping enum yytokentype's definition inside #ifndef
5107 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
5108
5109 2002-10-13 Akim Demaille <akim@epita.fr>
5110
5111 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
5112 Un yy- yyrhs to avoid the name clash with the global YYRHS.
5113
5114 2002-10-13 Akim Demaille <akim@epita.fr>
5115
5116 * Makefile.maint: Update from Autoconf 2.54.
5117 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
5118
5119 2002-10-13 Akim Demaille <akim@epita.fr>
5120
5121 * src/print.c (print_state): Separate the list of solved conflicts
5122 from the other items.
5123 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
5124
5125 2002-10-13 Akim Demaille <akim@epita.fr>
5126
5127 Let nondeterministic skeletons be usable with deterministic
5128 tables.
5129
5130 With the patch, GAWK compiled by GCC without -O2 passes its test
5131 suite using a GLR parser driven by LALR tables. It fails with -O2
5132 because `struct stat' gives two different answers on my machine:
5133 88 (definition of an auto var) and later 96 (memset on this var).
5134 Hence the stack is badly corrumpted. The headers inclusion is to
5135 blame: if I move the awk.h inclusion before GLR's system header
5136 inclusion, the two struct stat have the same size.
5137
5138 * src/tables.c (pack_table): Always create conflict_table.
5139 (token_actions): Always create conflict_list.
5140 * data/glr.c (YYFLAG): Remove, unused.
5141
5142 2002-10-13 Akim Demaille <akim@epita.fr>
5143
5144 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
5145 (O0FLAGS): New.
5146 (VALGRIND, GXX): New.
5147 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
5148 * tests/bison.in: Run $PREBISON a pre-command.
5149 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
5150 (maintainer-check-g++): New.
5151 * Makefile.am (maintainer-check): New.
5152
5153 2002-10-13 Akim Demaille <akim@epita.fr>
5154
5155 * data/glr.c: Formatting changes.
5156 Tweak some trace messages to match yacc.c's.
5157
5158 2002-10-13 Akim Demaille <akim@epita.fr>
5159
5160 GLR parsers sometimes raise parse errors instead of performing the
5161 default reduction.
5162 Reported by Charles-Henry de Boysson.
5163
5164 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
5165 check the length of the traces when %glr.
5166 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
5167 GLR's traces.
5168 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
5169 Test GLR parsers.
5170 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
5171 (yyltype): Remove the yy prefix from the member names.
5172 (yytable): Complete its comment.
5173 (yygetLRActions): Map error action number from YYTABLE from
5174 YYTABLE_NINF to 0.
5175 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
5176 (which was a bug: it should have been YYTABEL_NINF, and yet it was
5177 not satisfying as we could compare an YYACTION computed from
5178 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
5179 only value for error actions.
5180 (yyreportParseError): In verbose parse error messages, don't issue
5181 `error' in the list of expected tokens.
5182 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
5183 next action to perform to match glr.c's decoding.
5184 (yytable): Complete its comment.
5185
5186 2002-10-13 Paul Eggert <eggert@twinsun.com>
5187
5188 Fix problem reported by Henrik Grubbstroem in
5189 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
5190 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
5191 because the Bison parser reads the second action before reducing
5192 the first one.
5193 * src/scan-gram.l (rule_length): New static var.
5194 Use it to keep track of the rule length in the scanner, since
5195 we can't expect the parser to be in lock-step sync with the scanner.
5196 (handle_action_dollar, handle_action_at): Use this var.
5197 * tests/actions.at (Exotic Dollars): Test for the problem.
5198
5199 2002-10-12 Paul Eggert <eggert@twinsun.com>
5200
5201 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
5202 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
5203 Include <sys/time.h> when checking for clock_t and struct tms.
5204 Use same include order as source.
5205 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
5206 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
5207
5208 * lib/timevar.c: Update copyright date and clarify comments.
5209 (get_time) [IN_GCC]: Keep the GCC version for reference.
5210
5211 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
5212 GCC version as of today, then merge Bison's changes.
5213 Change "GCC" to "Bison" in copyright notice. timevar.def's
5214 author is Akim, so change that too.
5215
5216 * src/reader.c (grammar_current_rule_check):
5217 Don't worry about the default action if $$ is untyped.
5218 Prevents bogus warnings reported by Jim Gifford in
5219 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
5220
5221 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
5222 * data/glr.c, data/lalr1.cc, data/yacc.c:
5223 Output token definitions before the first part of user declarations.
5224 Fixes compatibility problem reported by Jim Gifford for kbd in
5225 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
5226
5227 2002-10-11 Paul Eggert <eggert@twinsun.com>
5228
5229 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
5230 (yyparse): here. This undoes some of the 2002-07-25 change.
5231 Compatibility problem reported by Ralf S. Engelschall with
5232 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
5233
5234 2002-10-11 Akim Demaille <akim@epita.fr>
5235
5236 * tests/regression.at Characters Escapes): New.
5237 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
5238 characters.
5239 Reported by Jan Nieuwenhuizen.
5240
5241 2002-10-11 Akim Demaille <akim@epita.fr>
5242
5243 * po/id.po: New.
5244
5245 2002-10-10 Paul Eggert <eggert@twinsun.com>
5246
5247 Portability fixes for bitsets; this also avoids several GCC
5248 warnings.
5249
5250 * lib/abitset.c: Include <stddef.h>, for offsetof.
5251 * lib/lbitset.c: Likewise.
5252
5253 * lib/abitset.c (abitset_bytes): Return a size that is aligned
5254 properly for vectors of objects. Do not assume that adding a
5255 header size to a multiple of a word size yields a value that is
5256 properly aligned for the whole union.
5257 * lib/bitsetv.c (bitsetv_alloc): Likewise.
5258
5259 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
5260 unique names for structures.
5261 * lib/ebitset.c (ebitset_bytes): Likewise.
5262 * lib/lbitset.c (lbitset_bytes): Likewise.
5263
5264 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
5265 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
5266 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
5267 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
5268 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
5269 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
5270 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
5271 to improve the type-checking that GCC can do.
5272 * lib/bitset.c (bitset_op4_cmp): Likewise.
5273 * lib/bitset_stats.c (bitset_stats_count,
5274 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
5275 bitset_stats_copy, bitset_stats_disjoint_p,
5276 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
5277 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
5278 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
5279 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
5280 bitset_stats_and_or_cmp, bitset_stats_andn_or,
5281 bitset_stats_andn_or_cmp, bitset_stats_or_and,
5282 bitset_stats_or_and_cmp): Likewise.
5283 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
5284 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
5285 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
5286 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
5287
5288 * lib/abitset.h: Include bitset.h, not bbitset.h.
5289 * lib/ebitset.h: Likewise.
5290 * lib/lbitset.h: Likewise.
5291
5292 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
5293 All instances of parameters of type enum bitset_opts are now of
5294 type enum_bitset_opts, to conform to the C Standard, and similarly
5295 for enum_bitset_type.
5296 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
5297 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
5298
5299 Do not use "struct bitset_struct" to mean different things in
5300 different modules. Not only is this confusing, it violates
5301 the C Standard, which requires that structure types in different
5302 modules must be compatible if one is to be passed to the other.
5303 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
5304 All instances of "struct bitset_struct *" replaced with "bitset".
5305 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
5306 (union bitset_union, struct abitset_struct, struct ebitset_struct,
5307 struct lbitset_struct, struct bitset_stats_struct): New types.
5308 All uses of struct bitset_struct changed to union bitset_union,
5309 etc.
5310 * lib/abitset.c (struct abitset_struct, abitset,
5311 struct bitset_struct): Remove.
5312 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
5313 struct bitset_struct): Remove.
5314 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
5315 bitset_struct): Remove.
5316 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
5317 Likewise.
5318
5319 Do not call a function of type T using a call that assumes the
5320 function is of a different type U. Standard C requires that a
5321 function must be called with a type that is compatible with its
5322 definition.
5323 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
5324 New decls.
5325 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
5326 New functions.
5327 * lib/ebitset.c (PFV): Remove.
5328 * lib/lbitset.c (PFV): Likewise.
5329 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
5330 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
5331 decls.
5332 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
5333 (ebitset_vtable): Use them.
5334 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
5335 lbitset_xor): New functions.
5336 (lbitset_vtable): Use them.
5337
5338 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
5339 Declare.
5340
5341 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
5342 GCC warning.
5343 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
5344 Use offsetof, for simplicity.
5345
5346 2002-10-06 Paul Eggert <eggert@twinsun.com>
5347
5348 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
5349 the same width as int. This reapplies a hunk of the 2002-08-12 patch
5350 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
5351 which was inadvertently undone by the 2002-09-30 patch.
5352 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
5353 the same width as int.
5354
5355 2002-10-04 Paul Eggert <eggert@twinsun.com>
5356
5357 Version 1.50.
5358
5359 * configure.ac (AC_INIT), NEWS: Increment version number.
5360
5361 * doc/bison.texinfo: Minor spelling, grammar, and white space
5362 fixes.
5363 (Symbols): Mention that any negative value returned from yylex
5364 signifies end-of-input. Warn about negative chars. Mention
5365 the portable Standard C character set.
5366
5367 The GNU coding standard says CFLAGS and YFLAGS are reserved
5368 for the installer to set.
5369 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
5370 * src/Makefile.am (AM_CFLAGS): Likewise.
5371 (AM_YFLAGS): Renamed from YFLAGS.
5372
5373 Fix some MAX and MIN problems.
5374 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
5375 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
5376 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
5377 * src/reader.c (reader): Use it.
5378
5379 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
5380 POSIX 1003.1-2001 has removed fgrep.
5381
5382 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5383
5384 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
5385 interpreted as signed.
5386 * lib/ebitset.c (ebitset_list): Fix bug.
5387
5388 2002-10-01 Paul Eggert <eggert@twinsun.com>
5389
5390 More fixes for 64-bit hosts and large bitsets.
5391
5392 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
5393 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
5394 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
5395 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
5396 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
5397 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
5398 bitset_count_): Likewise.
5399 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
5400 bitset_first, bitset_last): Likewise.
5401 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
5402 bitset_stats_list_reverse, bitset_stats_size,
5403 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
5404 Likewise.
5405 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5406 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
5407 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
5408 bitsetv_reflexive_transitive_closure): Likewise.
5409 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
5410 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
5411 Likewise.
5412 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
5413 Likewise.
5414
5415 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
5416 Use size_t, not unsigned int, to count bytes.
5417 * lib/abitset.h (abitset_bytes): Likewise.
5418 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
5419 Likewise.
5420 * lib/bitset.h (bitset_bytes): Likewise.
5421 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
5422 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
5423 * lib/bitsetv.c (bitsetv_alloc): Likewise.
5424 * lib/ebitset.c (ebitset_bytes): Likewise.
5425 * lib/ebitset.h (ebitset_bytes): Likewise.
5426 * lib/lbitset.c (lbitset_bytes): Likewise.
5427 * lib/lbitset.h (lbitset_bytes): Likewise.
5428
5429 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
5430 abitset_subset_p, abitset_disjoint_p, abitset_and,
5431 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
5432 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
5433 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
5434 abitset_or_and, abitset_or_and_cmp):
5435 Use bitset_windex instead of unsigned int.
5436 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
5437 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
5438 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
5439 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
5440 Likewise.
5441 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
5442
5443 * lib/bitset.c (bitset_print):
5444 Use proper printf formats for widths of integer types.
5445 * lib/bitset_stats.c (bitset_percent_histogram_print,
5446 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
5447 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5448 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
5449 * lib/lbitset.c (lbitset_bytes): Likewise.
5450
5451 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
5452 BITSET_SIZE_MAX): New macros.
5453 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
5454 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
5455 to BITSET_WINDEX_MAX.
5456
5457 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
5458 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
5459 since we now return the bitset_bindex type (not int).
5460
5461 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
5462 when computing sizes.
5463 * lib/ebitset.c (ebitset_elts_grow): Likewise.
5464
5465 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
5466 and avoid cast to unsigned.
5467
5468 2002-09-30 Akim Demaille <akim@epita.fr>
5469
5470 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
5471 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
5472 Updates from Michael Hayes.
5473
5474 2002-09-30 Art Haas <ahaas@neosoft.com>
5475
5476 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
5477 invocations.
5478 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
5479 defined.
5480
5481 2002-09-27 Akim Demaille <akim@epita.fr>
5482
5483 Version 1.49c.
5484
5485 2002-09-27 Akim Demaille <akim@epita.fr>
5486
5487 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
5488 (Because of AC_LIBSOURCE).
5489
5490 2002-09-27 Akim Demaille <akim@epita.fr>
5491
5492 Playing with Autoscan.
5493
5494 * configure.ac: Remove the old LIBOBJ tweaks.
5495 (AC_REPLACE_FUNCS): Add strrchr and strtol.
5496 * lib/strrchr.c: New.
5497 * lib/strtol.c: New, from the Coreutils 4.5.1.
5498
5499 2002-09-27 Akim Demaille <akim@epita.fr>
5500
5501 Playing with Autoscan.
5502
5503 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
5504 * lib/Makefile.am (libbison_a_SOURCES): No longer include
5505 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
5506 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
5507 Coreutils 4.5.1.
5508
5509 2002-09-24 Akim Demaille <akim@epita.fr>
5510
5511 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
5512 (Frequently Asked Questions, Parser Stack Overflow): New.
5513
5514 2002-09-13 Akim Demaille <akim@epita.fr>
5515
5516 Playing with autoscan.
5517
5518 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
5519 * src/files.c (skeleton_find): Remove, unused.
5520 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
5521 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
5522
5523 2002-09-13 Akim Demaille <akim@epita.fr>
5524
5525 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
5526 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
5527
5528 2002-09-13 Akim Demaille <akim@epita.fr>
5529
5530 * configure.ac: Require 2.54.
5531 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
5532 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
5533 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
5534 Remove, provided by Autoconf macros.
5535
5536 2002-09-12 Akim Demaille <akim@epita.fr>
5537
5538 * m4/prereq.m4: Update, from Coreutils 4.5.1.
5539
5540 2002-09-12 Akim Demaille <akim@epita.fr>
5541
5542 * m4/prereq.m4: Update, from Fileutils 4.1.5.
5543 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
5544 Reported by Martin Mokrejs.
5545
5546 2002-09-10 Akim Demaille <akim@epita.fr>
5547
5548 * src/parse-gram.y: Associate a human readable string to each
5549 token type.
5550 * tests/regression.at (Invalid inputs): Adjust.
5551
5552 2002-09-10 Gary V. Vaughan <gary@gnu.org>
5553
5554 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
5555 with an Autoconf-2.5x style configure.ac.
5556
5557 2002-09-06 Paul Eggert <eggert@twinsun.com>
5558
5559 * doc/bison.texinfo (Conditions): Make explicit that the GPL
5560 exception applies only to yacc.c. This is a modification of a
5561 patch originally suggested by Akim Demaille.
5562
5563 2002-09-06 Akim Demaille <akim@epita.fr>
5564
5565 * data/c.m4 (b4_copyright): Move the GPL exception comment from
5566 here to...
5567 * data/yacc.c: here.
5568
5569 * data/lalr1.cc (struct yyltype): Don't define it, since we use
5570 LocationType.
5571 (b4_ltype): Default to yy::Location from location.hh.
5572
5573 2002-09-04 Jim Meyering <jim@meyering.net>
5574
5575 * data/yacc.c: Guard the declaration of yytoknum also with
5576 `#ifdef YYPRINT', so it is declared only when used.
5577
5578 2002-09-04 Akim Demaille <akim@epita.fr>
5579
5580 * configure.in: Rename as...
5581 * configure.ac: this.
5582 Bump to 1.49c.
5583
5584 2002-09-04 Akim Demaille <akim@epita.fr>
5585
5586 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
5587 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
5588 translate maintainer only messages.
5589
5590 2002-08-12 Paul Eggert <eggert@twinsun.com>
5591
5592 Version 1.49b.
5593
5594 * Makefile.am (SUBDIRS): Remove intl.
5595 (DISTCLEANFILES): Remove.
5596 * NEWS: Mention that GNU M4 is now required. Clarify what is
5597 meant by "larger grammars". Mention the pt_BR translation.
5598 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
5599 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
5600 Bump version from 0.11.2 to 0.11.5.
5601 (BISON_PREREQ_STAGE): Remove.
5602 (AM_GNU_GETTEXT): Use external gettext.
5603 (AC_OUTPUT): Remove intl/Makefile.
5604
5605 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
5606
5607 * data/glr.c: Include string.h, for strlen.
5608 (yyreportParseError): Use size_t for yysize.
5609 (yy_yypstack): No longer nested inside yypstates, as nested
5610 functions are not portable. Do not assume size_t is the
5611 same width as int.
5612 (yypstates): Do not assume that ptrdiff_t is the same width
5613 as int, and similarly for yyposn and YYINDEX.
5614
5615 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
5616
5617 * lib/Makefile.am (INCLUDES): Do not include from the intl
5618 directory, which has been removed.
5619 * src/Makefile.am (INCLUDES): Likewise.
5620
5621 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
5622 (bitsets_sources, additional_bitsets_sources, timevars_sources):
5623 New vars.
5624
5625 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
5626 * tests/Makefile.am (EXTRA_DIST): Likewise.
5627
5628 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
5629 Do not assume that bitset_windex is the same width as unsigned.
5630
5631 * lib/abitset.c (abitset_unused_clear): Do not assume that
5632 bitset_word is the same width as int.
5633 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
5634 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
5635 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
5636 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
5637 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
5638
5639 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
5640 portability to one's complement hosts!).
5641 * lib/ebitset.c (ebitset_op1): Likewise.
5642 * lib/lbitset.c (lbitset_op1): Likewise.
5643
5644 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
5645 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
5646 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
5647 Sync with fileutils.
5648 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
5649 lib/gettext.h: Sync with diffutils.
5650
5651 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
5652 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
5653
5654 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
5655 PROTOTYPES to check for prototypes, and "defined __STDC__" to
5656 check for void *.
5657
5658 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
5659 size_t; the old version tried to do this but casted improperly.
5660 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
5661 (bitset_test): Now returns int, not unsigned long.
5662
5663 * lib/bitset_stats.c: Include "gettext.h".
5664 (_): New macro.
5665 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
5666 name locals "index", as it generates unnecessary warnings on some
5667 hosts that have an "index" function.
5668
5669 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
5670 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
5671 they need translation.
5672 * src/LR0.c (state_list_append, new_itemsets, get_state,
5673 append_states, generate_states): Likewise.
5674 * src/assoc.c (assoc_to_string): Likewise.
5675 * src/closure.c (print_closure, set_firsts, closure): Likewise.
5676 * src/gram.c (grammar_dump): Likewise.
5677 * src/injections.c (injections_compute): Likewise.
5678 * src/lalr.c (lookaheads_print): Likewise.
5679 * src/relation.c (relation_transpose): Likewise.
5680 * src/scan-gram.l: Likewise.
5681 * src/tables.c (table_grow, pack_vector): Likewise.
5682
5683 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
5684 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
5685 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
5686 * m4/mbstate_t.m4: Sync with fileutils.
5687 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
5688
5689 * po/LINGUAS: Add pt_BR.
5690 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
5691 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
5692 lib/timevar.c.
5693 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
5694 manual recommends.
5695 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
5696
5697 * src/complain.c (strerror_r): Remove decl; not needed.
5698 (strerror): Use same pattern as ../lib/error.c.
5699
5700 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
5701
5702 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
5703
5704 * src/main.c (main): Cast result of bindtextdomain and textdomain
5705 to void, to avoid a GCC warning when --disable-nls is in effect.
5706
5707 * src/scan-gram.l: Use strings rather than escapes when possible,
5708 to minimize the number of warnings from xgettext.
5709 (handle_action_dollar, handle_action_at): Don't use isdigit,
5710 as it mishandles negative chars and it may not work as expected
5711 outside the C locale.
5712
5713 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
5714 this is a GCC extension and is not portable to other compilers.
5715
5716 * src/system.h (alloca): Use same pattern as ../lib/error.c.
5717 Do not include <ctype.h>; no longer needed.
5718 Do not include <malloc.h>; no longer needed (and generates
5719 warnings on OpenBSD 3.0).
5720
5721 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
5722 it's not portable.
5723
5724 * tests/regression.at: Do not use 'cc -c input.c -o input';
5725 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
5726
5727 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
5728 exit status as failure, not just exit status 1. Sun C exits
5729 with status 2 sometimes.
5730
5731 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
5732 Use it for the two large tests.
5733
5734 2002-08-02 Akim Demaille <akim@epita.fr>
5735
5736 * src/conflicts.c (conflicts_output): Don't output rules never
5737 reduced here, since anyway that computation doesn't work.
5738 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
5739 (rule_useless_p, rule_never_reduced_p): New.
5740 (grammar_rules_partial_print): Use a filter instead of a range.
5741 Display the title only if needed.
5742 (grammar_rules_print): Adjust.
5743 (grammar_rules_never_reduced_report): New.
5744 * src/tables.c (action_row): Move the computation of rules never
5745 reduced to...
5746 (token_actions): here.
5747 * src/main.c (main): Make the parser before making the report, so
5748 that rules never reduced are computed.
5749 Call grammar_rules_never_reduced_report.
5750 * src/print.c (print_results): Report rules never reduced.
5751 * tests/conflicts.at, tests/reduce.at: Adjust.
5752
5753 2002-08-01 Akim Demaille <akim@epita.fr>
5754
5755 Instead of attaching lookaheads and duplicating the rules being
5756 reduced by a state, attach the lookaheads to the reductions.
5757
5758 * src/state.h (state_t): Remove the `lookaheads',
5759 `lookaheads_rule' member.
5760 (reductions_t): Add a `lookaheads' member.
5761 Use a regular array for the `rules'.
5762 * src/state.c (reductions_new): Initialize the lookaheads member
5763 to 0.
5764 (state_rule_lookaheads_print): Adjust.
5765 * src/state.h, src/state.c (state_reductions_find): New.
5766 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
5767 (count_rr_conflicts): Adjust.
5768 * src/lalr.c (LArule): Remove.
5769 (add_lookback_edge): Adjust.
5770 (state_lookaheads_count): New.
5771 (states_lookaheads_initialize): Merge into...
5772 (initialize_LA): this.
5773 (lalr_free): Adjust.
5774 * src/main.c (main): Don't free nullable and derives too early: it
5775 is used by --verbose.
5776 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
5777
5778 2002-08-01 Akim Demaille <akim@epita.fr>
5779
5780 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
5781 `rule_number_t**'.
5782 (set_derives, free_derives): Rename as...
5783 (derives_compute, derives_free): this.
5784 Adjust all dependencies.
5785 * src/nullable.c (set_nullable, free_nullable): Rename as...
5786 (nullable_compute, nullable_free): these.
5787 (rule_list_t): Store rule_t *, not rule_number_t.
5788 * src/state.c (state_rule_lookaheads_print): Directly compare rule
5789 pointers, instead of their numbers.
5790 * src/main.c (main): Call nullable_free, and derives_free earlier,
5791 as they were lo longer used.
5792
5793 2002-08-01 Akim Demaille <akim@epita.fr>
5794
5795 * lib/timevar.c (get_time): Include children time.
5796 * src/lalr.h (LA, LArule): Don't export them: used with the
5797 state_t.
5798 * src/lalr.c (LA, LArule): Static.
5799 * src/lalr.h, src/lalr.c (lalr_free): New.
5800 * src/main.c (main): Call it.
5801 * src/tables.c (pack_vector): Check whether loc is >= to the
5802 table_size, not >.
5803 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
5804 (tables_generate): do it, since that's also it which allocates
5805 them.
5806 Don't free LA and LArule, main does.
5807
5808 2002-07-31 Akim Demaille <akim@epita.fr>
5809
5810 Separate parser tables computation and output.
5811
5812 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
5813 (conflict_list, conflict_list_cnt, table, check, table_ninf)
5814 (yydefgoto, yydefact, high): Move to...
5815 * src/tables.h, src/tables.c: here.
5816 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
5817 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
5818 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
5819 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
5820 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
5821 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
5822 (action_row, save_row, token_actions, save_column, default_goto)
5823 (goto_actions, sort_actions, matching_state, pack_vector)
5824 (table_ninf_remap, pack_table, prepare_actions): Move to...
5825 * src/tables.c: here.
5826 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
5827 * src/output.c (token_actions, output_base, output_conflicts)
5828 (output_check): Merge into...
5829 (prepare_actions): this.
5830 (actions_output): Rename as...
5831 (user_actions_output): this.
5832 * src/main.c (main): Call tables_generate and tables_free.
5833
5834 2002-07-31 Akim Demaille <akim@epita.fr>
5835
5836 Steal GCC's --time-report support.
5837
5838 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
5839 stolen/adjusted from GCC.
5840 * m4/stage.m4: Remove time related checks.
5841 * m4/timevar.m4: New.
5842 * configure.in: Adjust.
5843 * src/system.h: Adjust to using timevar.h.
5844 * src/getargs.h, src/getargs.c: Support trace_time for
5845 --trace=time.
5846 * src/main.c (stage): Remove.
5847 (main): Replace `stage' invocations with timevar calls.
5848 * src/output.c: Insert pertinent timevar calls.
5849
5850 2002-07-31 Akim Demaille <akim@epita.fr>
5851
5852 Let --trace have arguments.
5853
5854 * src/getargs.h (enum trace_e): New.
5855 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
5856 (long_options, short_options): --trace/-T takes an optional
5857 argument.
5858 Change all the uses of trace_flag to reflect the new flags.
5859 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
5860
5861 Strengthen `stage' portability.
5862
5863 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
5864 * configure.in: Use it.
5865 Don't check for malloc.h and sys/times.h.
5866 * src/system.h: Include them when appropriate.
5867 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
5868 times and struct tms are available.
5869
5870 2002-07-30 Akim Demaille <akim@epita.fr>
5871
5872 In verbose parse error message, don't report `error' as an
5873 expected token.
5874 * tests/actions.at (Printers and Destructors): Adjust.
5875 * tests/calc.at (Calculator $1): Adjust.
5876 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
5877 error message, do not report the parser accepts the error token in
5878 that state.
5879
5880 2002-07-30 Akim Demaille <akim@epita.fr>
5881
5882 Normalize conflict related messages.
5883
5884 * src/complain.h, src/complain.c (warn, complain): New.
5885 * src/conflicts.c (conflicts_print): Use them.
5886 (conflict_report_yacc): New, extracted from...
5887 (conflicts_print): here.
5888 * tests/conflicts.at, tests/existing.at: Adjust.
5889
5890 2002-07-30 Akim Demaille <akim@epita.fr>
5891
5892 Report rules which are never reduced by the parser: those hidden
5893 by conflicts.
5894
5895 * src/LR0.c (save_reductions): Don't make the final state too
5896 different: save its reduction (accept) instead of having a state
5897 without any action (no shift or goto, no reduce).
5898 Note: the final state is now a ``regular'' state, i.e., the
5899 parsers now contain `reduce 0' as default reduction.
5900 Nevertheless, since they decide to `accept' when yystate =
5901 final_state, they still will not reduce rule 0.
5902 * src/print.c (print_actions, print_reduction): Adjust.
5903 * src/output.c (action_row): Track reduced rules.
5904 (token_actions): Report rules never reduced.
5905 * tests/conflicts.at, tests/regression.at: Adjust.
5906
5907 2002-07-30 Akim Demaille <akim@epita.fr>
5908
5909 `stage' was accidently included in a previous patch.
5910 Initiate its autoconfiscation.
5911
5912 * configure.in: Look for malloc.h and sys/times.h.
5913 * src/main.c (stage): Adjust.
5914 Report only when trace_flag.
5915
5916 2002-07-29 Akim Demaille <akim@epita.fr>
5917
5918 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
5919 state_number_t.
5920 (errs_t): symbol_t*, not symbol_number_t.
5921 (reductions_t): rule_t*, not rule_number_t.
5922 (FOR_EACH_SHIFT): New.
5923 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
5924 * src/print.c, src/print_graph.c: Adjust.
5925
5926 2002-07-29 Akim Demaille <akim@epita.fr>
5927
5928 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
5929
5930 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
5931 (endtoken, accept): these.
5932 * src/reader.c (reader): Set endtoken's default tag to "$end".
5933 Set undeftoken's tag to "$undefined" instead of "$undefined.".
5934 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
5935 Adjust.
5936
5937 2002-07-29 Akim Demaille <akim@epita.fr>
5938
5939 * src/reduce.c (reduce_grammar): When the language is empty,
5940 complain about the start symbol, not the axiom.
5941 Use its location.
5942 * tests/reduce.at (Empty Language): New.
5943
5944 2002-07-26 Akim Demaille <akim@epita.fr>
5945
5946 * src/reader.h, src/reader.c (gram_error): ... can't get
5947 yycontrol without making too strong assumptions on the parser
5948 itself.
5949 * src/output.c (prepare_tokens): Use the real 0th value of
5950 token_translations instead of `0'.
5951 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
5952 visible here.
5953 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
5954 for the time being: %locations ought to provide it to yyerror.
5955
5956 2002-07-25 Akim Demaille <akim@epita.fr>
5957
5958 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
5959 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
5960 * tests/regression.at (Web2c Actions): Adjust.
5961
5962 2002-07-25 Akim Demaille <akim@epita.fr>
5963
5964 Stop storing rules from 1 to nrules + 1.
5965
5966 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
5967 * src/nullable.c, src/output.c, src/print.c, src/reader.c
5968 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
5969 Iterate from 0 to nrules.
5970 Use rule_number_as_item_number and item_number_as_rule_number.
5971 Adjust to `derive' now containing possibly 0.
5972 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
5973 Handle the `- 1' part in rule numbers from/to item numbers.
5974 * src/conflicts.c (log_resolution): Fix the message which reversed
5975 shift and reduce.
5976 * src/output.c (action_row): Initialize default_rule to -1.
5977 (token_actions): Adjust.
5978 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
5979 expected output.
5980 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
5981
5982 2002-07-25 Akim Demaille <akim@epita.fr>
5983
5984 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
5985 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
5986 (b4_c_knr_arg_decl): New.
5987 * data/yacc.c: Use it to define yysymprint, yydestruct, and
5988 yyreport_parse_error.
5989
5990 2002-07-25 Akim Demaille <akim@epita.fr>
5991
5992 * data/yacc.c (yyreport_parse_error): New, extracted from...
5993 (yyparse): here.
5994 (yydestruct, yysymprint): Move above yyparse.
5995 Be K&R compliant.
5996
5997 2002-07-25 Akim Demaille <akim@epita.fr>
5998
5999 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
6000 replace...
6001 (b4_sint_type, b4_uint_type): these.
6002 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
6003 * tests/regression.at (Web2c Actions): Adjust.
6004
6005 2002-07-25 Akim Demaille <akim@epita.fr>
6006
6007 * src/gram.h (TIEM_NUMBER_MAX): New.
6008 (item_number_of_rule_number, rule_number_of_item_number): Rename
6009 as...
6010 (rule_number_as_item_number, item_number_as_rule_number): these.
6011 Adjust dependencies.
6012 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
6013 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
6014 (symbol_number_to_vector_number): New.
6015 (order): Of vector_number_t* type.
6016 (base_t, BASE_MAX, BASE_MIN): New.
6017 (froms, tos, width, pos, check): Of base_t type.
6018 (action_number_t, ACTION_MIN, ACTION_MAX): New.
6019 (actrow): Of action_number_t type.
6020 (conflrow): Of unsigned int type.
6021 (table_ninf, base_ninf): New.
6022 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
6023 (muscle_insert_int_table, muscle_insert_base_table)
6024 (muscle_insert_rule_number_table): New.
6025 (prepare_tokens): Output `toknum' as int_table.
6026 (action_row): Returns a rule_number_t.
6027 Use ACTION_MIN, not SHRT_MIN.
6028 (token_actions): yydefact is rule_number_t*.
6029 (table_ninf_remap): New.
6030 (pack_table): Use it for `base' and `table'.
6031 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
6032 replaced with...
6033 (YYPACT_NINF, YYTABLE_NINF): these.
6034 (yypact, yytable): Compute their types instead of hard-coded
6035 `short'.
6036 * tests/regression.at (Web2c Actions): Adjust.
6037
6038 2002-07-19 Akim Demaille <akim@epita.fr>
6039
6040 * src/scan-gram.l (id): Can start with an underscore.
6041
6042 2002-07-16 Akim Demaille <akim@epita.fr>
6043
6044 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
6045 Adjust all former `associativity' dependencies.
6046 * src/symtab.c (symbol_new): Default associativity is `undef', not
6047 `right'.
6048 (symbol_check_alias_consistence): Adjust.
6049
6050 2002-07-09 Akim Demaille <akim@epita.fr>
6051
6052 * doc/bison.texinfo: Properly set the ``header'' part.
6053 Use @dircategory ``GNU programming tools'' as per Texinfo's
6054 documentation.
6055 Use @copying.
6056
6057 2002-07-09 Akim Demaille <akim@epita.fr>
6058
6059 * lib/quotearg.h: Protect against multiple inclusions.
6060 * src/location.h (location_t): Add a `file' member.
6061 (LOCATION_RESET, LOCATION_PRINT): Adjust.
6062 * src/complain.c (warn_at, complain_at, fatal_at): Drop
6063 `error_one_per_line' support.
6064
6065 2002-07-09 Akim Demaille <akim@epita.fr>
6066
6067 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
6068 * src/reader.c (lineno): Remove.
6069 Adjust all dependencies.
6070 (get_merge_function): Take a location and use complain_at.
6071 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
6072 * tests/regression.at (Invalid inputs, Mixing %token styles):
6073 Adjust.
6074
6075 2002-07-09 Akim Demaille <akim@epita.fr>
6076
6077 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
6078 recovery rule, and forbid extensions when --yacc.
6079 (gram_error): Use complain_at.
6080 * src/reader.c (reader): Exit if there were parse errors.
6081
6082 2002-07-09 Akim Demaille <akim@epita.fr>
6083
6084 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
6085 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
6086 Reported by R Blake <blakers@mac.com>.
6087
6088 2002-07-09 Akim Demaille <akim@epita.fr>
6089
6090 * data/yacc.c: Output the copyright notive in the header.
6091
6092 2002-07-03 Akim Demaille <akim@epita.fr>
6093
6094 * src/output.c (froms, tos): Are state_number_t.
6095 (save_column): sp, sp1, and sp2 are state_number_t.
6096 (prepare): Rename `final' as `final_state_number', `nnts' as
6097 `nterms_number', `nrules' as `rules_number', `nstates' as
6098 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
6099 unused.
6100 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
6101 * data/lalr1.cc (nsym_): Remove, unused.
6102
6103 2002-07-03 Akim Demaille <akim@epita.fr>
6104
6105 * src/lalr.h, src/lalr.c (goto_number_t): New.
6106 * src/lalr.c (goto_list_t): New.
6107 Propagate them.
6108 * src/nullable.c (rule_list_t): New.
6109 Propagate.
6110 * src/types.h: Remove.
6111
6112 2002-07-03 Akim Demaille <akim@epita.fr>
6113
6114 * src/closure.c (print_fderives): Use rule_rhs_print.
6115 * src/derives.c (print_derives): Use rule_rhs_print.
6116 (rule_list_t): New, replaces `shorts'.
6117 (set_derives): Add comments.
6118 * tests/sets.at (Nullable, Firsts): Adjust.
6119
6120 2002-07-03 Akim Demaille <akim@epita.fr>
6121
6122 * src/output.c (prepare_actions): Free `tally' and `width'.
6123 (prepare_actions): Allocate and free `order'.
6124 * src/symtab.c (symbols_free): Free `symbols'.
6125 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
6126 * src/output.c (m4_invoke): Move to...
6127 * src/scan-skel.l: here.
6128 (<<EOF>>): Close yyout, and free its name.
6129
6130 2002-07-03 Akim Demaille <akim@epita.fr>
6131
6132 Fix some memory leaks, and fix a bug: state 0 was examined twice.
6133
6134 * src/LR0.c (new_state): Merge into...
6135 (state_list_append): this.
6136 (new_states): Merge into...
6137 (generate_states): here.
6138 (set_states): Don't ensure a proper `errs' state member here, do it...
6139 * src/conflicts.c (conflicts_solve): here.
6140 * src/state.h, src/state.c: Comment changes.
6141 (state_t): Rename member `shifts' as `transitions'.
6142 Adjust all dependencies.
6143 (errs_new): For consistency, also take the values as argument.
6144 (errs_dup): Remove.
6145 (state_errs_set): New.
6146 (state_reductions_set, state_transitions_set): Assert that no
6147 previous value was assigned.
6148 (state_free): New.
6149 (states_free): Use it.
6150 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
6151 temporary storage: use `errs' and `nerrs' as elsewhere.
6152 (set_conflicts): Allocate and free this `errs'.
6153
6154 2002-07-02 Akim Demaille <akim@epita.fr>
6155
6156 * lib/libiberty.h: New.
6157 * lib: Update the bitset implementation from upstream.
6158 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
6159 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
6160 * src/main.c: Adjust bitset stats calls.
6161
6162 2002-07-01 Paul Eggert <eggert@twinsun.com>
6163
6164 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
6165 char, so that negative chars don't collide with $.
6166
6167 2002-06-30 Akim Demaille <akim@epita.fr>
6168
6169 Have the GLR tests be `warning' checked, and fix the warnings.
6170
6171 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
6172 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
6173 (yyremoveDeletes): `yyi' and `yyj' are size_t.
6174 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
6175 (yyaddDeferredAction): static.
6176 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
6177 (yyreportParseError): yyprefix is const.
6178 yytokenp is used only when verbose.
6179 (yy__GNUC__): Replace with __GNUC__.
6180 (yypdumpstack): yyi is size_t.
6181 (yypreference): Un-yy local variables and arguments, to avoid
6182 clashes with `yyr1'. Anyway, we are not in the user name space.
6183 (yytname_size): be an int, as is compared with ints.
6184 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
6185 Use them.
6186 * tests/cxx-gram.at: Use quotation to protect $1.
6187 Use AT_COMPILE to enable warnings hunts.
6188 Prototype yylex and yyerror.
6189 `Use' argc.
6190 Include `string.h', not `strings.h'.
6191 Produce and prototype stmtMerge only when used.
6192 yylex takes a location.
6193
6194 2002-06-30 Akim Demaille <akim@epita.fr>
6195
6196 We spend a lot of time in quotearg, in particular when --verbose.
6197
6198 * src/symtab.c (symbol_get): Store a quoted version of the key.
6199 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
6200 Adjust all callers.
6201
6202 2002-06-30 Akim Demaille <akim@epita.fr>
6203
6204 * src/state.h (reductions_t): Rename member `nreds' as num.
6205 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
6206 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
6207
6208 2002-06-30 Akim Demaille <akim@epita.fr>
6209
6210 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
6211 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
6212 (shifts_to): Rename as...
6213 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
6214 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
6215 (TRANSITION_IS_DISABLED, transitions_to): these.
6216
6217 2002-06-30 Akim Demaille <akim@epita.fr>
6218
6219 * src/print.c (print_shifts, print_gotos): Merge into...
6220 (print_transitions): this.
6221 (print_transitions, print_errs, print_reductions): Align the
6222 lookaheads columns.
6223 (print_core, print_transitions, print_errs, print_state,
6224 print_grammar): Output empty lines separator before, not after.
6225 (state_default_rule_compute): Rename as...
6226 (state_default_rule): this.
6227 * tests/conflicts.at (Defaulted Conflicted Reduction),
6228 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
6229 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
6230
6231 2002-06-30 Akim Demaille <akim@epita.fr>
6232
6233 Display items as we display rules.
6234
6235 * src/gram.h, src/gram.c (rule_lhs_print): New.
6236 * src/gram.c (grammar_rules_partial_print): Use it.
6237 * src/print.c (print_core): Likewise.
6238 * tests/conflicts.at (Defaulted Conflicted Reduction),
6239 (Unresolved SR Conflicts): Adjust.
6240 (Unresolved SR Conflicts): Adjust and rename as...
6241 (Resolved SR Conflicts): this, as was meant.
6242 * tests/regression.at (Web2c Report): Adjust.
6243
6244 2002-06-30 Akim Demaille <akim@epita.fr>
6245
6246 * src/print.c (state_default_rule_compute): New, extracted from...
6247 (print_reductions): here.
6248 Pessimize, but clarify the code.
6249 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
6250
6251 2002-06-30 Akim Demaille <akim@epita.fr>
6252
6253 * src/output.c (action_row): Let default_rule be always a rule
6254 number.
6255
6256 2002-06-30 Akim Demaille <akim@epita.fr>
6257
6258 * src/closure.c (print_firsts, print_fderives, closure):
6259 Use BITSET_EXECUTE.
6260 * src/lalr.c (lookaheads_print): Likewise.
6261 * src/state.c (state_rule_lookaheads_print): Likewise.
6262 * src/print_graph.c (print_core): Likewise.
6263 * src/print.c (print_reductions): Likewise.
6264 * src/output.c (action_row): Likewise.
6265 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
6266
6267 2002-06-30 Akim Demaille <akim@epita.fr>
6268
6269 * src/print_graph.c: Use report_flag.
6270
6271 2002-06-30 Akim Demaille <akim@epita.fr>
6272
6273 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
6274 to...
6275 * src/relation.h, src/relation.c (traverse, relation_digraph)
6276 (relation_print, relation_transpose): New.
6277
6278 2002-06-30 Akim Demaille <akim@epita.fr>
6279
6280 * src/state.h, src/state.c (shifts_to): New.
6281 * src/lalr.c (build_relations): Use it.
6282
6283 2002-06-30 Akim Demaille <akim@epita.fr>
6284
6285 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
6286 (item_number_of_rule_number, rule_number_of_item_number): New.
6287 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
6288 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
6289 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
6290 Propagate their use.
6291 Much remains to be done, in particular wrt `shorts' from types.h.
6292
6293 2002-06-30 Akim Demaille <akim@epita.fr>
6294
6295 * src/symtab.c (symbol_new): Initialize the `printer' member.
6296
6297 2002-06-30 Akim Demaille <akim@epita.fr>
6298
6299 * src/LR0.c (save_reductions): Remove, replaced by...
6300 * src/state.h, src/state.c (state_reductions_set): New.
6301 (reductions, errs): Rename as...
6302 (reductions_t, errs_t): these.
6303 Adjust all dependencies.
6304
6305 2002-06-30 Akim Demaille <akim@epita.fr>
6306
6307 * src/LR0.c (state_list_t, state_list_append): New.
6308 (first_state, last_state): Now symbol_list_t.
6309 (this_state): Remove.
6310 (new_itemsets, append_states, save_reductions): Take a state_t as
6311 argument.
6312 (set_states, generate_states): Adjust.
6313 (save_shifts): Remove, replaced by...
6314 * src/state.h, src/state.c (state_shifts_set): New.
6315 (shifts): Rename as...
6316 (shifts_t): this.
6317 Adjust all dependencies.
6318 * src/state.h (state_t): Remove the `next' member.
6319
6320 2002-06-30 Akim Demaille <akim@epita.fr>
6321
6322 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
6323 escaped in slot 0.
6324
6325 2002-06-30 Akim Demaille <akim@epita.fr>
6326
6327 Use hash.h for the state hash table.
6328
6329 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
6330 (allocate_storage): Use state_hash_new.
6331 (free_storage): Use state_hash_free.
6332 (new_state, get_state): Adjust.
6333 * src/lalr.h, src/lalr.c (states): Move to...
6334 * src/states.h (state_t): Remove the `link' member, no longer
6335 used.
6336 * src/states.h, src/states.c: here.
6337 (state_hash_new, state_hash_free, state_hash_lookup)
6338 (state_hash_insert, states_free): New.
6339 * src/states.c (state_table, state_compare, state_hash): New.
6340 * src/output.c (output_actions): Do not free states now, since we
6341 still need to know the final_state number in `prepare', called
6342 afterwards. Do it...
6343 * src/main.c (main): here: call states_free after `output'.
6344
6345 2002-06-30 Akim Demaille <akim@epita.fr>
6346
6347 * src/state.h, src/state.c (state_new): New, extracted from...
6348 * src/LR0.c (new_state): here.
6349 * src/state.h (STATE_ALLOC): Move to...
6350 * src/state.c: here.
6351 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
6352 * src/state.h, src/state.c: here.
6353
6354 2002-06-30 Akim Demaille <akim@epita.fr>
6355
6356 * src/reader.c (gensym): Rename as...
6357 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
6358 (getsym): Rename as...
6359 (symbol_get): this.
6360
6361 2002-06-30 Akim Demaille <akim@epita.fr>
6362
6363 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
6364 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
6365 * src/output.c, src/print.c, src/print_graph.c: Propagate.
6366 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
6367
6368 2002-06-30 Akim Demaille <akim@epita.fr>
6369
6370 Make the test suite pass with warnings checked.
6371
6372 * tests/actions.at (Printers and Destructors): Improve.
6373 Avoid unsigned vs. signed issues.
6374 * tests/calc.at: Don't exercise the scanner here, do it...
6375 * tests/input.at (Torturing the Scanner): here.
6376
6377 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6378
6379 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
6380 reorganize first lines parallel to yacc.c.
6381
6382 2002-06-28 Akim Demaille <akim@epita.fr>
6383
6384 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
6385 (b4_token_enum, b4_token_defines): New, factored from...
6386 * data/lalr1.cc, data/yacc.c, glr.c: here.
6387
6388 2002-06-28 Akim Demaille <akim@epita.fr>
6389
6390 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
6391 unused variables.
6392 * src/output.c (merger_output): static.
6393
6394 2002-06-28 Akim Demaille <akim@epita.fr>
6395
6396 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
6397 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
6398 pacify GCC.
6399 * src/output.c (save_row): Initialize all the variables to pacify GCC.
6400
6401 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6402
6403 Accumulated changelog for new GLR parsing features.
6404
6405 * src/conflicts.c (count_total_conflicts): Change name to
6406 conflicts_total_count.
6407 * src/conflicts.h: Ditto.
6408 * src/output.c (token_actions): Use the new name.
6409 (output_conflicts): Change conflp => conflict_list_heads, and
6410 confl => conflict_list for better readability.
6411 * data/glr.c: Use the new names.
6412 * NEWS: Add self to GLR announcement.
6413
6414 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
6415
6416 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
6417 Akim Demaille.
6418
6419 * data/bison.glr: Change name to glr.c
6420 * data/glr.c: Renamed from bison.glr.
6421 * data/Makefile.am: Add glr.c
6422
6423 * src/getargs.c:
6424
6425 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
6426 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
6427
6428 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6429
6430 * data/bison.glr: Be sure to restore the
6431 current #line when returning to the skeleton contents after having
6432 exposed the input file's #line.
6433
6434 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6435
6436 * data/bison.glr: Bring up to date with changes to bison.simple.
6437
6438 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6439
6440 * data/bison.glr: Correct definitions that use b4_prefix.
6441 Various reformatting.
6442 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
6443 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
6444 yytokenp argument; now part of stack.
6445 (yychar): Define to behave as documented.
6446 (yyclearin): Ditto.
6447
6448 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6449
6450 * src/reader.h: Add declaration for free_merger_functions.
6451
6452 * src/reader.c (merge_functions): New variable.
6453 (get_merge_function): New function.
6454 (free_merger_functions): New function.
6455 (readgram): Check for %prec that is not followed by a symbol.
6456 Handle %dprec and %merge declarations.
6457 (packgram): Initialize dprec and merger fields in rules array.
6458
6459 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
6460 conflict_list_cnt, conflict_list_free): New variables.
6461 (table_grow): Also grow conflict_table.
6462 (prepare_rules): Output dprec and merger tables.
6463 (conflict_row): New function.
6464 (action_row): Output conflict lists for GLR parser. Don't use
6465 default reduction in conflicted states for GLR parser so that there
6466 are spaces for the conflict lists.
6467 (save_row): Also save conflict information.
6468 (token_actions): Allocate conflict list.
6469 (merger_output): New function.
6470 (pack_vector): Pack conflict table, too.
6471 (output_conflicts): New function to output yyconflp and yyconfl.
6472 (output_check): Allocate conflict_tos.
6473 (output_actions): Output conflict tables, also.
6474 (output_skeleton): Output b4_mergers definition.
6475 (prepare): Output b4_max_rhs_length definition.
6476 Use 'bison.glr' as default skeleton for GLR parsers.
6477
6478 * src/gram.c (glr_parser): New flag.
6479 (grammar_free): Call free_merger_functions.
6480
6481 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
6482 all pairs of conflicting reductions, rather than just all tokens
6483 causing conflicts. Needed to size conflict tables.
6484 (conflicts_output): Modify call to count_rr_conflicts for new
6485 interface.
6486 (conflicts_print): Ditto.
6487 (count_total_conflicts): New function.
6488
6489 * src/reader.h (merger_list): New type.
6490 (merge_functions): New variable.
6491
6492 * src/lex.h (tok_dprec, tok_merge): New token types.
6493
6494 * src/gram.h (rule_s): Add dprec and merger fields.
6495 (glr_parser): New flag.
6496
6497 * src/conflicts.h (count_total_conflicts): New function.
6498
6499 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
6500
6501 * doc/bison.texinfo (Generalized LR Parsing): New section.
6502 (GLR Parsers): New section.
6503 (Language and Grammar): Mention GLR parsing.
6504 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
6505 Correct typo ("tge" -> "the").
6506
6507 * data/bison.glr: New skeleton for GLR parsing.
6508
6509 * tests/cxx-gram.at: New tests for GLR parsing.
6510
6511 * tests/testsuite.at: Include cxx-gram.at.
6512
6513 * tests/Makefile.am: Add cxx-gram.at.
6514
6515 * src/parse-gram.y:
6516
6517 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
6518
6519 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
6520
6521 2002-06-27 Akim Demaille <akim@epita.fr>
6522
6523 * src/options.h, src/options.c: Remove.
6524 * src/getargs.c (short_options, long_options): New.
6525
6526 2002-06-27 Akim Demaille <akim@epita.fr>
6527
6528 * data/bison.simple, data/bison.c++: Rename as...
6529 * data/yacc.c, data/lalr1.cc: these.
6530 * doc/bison.texinfo (Environment Variables): Remove.
6531
6532 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
6533
6534 * src/getargs.c (report_argmatch): Initialize strtok().
6535
6536 2002-06-20 Akim Demaille <akim@epita.fr>
6537
6538 * data/bison.simple (b4_symbol_actions): New, replaces...
6539 (b4_symbol_destructor, b4_symbol_printer): these.
6540 (yysymprint): Be sure to call YYPRINT only for tokens, and using
6541 user token numbers.
6542
6543 2002-06-20 Akim Demaille <akim@epita.fr>
6544
6545 * data/bison.simple (yydestructor): Rename as...
6546 (yydestruct): this.
6547
6548 2002-06-20 Akim Demaille <akim@epita.fr>
6549
6550 * src/symtab.h, src/symtab.c (symbol_type_set)
6551 (symbol_destructor_set, symbol_precedence_set): The location is
6552 the last argument.
6553 Adjust all callers.
6554
6555 2002-06-20 Akim Demaille <akim@epita.fr>
6556
6557 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
6558 internals.
6559 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
6560 Takes a location.
6561 * src/symtab.h, src/symtab.c (symbol_class_set)
6562 (symbol_user_token_number_set): Likewise.
6563 Adjust all callers.
6564 Promote complain_at.
6565 * tests/input.at (Type Clashes): Adjust.
6566
6567 2002-06-20 Akim Demaille <akim@epita.fr>
6568
6569 * data/bison.simple (YYLEX): Fix the declaration when
6570 %pure-parser.
6571
6572 2002-06-20 Akim Demaille <akim@epita.fr>
6573
6574 * data/bison.simple (yysymprint): Don't print the token number,
6575 just its name.
6576 * tests/actions.at (Destructors): Rename as...
6577 (Printers and Destructors): this.
6578 Also exercise %printer.
6579
6580 2002-06-20 Akim Demaille <akim@epita.fr>
6581
6582 * data/bison.simple (YYDSYMPRINT): New.
6583 Use it to remove many of the #if YYDEBUG/if (yydebug).
6584
6585 2002-06-20 Akim Demaille <akim@epita.fr>
6586
6587 * src/symtab.h, src/symtab.c (symbol_t): printer and
6588 printer_location are new members.
6589 (symbol_printer_set): New.
6590 * src/parse-gram.y (PERCENT_PRINTER): New token.
6591 Handle its associated rule.
6592 * src/scan-gram.l: Adjust.
6593 (handle_destructor_at, handle_destructor_dollar): Rename as...
6594 (handle_symbol_code_at, handle_symbol_code_dollar): these.
6595 * src/output.c (symbol_printers_output): New.
6596 (output_skeleton): Call it.
6597 * data/bison.simple (yysymprint): New. Cannot be named yyprint
6598 since there are already many grammar files with a user `yyprint'.
6599 Replace the calls to YYPRINT to calls to yysymprint.
6600 * tests/calc.at: Adjust.
6601 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
6602 taking advantage of parser very internal details (stack size!).
6603
6604 2002-06-20 Akim Demaille <akim@epita.fr>
6605
6606 * src/scan-gram.l: Complete the scanner with the missing patterns
6607 to pacify Flex.
6608 Use `quote' and `symbol_tag_get' where appropriate.
6609
6610 2002-06-19 Akim Demaille <akim@epita.fr>
6611
6612 * tests/actions.at (Destructors): Augment to test locations.
6613 * data/bison.simple (yydestructor): Pass it the current location
6614 if locations are enabled.
6615 Prototype only when __STDC__ or C++.
6616 Change the argument names to move into the yy name space: there is
6617 user code here.
6618
6619 2002-06-19 Akim Demaille <akim@epita.fr>
6620
6621 * data/bison.simple (b4_pure_if): New.
6622 Use it instead of #ifdef YYPURE.
6623
6624 2002-06-19 Akim Demaille <akim@epita.fr>
6625
6626 * data/bison.simple (b4_location_if): New.
6627 Use it instead of #ifdef YYLSP_NEEDED.
6628
6629 2002-06-19 Akim Demaille <akim@epita.fr>
6630
6631 Prepare @$ in %destructor, but currently don't bind it in the
6632 skeleton, as %location use is not cleaned up yet.
6633
6634 * src/scan-gram.l (handle_dollar, handle_destructor_at)
6635 (handle_action_at): New.
6636 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
6637 a braced_code_t and a location as additional arguments.
6638 (handle_destructor_dollar): Instead of requiring `b4_eval', just
6639 unquote one when outputting `b4_dollar_dollar'.
6640 Adjust callers.
6641 * data/bison.simple (b4_eval): Remove.
6642 (b4_symbol_destructor): Adjust.
6643 * tests/input.at (Invalid @n): Adjust.
6644
6645 2002-06-19 Zack Weinberg <zack@codesourcery.com>
6646
6647 * doc/bison.texinfo: Document ability to have multiple
6648 prologue sections.
6649
6650 2002-06-18 Akim Demaille <akim@epita.fr>
6651
6652 * src/files.c (compute_base_names): When computing the output file
6653 names from the input file name, strip the directory part.
6654
6655 2002-06-18 Akim Demaille <akim@epita.fr>
6656
6657 * data/bison.simple.new: Comment changes.
6658 Reported by Andreas Schwab.
6659
6660 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
6661
6662 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
6663 there are no `label `yyoverflowlab' defined but not used' warnings
6664 when yyoverflow is defined.
6665
6666 2002-06-18 Akim Demaille <akim@epita.fr>
6667
6668 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
6669 new member.
6670 (symbol_destructor_set): Adjust.
6671 * src/output.c (symbol_destructors_output): Output the destructor
6672 locations.
6673 Output the symbol name.
6674 * data/bison.simple (b4_symbol_destructor): Adjust.
6675
6676 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
6677 and Akim Demaille <akim@epita.fr>
6678
6679 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
6680 what's left on the stack when the error recovery hits EOF.
6681 * tests/actions.at (Destructors): Complete to exercise this case.
6682
6683 2002-06-17 Akim Demaille <akim@epita.fr>
6684
6685 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
6686 arguments is really empty, not only equal to `[]'.
6687 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
6688 member.
6689 (symbol_destructor_set): New.
6690 * src/output.c (symbol_destructors_output): New.
6691 * src/reader.h (brace_code_t, current_braced_code): New.
6692 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
6693 (handle_dollar): Rename as...
6694 (handle_action_dollar): this.
6695 (handle_destructor_dollar): New.
6696 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
6697 (grammar_declaration): Use it.
6698 * data/bison.simple (yystos): Is always defined.
6699 (yydestructor): New.
6700 * tests/actions.at (Destructors): New.
6701 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
6702
6703 2002-06-17 Akim Demaille <akim@epita.fr>
6704
6705 * src/symlist.h, src/symlist.c (symbol_list_length): New.
6706 * src/scan-gram.l (handle_dollar, handle_at): Compute the
6707 rule_length only when needed.
6708 * src/output.c (actions_output, token_definitions_output): Output
6709 the full M4 block.
6710 * src/symtab.c: Don't access directly to the symbol tag, use
6711 symbol_tag_get.
6712 * src/parse-gram.y: Use symbol_list_free.
6713
6714 2002-06-17 Akim Demaille <akim@epita.fr>
6715
6716 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
6717 (symbol_list_prepend, get_type_name): Move to...
6718 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
6719 (symbol_list_prepend, symbol_list_n_type_name_get): here.
6720 Adjust all callers.
6721 (symbol_list_free): New.
6722 * src/scan-gram.l (handle_dollar): Takes a location.
6723 * tests/input.at (Invalid $n): Adjust.
6724
6725 2002-06-17 Akim Demaille <akim@epita.fr>
6726
6727 * src/reader.h, src/reader.c (symbol_list_new): Export it.
6728 (symbol_list_prepend): New.
6729 * src/parse-gram.y (%union): `list' is a new member.
6730 (symbols.1): New, replaces...
6731 (terms_to_prec.1, nterms_to_type.1): these.
6732 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
6733 Take a location as additional argument.
6734 Adjust all callers.
6735
6736 2002-06-15 Akim Demaille <akim@epita.fr>
6737
6738 * src/parse-gram.y: Move %token in the declaration section so that
6739 we don't depend upon CVS Bison.
6740
6741 2002-06-15 Akim Demaille <akim@epita.fr>
6742
6743 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
6744 * src/print.c (print_core): Use it.
6745
6746 2002-06-15 Akim Demaille <akim@epita.fr>
6747
6748 * src/conflicts.c (log_resolution): Accept the rule involved in
6749 the sr conflicts instead of the lookahead number that points to
6750 that rule.
6751 (flush_reduce): Accept the current lookahead vector as argument,
6752 instead of the index in LA.
6753 (resolve_sr_conflict): Accept the current number of lookahead
6754 bitset to consider for the STATE, instead of the index in LA.
6755 (set_conflicts): Adjust.
6756 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
6757
6758 2002-06-15 Akim Demaille <akim@epita.fr>
6759
6760 * src/state.h (state_t): Replace the `lookaheadsp' member, a
6761 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
6762 Adjust all dependencies.
6763 * src/lalr.c (initialize_lookaheads): Split into...
6764 (states_lookaheads_count, states_lookaheads_initialize): these.
6765 (lalr): Adjust.
6766
6767 2002-06-15 Akim Demaille <akim@epita.fr>
6768
6769 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
6770 out of...
6771 (grammar_rules_print): here.
6772 * src/reduce.c (reduce_output): Use it.
6773 * tests/reduce.at (Useless Rules, Reduced Automaton)
6774 (Underivable Rules): Adjust.
6775
6776 2002-06-15 Akim Demaille <akim@epita.fr>
6777
6778 Copy BYacc's nice way to report the grammar.
6779
6780 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
6781 New.
6782 Don't print the rules' location, it is confusing and useless.
6783 (rule_print): Use grammar_rhs_print.
6784 * src/print.c (print_grammar): Use grammar_rules_print.
6785
6786 2002-06-15 Akim Demaille <akim@epita.fr>
6787
6788 Complete and rationalize `useless thing' warnings.
6789
6790 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
6791 (symbol_tag_print): New.
6792 Use them everywhere in place of accessing directly the tag member.
6793 * src/gram.h, src/gram.c (rule_print): New.
6794 Use it where a rule used to be printed `by hand'.
6795 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
6796 (reduce_grammar_tables): Report the useless rules.
6797 (reduce_print): Useless things are a warning, not an error.
6798 Report it as such.
6799 * tests/reduce.at (Useless Nonterminals, Useless Rules):
6800 (Reduced Automaton, Underivable Rules): Adjust.
6801 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
6802 * tests/conflicts.at (Unresolved SR Conflicts)
6803 (Solved SR Conflicts): Adjust.
6804
6805 2002-06-15 Akim Demaille <akim@epita.fr>
6806
6807 Let symbols have a location.
6808
6809 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
6810 (getsym): Adjust.
6811 Adjust all callers.
6812 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
6813 Use location_t, not int.
6814 * src/symtab.c (symbol_check_defined): Take advantage of the
6815 location.
6816 * tests/regression.at (Invalid inputs): Adjust.
6817
6818 2002-06-15 Akim Demaille <akim@epita.fr>
6819
6820 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
6821 (input): Don't try to initialize yylloc here, do it in the
6822 scanner.
6823 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
6824 * src/gram.h (rule_t): Change line and action_line into location
6825 and action_location, of location_t type.
6826 Adjust all dependencies.
6827 * src/location.h, src/location.c (empty_location): New.
6828 * src/reader.h, src/reader.c (grammar_start_symbol_set)
6829 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
6830 (grammar_current_rule_symbol_append)
6831 (grammar_current_rule_action_append): Expect a location as argument.
6832 * src/reader.c (grammar_midrule_action): Adjust to attach an
6833 action's location as dummy symbol location.
6834 * src/symtab.h, src/symtab.c (startsymbol_location): New.
6835 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
6836 the line numbers.
6837
6838 2002-06-14 Akim Demaille <akim@epita.fr>
6839
6840 Grammar declarations may be found in the grammar section.
6841
6842 * src/parse-gram.y (rules_or_grammar_declaration): New.
6843 (declarations): Each declaration may end with a semicolon, not
6844 just...
6845 (grammar_declaration): `"%union"'.
6846 (grammar): Branch to rules_or_grammar_declaration.
6847
6848 2002-06-14 Akim Demaille <akim@epita.fr>
6849
6850 * src/main.c (main): Invoke scanner_free.
6851
6852 2002-06-14 Akim Demaille <akim@epita.fr>
6853
6854 * src/output.c (m4_invoke): Extracted from...
6855 (output_skeleton): here.
6856 Free tempfile.
6857
6858 2002-06-14 Akim Demaille <akim@epita.fr>
6859
6860 * src/parse-gram.y (directives, directive, gram)
6861 (grammar_directives, precedence_directives, precedence_directive):
6862 Rename as...
6863 (declarations, declaration, grammar, grammar_declaration)
6864 (precedence_declaration, precedence_declarator): these.
6865 (symbol_declaration): New.
6866
6867 2002-06-14 Akim Demaille <akim@epita.fr>
6868
6869 * src/files.c (action_obstack): Remove, unused.
6870 (output_obstack): Remove it, and all its dependencies, as it is no
6871 longer needed.
6872 * src/reader.c (epilogue_set): Build the epilogue in the
6873 muscle_obstack.
6874 * src/output.h, src/output.c (muscle_obstack): Move to...
6875 * src/muscle_tab.h, src/muscle_tab.h: here.
6876 (muscle_init): Initialize muscle_obstack.
6877 (muscle_free): New.
6878 * src/main.c (main): Call it.
6879
6880 2002-06-14 Akim Demaille <akim@epita.fr>
6881
6882 * src/location.h: New, extracted from...
6883 * src/reader.h: here.
6884 * src/Makefile.am (noinst_HEADERS): Merge into
6885 (bison_SOURCES): this.
6886 Add location.h.
6887 * src/parse-gram.y: Use location_t instead of Bison's.
6888 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
6889 Use location_t instead of ints.
6890
6891 2002-06-14 Akim Demaille <akim@epita.fr>
6892
6893 * data/bison.simple, data/bison.c++: Be sure to restore the
6894 current #line when returning to the skeleton contents after having
6895 exposed the input file's #line.
6896
6897 2002-06-12 Akim Demaille <akim@epita.fr>
6898
6899 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
6900 eager.
6901 * tests/actions.at (Exotic Dollars): New.
6902
6903 2002-06-12 Akim Demaille <akim@epita.fr>
6904
6905 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
6906 ['"/] too eagerly.
6907 * tests/input.at (Torturing the Scanner): New.
6908
6909 2002-06-11 Akim Demaille <akim@epita.fr>
6910
6911 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
6912 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
6913 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
6914 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
6915 * src/reader.c (reader): Use it.
6916
6917 2002-06-11 Akim Demaille <akim@epita.fr>
6918
6919 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
6920 Adjust all callers.
6921 (scanner_last_string_free): New.
6922
6923 2002-06-11 Akim Demaille <akim@epita.fr>
6924
6925 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
6926 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
6927 (last_string, YY_OBS_FREE): New.
6928 Use them when returning an ID.
6929
6930 2002-06-11 Akim Demaille <akim@epita.fr>
6931
6932 Have Bison grammars parsed by a Bison grammar.
6933
6934 * src/reader.c, src/reader.h (prologue_augment): New.
6935 * src/reader.c (copy_definition): Remove.
6936
6937 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
6938 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
6939 (grammar_current_rule_prec_set, grammar_current_rule_check)
6940 (grammar_current_rule_symbol_append)
6941 (grammar_current_rule_action_append): Export.
6942 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
6943 (symbol_list_action_append): Remove.
6944 Hook the routines from reader.
6945 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
6946 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
6947
6948 * src/reader.c (read_declarations): Remove, unused.
6949
6950 * src/parse-gram.y: Handle the epilogue.
6951 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
6952 (grammar_start_symbol_set): this.
6953 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
6954 * src/reader.c (readgram): Remove, unused.
6955 (reader): Adjust to insert eoftoken and axiom where appropriate.
6956
6957 * src/reader.c (copy_dollar): Replace with...
6958 * src/scan-gram.h (handle_dollar): this.
6959 * src/parse-gram.y: Remove `%thong'.
6960
6961 * src/reader.c (copy_at): Replace with...
6962 * src/scan-gram.h (handle_at): this.
6963
6964 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
6965 New.
6966
6967 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
6968 time being.
6969
6970 * src/reader.h, src/reader.c (grammar_rule_end): New.
6971
6972 * src/parse.y (current_type, current_class): New.
6973 Implement `%nterm', `%token' support.
6974 Merge `%term' into `%token'.
6975 (string_as_id): New.
6976 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
6977 type name.
6978
6979 * src/parse-gram.y: Be sure to handle properly the beginning of
6980 rules.
6981
6982 * src/parse-gram.y: Handle %type.
6983 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
6984
6985 * src/parse-gram.y: More directives support.
6986 * src/options.c: No longer handle source directives.
6987
6988 * src/parse-gram.y: Fix %output.
6989
6990 * src/parse-gram.y: Handle %union.
6991 Use the prologue locations.
6992 * src/reader.c (parse_union_decl): Remove.
6993
6994 * src/reader.h, src/reader.c (epilogue_set): New.
6995 * src/parse-gram.y: Use it.
6996
6997 * data/bison.simple, data/bison.c++: b4_stype is now either not
6998 defined, then default to int, or to the contents of %union,
6999 without `union' itself.
7000 Adjust.
7001 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
7002
7003 * src/output.c (actions_output): Don't output braces, as they are
7004 already handled by the scanner.
7005
7006 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
7007 characters to themselves.
7008
7009 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
7010 that the epilogue has a proper #line.
7011
7012 * src/parse-gram.y: Handle precedence/associativity.
7013
7014 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
7015 a terminal.
7016 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
7017 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
7018 at all to define terminals that cannot be emitted.
7019
7020 * src/scan-gram.l: Escape M4 characters.
7021
7022 * src/scan-gram.l: Working properly with escapes in user
7023 strings/characters.
7024
7025 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
7026 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
7027 grammar.
7028 Use more modest sizes, as for the time being the parser does not
7029 release memory, and therefore the process swallows a huge amount
7030 of memory.
7031
7032 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
7033 stricter %token grammar.
7034
7035 * src/symtab.h (associativity): Add `undef_assoc'.
7036 (symbol_precedence_set): Do nothing when passed an undef_assoc.
7037 * src/symtab.c (symbol_check_alias_consistence): Adjust.
7038
7039 * tests/regression.at (Invalid %directive): Remove, as it is now
7040 meaningless.
7041 (Invalid inputs): Adjust to the new error messages.
7042 (Token definitions): The new grammar doesn't allow too many
7043 eccentricities.
7044
7045 * src/lex.h, src/lex.c: Remove.
7046 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
7047 (copy_character, copy_string2, copy_string, copy_identifier)
7048 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
7049 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
7050 (parse_action): Remove.
7051 * po/POTFILES.in: Adjust.
7052
7053 2002-06-11 Akim Demaille <akim@epita.fr>
7054
7055 * src/reader.c (parse_action): Don't store directly into the
7056 rule's action member: return the action as a string.
7057 Don't require `rule_length' as an argument: compute it.
7058 (grammar_current_rule_symbol_append)
7059 (grammar_current_rule_action_append): New, eved out from
7060 (readgram): here.
7061 Remove `action_flag', `rulelength', unused now.
7062
7063 2002-06-11 Akim Demaille <akim@epita.fr>
7064
7065 * src/reader.c (grammar_current_rule_prec_set).
7066 (grammar_current_rule_check): New, eved out from...
7067 (readgram): here.
7068 Remove `xaction', `first_rhs': useless.
7069 * tests/input.at (Type clashes): New.
7070 * tests/existing.at (GNU Cim Grammar): Adjust.
7071
7072 2002-06-11 Akim Demaille <akim@epita.fr>
7073
7074 * src/reader.c (grammar_midrule_action): New, Eved out from
7075 (readgram): here.
7076
7077 2002-06-11 Akim Demaille <akim@epita.fr>
7078
7079 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
7080 New.
7081 (readgram): Use them as replacement of inlined code, crule and
7082 crule1.
7083
7084 2002-06-11 Akim Demaille <akim@epita.fr>
7085
7086 * src/reader.c (grammar_end, grammar_symbol_append): New.
7087 (readgram): Use them.
7088 Make the use of `p' as local as possible.
7089
7090 2002-06-10 Akim Demaille <akim@epita.fr>
7091
7092 GCJ's parser requires the tokens to be defined before the prologue.
7093
7094 * data/bison.simple: Output the token definition before the user's
7095 prologue.
7096 * tests/regression.at (Braces parsing, Duplicate string)
7097 (Mixing %token styles): Check the output from bison.
7098 (Early token definitions): New.
7099
7100 2002-06-10 Akim Demaille <akim@epita.fr>
7101
7102 * src/symtab.c (symbol_user_token_number_set): Don't complain when
7103 assigning twice the same user number to a token, so that we can
7104 use it in...
7105 * src/lex.c (lex): here.
7106 Also use `symbol_class_set' instead of hand written code.
7107 * src/reader.c (parse_assoc_decl): Likewise.
7108
7109 2002-06-10 Akim Demaille <akim@epita.fr>
7110
7111 * src/symtab.c, src/symtab.c (symbol_class_set)
7112 (symbol_user_token_number_set): New.
7113 * src/reader.c (parse_token_decl): Use them.
7114 Use a switch instead of ifs.
7115 Use a single argument.
7116
7117 2002-06-10 Akim Demaille <akim@epita.fr>
7118
7119 Remove `%thong' support as it is undocumented, unused, duplicates
7120 `%token's job, and creates useless e-mail traffic with people who
7121 want to know what it is, why it is undocumented, unused, and
7122 duplicates `%token's job.
7123
7124 * src/reader.c (parse_thong_decl): Remove.
7125 * src/options.c (option_table): Remove "thong".
7126 * src/lex.h (tok_thong): Remove.
7127
7128 2002-06-10 Akim Demaille <akim@epita.fr>
7129
7130 * src/symtab.c, src/symtab.c (symbol_type_set)
7131 (symbol_precedence_set): New.
7132 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
7133 (value_components_used): Remove, unused.
7134
7135 2002-06-09 Akim Demaille <akim@epita.fr>
7136
7137 Move symbols handling code out of the reader.
7138
7139 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
7140 (axiom): Move to...
7141 * src/symtab.h, src/symtab.c: here.
7142
7143 * src/gram.c (start_symbol): Remove: use startsymbol->number.
7144 * src/reader.c (startval): Rename as...
7145 * src/symtab.h, src/symtab.c (startsymbol): this.
7146 * src/reader.c: Adjust.
7147
7148 * src/reader.c (symbol_check_defined, symbol_make_alias)
7149 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
7150 (token_translations_init)
7151 Move to...
7152 * src/symtab.c: here.
7153 * src/reader.c (packsymbols): Move to...
7154 * src/symtab.h, src/symtab.c (symbols_pack): here.
7155 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
7156 argument.
7157
7158 2002-06-03 Akim Demaille <akim@epita.fr>
7159
7160 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
7161 then statements.
7162
7163 2002-06-03 Akim Demaille <akim@epita.fr>
7164
7165 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
7166 structs with non literals.
7167 * src/scan-skel.l: never-interactive.
7168 * src/conflicts.c (enum conflict_resolution_e): No trailing
7169 comma.
7170 * src/getargs.c (usage): Split long literal strings.
7171 Reported by Hans Aberg.
7172
7173 2002-05-28 Akim Demaille <akim@epita.fr>
7174
7175 * data/bison.c++: Use C++ ostreams.
7176 (cdebug_): New member.
7177
7178 2002-05-28 Akim Demaille <akim@epita.fr>
7179
7180 * src/output.c (output_skeleton): Be sure to allocate enough room
7181 for `/' _and_ for `\0' in full_skeleton.
7182
7183 2002-05-28 Akim Demaille <akim@epita.fr>
7184
7185 * data/bison.c++: Catch up with bison.simple:
7186 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7187 and Paul Eggert <eggert@twinsun.com>: `error' handing.
7188 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
7189 and popping traces.
7190
7191 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7192
7193 * src/output.c (output_skeleton): Put an explicit path in front of
7194 the skeleton file name, rather than relying on the -I directory,
7195 to partially alleviate effects of having a skeleton file lying around
7196 in the current directory.
7197
7198 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7199
7200 * src/conflicts.c (log_resolution): Correct typo:
7201 obstack_printf should be obstack_fgrow1.
7202
7203 2002-05-26 Akim Demaille <akim@epita.fr>
7204
7205 * src/state.h (state_t): `solved_conflicts' is a new member.
7206 * src/LR0.c (new_state): Set it to 0.
7207 * src/conflicts.h, src/conflicts.c (print_conflicts)
7208 (free_conflicts, solve_conflicts): Rename as...
7209 (conflicts_print, conflicts_free, conflicts_solve): these.
7210 Adjust callers.
7211 * src/conflicts.c (enum conflict_resolution_e)
7212 (solved_conflicts_obstack): New, used by...
7213 (log_resolution): this.
7214 Adjust to attach the conflict resolution to each state.
7215 Complete the description with the precedence/associativity
7216 information.
7217 (resolve_sr_conflict): Adjust.
7218 * src/print.c (print_state): Output its solved_conflicts.
7219 * tests/conflicts.at (Unresolved SR Conflicts)
7220 (Solved SR Conflicts): Exercise --report=all.
7221
7222 2002-05-26 Akim Demaille <akim@epita.fr>
7223
7224 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
7225 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
7226 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
7227 (token_number_t, item_number_as_token_number)
7228 (token_number_as_item_number, muscle_insert_token_number_table):
7229 Rename as...
7230 (symbol_number_t, item_number_as_symbol_number)
7231 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
7232 these, since it is more appropriate.
7233
7234 2002-05-26 Akim Demaille <akim@epita.fr>
7235
7236 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
7237 `Error:' lines.
7238 * data/bison.simple (yystos) [YYDEBUG]: New.
7239 (yyparse) [YYDEBUG]: Display the symbols which are popped during
7240 error recovery.
7241 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
7242
7243 2002-05-25 Akim Demaille <akim@epita.fr>
7244
7245 * doc/bison.texinfo (Debugging): Split into...
7246 (Tracing): this new section, its former contents, and...
7247 (Understanding): this new section.
7248 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
7249 by...
7250 (report_flag): this.
7251 Adjust all dependencies.
7252 (report_args, report_types, report_argmatch): New.
7253 (usage, getargs): Report/support -r, --report.
7254 * src/options.h
7255 (struct option_table_struct): Rename as..,
7256 (struct option_table_s): this.
7257 Rename the `set_flag' member to `flag' to match with getopt_long's
7258 struct.
7259 * src/options.c (option_table): Split verbose into an entry for
7260 %verbose, and another for --verbose.
7261 Support --report/-r, so remove -r from the obsolete --raw.
7262 * src/print.c: Attach full item sets and lookaheads reports to
7263 report_flag instead of trace_flag.
7264 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
7265
7266 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7267 and Paul Eggert <eggert@twinsun.com>
7268
7269 * data/bison.simple (yyparse): Correct error handling to conform to
7270 POSIX and yacc. Specifically, after syntax error is discovered,
7271 do not reduce further before shifting the error token.
7272 Clean up the code a bit by removing the labels yyerrdefault,
7273 yyerrhandle, yyerrpop.
7274 * NEWS: Document the above.
7275
7276 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7277
7278 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
7279 type; it isn't always big enough, since it doesn't necessarily
7280 include non-terminals.
7281 (yytranslate): Expand definition of yy_token_number_type, so that
7282 the latter can be removed.
7283 (yy_token_number_type): Remove, only one use.
7284 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
7285 don't use TokenNumberType as element type.
7286
7287 * tests/regression.at: Modify expected output to agree with change
7288 to yyr1 and yytranslate.
7289
7290 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
7291
7292 * src/reader.c (parse_action): Use copy_character instead of
7293 obstack_1grow.
7294
7295 2002-05-13 Akim Demaille <akim@epita.fr>
7296
7297 * tests/regression.at (Token definitions): Prototype yylex and
7298 yyerror.
7299
7300 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7301
7302 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
7303 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
7304 32-bit arithmetic.
7305 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
7306
7307 2002-05-07 Akim Demaille <akim@epita.fr>
7308
7309 * tests/synclines.at: Be sure to prototype yylex and yyerror to
7310 avoid GCC warnings.
7311
7312 2002-05-07 Akim Demaille <akim@epita.fr>
7313
7314 Kill GCC warnings.
7315
7316 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
7317 over the RHS of each rule.
7318 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
7319 * src/state.h (state_t): Member `nitems' is unsigned short.
7320 * src/LR0.c (get_state): Adjust.
7321 * src/reader.c (packgram): Likewise.
7322 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
7323 `Type'.
7324 (muscle_insert_int_table): Remove, unused.
7325 (prepare_rules): Remove `max'.
7326
7327 2002-05-06 Akim Demaille <akim@epita.fr>
7328
7329 * src/closure.c (print_firsts): Display of the symbol tags.
7330 (bitmatrix_print): Move to...
7331 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
7332 here.
7333 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
7334
7335 2002-05-06 Akim Demaille <akim@epita.fr>
7336
7337 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
7338 hash_do_for_each.
7339
7340 2002-05-06 Akim Demaille <akim@epita.fr>
7341
7342 * src/LR0.c (new_state, get_state): Instead of using the global
7343 `kernel_size' and `kernel_base', have two new arguments:
7344 `core_size' and `core'.
7345 Adjust callers.
7346
7347 2002-05-06 Akim Demaille <akim@epita.fr>
7348
7349 * src/reader.c (packgram): No longer end `ritem' with a 0
7350 sentinel: it is not used.
7351
7352 2002-05-05 Akim Demaille <akim@epita.fr>
7353
7354 New experimental feature: display the lookaheads in the report and
7355 graph.
7356
7357 * src/print (print_core): When --trace-flag, display the rules
7358 lookaheads.
7359 * src/print_graph.c (print_core): Likewise.
7360 Swap the arguments.
7361 Adjust caller.
7362
7363 2002-05-05 Akim Demaille <akim@epita.fr>
7364
7365 * tests/torture.at (Many lookaheads): New test.
7366
7367 2002-05-05 Akim Demaille <akim@epita.fr>
7368
7369 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
7370 (GENERATE_MUSCLE_INSERT_TABLE): this.
7371 (output_int_table, output_unsigned_int_table, output_short_table)
7372 (output_token_number_table, output_item_number_table): Replace with...
7373 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
7374 (muscle_insert_short_table, muscle_insert_token_number_table)
7375 (muscle_insert_item_number_table): these.
7376 Adjust all callers.
7377 (prepare_tokens): Don't free `translations', since...
7378 * src/reader.h, src/reader.c (grammar_free): do it.
7379 Move to...
7380 * src/gram.h, src/gram.c (grammar_free): here.
7381 * data/bison.simple, data/bison.c++: b4_token_number_max is now
7382 b4_translate_max.
7383
7384 2002-05-05 Akim Demaille <akim@epita.fr>
7385
7386 * src/output.c (output_unsigned_int_table): New.
7387 (prepare_rules): `i' is unsigned.
7388 `prhs', `rline', `r2' are unsigned int.
7389 Rename muscle `rhs_number_max' as `rhs_max'.
7390 Output muscles `prhs_max', `rline_max', and `r2_max'.
7391 Free rline and r1.
7392 * data/bison.simple, data/bison.c++: Adjust to use these muscles
7393 to compute types instead of constant types.
7394 * tests/regression.at (Web2c Actions): Adjust.
7395
7396 2002-05-04 Akim Demaille <akim@epita.fr>
7397
7398 * src/symtab.h (SALIAS, SUNDEF): Rename as...
7399 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
7400 Adjust dependencies.
7401 * src/output.c (token_definitions_output): Be sure not to output a
7402 `#define 'a'' when fed with `%token 'a' "a"'.
7403 * tests/regression.at (Token definitions): New.
7404
7405 2002-05-03 Paul Eggert <eggert@twinsun.com>
7406
7407 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
7408 for K&R C.
7409
7410 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
7411
7412 * Makefile.am (SUBDIRS): Remove intl.
7413 (EXTRA_DIST): Add config/config.rpath.
7414
7415 2002-05-03 Akim Demaille <akim@epita.fr>
7416
7417 * data/bison.simple (m4_if): Don't output empty enums.
7418 And actually, output valid enum definitions :(.
7419
7420 2002-05-03 Akim Demaille <akim@epita.fr>
7421
7422 * configure.bat: Remove, completely obsolete.
7423 * Makefile.am (EXTRA_DIST): Adjust.
7424 Don't distribute config.rpath...
7425 * config/Makefile.am (EXTRA_DIST): Do it.
7426
7427 2002-05-03 Akim Demaille <akim@epita.fr>
7428
7429 * configure.in (GETTEXT_VERSION): New.
7430 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
7431
7432 2002-05-03 Akim Demaille <akim@epita.fr>
7433
7434 * data/bison.simple (b4_token_enum): New.
7435 (b4_token_defines): Use it to output tokens both as #define and
7436 enums.
7437 Suggested by Paul Eggert.
7438 * src/output.c (token_definitions_output): Don't output spurious
7439 white spaces.
7440
7441 2002-05-03 Akim Demaille <akim@epita.fr>
7442
7443 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
7444
7445 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
7446
7447 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
7448 Update the stack class, give a try to deque as the default container.
7449
7450 2002-05-02 Akim Demaille <akim@epita.fr>
7451
7452 * data/bison.simple (yyparse): Do not implement @$ = @1.
7453 (YYLLOC_DEFAULT): Adjust to do it.
7454 * doc/bison.texinfo (Location Default Action): Fix.
7455
7456 2002-05-02 Akim Demaille <akim@epita.fr>
7457
7458 * src/reader.c (parse_braces): Merge into...
7459 (parse_action): this.
7460
7461 2002-05-02 Akim Demaille <akim@epita.fr>
7462
7463 * configure.in (ALL_LINGUAS): Remove.
7464 * po/LINGUAS, hr.po: New.
7465
7466 2002-05-02 Akim Demaille <akim@epita.fr>
7467
7468 Remove the so called hairy (semantic) parsers.
7469
7470 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
7471 * src/gram.h, src/gram.c (semantic_parser): Remove.
7472 (rule_t): Remove the guard and guard_line members.
7473 * src/lex.h (token_t): remove tok_guard.
7474 * src/options.c (option_table): Remove %guard and %semantic_parser
7475 support.
7476 * src/output.c, src/output.h (guards_output): Remove.
7477 (prepare): Adjust.
7478 (token_definitions_output): Don't output the `T'
7479 tokens (???).
7480 (output_skeleton): Don't output the guards.
7481 * src/files.c, src/files.c (attrsfile): Remove.
7482 * src/reader.c (symbol_list): Remove the guard and guard_line
7483 members.
7484 Adjust dependencies.
7485 (parse_guard): Remove.
7486 * data/bison.hairy: Remove.
7487 * doc/bison.texinfo (Environment Variables): Remove occurrences of
7488 BISON_HAIRY.
7489
7490 2002-05-02 Akim Demaille <akim@epita.fr>
7491
7492 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
7493 (parse_guard): Rename the formal argument `stack_offset' as
7494 `rule_length', which is more readable.
7495 Adjust callers.
7496 (copy_at, copy_dollar): Instead of outputting the hard coded
7497 values of $$, $n and so forth, output invocation to b4_lhs_value,
7498 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
7499 Note: this patch partially drops `semantic-parser' support: it
7500 always does `rule_length - n', where semantic parsers ought to
7501 always use `-n'.
7502 * data/bison.simple, data/bison.c++ (b4_lhs_value)
7503 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
7504
7505 2002-05-02 Akim Demaille <akim@epita.fr>
7506
7507 * configure.in (AC_INIT): Bump to 1.49b.
7508 (AM_INIT_AUTOMAKE): Short invocation.
7509
7510 2002-05-02 Akim Demaille <akim@epita.fr>
7511
7512 Version 1.49a.
7513
7514 2002-05-01 Akim Demaille <akim@epita.fr>
7515
7516 * src/skeleton.h: Remove.
7517
7518 2002-05-01 Akim Demaille <akim@epita.fr>
7519
7520 * src/skeleton.h: Fix the #endif.
7521 Reported by Magnus Fromreide.
7522
7523 2002-04-26 Paul Eggert <eggert@twinsun.com>
7524
7525 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
7526 Define if we define YYSTYPE and YYLTYPE, respectively.
7527 (YYCOPY): Fix [] quoting problem in the non-GCC case.
7528
7529 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
7530
7531 * src/scan-skel.l: Postprocess quadrigraphs.
7532
7533 * src/reader.c (copy_character): New function, used to output
7534 single characters while replacing `[' and `]' with quadrigraphs, to
7535 avoid troubles with M4 quotes.
7536 (copy_comment): Output characters with copy_character.
7537 (read_additionnal_code): Likewise.
7538 (copy_string2): Likewise.
7539 (copy_definition): Likewise.
7540
7541 * tests/calc.at: Exercise M4 quoting.
7542
7543 2002-04-25 Akim Demaille <akim@epita.fr>
7544
7545 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
7546 between `!' and the command.
7547 Reported by Paul Eggert.
7548
7549 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
7550
7551 * tests/calc.at: Exercise prologue splitting.
7552
7553 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
7554 `b4_post_prologue' instead of `b4_prologue'.
7555
7556 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
7557 muscles.
7558 (output): Free pre_prologue_obstack and post_prologue_obstack.
7559 * src/files.h, src/files.c (attrs_obstack): Remove.
7560 (pre_prologue_obstack, post_prologue_obstack): New.
7561 * src/reader.c (copy_definition): Add a parameter to specify the
7562 obstack to fill, instead of using attrs_obstack unconditionally.
7563 (read_declarations): Pass pre_prologue_obstack to copy_definition if
7564 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
7565
7566 2002-04-23 Paul Eggert <eggert@twinsun.com>
7567
7568 * data/bison.simple: Remove unnecessary commentary and white
7569 space differences from 1_29-branch.
7570 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
7571
7572 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
7573 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
7574 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
7575 constructors or destructors.
7576
7577 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
7578
7579 2002-04-23 Akim Demaille <akim@epita.fr>
7580
7581 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
7582 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
7583 location with columns.
7584 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
7585 All reported by Paul Eggert.
7586
7587 2002-04-22 Akim Demaille <akim@epita.fr>
7588
7589 * src/reduce.c (dump_grammar): Move to...
7590 * src/gram.h, src/gram.c (grammar_dump): here.
7591 Be sure to separate long item numbers.
7592 Don't read the members of a rule's prec if its nil.
7593
7594 2002-04-22 Akim Demaille <akim@epita.fr>
7595
7596 * src/output.c (table_size, table_grow): New.
7597 (MAXTABLE): Remove, replace uses with table_size.
7598 (pack_vector): Instead of dying when the table is too big, grow it.
7599
7600 2002-04-22 Akim Demaille <akim@epita.fr>
7601
7602 * data/bison.simple (yyr1): Its type is that of a token number.
7603 * data/bison.c++ (r1_): Likewise.
7604 * tests/regression.at (Web2c Actions): Adjust.
7605
7606 2002-04-22 Akim Demaille <akim@epita.fr>
7607
7608 * src/reader.c (token_translations_init): 256 is now the default
7609 value for the error token, i.e., it will be assigned another
7610 number if the user assigned 256 to one of her tokens.
7611 (reader): Don't force 256 to error.
7612 * doc/bison.texinfo (Symbols): Adjust.
7613 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
7614 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
7615 etc. instead of 10, 20, 30 (which was used to `jump' over error
7616 (256) and undefined (2)).
7617
7618 2002-04-22 Akim Demaille <akim@epita.fr>
7619
7620 Propagate more token_number_t.
7621
7622 * src/gram.h (token_number_as_item_number)
7623 (item_number_as_token_number): New.
7624 * src/output.c (GENERATE_OUTPUT_TABLE): New.
7625 Use it to create output_item_number_table and
7626 output_token_number_table.
7627 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
7628 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
7629 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
7630 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
7631
7632 2002-04-22 Akim Demaille <akim@epita.fr>
7633
7634 * src/output.h, src/output.c (get_lines_number): Remove.
7635
7636 2002-04-19 Akim Demaille <akim@epita.fr>
7637
7638 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
7639 as Lex/Flex'.
7640 (Debugging): More details about enabling the debugging features.
7641 (Table of Symbols): Describe $$, $n, @$, and @n.
7642 Suggested by Tim Josling.
7643
7644 2002-04-19 Akim Demaille <akim@epita.fr>
7645
7646 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
7647
7648 2002-04-10 Akim Demaille <akim@epita.fr>
7649
7650 * src/system.h: Rely on HAVE_LIMITS_H.
7651 Suggested by Paul Eggert.
7652
7653 2002-04-09 Akim Demaille <akim@epita.fr>
7654
7655 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
7656 full stderr, and strip it according to the bison options, instead
7657 of composing the error message from different bits.
7658 This makes it easier to check for several error messages.
7659 Adjust all the invocations.
7660 Add an invocation exercising the error token.
7661 Add an invocation demonstrating a stupid error message.
7662 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
7663 Adjust the tests.
7664 Error message are for stderr, not stdout.
7665
7666 2002-04-09 Akim Demaille <akim@epita.fr>
7667
7668 * src/gram.h, src/gram.c (error_token_number): Remove, use
7669 errtoken->number.
7670 * src/reader.c (reader): Don't specify the user token number (2)
7671 for $undefined, as it uselessly prevents using it.
7672 * src/gram.h (token_number_t): Move to...
7673 * src/symtab.h: here.
7674 (state_t.number): Is a token_number_t.
7675 * src/print.c, src/reader.c: Use undeftoken->number instead of
7676 hard coded 2.
7677 (Even though this 2 is not the same as above: the number of the
7678 undeftoken remains being 2, it is its user token number which
7679 might not be 2).
7680 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
7681 `user_token_number_max'.
7682 Output `undef_token_number'.
7683 * data/bison.simple, data/bison.c++: Use them.
7684 Be sure to map invalid yylex return values to
7685 `undef_token_number'. This saves us from gratuitous SEGV.
7686
7687 * tests/conflicts.at (Solved SR Conflicts)
7688 (Unresolved SR Conflicts): Adjust.
7689 * tests/regression.at (Web2c Actions): Adjust.
7690
7691 2002-04-08 Akim Demaille <akim@epita.fr>
7692
7693 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
7694 Adding #line.
7695 Remove the duplicate `typedefs'.
7696 (RhsNumberType): Fix the declaration and various other typos.
7697 Use __ofile__.
7698 * data/bison.simple: Use __ofile__.
7699 * src/scan-skel.l: Handle __ofile__.
7700
7701 2002-04-08 Akim Demaille <akim@epita.fr>
7702
7703 * src/gram.h (item_number_t): New, the type of item numbers in
7704 RITEM. Note that it must be able to code symbol numbers as
7705 positive number, and the negation of rule numbers as negative
7706 numbers.
7707 Adjust all dependencies (pretty many).
7708 * src/reduce.c (rule): Remove this `short *' pointer: use
7709 item_number_t.
7710 * src/system.h (MINSHORT, MAXSHORT): Remove.
7711 Include `limits.h'.
7712 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
7713 (shortcpy): Remove.
7714 (MAXTABLE): Move to...
7715 * src/output.c (MAXTABLE): here.
7716 (prepare_rules): Use output_int_table to output rhs.
7717 * data/bison.simple, data/bison.c++: Adjust.
7718 * tests/torture.at (Big triangle): Move the limit from 254 to
7719 500.
7720 * tests/regression.at (Web2c Actions): Ajust.
7721
7722 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
7723 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
7724 passes, but produces negative #line number, once fixed, GCC is
7725 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
7726 C), it passes.
7727 * src/state.h (state_h): Code input lines on ints, not shorts.
7728
7729 2002-04-08 Akim Demaille <akim@epita.fr>
7730
7731 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
7732 and then the grammar.
7733
7734 2002-04-08 Akim Demaille <akim@epita.fr>
7735
7736 * src/system.h: No longer using strndup.
7737
7738 2002-04-07 Akim Demaille <akim@epita.fr>
7739
7740 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
7741 * src/output.c (output_table_data): Return the longest number.
7742 (prepare_tokens): Output `token_number_max').
7743 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
7744 New.
7745 Use them to define yy_token_number_type/TokenNumberType.
7746 Use this type for yytranslate.
7747 * tests/torture.at (Big triangle): Push the limit from 124 to
7748 253.
7749 * tests/regression.at (Web2c Actions): Adjust.
7750
7751 2002-04-07 Akim Demaille <akim@epita.fr>
7752
7753 * tests/torture.at (Big triangle): New.
7754 (GNU AWK Grammar, GNU Cim Grammar): Move to...
7755 * tests/existing.at: here.
7756
7757 2002-04-07 Akim Demaille <akim@epita.fr>
7758
7759 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
7760 nritems.
7761 Adjust dependencies.
7762
7763 2002-04-07 Akim Demaille <akim@epita.fr>
7764
7765 * src/reader.c: Normalize increments to prefix form.
7766
7767 2002-04-07 Akim Demaille <akim@epita.fr>
7768
7769 * src/reader.c, symtab.c: Remove debugging code.
7770
7771 2002-04-07 Akim Demaille <akim@epita.fr>
7772
7773 Rename all the `bucket's as `symbol_t'.
7774
7775 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
7776 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
7777 * src/symtab.c, src/symtab.h (bucket): Rename as...
7778 (symbol_t): this.
7779 (symbol_list_new, bucket_check_defined, bucket_make_alias)
7780 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
7781 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
7782 (buckets_new, buckets_free, buckets_do): Rename as...
7783 (symbol_list_new, symbol_check_defined, symbol_make_alias)
7784 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
7785 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
7786 (symbols_new, symbols_free, symbols_do): these.
7787
7788 2002-04-07 Akim Demaille <akim@epita.fr>
7789
7790 Use lib/hash for the symbol table.
7791
7792 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
7793 EOF.
7794 * src/lex.c (lex): Set the `number' member of new terminals.
7795 * src/reader.c (bucket_check_defined, bucket_make_alias)
7796 (bucket_check_alias_consistence, bucket_translation): New.
7797 (reader, grammar_free, readgram, token_translations_init)
7798 (packsymbols): Adjust.
7799 (reader): Number the predefined tokens.
7800 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
7801 for predefined tokens.
7802 * src/symtab.h (bucket): Remove all the hash table related
7803 members.
7804 * src/symtab.c (symtab): Replace by...
7805 (bucket_table): this.
7806 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
7807 (buckets_new, buckets_do): New.
7808
7809 2002-04-07 Akim Demaille <akim@epita.fr>
7810
7811 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
7812 (start_symbol, max_user_token_number, semantic_parser)
7813 (error_token_number): Initialize.
7814 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
7815 Initialize.
7816 (reader): Don't.
7817 (errtoken, eoftoken, undeftoken, axiom): Extern.
7818
7819 2002-04-07 Akim Demaille <akim@epita.fr>
7820
7821 * src/gram.h (rule_s): prec and precsym are now pointers
7822 to the bucket giving the priority/associativity.
7823 Member `associativity' removed: useless.
7824 * src/reduce.c, src/conflicts.c: Adjust.
7825
7826 2002-04-07 Akim Demaille <akim@epita.fr>
7827
7828 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
7829 Properly escape the symbols' TAG when outputting them.
7830
7831 2002-04-07 Akim Demaille <akim@epita.fr>
7832
7833 * src/lalr.h (LA): Is a bitsetv, not bitset*.
7834
7835 2002-04-07 Akim Demaille <akim@epita.fr>
7836
7837 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
7838 (LArule): this, which is an array to rule_t*.
7839 * src/print.c, src/conflicts.c: Adjust.
7840
7841 2002-04-07 Akim Demaille <akim@epita.fr>
7842
7843 * src/gram.h (rule_t): Rename `number' as `user_number'.
7844 `number' is a new member.
7845 Adjust dependencies.
7846 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
7847
7848 2002-04-07 Akim Demaille <akim@epita.fr>
7849
7850 As a result of the previous patch, it is no longer needed
7851 to reorder ritem itself.
7852
7853 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
7854
7855 2002-04-07 Akim Demaille <akim@epita.fr>
7856
7857 Be sure never to walk through RITEMS, but use only data related to
7858 the rules themselves. RITEMS should be banished.
7859
7860 * src/output.c (output_token_translations): Rename as...
7861 (prepare_tokens): this.
7862 In addition to `translate', prepare the muscles `tname' and
7863 `toknum', which were handled by...
7864 (output_rule_data): this.
7865 Remove, and move the remainder of its outputs into...
7866 (prepare_rules): this new routines, which also merges content from
7867 (output_gram): this.
7868 (prepare_rules): Be sure never to walk through RITEMS.
7869 (output_stos): Rename as...
7870 (prepare_stos): this.
7871 (output): Always invoke prepare_states, after all, just don't use it
7872 in the output if you don't need it.
7873
7874 2002-04-07 Akim Demaille <akim@epita.fr>
7875
7876 * src/LR0.c (new_state): Display `nstates' as the name of the
7877 newly created state.
7878 Adjust to initialize first_state and last_state if needed.
7879 Be sure to distinguish the initial from the final state.
7880 (new_states): Create the itemset of the initial state, and use
7881 new_state.
7882 * src/closure.c (closure): Now that the initial state has its
7883 items properly set, there is no need for a special case when
7884 creating `ruleset'.
7885
7886 As a result, now the rule 0, reducing to $axiom, is visible in the
7887 outputs. Adjust the test suite.
7888
7889 * tests/conflicts.at (Solved SR Conflicts)
7890 (Unresolved SR Conflicts): Adjust.
7891 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
7892 * tests/conflicts.at (S/R in initial): New.
7893
7894 2002-04-07 Akim Demaille <akim@epita.fr>
7895
7896 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
7897 the RHS of the rules.
7898 * src/output.c (output_gram): Likewise.
7899
7900 2002-04-07 Akim Demaille <akim@epita.fr>
7901
7902 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
7903 bucket.
7904 Adjust all dependencies.
7905 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
7906 `number' of the buckets too.
7907 * src/gram.h: Include `symtab.h'.
7908 (associativity): Move to...
7909 * src/symtab.h: here.
7910 No longer include `gram.h'.
7911
7912 2002-04-07 Akim Demaille <akim@epita.fr>
7913
7914 * src/gram.h, src/gram.c (rules_rhs_length): New.
7915 (ritem_longest_rhs): Use it.
7916 * src/gram.h (rule_t): `number' is a new member.
7917 * src/reader.c (packgram): Set it.
7918 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
7919 the end of `rules', and count them out of `nrules'.
7920 (reduce_output, dump_grammar): Adjust.
7921 * src/print.c (print_grammar): It is no longer needed to check for
7922 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
7923 * tests/reduce.at (Reduced Automaton): New test.
7924
7925 2002-04-07 Akim Demaille <akim@epita.fr>
7926
7927 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
7928 lacking `+ 1' to nrules, Bison reported as useless a token if it
7929 was used solely to set the precedence of the last rule...
7930
7931 2002-04-07 Akim Demaille <akim@epita.fr>
7932
7933 * data/bison.c++, data/bison.simple: Don't output the current file
7934 name in #line, to avoid useless diffs between two identical
7935 outputs under different names.
7936
7937 2002-04-07 Akim Demaille <akim@epita.fr>
7938
7939 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
7940 Normalize loops to using `< nrules + 1', not `<= nrules'.
7941
7942 2002-04-07 Akim Demaille <akim@epita.fr>
7943
7944 * TODO: Update.
7945
7946 2002-04-07 Akim Demaille <akim@epita.fr>
7947
7948 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
7949 bucket.value as bucket.number.
7950
7951 2002-04-07 Akim Demaille <akim@epita.fr>
7952
7953 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
7954 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
7955 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
7956 RHS, instead of being an index in RITEMS.
7957
7958 2002-04-04 Paul Eggert <eggert@twinsun.com>
7959
7960 * doc/bison.texinfo: Update copyright date.
7961 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
7962 (Symbols): Warn about running Bison in one character set,
7963 but compiling and/or running in an incompatible one.
7964 Warn about character code 256, too.
7965
7966 2002-04-03 Paul Eggert <eggert@twinsun.com>
7967
7968 * src/bison.data (YYSTACK_ALLOC): Depend on whether
7969 YYERROR_VERBOSE is nonzero, not whether it is defined.
7970
7971 Merge changes from bison-1_29-branch.
7972
7973 2002-03-20 Paul Eggert <eggert@twinsun.com>
7974
7975 Merge fixes from Debian bison_1.34-1.diff.
7976
7977 * configure.in (AC_PREREQ): 2.53.
7978
7979 2002-03-20 Akim Demaille <akim@epita.fr>
7980
7981 * src/conflicts.c (log_resolution): Argument `resolution' is const.
7982
7983 2002-03-19 Paul Eggert <eggert@twinsun.com>
7984
7985 * src/bison.simple (YYCOPY): New macro.
7986 (YYSTACK_RELOCATE): Use it.
7987 Remove Type arg; no longer needed. All callers changed.
7988 (yymemcpy): Remove; no longer needed.
7989
7990 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
7991 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
7992
7993 2002-03-19 Akim Demaille <akim@epita.fr>
7994
7995 Test and fix the #line outputs.
7996
7997 * tests/atlocal.at (GCC): New.
7998 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
7999 (Prologue synch line, %union synch line, Postprologue synch line)
8000 (Action synch line, Epilogue synch line): New tests.
8001 * src/reader.c (parse_union_decl): Define the muscle stype_line.
8002 * data/bison.simple, data/bison.c++: Use it.
8003
8004 2002-03-19 Akim Demaille <akim@epita.fr>
8005
8006 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
8007 (Solved SR Conflicts, %expect not enough, %expect right)
8008 (%expect too much): Move to...
8009 * tests/conflicts.at: this new file.
8010
8011 2002-03-19 Akim Demaille <akim@epita.fr>
8012
8013 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
8014 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
8015 that we can move to enums for instance.
8016 * src/output.c (token_definitions_output): Output a list of
8017 `token-name, token-number' instead of the #define.
8018 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
8019
8020 2002-03-14 Akim Demaille <akim@epita.fr>
8021
8022 Use Gettext 0.11.1.
8023
8024 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
8025
8026 * data/bison.c++: Make the user able to add members to the generated
8027 parser by subclassing.
8028
8029 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
8030
8031 * src/reader.c (read_additionnal_code): `c' should be an integer, not
8032 a character.
8033 Reported by Nicolas Tisserand and Nicolas Burrus.
8034
8035 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8036
8037 * src/reader.c: Warn about lacking semi-colons, do not complain.
8038
8039 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8040
8041 * data/bison.c++: Remove a debug line.
8042
8043 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
8044
8045 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
8046 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
8047 provide a default implementation.
8048
8049 2002-03-04 Akim Demaille <akim@epita.fr>
8050
8051 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
8052 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
8053 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
8054 * tests/semantic.at (Parsing Guards): Similarly.
8055 * src/reader.at (readgram): Complain if the last rule is not ended
8056 with a semi-colon.
8057
8058 2002-03-04 Akim Demaille <akim@epita.fr>
8059
8060 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
8061 * src/closure.c: here.
8062 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
8063 RTC.
8064 * src/warshall.h, src/warshall.c: Remove.
8065 * tests/sets.at (Broken Closure): Adjust.
8066
8067 2002-03-04 Akim Demaille <akim@epita.fr>
8068
8069 * src/output.c (output_skeleton): tempdir is const.
8070 bytes_read is unused.
8071
8072 2002-03-04 Akim Demaille <akim@epita.fr>
8073
8074 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
8075 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
8076 Update.
8077 From Michael Hayes.
8078
8079 2002-03-04 Akim Demaille <akim@epita.fr>
8080
8081 * src/closure.c (closure): `r' is unused.
8082
8083 2002-03-04 Akim Demaille <akim@epita.fr>
8084
8085 * tests/sets.at (Broken Closure): Add the ending `;'.
8086 * src/reader.at (readgram): Complain if a rule is not ended with a
8087 semi-colon.
8088
8089 2002-03-04 Akim Demaille <akim@epita.fr>
8090
8091 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
8092 (count_sr_conflicts): Use bitset_count.
8093 * src/reduce.c (inaccessable_symbols): Ditto.
8094 (bits_size): Remove.
8095 * src/warshall.h, src/warshall.c: Convert to bitsetv.
8096
8097 2002-03-04 Akim Demaille <akim@epita.fr>
8098
8099 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
8100 * src/reduce.c: Remove the `bitset_zero's following the
8101 `bitset_create's, as now it is performed by the latter.
8102
8103 2002-03-04 Akim Demaille <akim@epita.fr>
8104
8105 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
8106 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
8107 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
8108 latest sources from Michael.
8109
8110 2002-03-04 Akim Demaille <akim@epita.fr>
8111
8112 * src/output.c (output): Don't free the grammar.
8113 * src/reader.c (grammar_free): New.
8114 * src/main.c (main): Call it and don't free symtab here.
8115
8116 2002-03-04 Akim Demaille <akim@epita.fr>
8117
8118 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
8119 before returning.
8120 Reported by Benoit Perrot.
8121
8122 2002-03-04 Akim Demaille <akim@epita.fr>
8123
8124 Use bitset operations when possible, not loops over bits.
8125
8126 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
8127 bitset_or.
8128 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
8129 * src/reduce.c (useless_nonterminals): Formatting changes.
8130 * src/warshall.c (TC): Use bitset_or.
8131
8132 2002-03-04 Akim Demaille <akim@epita.fr>
8133
8134 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
8135 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
8136 Ditto.
8137
8138 2002-03-04 Akim Demaille <akim@epita.fr>
8139
8140 * src/lalr.c (F): Now a bitset*.
8141 Adjust all dependencies.
8142
8143 2002-03-04 Akim Demaille <akim@epita.fr>
8144
8145 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
8146 Adjust all dependencies.
8147
8148 2002-03-04 Akim Demaille <akim@epita.fr>
8149
8150 * src/L0.c, src/LR0.h (nstates): Be size_t.
8151 Adjust comparisons (signed vs unsigned).
8152 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
8153 bitset*.
8154 Adjust all dependencies.
8155
8156 2002-03-04 Akim Demaille <akim@epita.fr>
8157
8158 * src/closure.c (firsts): Now, also a bitset.
8159 Adjust all dependencies.
8160 (varsetsize): Remove, now unused.
8161 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
8162
8163 2002-03-04 Akim Demaille <akim@epita.fr>
8164
8165 * src/print.c: Convert to use bitset.h, not hand coded iterations
8166 over ints.
8167
8168 2002-03-04 Akim Demaille <akim@epita.fr>
8169
8170 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
8171
8172 2002-03-04 Akim Demaille <akim@epita.fr>
8173
8174 * src/closure.c (ruleset): Be a bitset.
8175 (rulesetsize): Remove.
8176
8177 2002-03-04 Akim Demaille <akim@epita.fr>
8178
8179 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
8180 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
8181 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
8182 * src/closure.c (fderives): Be an array of bitsets.
8183
8184 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
8185
8186 * data/bison.c++: Merge the two generated headers. Insert a copyright
8187 notice in each output file.
8188
8189 2002-02-28 Akim Demaille <akim@epita.fr>
8190
8191 * data/bison.c++: Copy the prologue of bison.simple to fetch
8192 useful M4 definitions, such as b4_header_guard.
8193
8194 2002-02-25 Akim Demaille <akim@epita.fr>
8195
8196 * src/getargs.c (version): Give the name of the authors, and use a
8197 translator friendly scheme for the bgr
8198 copyright notice.
8199
8200 2002-02-25 Akim Demaille <akim@epita.fr>
8201
8202 * src/output.c (header_output): Remove, now handled completely via
8203 M4.
8204
8205 2002-02-25 Akim Demaille <akim@epita.fr>
8206
8207 * m4/m4.m4: New, from CVS Autoconf.
8208 * configure.in: Invoke it.
8209 * src/output.c (output_skeleton): Use its result instead of the
8210 hard coded name.
8211
8212 2002-02-25 Akim Demaille <akim@epita.fr>
8213
8214 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
8215 Fileutils 4.1.5.
8216 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
8217 * src/output.c (output_skeleton): Use mkstemp to create a real
8218 temporary file.
8219 Move the filling of `skeleton' and its muscle to...
8220 (prepare): here.
8221 (output): Move the definition of the prologue muscle to...
8222 (prepare): here.
8223 * src/system.h (DEFAULT_TMPDIR): New.
8224
8225 2002-02-14 Paul Eggert <eggert@twinsun.com>
8226
8227 Remove the support for C++ namespace cleanliness; it was
8228 causing more problems than it was curing, since it didn't work
8229 properly on some nonstandard C++ compilers. This can wait
8230 for a proper C++ parser.
8231
8232 * NEWS: Document this.
8233 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
8234 of C++, as it's treated like C now.
8235 * src/bison.simple (YYSTD): Remove.
8236 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
8237 Treat C++ just like Standard C instead of trying to support
8238 namespace cleanliness.
8239
8240 2002-02-14 Akim Demaille <akim@epita.fr>
8241
8242 * tests/regression.at (else): Adjust to Andreas' change.
8243
8244 2002-02-14 Akim Demaille <akim@epita.fr>
8245
8246 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
8247
8248 2002-02-13 Andreas Schwab <schwab@suse.de>
8249
8250 * src/output.c (output_rule_data): Don't output NULL, it might
8251 not be defined yet.
8252
8253 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
8254
8255 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
8256 (Copyright notice): Update.
8257
8258 2002-02-11 Akim Demaille <akim@epita.fr>
8259
8260 * tests/regression.at (%nonassoc and eof): Don't include
8261 nonportable headers.
8262
8263 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
8264
8265 * data/bison.c++: Correct error recovery. Make the user able to
8266 initialize the starting location.
8267
8268 2002-02-07 Akim Demaille <akim@epita.fr>
8269
8270 * tests/input.at: New.
8271
8272 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8273
8274 * data/bison.c++: Replace some direct m4 expansions by constants. Be
8275 more consistent when naming methods and variables. Put preprocessor
8276 directives around tables only needed for debugging.
8277
8278 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8279
8280 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
8281 C++ parsers.
8282 (yy::b4_name::parse): Use print_.
8283
8284 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8285
8286 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
8287
8288 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
8289
8290 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
8291 C++ parsers.
8292 (yy::b4_name::parse): Build verbose error messages, and use error_.
8293
8294 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
8295
8296 * data/bison.c++: Fix m4 quoting in comments.
8297
8298 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
8299
8300 * data/bison.c++: Adjust the parser code. Fix some muscles that were
8301 not expanded by m4.
8302
8303 2002-02-05 Akim Demaille <akim@epita.fr>
8304
8305 * data/bison.c++: Adjust to the M4 back end.
8306 More is certainly needed.
8307
8308 2002-02-05 Akim Demaille <akim@epita.fr>
8309
8310 Give a try to M4 as a back end.
8311
8312 * lib/readpipe.c: New, from wdiff.
8313 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
8314 BISON_HAIRY.
8315 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
8316 specific values. Now it is m4 that performs the lookup.
8317 * src/parse-skel.y: Remove.
8318 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
8319 * src/output.c (actions_output, guards_output)
8320 (token_definitions_output): No longer keeps track of the output
8321 line number, hence remove the second argument.
8322 (guards_output): Check against the guard member of a rule, not the
8323 action member.
8324 Adjust callers.
8325 (output_skeleton): Don't look for the skeleton location, let m4 do
8326 that.
8327 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
8328 file will be used.
8329 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
8330 (prepare): Given that for the time being changesyntax is not
8331 usable in M4, rename the muscles using `-' to `_'.
8332 Define `defines_flag', `output_parser_name' and `output_header_name'.
8333 * src/output.h (actions_output, guards_output)
8334 (token_definitions_output): Adjust prototypes.
8335 * src/scan-skel.l: Instead of scanning the skeletons, it now
8336 processes the output of m4: `__oline__' and `#output'.
8337 * data/bison.simple: Adjust to be used by M4(sugar).
8338 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
8339 to date.
8340 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
8341 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
8342 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
8343 shamelessly stolen from CVS Autoconf.
8344
8345 2002-02-05 Akim Demaille <akim@epita.fr>
8346
8347 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
8348 * configure.in: Check for the declarations of free and malloc.
8349 * src/muscle_tab.c: Adjust.
8350
8351 2002-02-05 Akim Demaille <akim@epita.fr>
8352
8353 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
8354 which have no values.
8355
8356 2002-02-05 Akim Demaille <akim@epita.fr>
8357
8358 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
8359 * data/: here.
8360
8361 2002-01-29 Paul Eggert <eggert@twinsun.com>
8362
8363 * src/bison.simple (YYSIZE_T): Do not define merely because
8364 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
8365 On some platforms, <alloca.h> does not declare YYSTD (size_t).
8366
8367 2002-01-27 Akim Demaille <akim@epita.fr>
8368
8369 Fix `%nonassoc and eof'.
8370
8371 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
8372 which were not properly copied! Replace
8373 memcpy (res->errs, src->errs, src->nerrs);
8374 with
8375 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
8376 !!!
8377 * tests/regression.at (%nonassoc and eof): Adjust to newest
8378 Autotest: `.' is not in the PATH.
8379
8380 2002-01-27 Akim Demaille <akim@epita.fr>
8381
8382 * tests/sets.at (AT_EXTRACT_SETS): New.
8383 (Nullable): Use it.
8384 (Firsts): New.
8385
8386 2002-01-26 Akim Demaille <akim@epita.fr>
8387
8388 * tests/actions.at, tests/calc.at, tests/headers.at,
8389 * tests/torture.at: Adjust to the newest Autotest which no longer
8390 forces `.' in the PATH.
8391
8392 2002-01-25 Akim Demaille <akim@epita.fr>
8393
8394 * tests/regression.at (%nonassoc and eof): New.
8395 Suggested by Robert Anisko.
8396
8397 2002-01-24 Akim Demaille <akim@epita.fr>
8398
8399 Bison dumps core when trying to complain about broken input files.
8400 Reported by Cris van Pelt.
8401
8402 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
8403 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
8404 into...
8405 (Invalid inputs): Strengthen: exercise parse_percent_token.
8406
8407 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
8408
8409 * src/Makefile.am: Add bison.c++.
8410 * src/bison.c++: New skeleton.
8411
8412 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
8413
8414 * po/it.po: New.
8415
8416 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
8417
8418 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
8419
8420 2002-01-20 Marc Autret <marc@gnu.org>
8421
8422 * src/files.c (compute_output_file_names): Fix
8423
8424 2002-01-20 Marc Autret <marc@gnu.org>
8425
8426 * tests/output.at: New test.
8427 * src/files.c (compute_base_names): Don't map extensions when
8428 the YACC flag is set, use defaults.
8429 Reported by Evgeny Stambulchik.
8430
8431 2002-01-20 Marc Autret <marc@gnu.org>
8432
8433 * src/system.h: Need to define __attribute__ away for non-GCC
8434 compilers as well (i.e. the vendor C compiler).
8435 Suggested by Albert Chin-A-Young.
8436
8437 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
8438
8439 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
8440 canonical definition.
8441 * src/system.h: Use the canonical definition for PARAMS (avoids
8442 a conflict with the macro from lib/hash.h).
8443
8444 2002-01-11 Akim Demaille <akim@epita.fr>
8445
8446 * configure.in: Use AC_FUNC_STRNLEN.
8447 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
8448
8449 2002-01-09 Akim Demaille <akim@epita.fr>
8450
8451 * src/files.c, src/files.h (output_infix): New.
8452 (tab_extension): Remove.
8453 (compute_base_names): Compute the former, drop the latter.
8454 * src/output.c (prepare): Insert the muscles `output-infix', and
8455 `output-suffix'.
8456 * src/parse-skel.y (string, string.1): New.
8457 (section.header): Use it.
8458 (section.yacc): Remove.
8459 (prefix): Remove too.
8460 * src/scan-skel.l: Adjust.
8461 * src/bison.simple, src/bison.hairy: Adjust.
8462
8463 2002-01-09 Akim Demaille <akim@epita.fr>
8464
8465 * configure.in (WERROR_CFLAGS): Compute it.
8466 * src/Makefile.am (CFLAGS): Pass it.
8467 * tests/atlocal.in (CFLAGS): Idem.
8468 * src/files.c: Fix a few warnings.
8469 (get_extension_index): Remove, unused.
8470
8471 2002-01-08 Akim Demaille <akim@epita.fr>
8472
8473 * src/getargs.c (AS_FILE_NAME): New.
8474 (getargs): Use it to convert DOSish file names.
8475 * src/files.c (base_name): Rename as full_base_name to avoid
8476 clashes with `base_name ()'.
8477 (filename_split): New.
8478 (compute_base_names): N-th rewrite, using filename_split.
8479
8480 2002-01-08 Akim Demaille <akim@epita.fr>
8481
8482 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
8483 New, stolen from the Fileutils 4.1.
8484 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8485 * configure.in: Check for the presence of memrchr, and of its
8486 prototype.
8487
8488 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
8489
8490 * lib/hash.h (__P): Added definition for this macro.
8491 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
8492 BUILT_SOURCES, to ensure they are generated first.
8493 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
8494 %error-verbose to allow bootstrapping with bison 1.30x.
8495
8496 2002-01-06 Akim Demaille <akim@epita.fr>
8497
8498 * src/reader.c (parse_braces): Don't fetch the next char, the
8499 convention is to fetch on entry.
8500 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
8501 'switch' without a following semicolon.
8502 * tests/regression.at (braces parsing): New.
8503
8504 2002-01-06 Akim Demaille <akim@epita.fr>
8505
8506 Bison is dead wrong in its RR conflict reports.
8507
8508 * tests/torture.at (GNU Cim Grammar): New.
8509 * src/conflicts.c (count_rr_conflicts): Fix.
8510
8511 2002-01-06 Akim Demaille <akim@epita.fr>
8512
8513 Creating package.m4 from configure.ac causes too many problems.
8514
8515 * tests/Makefile.am (package.m4): Create it by hand,
8516 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
8517
8518 2002-01-06 Akim Demaille <akim@epita.fr>
8519
8520 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
8521 skeleton.h.
8522
8523 2002-01-04 Paul Eggert <eggert@twinsun.com>
8524
8525 * doc/bison.texinfo (Debugging):
8526 Remove YYSTDERR; it's no longer defined or used.
8527 Also, s/cstdio.h/cstdio/.
8528
8529 2002-01-03 Akim Demaille <akim@epita.fr>
8530
8531 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
8532
8533 2002-01-03 Akim Demaille <akim@epita.fr>
8534
8535 * src/parse-skel.y (process_skeleton): Don't bind the parser's
8536 tracing code to --trace, wait for a better --trace option, with
8537 args.
8538
8539 2002-01-03 Akim Demaille <akim@epita.fr>
8540
8541 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
8542 The ISO C++ standard is extremely clear about it: stderr is
8543 considered a macro, not a regular symbol (see table 94 `Header
8544 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
8545 Therefore std:: does not apply to it. It still does with fprintf.
8546 Also, s/cstdio.h/cstdio/.
8547
8548 2002-01-03 Akim Demaille <akim@epita.fr>
8549
8550 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
8551 for non system headers.
8552
8553 2002-01-02 Akim Demaille <akim@epita.fr>
8554
8555 Equip the skeleton chain with location tracking, runtime trace,
8556 pure parser and scanner.
8557
8558 * src/parse-skel.y: Request a pure parser, locations, and prefix
8559 renaming.
8560 (%union): Having several members with the same type does not help
8561 type mismatches, simplify.
8562 (YYPRINT, yyprint): New.
8563 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
8564 (skel_error): this.
8565 Handle locations.
8566 * src/scan-skel.l: Adjust to these changes.
8567 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
8568 (LOCATION_PRINT, skel_control_t): New.
8569
8570 2001-12-30 Akim Demaille <akim@epita.fr>
8571
8572 * src/parse-skel.y: Get rid of the shift/reduce conflict:
8573 replace `gb' with BLANKS.
8574 * src/scan-skel.l: Adjust.
8575
8576 2001-12-30 Akim Demaille <akim@epita.fr>
8577
8578 * src/system.h: We don't need nor want bcopy.
8579 Throw away MS-DOS crap: we don't need getpid.
8580 * configure.in: We don't need strndup. It was even causing
8581 problems: because Flex includes the headers *before* us,
8582 _GNU_SOURCE is not defined by config.h, and therefore strndup was
8583 not visible.
8584 * lib/xstrndup.c: New.
8585 * src/scan-skel.l: Use it.
8586 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
8587 * src/parse-skel.y: Use %directives instead of #defines.
8588
8589 2001-12-30 Akim Demaille <akim@epita.fr>
8590
8591 * src/skeleton.h: New.
8592 * src/output.c (output_parser, output_master_parser): Remove, dead
8593 code.
8594 * src/output.h (get_lines_number, actions_output, guards_output)
8595 (token_definitions_output): Prototype them.
8596 * src/parse-skel.y: Add the license notice.
8597 Include output.h and skeleton.h.
8598 (process_skeleton): Returns void, and takes a single parameter.
8599 * src/scan-skel.l: Add the license notice.
8600 Include skeleton.h.
8601 Don't use %option yylineno: it seems that then Flex imagines
8602 REJECT has been used, and therefore it won't reallocate its
8603 buffers (which makes no other sense to me than a bug). It results
8604 in warnings for `unused: yy_flex_realloc'.
8605
8606 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
8607
8608 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
8609 (MUSCLE_INSERT_PREFIX): ...to there.
8610 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
8611 (MUSCLE_INSERT_PREFIX): Move from here...
8612
8613 * src/bison.hairy: Add a section directive. Put braces around muscle
8614 names. This parser skeleton is still broken, but Bison should not
8615 choke on a bad muscle 'syntax'.
8616 * src/bison.simple: Add a section directive. Put braces around muscle
8617 names.
8618
8619 * src/files.h (strsuffix, stringappend): Add declarations.
8620 (tab_extension): Add declaration.
8621 (short_base_name): Add declaration.
8622
8623 * src/files.c (strsuffix, stringappend): No longer static. These
8624 functions are used in the skeleton parser.
8625 (tab_extension): New.
8626 (compute_base_names): Use the computations done in this function
8627 to guess if the generated parsers should have '.tab' in their
8628 names.
8629 (short_base_name): No longer static.
8630
8631 * src/output.c (output_skeleton): New.
8632 (output): Disable call to output_master_parser, and give a try to
8633 a new skeleton handling system.
8634 (guards_output, actions_output): No longer static.
8635 (token_definitions_output, get_lines_number): No longer static.
8636
8637 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
8638
8639 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
8640 parse-skel.y.
8641
8642 * src/parse-skel.y: New file.
8643 * src/scan-skel.l: New file.
8644
8645 2001-12-29 Akim Demaille <akim@epita.fr>
8646
8647 %name-prefix is broken.
8648
8649 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
8650 Adjust all dependencies.
8651 * tests/headers.at (export YYLTYPE): Strengthen this test: use
8652 %name-prefix.
8653
8654 Renaming yylval but not yylloc is not consistent. Now we do.
8655
8656 * src/bison.simple: Prefix yylloc if used.
8657 * doc/bison.texinfo (Decl Summary): Document that.
8658
8659 2001-12-29 Akim Demaille <akim@epita.fr>
8660
8661 * doc/bison.texinfo: Promote `%long-directive' over
8662 `%long_directive'.
8663 Remove all references to fixed-output-files, yacc is enough.
8664
8665 2001-12-29 Akim Demaille <akim@epita.fr>
8666
8667 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
8668 user prologue. These are defaults.
8669 * tests/actions.at (Mid-rule actions): Make sure the user can
8670 define YYDEBUG and YYERROR_VERBOSE.
8671
8672 2001-12-29 Akim Demaille <akim@epita.fr>
8673
8674 * src/output.c (header_output): Don't forget to export YYLTYPE and
8675 yylloc.
8676 * tests/headers.at (export YYLTYPE): New, make sure it does.
8677 * tests/regression.at (%union and --defines, Invalid CPP headers):
8678 Move to...
8679 * tests/headers.at: here.
8680
8681 2001-12-29 Akim Demaille <akim@epita.fr>
8682
8683 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
8684
8685 2001-12-29 Akim Demaille <akim@epita.fr>
8686
8687 * tests/actions.at (Mid-rule actions): Output on a single line
8688 instead of several.
8689
8690 2001-12-29 Akim Demaille <akim@epita.fr>
8691
8692 * doc/bison.texinfo: Formatting changes.
8693
8694 2001-12-29 Akim Demaille <akim@epita.fr>
8695
8696 Don't store the token defs in a muscle, just be ready to output it
8697 on command. Now possible via `symbols'. Fixes a memory leak.
8698
8699 * src/output.c (token_definitions_output): New.
8700 (output_parser, header_output): Use it.
8701 * src/reader.c (symbols_save): Remove.
8702
8703 2001-12-29 Akim Demaille <akim@epita.fr>
8704
8705 * src/bison.simple: Do not provide a default for YYSTYPE and
8706 YYLTYPE before the user's prologue. Otherwise it's hardly... a
8707 default.
8708
8709 2001-12-29 Akim Demaille <akim@epita.fr>
8710
8711 Mid-rule actions are simply... ignored!
8712
8713 * src/reader.c (readgram): Be sure to attach mid-rule actions to
8714 the empty-rule associated to the dummy symbol, not to the host
8715 rule.
8716 * tests/actions.at (Mid-rule actions): New.
8717
8718 2001-12-29 Akim Demaille <akim@epita.fr>
8719
8720 Memory leak.
8721
8722 * src/reader.c (reader): Free grammar.
8723
8724 2001-12-29 Akim Demaille <akim@epita.fr>
8725
8726 Memory leak.
8727
8728 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
8729 since it allocates it for each state, although only one is needed.
8730 (allocate_storage): Do it here.
8731
8732 2001-12-29 Akim Demaille <akim@epita.fr>
8733
8734 * src/options.h, src/options.c (create_long_option_table): Rename
8735 as...
8736 (long_option_table_new): this, with a clearer prototype.
8737 (percent_table): Remove, unused,
8738 * src/getargs.c (getargs): Adjust.
8739
8740 2001-12-29 Akim Demaille <akim@epita.fr>
8741
8742 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
8743 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
8744 as states.
8745
8746 2001-12-29 Akim Demaille <akim@epita.fr>
8747
8748 * src/lalr.c (build_relations): Rename `states' as `states1'.
8749 Sorry, I don't understand exactly what it is, no better name...
8750
8751 2001-12-29 Akim Demaille <akim@epita.fr>
8752
8753 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
8754 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
8755 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
8756 as rules.
8757
8758 2001-12-29 Akim Demaille <akim@epita.fr>
8759
8760 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
8761 ago.
8762
8763 2001-12-29 Akim Demaille <akim@epita.fr>
8764
8765 * src/reader.c, src/reader.h (user_toknums): Remove.
8766 Adjust all users to use symbols[i]->user_token_number.
8767
8768 2001-12-29 Akim Demaille <akim@epita.fr>
8769
8770 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
8771 Adjust all users to use symbols[i]->prec or ->assoc.
8772
8773 2001-12-29 Akim Demaille <akim@epita.fr>
8774
8775 * src/reader.c, src/reader.h (tags): Remove.
8776 Adjust all users to use symbols[i]->tag.
8777
8778 2001-12-29 Akim Demaille <akim@epita.fr>
8779
8780 * src/gram.h, src/gram.c (symbols): New, similar to state_table
8781 and rule_table.
8782 * src/reader.c (packsymbols): Fill this table.
8783 Drop sprec.
8784 * src/conflicts.c (resolve_sr_conflict): Adjust.
8785 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
8786 single table.
8787 Use symbols[i]->tag instead of tags[i].
8788
8789 2001-12-29 Akim Demaille <akim@epita.fr>
8790
8791 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
8792 In addition, put a comment in there, to replace...
8793 * tests/regression.at (%union and C comments): Remove.
8794
8795 2001-12-29 Akim Demaille <akim@epita.fr>
8796
8797 * tests/regression.at (Web2c Actions): Blindly move the actual
8798 output as expected output. The contents *seem* right to me, but I
8799 can't pretend reading perfectly parser tables... Nonetheless, all
8800 the other tests pass correctly, the table look OK, even though the
8801 presence of `$axiom' is to be noted: AFAICS it is useless (but
8802 harmless).
8803
8804 2001-12-29 Akim Demaille <akim@epita.fr>
8805
8806 * src/reader.c (readgram): Don't add the rule 0 if there were no
8807 rules read. In other words, add it _after_ having performed
8808 grammar sanity checks.
8809 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
8810
8811 2001-12-29 Akim Demaille <akim@epita.fr>
8812
8813 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
8814 visible, and some states have now a different number.
8815
8816 2001-12-29 Akim Demaille <akim@epita.fr>
8817
8818 * src/reader.c (readgram): Bind the initial rule's lineno to that
8819 of the first rule.
8820 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
8821 (Solved SR Conflicts): Adjust rule 0's line number.
8822
8823 2001-12-29 Akim Demaille <akim@epita.fr>
8824
8825 Fix the `GAWK Grammar' failure.
8826
8827 * src/LR0.c (final_state): Initialize to -1 so that we do compute
8828 the reductions of the first state which was mistakenly confused
8829 with the final state because precisely final_state was initialized
8830 to 0.
8831 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
8832 now noticed by Bison.
8833 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
8834 have a reduction on $default.
8835
8836 2001-12-29 Akim Demaille <akim@epita.fr>
8837
8838 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
8839 rule line numbers.
8840 * src/closure.c (print_closure): Likewise.
8841 * src/derives.c (print_derives): Likewise.
8842 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
8843 now.
8844
8845 2001-12-29 Akim Demaille <akim@epita.fr>
8846
8847 * src/lalr.c (lookaheads_print): New.
8848 (lalr): Call it when --trace-flag.
8849 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
8850 are dumped.
8851
8852 2001-12-29 Akim Demaille <akim@epita.fr>
8853
8854 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
8855 when walking through ritem, even via rule->rhs.
8856 * src/reduce.c (dump_grammar, useful_production, reduce_output)
8857 (useful_production, useless_nonterminals): Likewise.
8858 (reduce_grammar_tables): Likewise, plus update nritems.
8859 * src/nullable.c (set_nullable): Likewise.
8860 * src/lalr.c (build_relations): Likewise.
8861 * tests/sets.at (Nullable): Adjust.
8862 Fortunately, now, the $axiom is no longer nullable.
8863
8864 2001-12-29 Akim Demaille <akim@epita.fr>
8865
8866 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
8867 the 0-sentinel.
8868 * src/gram.c (ritem_longest_rhs): Likewise.
8869 * src/reduce.c (nonterminals_reduce): Likewise.
8870 * src/print_graph.c (print_graph): Likewise.
8871 * src/output.c (output_rule_data): Likewise.
8872 * src/nullable.c (set_nullable): Likewise.
8873
8874 2001-12-29 Akim Demaille <akim@epita.fr>
8875
8876 * src/output.c: Comment changes.
8877
8878 2001-12-27 Paul Eggert <eggert@twinsun.com>
8879
8880 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
8881 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
8882 Sparc, as they were causing more porting problems than the
8883 (minor) performance improvement was worth.
8884
8885 Also, catch up with 1.31's YYSTD.
8886
8887 2001-12-27 Akim Demaille <akim@epita.fr>
8888
8889 * src/output.c (output_gram): Rely on nritems, not the
8890 0-sentinel. See below.
8891 Use -1 as separator, not 0.
8892 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
8893 Rely on -1 as separator in yyrhs, instead of 0.
8894 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
8895 twice `Now at end of input', therefore there are two lines less to
8896 expect.
8897
8898 2001-12-27 Akim Demaille <akim@epita.fr>
8899
8900 * tests/regression.at (Unresolved SR Conflicts):
8901 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
8902 below.
8903
8904 2001-12-27 Akim Demaille <akim@epita.fr>
8905
8906 * src/LR0.c (new_state): Recognize the final state by the fact it
8907 is reached by eoftoken.
8908 (insert_start_shifting_state, insert_eof_shifting_state)
8909 (insert_accepting_state, augment_automaton): Remove, since now
8910 these states are automatically computed from the initial state.
8911 (generate_states): Adjust.
8912 * src/print.c: When reporting a rule number to the user, substract
8913 1, so that the axiom rule is rule 0, and the first user rule is 1.
8914 * src/reduce.c: Likewise.
8915 * src/print_graph.c (print_core): For the time being, just as for
8916 the report, depend upon --trace-flags to dump the full set of
8917 items.
8918 * src/reader.c (readgram): Once the grammar read, insert the rule
8919 0: `$axiom: START-SYMBOL $'.
8920 * tests/set.at: Adjust: rule 0 is now displayed, and since the
8921 number of the states has changed (the final state is no longer
8922 necessarily the last), catch up.
8923
8924 2001-12-27 Akim Demaille <akim@epita.fr>
8925
8926 Try to make the use of the eoftoken valid. Given that its value
8927 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
8928 is used instead of > 0 where appropriate, (ii), depend upon nritems
8929 instead of the 0-sentinel.
8930
8931 * src/gram.h, src/gram.c (nritems): New.
8932 Expected to be duplication of nitems, but for the time being...
8933 * src/reader.c (packgram): Assert nritems and nitems are equal.
8934 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
8935 * src/closure.c (print_closure, print_fderives): Likewise.
8936 * src/gram.c (ritem_print): Likewise.
8937 * src/print.c (print_core, print_grammar): Likewise.
8938 * src/print_graph.c: Likewise.
8939
8940 2001-12-27 Akim Demaille <akim@epita.fr>
8941
8942 * src/main.c (main): If there are complains after grammar
8943 reductions, then output the report anyway if requested, then die.
8944 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
8945 * src/reader.c (eoftoken): New.
8946 (parse_token_decl): If the token being defined has value `0', it
8947 is the eoftoken.
8948 (packsymbols): No longer hack `tags' to insert `$' by hand.
8949 Be sure to preserve the value of the eoftoken.
8950 (reader): Make sure eoftoken is defined.
8951 Initialize nsyms to 0: now eoftoken is created just like the others.
8952 * src/print.c (print_grammar): Don't special case the eof token.
8953 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
8954 lie anyway, albeit pleasant.
8955 * tests/calc.at: Exercise error messages with eoftoken.
8956 Change the grammar so that empty input is invalid.
8957 Adjust expectations.
8958 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
8959
8960 2001-12-27 Akim Demaille <akim@epita.fr>
8961
8962 * configure.in: Check the protos of strchr ans strspn.
8963 Replace strchr if needed.
8964 * src/system.h: Provide the protos of strchr, strspn and memchr if
8965 missing.
8966 * lib/strchr.c: New.
8967 * src/reader.c (symbols_save): Use strchr.
8968
8969 2001-12-27 Akim Demaille <akim@epita.fr>
8970
8971 * src/print.c, src/print_graph.c (escape): New.
8972 Use it to quote the TAGS outputs.
8973 * src/print_graph.c (print_state): Now errors are in red, and
8974 reductions in green.
8975 Prefer high to wide: output the state number on a line of its own.
8976
8977 2001-12-27 Akim Demaille <akim@epita.fr>
8978
8979 * src/state.h, src/state.c (reductions_new): New.
8980 * src/LR0.c (set_state_table): Let all the states have a
8981 `reductions', even if reduced to 0.
8982 (save_reductions): Adjust.
8983 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
8984 * src/print.c (print_reductions, print_actions): Adjust.
8985 * src/output.c (action_row): Adjust.
8986
8987 2001-12-27 Akim Demaille <akim@epita.fr>
8988
8989 * src/state.h, src/state.c (errs_new, errs_dup): New.
8990 * src/LR0.c (set_state_table): Let all the states have an errs,
8991 even if reduced to 0.
8992 * src/print.c (print_errs, print_reductions): Adjust.
8993 * src/output.c (output_actions, action_row): Adjust.
8994 * src/conflicts.c (resolve_sr_conflict): Adjust.
8995
8996 2001-12-27 Akim Demaille <akim@epita.fr>
8997
8998 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
8999
9000 2001-12-27 Akim Demaille <akim@epita.fr>
9001
9002 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
9003 * src/print.c: here.
9004 (lookaheadset, shiftset): New, used as additional storage by
9005 print_reductions.
9006 (print_results): Adjust.
9007 (print_shifts, print_gotos, print_errs): New, extracted from...
9008 (print_actions): here.
9009 * src/print_graph.c (print_actions): Remove dead code.
9010
9011 2001-12-27 Akim Demaille <akim@epita.fr>
9012
9013 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
9014 `$n' and `@n'.
9015
9016 2001-12-27 Akim Demaille <akim@epita.fr>
9017
9018 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
9019 (build_relations): Adjust.
9020
9021 2001-12-27 Akim Demaille <akim@epita.fr>
9022
9023 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
9024 duplication.
9025
9026 2001-12-27 Akim Demaille <akim@epita.fr>
9027
9028 * src/reader.c (packgram): Catch nitems overflows.
9029
9030 2001-12-27 Akim Demaille <akim@epita.fr>
9031
9032 * src/files.c, src/files.h (guard_obstack): Remove.
9033 * src/output.c (output): Adjust.
9034 * src/reader.c (parse_braces): New, factoring...
9035 (copy_action, copy_guard): these two which are renamed as...
9036 (parse_action, parse_guard): these.
9037 As a voluntary consequence, using braces around guards is now
9038 mandatory.
9039
9040 2001-12-27 Akim Demaille <akim@epita.fr>
9041
9042 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
9043 * src/reader.c (symbol_list): `guard' and `guard_line' are new
9044 members.
9045 (symbol_list_new): Adjust.
9046 (copy_action): action_line is the first line, not the last.
9047 (copy_guard): Just as for actions, store the `action' only, not
9048 the switch/case/break flesh.
9049 Don't parse the user action that might follow the guard, let...
9050 (readgram): do it, i.e., now, there can be an action after a
9051 guard.
9052 In other words the guard is just explicitly optional.
9053 (packgram): Adjust.
9054 * src/output.c (guards_output): New.
9055 (output_parser): Call it when needed.
9056 (output): Also free the guard and attrs obstacks.
9057 * src/files.c, src/files.h (obstack_save): Remove.
9058 (output_files): Remove.
9059 As a result, if one needs the former `.act' file, using an
9060 appropriate skeleton which requires actions and guards is now
9061 required.
9062 * src/main.c (main): Adjust.
9063 * tests/semantic.at: New.
9064 * tests/regression.at: Use `input.y' as input file name.
9065 Avoid 8+3 problems by requiring input.c when the test needs the
9066 parser.
9067
9068 2001-12-27 Akim Demaille <akim@epita.fr>
9069
9070 * src/reader.c (symbol_list_new): Be sure to initialize all the
9071 fields.
9072
9073 2001-12-27 Akim Demaille <akim@epita.fr>
9074
9075 All the hacks using a final pseudo state are now useless.
9076
9077 * src/LR0.c (set_state_table): state_table holds exactly nstates.
9078 * src/lalr.c (nLA): New.
9079 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
9080 instead of lookaheadsp from the pseudo state (nstate + 1).
9081
9082 2001-12-27 Akim Demaille <akim@epita.fr>
9083
9084 * src/output.c (action_row, token_actions): Use a state_t instead
9085 of a integer, and nlookaheads instead of the following state's
9086 lookaheadsp.
9087
9088 2001-12-27 Akim Demaille <akim@epita.fr>
9089
9090 * src/conflicts.c (log_resolution, flush_shift)
9091 (resolve_sr_conflict, set_conflicts, solve_conflicts)
9092 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
9093 (conflicts_print, print_reductions): Use a state_t instead of an
9094 integer when referring to a state.
9095 As much as possible, depend upon nlookaheads, instead of the
9096 `lookaheadsp' member of the following state (since lookaheads of
9097 successive states are successive, the difference between state n + 1
9098 and n served as the number of lookaheads for state n).
9099 * src/lalr.c (add_lookback_edge): Likewise.
9100 * src/print.c (print_core, print_actions, print_state)
9101 (print_results): Likewise.
9102 * src/print_graph.c (print_core, print_actions, print_state)
9103 (print_graph): Likewise.
9104 * src/conflicts.h: Adjust.
9105
9106 2001-12-27 Akim Demaille <akim@epita.fr>
9107
9108 * src/bison.hairy: Formatting/comment changes.
9109 ANSIfy.
9110 Remove `register' indications.
9111 Add plenty of `static'.
9112
9113 2001-12-27 Akim Demaille <akim@epita.fr>
9114
9115 * src/output.c (prepare): Drop the muscle `ntbase' which
9116 duplicates ntokens.
9117 * src/bison.simple: Formatting/comment changes.
9118 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
9119 is an undocumented synonym.
9120
9121 2001-12-22 Akim Demaille <akim@epita.fr>
9122
9123 * src/output.c (output_table_data): Change the prototype to use
9124 `int' for array ranges: some invocations do pass an int, not a
9125 short.
9126 Reported by Wayne Green.
9127
9128 2001-12-22 Akim Demaille <akim@epita.fr>
9129
9130 Some actions of web2c.y are improperly triggered.
9131 Reported by Mike Castle.
9132
9133 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
9134 * tests/regression.at (Web2c): Rename as...
9135 (Web2c Report): this.
9136 (Web2c Actions): New.
9137
9138 2001-12-22 Akim Demaille <akim@epita.fr>
9139
9140 Reductions in web2c.y are improperly reported.
9141 Reported by Mike Castle.
9142
9143 * src/conflicts.c (print_reductions): Fix.
9144 * tests/regression.at (Web2c): New.
9145
9146 2001-12-18 Akim Demaille <akim@epita.fr>
9147
9148 Some host fail on `assert (!"foo")', which expands to
9149 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
9150 Reported by Nelson Beebee.
9151
9152 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
9153 `#define it_succeeded 0' and `assert (it_succeeded)'.
9154
9155 2001-12-17 Marc Autret <autret_m@epita.fr>
9156
9157 * src/bison.simple: Don't hard code the skeleton line and filename.
9158 * src/output.c (output_parser): Rename 'line' as 'output_line'.
9159 New line counter 'skeleton_line' (skeleton-line muscle).
9160
9161 2001-12-17 Paul Eggert <eggert@twinsun.com>
9162
9163 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
9164 YYDEBUG must be defined to a nonzero value.
9165
9166 * src/bison.simple (yytname): Do not assume that the user defines
9167 YYDEBUG to a properly parenthesized expression.
9168
9169 2001-12-17 Akim Demaille <akim@epita.fr>
9170
9171 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
9172 nlookaheads is a new member.
9173 Adjust all users.
9174 * src/lalr.h (nlookaheads): Remove this orphan declaration.
9175 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
9176 state.
9177
9178 2001-12-17 Akim Demaille <akim@epita.fr>
9179
9180 * src/files.h, src/files.c (open_files, close_files): Remove.
9181 * src/main.c (main): Don't open/close files, nor invoke lex_free,
9182 let...
9183 * src/reader.c (reader): Do it.
9184
9185 2001-12-17 Akim Demaille <akim@epita.fr>
9186
9187 * src/conflicts.c (print_reductions): Formatting changes.
9188
9189 2001-12-17 Akim Demaille <akim@epita.fr>
9190
9191 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
9192 (flush_reduce): New.
9193 (resolve_sr_conflict): Adjust.
9194
9195 2001-12-17 Akim Demaille <akim@epita.fr>
9196
9197 * src/output.c (output_obstack): Be static and rename as...
9198 (format_obstack): this, to avoid any confusion with files.c's
9199 output_obstack.
9200 * src/reader.h (muscle_obstack): Move to...
9201 * src/output.h: here, since it's defined in output.c.
9202
9203 2001-12-17 Akim Demaille <akim@epita.fr>
9204
9205 * src/output.c (action_row, save_column, default_goto)
9206 (sort_actions, matching_state, pack_vector): Better variable
9207 locality.
9208
9209 2001-12-17 Akim Demaille <akim@epita.fr>
9210
9211 * src/output.c: Various formatting changes.
9212
9213 2001-12-17 Akim Demaille <akim@epita.fr>
9214
9215 * src/files.c (output_files): Free the output_obstack.
9216 * src/main.c (main): Call print and print_graph conditionally.
9217 * src/print.c (print): Work unconditionally.
9218 * src/print_graph.c (print_graph): Work unconditionally.
9219 * src/conflicts.c (log_resolution): Output only if verbose_flag.
9220
9221 2001-12-16 Marc Autret <autret_m@epita.fr>
9222
9223 * src/output.c (actions_output): Fix. When we use %no-lines,
9224 there is one less line per action.
9225
9226 2001-12-16 Marc Autret <autret_m@epita.fr>
9227
9228 * src/bison.simple: Remove a useless #line directive.
9229 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
9230 * src/output.c (get_lines_number): New.
9231 (output_parser): Adjust, now takes care about the lines of a
9232 output muscles.
9233 Fix line numbering.
9234 (actions_output): Computes the number of lines taken by actions.
9235 (output_master_parser): Insert new skeleton which is the name of
9236 the output parser file name.
9237
9238 2001-12-15 Marc Autret <autret_m@epita.fr>
9239
9240 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
9241
9242 2001-12-15 Marc Autret <autret_m@epita.fr>
9243
9244 * src/output.c (output_gram): Keep track of the hairy one.
9245
9246 2001-12-15 Akim Demaille <akim@epita.fr>
9247
9248 Make `make distcheck' work.
9249
9250 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
9251 system.h which uses libgettext.h.
9252
9253 2001-12-15 Akim Demaille <akim@epita.fr>
9254
9255 * src/nullable.c (set_nullable): Useless rules must be skipped,
9256 otherwise, since we range over their symbols, we might look at a
9257 nonterminal which no longer ``exists'', i.e., it is not counted in
9258 `nvars', hence we overflow our arrays.
9259
9260 2001-12-15 Akim Demaille <akim@epita.fr>
9261
9262 The header can also be produced directly, without any obstack!
9263 Yahoo!
9264
9265 * src/files.c, src/files.h (defines_obstack): Remove.
9266 (compute_header_macro): Global.
9267 (defines_obstack_save): Remove.
9268 * src/reader.c (parse_union_decl): No longer output to
9269 defines_obstack: its content can be found in the `stype' muscle
9270 anyway.
9271 (output_token_translations): Merge into...
9272 (symbols_output): this.
9273 Rename as...
9274 (symbols_save): this.
9275 (reader): Adjust.
9276 * src/output.c (header_output): New.
9277 (output): Call it.
9278
9279 2001-12-15 Akim Demaille <akim@epita.fr>
9280
9281 * src/reader.c (parse_union_decl): Instead of handling two obstack
9282 simultaneously, use one to define the `stype' muscle, and use the
9283 value of the latter to fill defines_obstack.
9284 (copy_comment): Remove.
9285 (copy_comment2): Work for a single obstack.
9286 Rename as...
9287 (copy_comment): this.
9288
9289 2001-12-15 Akim Demaille <akim@epita.fr>
9290
9291 * src/lex.c, src/lex.h (xgetc): No longer static.
9292 * src/reader.c (parse_union_decl): Revamp.
9293
9294 2001-12-15 Akim Demaille <akim@epita.fr>
9295
9296 Still making progress in separating Bison into (i) input, (ii)
9297 process, (iii) output: now we can directly output the parser file
9298 without using table_obstack at all.
9299
9300 * src/files.c, src/files.h (table_obstack): Bye bye.
9301 (parser_file_name): New.
9302 * src/files.c (compute_output_file_names): Compute it.
9303 * src/output.c (actions_output, output_parser)
9304 (output_master_parser): To a file instead of an obstack.
9305
9306 2001-12-15 Akim Demaille <akim@epita.fr>
9307
9308 Attach actions to rules, instead of pre-outputting them to
9309 actions_obstack.
9310
9311 * src/gram.h (rule_t): action and action_line are new members.
9312 * src/reader.c (symbol_list): Likewise.
9313 (copy_action): Save the actions within the rule.
9314 (packgram): Save them in rule_table.
9315 * src/output.c (actions_output): New.
9316 (output_parser): Use it on `%%actions'.
9317 (output_rule_data): Don't free rule_table.
9318 (output): Do it.
9319 (prepare): Don't save the `action' muscle.
9320 * src/bison.simple: s/%%action/%%actions/.
9321
9322 2001-12-15 Akim Demaille <akim@epita.fr>
9323
9324 * src/reader.c (copy_action): When --yacc, don't append a `;'
9325 to the user action: let it fail if lacking.
9326 Suggested by Arnold Robbins and Tom Tromey.
9327
9328 2001-12-14 Akim Demaille <akim@epita.fr>
9329
9330 * src/lex.c (literalchar): Simply return the char you decoded, non
9331 longer mess around with obstacks and int pointers.
9332 Adjust all callers.
9333
9334 2001-12-14 Akim Demaille <akim@epita.fr>
9335
9336 * src/lex.c (literalchar): Don't escape the special characters,
9337 just decode them, and keep them as char (before, eol was output as
9338 the 2 char string `\n' etc.).
9339 * src/output.c (output_rule_data): Use quotearg to output the
9340 token strings.
9341
9342 2001-12-13 Paul Eggert <eggert@twinsun.com>
9343
9344 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
9345 Do not infringe on the global user namespace when using C++.
9346 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
9347 All uses of `fprintf' and `stderr' changed.
9348
9349 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
9350
9351 2001-12-13 Akim Demaille <akim@epita.fr>
9352
9353 The computation of nullable is broken: it doesn't handle empty
9354 RHS's properly.
9355
9356 * tests/torture.at (GNU AWK Grammar): New.
9357 * tests/sets.at (Nullable): New.
9358 * src/nullable.c (set_nullable): Instead of blindly looping over
9359 `ritems', loop over the rules, and then over their rhs's.
9360
9361 Work around Autotest bugs.
9362
9363 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
9364 frame, because Autotest understand lines starting with a `+' as
9365 traces from the shell. Then, they are not processed properly.
9366 Admittedly an Autotest bug, but we don't have time to wait for
9367 Autotest to catch up.
9368 * tests/regression.at (Broken Closure): Adjust to the new table
9369 frames.
9370 Move to...
9371 * tests/sets.at: here.
9372
9373 2001-12-13 Akim Demaille <akim@epita.fr>
9374
9375 * src/closure.c (closure): Use nrules instead of playing tricks
9376 with BITS_PER_WORD.
9377
9378 2001-12-13 Akim Demaille <akim@epita.fr>
9379
9380 * src/print.c (print_actions): Output the handling of `$' as the
9381 traces do: shifting the token EOF. Before EOF was treated as a
9382 nonterminal.
9383 * tests/regression.at: Adjust some tests.
9384 * src/print_graph.c (print_core): Complete the set of items via
9385 closure. The next-to-final and final states are still unsatisfying,
9386 but that's to be addressed elsewhere.
9387 No longer output the rule numbers, but do output the state number.
9388 A single loop for the shifts + gotos is enough, but picked a
9389 distinct color for each.
9390 (print_graph): Initialize and finalize closure.
9391
9392 2001-12-13 Akim Demaille <akim@epita.fr>
9393
9394 * src/reader.c (readgram): Remove dead code, an strip useless
9395 braces.
9396 (get_type): Remove, unused.
9397
9398 2001-12-12 Akim Demaille <akim@epita.fr>
9399
9400 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
9401 on that of lib/error.c.
9402
9403 2001-12-12 Akim Demaille <akim@epita.fr>
9404
9405 Some hosts don't like `/' in includes.
9406
9407 * src/system.h: Include libgettext.h without qualifying the path.
9408 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
9409 $(top_srcdir).
9410
9411 2001-12-11 Marc Autret <autret_m@epita.fr>
9412
9413 * src/output.c (output_parser): Remove useless muscle.
9414
9415 2001-12-11 Marc Autret <autret_m@epita.fr>
9416
9417 * src/bison.simple: Remove #line just before %%epilogue. It
9418 is now handled in ...
9419 * src/reader.c (read_additionnal_code): Add the output of a
9420 #line for the epilogue.
9421
9422 2001-12-10 Marc Autret <autret_m@epita.fr>
9423
9424 * src/reader.c (copy_definition): Re-use CPP-outed code which
9425 replace precedent remove.
9426 * src/bison.simple: Remove #line before %%prologue because
9427 %%input-line is wrong at this time.
9428
9429 2001-12-10 Marc Autret <autret_m@epita.fr>
9430
9431 * src/reader.c (symbols_output): Clean up.
9432 * src/output.c (output_gram, output): Clean up.
9433
9434 2001-12-10 Akim Demaille <akim@epita.fr>
9435
9436 * src/lalr.c (initialize_lookaheads): New. Extracted from...
9437 * src/LR0.c (set_state_table): here.
9438 * src/lalr.c (lalr): Call it.
9439
9440 2001-12-10 Akim Demaille <akim@epita.fr>
9441
9442 * src/state.h (shifts): Remove the `number' member: shifts are
9443 attached to state, hence no longer need to be labelled with a
9444 state number.
9445
9446 2001-12-10 Akim Demaille <akim@epita.fr>
9447
9448 Now that states have a complete set of members, the linked list of
9449 shifts is useless: just fill directly the state's shifts member.
9450
9451 * src/state.h (shifts): Remove the `next' member.
9452 * src/LR0.c (first_state, last_state): Remove.
9453 Adjust the callers.
9454 (augment_automaton): Don't look for the shifts that must be added
9455 a shift on EOF: it is those of the state we looked for! But now,
9456 since shifts are attached, it is no longer needed to looking
9457 merely by its id: its number.
9458
9459 2001-12-10 Akim Demaille <akim@epita.fr>
9460
9461 * src/LR0.c (augment_automaton): Better variable locality.
9462 Remove an impossible branch: if there is a state corresponding to
9463 the start symbol being shifted, then there is shift for the start
9464 symbol from the initial state.
9465
9466 2001-12-10 Akim Demaille <akim@epita.fr>
9467
9468 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
9469 only when appropriate: when insert_start_shifting_state' is not
9470 invoked.
9471 * tests/regression.at (Rule Line Numbers): Adjust.
9472
9473 2001-12-10 Akim Demaille <akim@epita.fr>
9474
9475 * src/LR0.c (augment_automaton): Now that all states have shifts,
9476 merge the two cases addition shifts to the initial state.
9477
9478 2001-12-10 Akim Demaille <akim@epita.fr>
9479
9480 * src/lalr.c (set_state_table): Move to...
9481 * src/LR0.c: here.
9482 * src/lalr.c (lalr): Don't call it...
9483 * src/LR0.c (generate_states): do it.
9484 * src/LR0.h (first_state): Remove, only the table is used.
9485
9486 2001-12-10 Akim Demaille <akim@epita.fr>
9487
9488 * src/LR0.h (first_shift, first_reduction): Remove.
9489 * src/lalr.c: Don't use first_shift: find shifts through the
9490 states.
9491
9492 2001-12-10 Akim Demaille <akim@epita.fr>
9493
9494 * src/LR0.c: Attach shifts to states as soon as they are
9495 computed.
9496 * src/lalr.c (set_state_table): Instead of assigning shifts to
9497 state, just assert that the mapping was properly done.
9498
9499 2001-12-10 Akim Demaille <akim@epita.fr>
9500
9501 * src/LR0.c (insert_start_shift): Rename as...
9502 (insert_start_shifting_state): this.
9503 (insert_eof_shifting_state, insert_accepting_state): New.
9504 (augment_automaton): Adjust.
9505 Better locality of the variables.
9506 When looking if the start_symbol is shifted from the initial
9507 state, using `while (... symbol != start_symbol ...)' sounds
9508 better than `while (... symbol < start_symbol ...)': If fail
9509 to see how the order between symbols could be relevant!
9510
9511 2001-12-10 Akim Demaille <akim@epita.fr>
9512
9513 * src/getargs.h: Don't declare `spec_name_prefix' and
9514 `spec_file_prefix', declared by src/files.h.
9515 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
9516 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
9517 * src/output.c (prepare): Adjust.
9518 * src/reader.c (symbols_output): Likewise.
9519 * src/vmsgetargs.c: Vaguely adjust, but who cares?
9520
9521 2001-12-10 Akim Demaille <akim@epita.fr>
9522
9523 * src/muscle_tab.c (muscle_init): NULL is a better default than
9524 `"0"'.
9525
9526 2001-12-10 Akim Demaille <akim@epita.fr>
9527
9528 * src/reader.c (reader): Calling symbols_output once is enough.
9529
9530 2001-12-10 Akim Demaille <akim@epita.fr>
9531
9532 Now that states have a complete set of members, the linked list of
9533 reductions is useless: just fill directly the state's reductions
9534 member.
9535
9536 * src/state.h (struct reductions): Remove member `number' and
9537 `next'.
9538 * src/LR0.c (first_reduction, last_reduction): Remove.
9539 (save_reductions): Don't link the new reductions, store them in
9540 this_state.
9541 * src/lalr.c (set_state_table): No need to attach reductions to
9542 states, it's already done.
9543 * src/output.c (output_actions): No longer free the shifts, then
9544 the reductions, then the states: free all the states and their
9545 members.
9546
9547 2001-12-10 Akim Demaille <akim@epita.fr>
9548
9549 * src/options.c (OPTN, DRTV, BOTH): New.
9550 (option_table): Use them.
9551
9552 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
9553 the job of system.h.
9554 * src/options.c: Don't include stdio.h and xalloc.h for the same
9555 reasons.
9556
9557 2001-12-10 Akim Demaille <akim@epita.fr>
9558
9559 * src/output.c (output, prepare): Make sure the values of the
9560 muscles `action' and `prologue' are 0-terminated.
9561
9562 2001-12-10 Akim Demaille <akim@epita.fr>
9563
9564 Clean up GCC warnings.
9565
9566 * src/reader.c (copy_action): `buf' is not used.
9567 (parse_skel_decl): Be static.
9568 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
9569 * src/options.h (create_long_option_table): Have a real prototype.
9570 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
9571 (hash_delete_at): Return const void *.
9572 Adjust casts to preserve the const.
9573
9574 2001-12-10 Akim Demaille <akim@epita.fr>
9575
9576 * configure.in: Require 2.52g.
9577 M4 is not needed, but AUTOM4TE is.
9578 * m4/m4.m4: Remove.
9579 * tests/Makefile.am: Adjust.
9580
9581 2001-12-10 Akim Demaille <akim@epita.fr>
9582
9583 One structure for states is enough, even though theoretically
9584 there are LR(0) states and LALR(1) states.
9585
9586 * src/lalr.h (state_t): Remove.
9587 (state_table): Be state_t **, not state_t *.
9588 * src/state.h (core, CORE_ALLOC): Rename as...
9589 (state_t, STATE_ALLOC): this.
9590 Add the LALR(1) members: shifts, reductions, errs.
9591 * src/LR0.c (state_table): Rename as...
9592 (state_hash): this, to avoid name clashes with the global
9593 `state_table'.
9594 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
9595 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
9596
9597 2001-12-10 Akim Demaille <akim@epita.fr>
9598
9599 Bison dumps core on bash.y.
9600 Reported by Pascal Bart.
9601
9602 * src/warshall.c (bitmatrix_print): New.
9603 (TC): Use it.
9604 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
9605 j must be the outer loop.
9606 * tests/regression.at (Broken Closure): New.
9607
9608 2001-12-05 Akim Demaille <akim@epita.fr>
9609
9610 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
9611 its argument.
9612 Reported by Peter Hamorsky.
9613
9614 2001-12-05 Akim Demaille <akim@epita.fr>
9615
9616 * src/conflicts.c (err_table): Remove.
9617 (resolve_sr_conflict): Adjust.
9618 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
9619 Rename as...
9620 (state_t.reductions, state_t.shifts): this.
9621
9622 2001-12-05 Akim Demaille <akim@epita.fr>
9623
9624 * src/reduce.c (reduce_grammar_tables): No longer disable the
9625 removal of useless rules via CPP but via `if (0)', so that the
9626 compiler still check the code is valid.
9627 For instance, it should have noticed `rline' no longer exists: use
9628 the `line' member of rule_t.
9629 * src/gram.c (dummy, rline): Remove, unused.
9630
9631 2001-12-05 Akim Demaille <akim@epita.fr>
9632
9633 * src/output.c (pack_vector): Use assert, not berror.
9634 * src/main.c (berror): Remove, unused.
9635
9636 2001-12-05 Akim Demaille <akim@epita.fr>
9637
9638 New experimental feature: if --verbose --trace output all the
9639 items of a state, not only its kernel.
9640
9641 * src/print.c (print_core): If `trace_flag', then invoke closure
9642 before outputting the items of the state (print_core is no longer
9643 a correct name them).
9644 (print_results): Invoke new_closure/free_closure if needed.
9645
9646 2001-12-05 Akim Demaille <akim@epita.fr>
9647
9648 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
9649 * src/closure.c, src/closure.h (itemsetsize): Rename as...
9650 (nitemset): for consistency with the rest of the project.
9651
9652 2001-12-05 Akim Demaille <akim@epita.fr>
9653
9654 * src/closure.c (print_closure): Improve.
9655 (closure): Use it for printing input and output.
9656
9657 2001-12-05 Akim Demaille <akim@epita.fr>
9658
9659 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
9660 indexed by nonterminals.
9661
9662 2001-12-05 Akim Demaille <akim@epita.fr>
9663
9664 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
9665 what it was!).
9666 * src/warshall.h: Remove accidental duplication of the content.
9667
9668 2001-12-05 Akim Demaille <akim@epita.fr>
9669
9670 * src/closure.c (set_fderives): De-obfuscate.
9671
9672 2001-12-05 Akim Demaille <akim@epita.fr>
9673
9674 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
9675
9676 2001-12-05 Akim Demaille <akim@epita.fr>
9677
9678 * src/closure.c (set_firsts): De-obfuscate.
9679
9680 2001-12-05 Akim Demaille <akim@epita.fr>
9681
9682 * src/output.c (action_row): De-obfuscate
9683 using the good o' techniques: arrays not pointers, variable
9684 locality, BITISSET, RESETBIT etc.
9685
9686 2001-12-05 Akim Demaille <akim@epita.fr>
9687
9688 Pessimize the code to simplify it: from now on, all the states
9689 have a valid SHIFTS, which NSHIFTS is possibly 0.
9690
9691 * src/LR0.c (shifts_new): Be global and move to..
9692 * src/state.c, src/state.h: here.
9693 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
9694 * src/print_graph: Adjust.
9695
9696 2001-12-05 Akim Demaille <akim@epita.fr>
9697
9698 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
9699 * src/conflicts.c: Use it.
9700 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
9701 incorrectly ``simplified''.
9702
9703 2001-12-05 Akim Demaille <akim@epita.fr>
9704
9705 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
9706 using the good o' techniques: arrays not pointers, variable
9707 locality, BITISSET, RESETBIT etc.
9708
9709 2001-12-05 Akim Demaille <akim@epita.fr>
9710
9711 * src/state.h (SHIFT_SYMBOL): New.
9712 * src/conflicts.c: Use it to deobfuscate.
9713
9714 2001-12-05 Akim Demaille <akim@epita.fr>
9715
9716 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
9717 (print_reductions): De-obfuscate using the good o' techniques:
9718 arrays not pointers, variable locality, BITISSET.
9719
9720 2001-12-05 Akim Demaille <akim@epita.fr>
9721
9722 * src/conflicts.c (print_reductions): Arrays, not pointers.
9723 Use BITISSET.
9724
9725 2001-12-05 Akim Demaille <akim@epita.fr>
9726
9727 * src/conflicts.c (print_reductions): Pessimize, but clarify.
9728
9729 2001-12-05 Akim Demaille <akim@epita.fr>
9730
9731 * src/conflicts.c (print_reductions): Improve variable locality.
9732
9733 2001-12-05 Akim Demaille <akim@epita.fr>
9734
9735 * src/conflicts.c (print_reductions): Pessimize, but clarify.
9736
9737 2001-12-05 Akim Demaille <akim@epita.fr>
9738
9739 * src/conflicts.c (print_reductions): Improve variable locality.
9740
9741 2001-12-05 Akim Demaille <akim@epita.fr>
9742
9743 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
9744 * src/lalr.c: Use them.
9745
9746 2001-12-05 Akim Demaille <akim@epita.fr>
9747
9748 * src/LR0.c (augment_automaton): Formatting changes.
9749 Better variable locality.
9750
9751 2001-12-05 Akim Demaille <akim@epita.fr>
9752
9753 * src/lalr.c (matrix_print): New.
9754 (transpose): Use it.
9755 Use arrays instead of pointers.
9756
9757 2001-12-05 Akim Demaille <akim@epita.fr>
9758
9759 * src/lalr.c (maxrhs): Move to...
9760 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
9761 * src/lalr.c (build_relations): Adjust.
9762
9763 2001-12-05 Akim Demaille <akim@epita.fr>
9764
9765 * src/lalr.c (transpose): Free the memory allocated to the
9766 argument, as it is replaced by the results by the unique caller.
9767 (build_relations): Merely invoke transpose: it handles the memory
9768 deallocation.
9769 Improve variable locality.
9770 Avoid variables used as mere abbreviations.
9771 (compute_lookaheads): Use arrays instead of pointers.
9772
9773 2001-12-05 Akim Demaille <akim@epita.fr>
9774
9775 * src/lalr.c (initialize_F): Improve variable locality.
9776 Avoid variables used as mere abbreviations.
9777
9778 2001-12-05 Akim Demaille <akim@epita.fr>
9779
9780 * src/derives.c (print_derives): Display the ruleno.
9781 * src/lalr.c (initialize_F, transpose): Better variable locality
9782 to improve readability.
9783 Avoid variables used as mere abbreviations.
9784
9785 2001-12-05 Akim Demaille <akim@epita.fr>
9786
9787 * src/lalr.c (traverse): Use arrays instead of pointers.
9788
9789 2001-12-05 Akim Demaille <akim@epita.fr>
9790
9791 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
9792 the handling of squeue.
9793 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
9794
9795 2001-12-05 Akim Demaille <akim@epita.fr>
9796
9797 Because useless nonterminals are now kept alive (instead of being
9798 `destroyed'), we now sometimes examine them, and store information
9799 related to them. Hence we need to know their number, and adjust
9800 memory allocations.
9801
9802 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
9803 static.
9804 * src/LR0.c (allocate_itemsets): The memory allocated to
9805 `symbol_count' was used for two different purpose: once to count
9806 the number of occurrences of each symbol, and later reassigned to
9807 `shift_symbol', containing the symbol that can be shifted from a
9808 given state.
9809 Deobfuscate, i.e., allocate, use and free `symbol_count' here
9810 only, and...
9811 (new_itemsets): Allocate `shift_symbol' here.
9812 (allocate_itemsets): symbol_count includes useless nonterminals.
9813 Make room for them.
9814 (free_storage): Use `free', not `XFREE', for pointers that cannot
9815 be null.
9816
9817 2001-12-05 Akim Demaille <akim@epita.fr>
9818
9819 * src/nullable.c (set_nullable): Deobfuscate the handling of
9820 ritem.
9821 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
9822
9823 2001-12-05 Akim Demaille <akim@epita.fr>
9824
9825 * src/gram.c, src/gram.h (ritem_print): New.
9826 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
9827 (This useless function was defined only to work around VMS linkers
9828 that can't handle compilation units with variables only).
9829 * src/reduce.c (dump_grammar): Use it to trace the construction of
9830 ritem.
9831
9832 2001-12-04 Paul Eggert <eggert@twinsun.com>
9833
9834 * src/bison.simple (union yyalloc): Change member names
9835 to be the same as the stack names.
9836 (yyparse): yyptr is now union yyalloc *, not char *.
9837 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
9838 and may generate better code on some machines.
9839 (yystpcpy): Use prototype if __STDC__ is defined, not just
9840 if __cplusplus is defined.
9841
9842 2001-11-30 Akim Demaille <akim@epita.fr>
9843
9844 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
9845 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
9846 Gettext doesn't compile cleanly, and dies with -Werror.
9847 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
9848 Include WARNING_CFLAGS here.
9849 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
9850 before being defined.
9851
9852 2001-11-27 Paul Eggert <eggert@twinsun.com>
9853
9854 * lib/quotearg.h (quotearg_n, quotearg_n_style):
9855 First arg is int, not unsigned.
9856 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
9857 (SIZE_MAX, UINT_MAX): New macros.
9858 (quotearg_n_options): Abort if N is negative.
9859 Avoid overflow check on hosts where size_t is 64 bits and int
9860 is 32 bits, as overflow is impossible there.
9861 Fix off-by-one typo that caused unnecessary reallocation.
9862
9863 2001-11-29 Paul Eggert <eggert@twinsun.com>
9864
9865 Name space cleanup in generated parser.
9866
9867 * doc/bison.texinfo (Bison Parser): Discuss system headers
9868 and their effect on the user name space.
9869
9870 * src/bison.simple:
9871 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
9872 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
9873 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
9874
9875 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
9876 on user names when possible.
9877
9878 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
9879 Simplify test for whather <alloca.h> exists.
9880
9881 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
9882
9883 (<stdio.h>): Include if YYDEBUG.
9884
9885 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
9886 ! defined (yyoverflow) && ! defined (yymemcpy).
9887
9888 (yymemcpy, yyparse): Rename local variables as needed so that
9889 they all begin with 'yy'.
9890
9891 (yystrlen, yystpcpy): New functions.
9892
9893 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
9894 All uses changed.
9895
9896 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
9897 instead of relying on string.h functions. Use YYSTACK_ALLOC
9898 and YYSTACK_FREE instead of malloc and free.
9899
9900 2001-11-30 Akim Demaille <akim@epita.fr>
9901
9902 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
9903 before their first uses.
9904 (YYBISON, YYPURE): Move to the top of the output.
9905
9906 2001-11-30 Akim Demaille <akim@epita.fr>
9907
9908 * tests/reduce.at (Useless Nonterminals): Fix.
9909
9910 2001-11-30 Akim Demaille <akim@epita.fr>
9911
9912 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
9913 if body instead of `;' to pacify GCC's warnings.
9914
9915 2001-11-30 Akim Demaille <akim@epita.fr>
9916
9917 Instead of mapping the LHS of unused rules to -1, keep the LHS
9918 valid, but flag the rules as invalid.
9919
9920 * src/gram.h (rule_t): `useful' is a new member.
9921 * src/print.c (print_grammar): Adjust.
9922 * src/derives.c (set_derives): Likewise.
9923 * src/reader.c (packgram, reduce_output): Likewise.
9924 * src/reduce.c (reduce_grammar_tables): Likewise.
9925 * tests/reduce.at (Underivable Rules, Useless Rules): New.
9926
9927 2001-11-30 Akim Demaille <akim@epita.fr>
9928
9929 * src/reduce.c (reduce_output): Formatting changes.
9930 * src/print.c (print_results, print_grammar): Likewise.
9931 * tests/regression.at (Rule Line Numbers)
9932 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
9933
9934 2001-11-30 Akim Demaille <akim@epita.fr>
9935
9936 * src/reduce.c (nonterminals_reduce): Instead of throwing away
9937 useless nonterminals, move them at the end of the symbol arrays.
9938 (reduce_output): Adjust.
9939 * tests/reduce.at (Useless Nonterminals): Adjust.
9940
9941 2001-11-30 Akim Demaille <akim@epita.fr>
9942
9943 * src/reduce.c: Various comment/formatting changes.
9944 (nonterminals_reduce): New, extracted from...
9945 (reduce_grammar_tables): here.
9946 (reduce_grammar): Call nonterminals_reduce.
9947
9948 2001-11-29 Paul Eggert <eggert@twinsun.com>
9949
9950 * src/bison.simple (YYSTACK_REALLOC): Remove.
9951 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
9952 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
9953 New macros.
9954 (union yyalloc): New type.
9955 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
9956 an arbitrary restriction on hosts where size_t is wider than int.
9957
9958 (yyparse): Don't dump core if alloca or malloc fails; instead, report
9959 a parser stack overflow. Allocate just one block of memory for all
9960 three stacks, instead of allocating three blocks; this typically is
9961 faster and reduces fragmentation.
9962
9963 Do not limit the number of items in the stack to a value that fits
9964 in 'int', as this is an arbitrary limit on hosts with 64-bit
9965 size_t and 32-bit int.
9966
9967 2001-11-29 Marc Autret <autret_m@epita.fr>
9968
9969 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
9970 of defining YYERROR_VERBOSE.
9971 [AT_DATA]: $4 is now out of C declarations in the prologue.
9972
9973 2001-11-28 Marc Autret <autret_m@epita.fr>
9974
9975 * src/reader.c (parse_dquoted_param): New.
9976 (parse_skel_decl): Use it.
9977 * src/lex.h: Add its prototype.
9978 * src/lex.c (literalchar): Become not static.
9979
9980 2001-11-28 Marc Autret <autret_m@epita.fr>
9981
9982 * src/output.h: And put its extern declaration here.
9983 * src/output.c (error_verbose): Define here.
9984 (prepare): Echo name modification.
9985 * src/getargs.h: Clean its extern declaration.
9986 * src/getargs.c (error_verbose_flag): Remove.
9987 (getargs): Remove case 'e'.
9988 * src/options.c (option_table): 'error-verbose' is now seen as simple
9989 percent option.
9990 Include output.h.
9991
9992 * src/reader.c (read_declarations): Remove case tok_include.
9993 (parse_include_decl): Remove.
9994 * src/lex.h (token_t): Remove tok_include.
9995 * src/options.c (option_table): 'include' is now a simple command line
9996 option.
9997
9998 2001-11-28 Marc Autret <autret_m@epita.fr>
9999
10000 * src/bison.simple: Adjust muscle names.
10001 * src/muscle_tab.c (muscle_init): Also rename the muscles.
10002 * src/output.c (prepare): s/_/-/ for the muscles names.
10003 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
10004
10005 2001-11-28 Marc Autret <autret_m@epita.fr>
10006
10007 * src/bison.simple: Fix debug.
10008 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
10009
10010 2001-11-28 Akim Demaille <akim@epita.fr>
10011
10012 * src/LR0.c (shifts_new): New.
10013 (save_shifts, insert_start_shift, augment_automaton): Use it.
10014
10015 2001-11-28 Akim Demaille <akim@epita.fr>
10016
10017 * src/closure.c (closure): `b' and `ruleno' denote the same value:
10018 keep ruleno only.
10019
10020 2001-11-28 Akim Demaille <akim@epita.fr>
10021
10022 * src/closure.c (closure): Instead of looping over word in array
10023 then bits in words, loop over bits in array.
10024
10025 2001-11-28 Akim Demaille <akim@epita.fr>
10026
10027 * src/closure.c (closure): No longer optimize the special case
10028 where all the bits of `ruleset[r]' are set to 0, to make the code
10029 clearer.
10030
10031 2001-11-28 Akim Demaille <akim@epita.fr>
10032
10033 * src/closure.c (closure): `r' and `c' are new variables, used to
10034 de-obfuscate accesses to RULESET and CORE.
10035
10036 2001-11-28 Akim Demaille <akim@epita.fr>
10037
10038 * src/reduce.c (reduce_print): Use ngettext.
10039 (dump_grammar): Improve the trace accuracy.
10040
10041 2001-11-28 Akim Demaille <akim@epita.fr>
10042
10043 * src/reduce.c (dump_grammar): Don't translate trace messages.
10044
10045 2001-11-28 Akim Demaille <akim@epita.fr>
10046
10047 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
10048 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
10049 as all tags are free'ed afterwards.
10050 From Enrico Scholz.
10051
10052 2001-11-27 Paul Eggert <eggert@twinsun.com>
10053
10054 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
10055 use alloca when we didn't want to, and vice versa.
10056
10057 2001-11-27 Marc Autret <autret_m@epita.fr>
10058
10059 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
10060 initialization.
10061 * src/output.c (prepare): Remove its update.
10062
10063 2001-11-27 Marc Autret <autret_m@epita.fr>
10064
10065 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
10066 Use %error-verbose.
10067
10068 2001-11-27 Marc Autret <autret_m@epita.fr>
10069
10070 * src/bison.simple: Remove YYERROR_VERBOSE using.
10071 Use %%error_verbose.
10072 (yyparse): Likewise.
10073 * src/output.c (prepare): Give its final value.
10074 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
10075 * src/getargs.h: Add its extern declaration.
10076 * src/getargs.c (error_verbose_flag): New int.
10077 (getargs): Update to catch new case.
10078 * src/options.c (option_table): 'error-verbose' is a new option.
10079 (shortopts): Update.
10080
10081 2001-11-27 Akim Demaille <akim@epita.fr>
10082
10083 * src/system.h: Use intl/libgettext.h.
10084 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
10085
10086 2001-11-27 Akim Demaille <akim@epita.fr>
10087
10088 * tests/torture.at (Exploding the Stack Size with Malloc):
10089 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
10090
10091 2001-11-27 Akim Demaille <akim@epita.fr>
10092
10093 * src/files.c: Include error.h.
10094 Reported by Hans Aberg.
10095
10096 2001-11-26 Marc Autret <autret_m@epita.fr>
10097
10098 * src/reader.c (parse_include_decl): New, not yet implemented.
10099 (read_declarations): Add case tok_include.
10100 * src/getargs.h (include): Add its extern definition.
10101 * src/getargs.c (include): New const char *.
10102 (getargs): Add case '-I'.
10103 * src/options.c (option_table): Add include as command line and
10104 percent option.
10105 * src/lex.h (token_t): Add tok_include.
10106
10107 2001-11-26 Akim Demaille <akim@epita.fr>
10108
10109 * src/reader.c (readgram): Make sure rules for mid-rule actions
10110 have a lineno equal to that of their host rule.
10111 Reported by Hans Aberg.
10112 * tests/regression.at (Rule Line Numbers): New.
10113
10114 2001-11-26 Akim Demaille <akim@epita.fr>
10115
10116 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
10117 size_ts.
10118
10119 2001-11-26 Akim Demaille <akim@epita.fr>
10120
10121 * src/complain.c, src/complain.h (error): Remove, provided by
10122 lib/error.[ch].
10123
10124 2001-11-26 Akim Demaille <akim@epita.fr>
10125
10126 * src/reader.c (read_declarations): Don't abort on tok_illegal,
10127 issue an error message.
10128 * tests/regression.at (Invalid %directive): New.
10129 Reported by Hans Aberg.
10130
10131 2001-11-26 Akim Demaille <akim@epita.fr>
10132
10133 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
10134 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
10135
10136 2001-11-26 Akim Demaille <akim@epita.fr>
10137
10138 * src/conflicts.c (conflicts_print): Don't complain at all when
10139 there are no reduce/reduce conflicts, and as many shift/reduce
10140 conflicts as expected.
10141 * tests/regression.at (%expect right): Adjust.
10142
10143 2001-11-23 Akim Demaille <akim@epita.fr>
10144
10145 * lib/alloca.c: Update, from fileutils.
10146
10147 2001-11-23 Akim Demaille <akim@epita.fr>
10148
10149 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
10150
10151 2001-11-23 Akim Demaille <akim@epita.fr>
10152
10153 * src/system.h: Include alloca.h.
10154 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
10155
10156 2001-11-23 Akim Demaille <akim@epita.fr>
10157
10158 * src/print_graph.c (print_actions): Remove `rule', unused.
10159 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
10160 pacify GCC's signed < unsigned warnings.
10161 * src/closure.c (itemsetsize): Likewise.
10162 * src/reader.c (symbol_list_new): Static.
10163
10164 2001-11-23 Akim Demaille <akim@epita.fr>
10165
10166 Attaching lineno to buckets is stupid, since only one copy of each
10167 symbol is kept, only the line of the first occurrence is kept too.
10168
10169 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
10170 * src/reader.c (rline_allocated): Remove, unused.
10171 (symbol_list): Have a `line' member.
10172 (symbol_list_new): New.
10173 (readgram): Use it.
10174 * src/print.c (print_grammar): Output the rule line numbers.
10175 * tests/regression.at (Solved SR Conflicts)
10176 (Unresolved SR Conflicts): Adjust.
10177 Reported by Hans Aberg.
10178
10179 2001-11-22 Marc Autret <autret_m@epita.fr>
10180
10181 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
10182
10183 2001-11-22 Marc Autret <autret_m@epita.fr>
10184
10185 * src/muscle_tab.c (muscle_init): Remove initialization of
10186 skeleton muscle.
10187 * src/output.c (output_master_parser): Do it here.
10188
10189 2001-11-20 Akim Demaille <akim@epita.fr>
10190
10191 * po/sv.po: New.
10192 * configure.in (ALL_LINGUAS): Adjust.
10193 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
10194 longer contains strings to translate.
10195
10196 2001-11-19 Akim Demaille <akim@epita.fr>
10197
10198 * src/conflicts.c (conflicts_print): Add a missing \n.
10199
10200 2001-11-19 Akim Demaille <akim@epita.fr>
10201
10202 * src/nullable.c (nullable_print): New.
10203 (set_nullable): Call it when tracing.
10204 Better locality of variables.
10205
10206 2001-11-19 Akim Demaille <akim@epita.fr>
10207
10208 * src/print.c (print_actions): Better locality of variables.
10209
10210 2001-11-19 Akim Demaille <akim@epita.fr>
10211
10212 * src/derives.c (print_derives): Fix and enrich.
10213 * src/closure.c (print_fderives): Likewise.
10214
10215 2001-11-19 Akim Demaille <akim@epita.fr>
10216
10217 * src/closure.c (itemsetend): Remove, replaced with...
10218 (itemsetsize): new.
10219
10220 2001-11-19 Akim Demaille <akim@epita.fr>
10221
10222 * src/LR0.c (kernel_end): Remove, replaced with...
10223 (kernel_size): new.
10224
10225 2001-11-19 Akim Demaille <akim@epita.fr>
10226
10227 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
10228 to clarify.
10229
10230 2001-11-19 Akim Demaille <akim@epita.fr>
10231
10232 * src/closure.c (closure): Use arrays instead of pointers to clarify.
10233
10234 2001-11-19 Akim Demaille <akim@epita.fr>
10235
10236 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
10237 trace messages.
10238 * src/LR0.c: Likewise.
10239 (allocate_itemsets): Use arrays instead of pointers to clarify.
10240
10241 2001-11-19 Akim Demaille <akim@epita.fr>
10242
10243 * src/getargs.c (statistics_flag): Replace with...
10244 (trace_flag): New.
10245 (longopts): Accept --trace instead of --statistics.
10246 * src/getargs.h, src/options.c: Adjust.
10247 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
10248 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
10249
10250 2001-11-19 Akim Demaille <akim@epita.fr>
10251
10252 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
10253 pointers to clarify the code.
10254 (save_reductions, save_shifts): Factor common parts of alternatives.
10255
10256 2001-11-19 Akim Demaille <akim@epita.fr>
10257
10258 * src/LR0.c (new_state, get_state): Complete TRACE code.
10259 * src/closure.c: Include `reader.h' to get `tags', needed by the
10260 trace code.
10261 Rename the conditional DEBUG as TRACE.
10262 Output consistently TRACEs to stderr, not stdout.
10263 * src/derives.c: Likewise.
10264 * src/reduce.c: (inaccessable_symbols): Using if is better style
10265 than goto.
10266 Use `#if TRACE' instead of `#if 0' for tracing code.
10267
10268 2001-11-19 Akim Demaille <akim@epita.fr>
10269
10270 * src/system.h (LIST_FREE, shortcpy): New.
10271 * src/LR0.c: Use them.
10272 * src/output.c (free_itemsets, free_reductions, free_shifts):
10273 Remove, replaced by LIST_FREE.
10274
10275 2001-11-19 Akim Demaille <akim@epita.fr>
10276
10277 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
10278 (REDUCTIONS_ALLOC): New.
10279 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
10280 allocation.
10281
10282 2001-11-19 Akim Demaille <akim@epita.fr>
10283
10284 * src/LR0.c (new_state): Complete trace code.
10285 * src/nullable.c (set_nullable): Don't translate traces.
10286
10287 2001-11-19 Akim Demaille <akim@epita.fr>
10288
10289 * src/print_graph.c (print_core): Better locality of variables.
10290 * src/print.c (print_core): Likewise.
10291
10292 2001-11-19 Akim Demaille <akim@epita.fr>
10293
10294 * src/vcg.c: You do the output, so you are responsible of the
10295 handling of VCG syntax, in particular: use quotearg.
10296 * src/print_graph.c: Don't.
10297 (print_actions): Don't output the actions as part of the nodes,
10298 since that's the job of the edges.
10299 (print_state): Don't output by hand: fill the node description,
10300 and ask for its output.
10301
10302 2001-11-19 Akim Demaille <akim@epita.fr>
10303
10304 * src/bison.simple (yyparse): When verbosely reporting an error,
10305 no longer put additional quotes around token names.
10306 * tests/calc.at: Adjust.
10307
10308 2001-11-19 Akim Demaille <akim@epita.fr>
10309
10310 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
10311 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
10312 * src/output.c: Adjust.
10313
10314 2001-11-19 Akim Demaille <akim@epita.fr>
10315
10316 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
10317 (rule_t): this.
10318 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
10319
10320 2001-11-19 Akim Demaille <akim@epita.fr>
10321
10322 * src/gram.h (rule_t): New.
10323 (rule_table): New.
10324 (rrhs, rlhs): Remove, part of state_t.
10325 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
10326 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
10327 * src/reader.c, src/reduce.c: Adjust.
10328
10329 2001-11-19 Akim Demaille <akim@epita.fr>
10330
10331 * src/reader.c (symbols_output): New, extracted from...
10332 (packsymbols): Here.
10333 (reader): Call it.
10334
10335 2001-11-19 Akim Demaille <akim@epita.fr>
10336
10337 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
10338 (maxrhs): this new function.
10339
10340 2001-11-19 Akim Demaille <akim@epita.fr>
10341
10342 * src/lalr.c (F): New macro to access the variable F.
10343 Adjust.
10344
10345 2001-11-19 Akim Demaille <akim@epita.fr>
10346
10347 * src/lalr.h (LA): New macro to access the variable LA.
10348 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10349 * src/lalr.c: Adjust.
10350
10351 2001-11-19 Akim Demaille <akim@epita.fr>
10352
10353 * src/lalr.c (initialize_LA): Only initialize LA. Let...
10354 (set_state_table): handle the `lookaheads' members.
10355
10356 2001-11-19 Akim Demaille <akim@epita.fr>
10357
10358 * src/lalr.h (lookaheads): Removed array, whose contents is now
10359 a member of...
10360 (state_t): this structure.
10361 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10362 Adjust.
10363
10364 2001-11-19 Akim Demaille <akim@epita.fr>
10365
10366 * src/lalr.h (consistent): Removed array, whose contents is now
10367 a member of...
10368 (state_t): this structure.
10369 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10370 Adjust.
10371
10372 2001-11-19 Akim Demaille <akim@epita.fr>
10373
10374 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
10375 contents are now members of...
10376 (state_t): this structure.
10377 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10378 Adjust.
10379
10380 2001-11-19 Akim Demaille <akim@epita.fr>
10381
10382 * src/lalr.h (state_t): New.
10383 (state_table): Be a state_t * instead of a core **.
10384 (accessing_symbol): Remove, part of state_t.
10385 * src/lalr.c: Adjust.
10386 (set_accessing_symbol): Merge into...
10387 (set_state_table): this.
10388 * src/print_graph.c, src/conflicts.c: Adjust.
10389
10390 2001-11-14 Akim Demaille <akim@epita.fr>
10391
10392 * tests/calc.at, tests/output.at, tests/regression.at,
10393 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
10394 now the tests are run in private dirs, therefore AC_CLEANUP and
10395 family can be simplified to 0-ary.
10396 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
10397 use abs. path to find config.h.
10398 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
10399 stderr, there can be way too much random noise.
10400 Instead pass -Werror to GCC and rely on the exit status.
10401 Reported by Wolfram Wagner.
10402
10403 2001-11-14 Akim Demaille <akim@epita.fr>
10404
10405 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
10406 defined only if yyoverflow is defined, to avoid `warning: unused
10407 variable `yyvs1''.
10408 Reported by The Test Suite.
10409
10410 2001-11-14 Akim Demaille <akim@epita.fr>
10411
10412 * src/print.c: Include reduce.h.
10413 Reported by Hans Aberg.
10414
10415 2001-11-14 Akim Demaille <akim@epita.fr>
10416
10417 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
10418 Revert a previous patch: these are really const.
10419 * src/conflicts.c (conflict_report): Additional useless pair of
10420 braces to pacify GCC's warnings for `if () if () {} else {}'.
10421 * src/lex.c (parse_percent_token): Replace equal_offset with
10422 arg_offset.
10423 arg is const.
10424 Be sure to strdup `arg' when used, since there is no reason for
10425 token_buffer not to change.
10426
10427 2001-11-14 Akim Demaille <akim@epita.fr>
10428
10429 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
10430 definition.
10431 * src/main.c (main): Use them.
10432 Suggested by Hans Aberg.
10433
10434 2001-11-12 Akim Demaille <akim@epita.fr>
10435
10436 * src/system.h (ngettext): Now that we use ngettext, be sure to
10437 provide a default definition when NLS are not used.
10438
10439 2001-11-12 Akim Demaille <akim@epita.fr>
10440
10441 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
10442 Use @kbd to denote user input.
10443 (Language and Grammar): ANSIfy the example.
10444 Adjust its layout for info/notinfo.
10445 (Location Tracking Calc): Output error messages to stderr.
10446 Output locations in a more GNUtically correct way.
10447 Fix a couple of Englishos.
10448 Adjust @group/@end group pairs.
10449
10450 2001-11-12 Akim Demaille <akim@epita.fr>
10451
10452 %expect was not functioning at all.
10453
10454 * src/conflicts.c (expected_conflicts): Set to -1.
10455 (conflict_report): Use ngettext.
10456 (conflicts_print): Check %expect and make its violation an error.
10457 * doc/bison.texinfo (Expect Decl): Adjust.
10458 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
10459 * tests/regression.at (%expect not enough, %expect right)
10460 (%expect too much): New.
10461
10462 2001-11-12 Akim Demaille <akim@epita.fr>
10463
10464 * tests/regression.at (Conflicts): Rename as...
10465 (Unresolved SR Conflicts): this.
10466 (Solved SR Conflicts): New.
10467
10468 2001-11-12 Akim Demaille <akim@epita.fr>
10469
10470 * src/reduce.c (print_results): Rename as...
10471 (reduce_output): This.
10472 Output to OUT, passed as argument, instead of output_obstack.
10473 (dump_grammar): Likewise.
10474 (reduce_free): New.
10475 Also free V1.
10476 (reduce_grammar): No longer call reduce_output, since...
10477 * src/print.c (print_results): do it.
10478 * src/main.c (main): Call reduce_free;
10479
10480 2001-11-12 Akim Demaille <akim@epita.fr>
10481
10482 * src/conflicts.c (print_reductions): Accept OUT as argument.
10483 Output to it, not to output_obstack.
10484 * src/print.c (print_actions): Adjust.
10485
10486 2001-11-12 Akim Demaille <akim@epita.fr>
10487
10488 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
10489 the result instead of using...
10490 (src_total, rrc_total, src_count, rrc_count): Remove.
10491 (any_conflicts): Remove.
10492 (print_conflicts): Split into...
10493 (conflicts_print, conflicts_output): New.
10494 * src/conflicts.h: Adjust.
10495 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
10496 * src/print.c (print_grammar): Issue `\n' between two rules.
10497 * tests/regression.at (Conflicts): New.
10498 Reported by Tom Lane.
10499
10500 2001-11-12 Akim Demaille <akim@epita.fr>
10501
10502 * tests/regression.at (Invalid input): Remove, duplicate with
10503 ``Invalid input: 1''.
10504
10505 2001-11-12 Akim Demaille <akim@epita.fr>
10506
10507 * tests/torture.at (AT_DATA_STACK_TORTURE)
10508 (Exploding the Stack Size with Alloca)
10509 (Exploding the Stack Size with Malloc): New.
10510
10511 2001-11-12 Akim Demaille <akim@epita.fr>
10512
10513 * src/bison.simple (YYSTACK_REALLOC): New.
10514 (yyparse) [!yyoverflow]: Use it and free the old stack.
10515 Reported by Per Allansson.
10516
10517 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
10518
10519 * src/bison.simple: Define type yystype instead of YYSTYPE, and
10520 define CPP macro, which substitute YYSTYPE by yystype.
10521 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
10522 with yyltype/YYLTYPE. This allows inclusion of the generated
10523 header within the parser if the compiler, such as GGC, accepts
10524 multiple equivalent #defines.
10525 From Akim.
10526
10527 2001-11-05 Akim Demaille <akim@epita.fr>
10528
10529 * src/reader.c (symbols_output): New, extracted from...
10530 (packsymbols): here.
10531 (reader): Adjust.
10532
10533 2001-11-05 Akim Demaille <akim@epita.fr>
10534
10535 * src/lex.c (parse_percent_token): s/quotearg/quote/.
10536
10537 2001-11-05 Akim Demaille <akim@epita.fr>
10538
10539 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
10540 pattern.
10541
10542 2001-11-05 Akim Demaille <akim@epita.fr>
10543
10544 * src/options.h (struct option_table_struct): set_flags is void*.
10545 * src/options.c (longopts): Support `--output' and `%output'.
10546 (usage): Adjust.
10547 * src/lex.h (tok_setopt): Remove, replaced with...
10548 (tok_intopt, tok_stropt): these new guys.
10549 * src/lex.c (getopt.h): Not needed.
10550 (token_buffer, unlexed_token_buffer): Not const.
10551 (percent_table): Promote `-' over `_' in directive names.
10552 Active `%name-prefix', `file-prefix', and `output'.
10553 (parse_percent_token): Accept possible arguments to directives.
10554 Promote `-' over `_' in directive names.
10555
10556 2001-11-04 Akim Demaille <akim@epita.fr>
10557
10558 * doc/bison.texinfo (Decl Summary): Split the list into
10559 `directives for grammars' and `directives for bison'.
10560 Sort'em.
10561 Add description of `%name-prefix', `file-prefix', and `output'.
10562 Promote `-' over `_' in directive names.
10563 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
10564 Simplify the description of `--name-prefix'.
10565 Promote `-' over `_' in directive names.
10566 Promote `--output' over `--output-file'.
10567 Fix the description of `--defines'.
10568 * tests/output.at: Exercise %file-prefix and %output.
10569
10570 2001-11-02 Akim Demaille <akim@epita.fr>
10571
10572 * doc/refcard.tex: Update.
10573
10574 2001-11-02 Akim Demaille <akim@epita.fr>
10575
10576 * src/symtab.h (SUNDEF): New.
10577 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
10578 stand for `uninitialized', instead of 0.
10579 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
10580 * src/lex.c (lex): Adjust.
10581
10582 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
10583 Number it 0.
10584 Let yylex return it instead of a plain 0.
10585 Reported by Dick Streefland.
10586
10587 2001-11-02 Akim Demaille <akim@epita.fr>
10588
10589 * tests/regression.at (Mixing %token styles): New test.
10590
10591 2001-11-02 Akim Demaille <akim@epita.fr>
10592
10593 * src/reader.c (parse_thong_decl): Formatting changes.
10594 (token_translations_init): New, extracted from...
10595 (packsymbols): Here.
10596 Adjust.
10597
10598 2001-11-01 Akim Demaille <akim@epita.fr>
10599
10600 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
10601 Check that `9foo.y' produces correct cpp guards.
10602 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
10603 guards.
10604 Reported by Wwp.
10605
10606 2001-11-01 Akim Demaille <akim@epita.fr>
10607
10608 * tests/regression.at (Invalid input: 2): New.
10609 * src/lex.c (unlexed_token_buffer): New.
10610 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
10611 too.
10612 Reported by Wwp.
10613
10614 2001-11-01 Akim Demaille <akim@epita.fr>
10615
10616 * tests/calc.at: Catch up with 1.30.
10617 * configure.in: Bump to 1.49a.
10618 Adjust to newer Autotest.
10619
10620 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
10621
10622 * src/conflicts.c: Move global variables rrc_total and src_total ...
10623 (print_conflicts): here.
10624 * src/output.c (output): Free global variable user_toknums.
10625 * src/lex.c (token_obstack): Become static.
10626
10627 2001-10-18 Akim Demaille <akim@epita.fr>
10628
10629 * tests/atlocal.in (GCC): Add.
10630 * tests/calc.at: s/m4_match/m4_bmatch/.
10631 s/m4_patsubst/m4_bpatsubst/.
10632 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
10633 * configure.in: AC_SUBST(GCC).
10634
10635 2001-10-14 Marc Autret <autret_m@epita.fr>
10636
10637 * src/options.c (create_long_option_table): Fix.
10638
10639 2001-10-10 Akim Demaille <akim@epita.fr>
10640
10641 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
10642
10643 2001-10-04 Akim Demaille <akim@epita.fr>
10644
10645 * src/reader.c (parse_union_decl): Push the caracters in
10646 union_obstack, not attrs_obstack.
10647
10648 2001-10-04 Akim Demaille <akim@epita.fr>
10649
10650 Merge in the branch 1.29.
10651
10652 * src/reader.c (packsymbols): Use a temporary obstack for
10653 `%%tokendef', since output_stack is already used elsewhere.
10654
10655 2001-10-02 Akim Demaille <akim@epita.fr>
10656
10657 Bump 1.29d.
10658
10659 2001-10-02 Akim Demaille <akim@epita.fr>
10660
10661 Version 1.29c.
10662
10663 2001-10-02 Akim Demaille <akim@epita.fr>
10664
10665 * tests/regression.at (Invalid CPP headers): New.
10666 From Alexander Belopolsky.
10667 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
10668
10669 2001-10-02 Akim Demaille <akim@epita.fr>
10670
10671 * tests/regression.at (Invalid input): New.
10672 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
10673 Reported by Shura.
10674
10675 2001-10-02 Akim Demaille <akim@epita.fr>
10676
10677 * tests/calc.at: Now that --debug works, the tests must be adjusted.
10678
10679 2001-10-02 Akim Demaille <akim@epita.fr>
10680
10681 * src/output.c (output_parser): Assert `skeleton'.
10682 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
10683 systems.
10684 From Shura.
10685
10686 2001-10-01 Marc Autret <autret_m@epita.fr>
10687
10688 * src/lex.h: Echo modifications.
10689 * src/lex.c (unlex): Parameter is now token_t.
10690 From Hans Aberg.
10691
10692 2001-10-01 Marc Autret <autret_m@epita.fr>
10693
10694 * src/main.c: Include lex.h.
10695 From Hans Aberg.
10696
10697 2001-09-29 Akim Demaille <akim@epita.fr>
10698
10699 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
10700
10701 2001-09-28 Akim Demaille <akim@epita.fr>
10702
10703 * tests/testsuite.at: Update to newer Autotest.
10704 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
10705
10706 2001-09-27 Akim Demaille <akim@epita.fr>
10707
10708 Position independent wrapper.
10709
10710 * tests/bison: Remove.
10711 * tests/bison.in: New.
10712 * configure.in: Adjust.
10713
10714 2001-09-27 Paul Eggert <eggert@twinsun.com>
10715
10716 Port quotearg fixes from tar 1.13.24.
10717
10718 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
10719 tm to be declared.
10720 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
10721 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
10722
10723 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
10724 * m4/mbrtowc.m4: New file.
10725 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
10726 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
10727
10728 2001-09-27 Akim Demaille <akim@epita.fr>
10729
10730 Bump to 1.29c.
10731
10732 2001-09-27 Akim Demaille <akim@epita.fr>
10733
10734 Version 1.29b.
10735
10736 2001-09-25 Akim Demaille <akim@epita.fr>
10737
10738 * src/system.h: Include `xalloc.h'.
10739 Remove it from the C files.
10740 * src/files.c (output_files): Free the obstacks.
10741 * src/lex.c (init_lex): Rename as...
10742 (lex_init): this.
10743 (lex_free): New.
10744 * src/main.c (main): Use it.
10745
10746 2001-09-24 Marc Autret <autret_m@epita.fr>
10747
10748 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
10749 to output informations in fout (FILE*).
10750 (open_graph, close_graph): Likewise.
10751 (output_graph, output_edge, output_node): Likewise.
10752 * src/vcg.h: Update function prototypes.
10753 * src/print_graph.c (print_graph): Open output graph file.
10754 (print_actions): Adjust.
10755 * src/files.h: Remove extern declaration.
10756 * src/files.c: Remove graph_obstack declaration.
10757 (open_files): Remove graph_obstack initialization.
10758 (output_files): Remove graph_obstack saving.
10759
10760 2001-09-24 Marc Autret <autret_m@epita.fr>
10761
10762 * src/files.c (compute_output_file_names): Fix.
10763
10764 2001-09-24 Marc Autret <autret_m@epita.fr>,
10765 Akim Demaille <akim@epita.fr>
10766
10767 * src/reader.c (reader): Remove call to free_symtab ().
10768 * src/main.c (main): Call it here.
10769 Include symtab.h.
10770 * src/conflicts.c (initialize_conflicts): Rename as...
10771 (solve_conflicts): this.
10772 * src/print.c (print_core, print_actions, print_state)
10773 (print_grammar): Dump to a file instead a `output_obstack'.
10774 (print_results): Dump `output_obstack', and then proceed with the
10775 FILE *.
10776 * src/files.c (compute_output_file_names, close_files): New.
10777 (output_files): Adjust.
10778 * src/main.c (main): Adjust.
10779
10780 2001-09-23 Marc Autret <autret_m@epita.fr>
10781
10782 * src/files.c (compute_header_macro): Computes header macro name
10783 from spec_defines_file when given.
10784
10785 2001-09-23 Marc Autret <autret_m@epita.fr>
10786
10787 * src/files.c (output_files): Add default extensions.
10788
10789 2001-09-22 Akim Demaille <akim@epita.fr>
10790
10791 * src/conflicts.c (finalize_conflicts): Rename as...
10792 (free_conflicts): this.
10793
10794 2001-09-22 Akim Demaille <akim@epita.fr>
10795
10796 * src/gram.c (gram_free): Rename back as...
10797 (dummy): this.
10798 (output_token_translations): Free `token_translations'.
10799 * src/symtab.c (free_symtab): Free the tag field.
10800
10801 2001-09-22 Akim Demaille <akim@epita.fr>
10802
10803 Remove `translations' as it is always set to true.
10804
10805 * src/gram.h: Adjust.
10806 * src/reader.c (packsymbols, parse_token_decl): Adjust
10807 * src/print.c (print_grammar): Adjust.
10808 * src/output.c (output_token_translations): Adjust.
10809 * src/lex.c (lex): Adjust.
10810 * src/gram.c: Be sure the set pointers to NULL.
10811 (dummy): Rename as...
10812 (gram_free): this.
10813
10814 2001-09-22 Akim Demaille <akim@epita.fr>
10815
10816 * configure.in: Invoke AM_LIB_DMALLOC.
10817 * src/system.h: Use dmalloc.
10818 * src/LR0.c: Be sure to have pointers initialized to NULL.
10819 (allocate_itemsets): Allocate kernel_items only if needed.
10820
10821 2001-09-22 Akim Demaille <akim@epita.fr>
10822
10823 * configure.in: Bump to 1.29b.
10824 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
10825 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
10826 need xmalloc.c in calc.y.
10827 From Pascal Bart.
10828
10829 2001-09-21 Akim Demaille <akim@epita.fr>
10830
10831 Version 1.29a.
10832 * Makefile.maint, config/config.guess, config/config.sub,
10833 * config/missing: Update from masters.
10834 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
10835 upon package.m4.
10836 * configure.in (ALL_LINGUAS): Add `tr'.
10837
10838 2001-09-21 Akim Demaille <akim@epita.fr>
10839
10840 * tests/Makefile.am (package.m4): Move to...
10841 ($(srcdir)/$(TESTSUITE)): here.
10842
10843 2001-09-20 Akim Demaille <akim@epita.fr>
10844
10845 * src/complain.c: No longer try to be standalone: use system.h.
10846 Don't assume __STDC__ is defined to 1. Just test if it is defined.
10847 * src/complain.h: Likewise.
10848 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
10849 Remove the unused variable `n'.
10850 From Albert Chin-A-Young.
10851
10852 2001-09-18 Marc Autret <autret_m@epita.fr>
10853
10854 * doc/bison.1: Update.
10855 * doc/bison.texinfo (Bison Options): Update --defines and --graph
10856 descriptions.
10857 (Option Cross Key): Update.
10858 Add --graph.
10859
10860 2001-09-18 Marc Autret <autret_m@epita.fr>
10861
10862 * tests/regression.at: New test (comment in %union).
10863
10864 2001-09-18 Marc Autret <autret_m@epita.fr>
10865
10866 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
10867 do that.
10868 Reported by Keith Browne.
10869
10870 2001-09-18 Marc Autret <autret_m@epita.fr>
10871
10872 * tests/output.at: Add tests for --defines and --graph.
10873
10874 2001-09-18 Marc Autret <autret_m@epita.fr>
10875
10876 * tests/output.at: Removes tests of %{header,src}_extension features.
10877
10878 2001-09-18 Akim Demaille <akim@epita.fr>
10879
10880 * tests/Makefile.am (package.m4): New.
10881 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
10882 (_AT_CHECK_CALC_ERROR): Likewise.
10883 Factor the `, ' part of verbose error messages.
10884
10885 2001-09-18 Marc Autret <autret_m@epita.fr>
10886
10887 * src/getargs.c (longopts): Declare --defines and --graph as options
10888 with optional arguments.
10889 * src/files.h: Add extern declarations.
10890 * src/files.c (spec_graph_file, spec_defines_file): New.
10891 (output_files): Update.
10892 Remove CPP-outed code.
10893
10894 2001-09-18 Marc Autret <autret_m@epita.fr>
10895
10896 Turn off %{source,header}_extension feature.
10897
10898 * src/files.c (compute_exts_from_gf): Update.
10899 (compute_exts_from_src): Update.
10900 (output_files): CPP-out useless code.
10901 * src/files.h: Remove {header,source}_extension extern declarations.
10902 * src/reader.c (parse_dquoted_param): CPP-out.
10903 (parse_header_extension_decl): Remove.
10904 (parse_source_extension_decl): Remove.
10905 (read_declarations): Remove cases tok_{hdrext,srcext}.
10906 * src/lex.c (percent_table): Remove {header,source}_extension entries.
10907 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
10908
10909 2001-09-10 Akim Demaille <akim@epita.fr>
10910
10911 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
10912 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
10913 (AT_CHECK_OUTPUT): this.
10914 Merely check ls' exit status, its output is useless.
10915
10916 2001-09-10 Akim Demaille <akim@epita.fr>
10917
10918 * tests/calc.at: Use m4_match.
10919 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
10920
10921 2001-09-10 Marc Autret <autret_m@epita.fr>,
10922 Akim Demaille <akim@epita.fr>
10923
10924 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
10925 enum color_e.
10926 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
10927 to `normal'.
10928 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
10929 * src/lex.h: Adjust prototype.
10930 (token_t): Add `tok_undef'.
10931 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
10932 (parse_percent_token): Now returns token_t.
10933 Add default statement in switch.
10934 (lex): Separate `c' as an input variable, from the token_t result
10935 part.
10936 (unlexed): Is a token_t.
10937
10938 2001-09-10 Akim Demaille <akim@epita.fr>
10939
10940 * configure.in: Bump to 1.29a.
10941
10942 2001-09-07 Akim Demaille <akim@epita.fr>
10943
10944 Version 1.29.
10945
10946 2001-08-30 Akim Demaille <akim@epita.fr>
10947
10948 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
10949 * m4/atconfig.m4: Remove.
10950 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
10951 * tests/bison: New.
10952 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
10953 m4_if, m4_patsubst, and m4_regexp.
10954 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
10955 `input' file instead of echo.
10956
10957 2001-08-29 Akim Demaille <akim@epita.fr>
10958
10959 Bump to 1.28e.
10960
10961 2001-08-29 Akim Demaille <akim@epita.fr>
10962
10963 Version 1.28d.
10964
10965 2001-08-29 Paul Eggert <eggert@twinsun.com>
10966
10967 * src/bison.simple (yyparse): Don't take the address of an
10968 item before the start of an array, as that doesn't conform to
10969 the C Standard.
10970
10971 2001-08-29 Robert Anisko <anisko_r@epita.fr>
10972
10973 * doc/bison.texinfo (Location Tracking Calc): New node.
10974
10975 2001-08-29 Paul Eggert <eggert@twinsun.com>
10976
10977 * src/output.c (output): Do not define const, as this now
10978 causes more problems than it cures.
10979
10980 2001-08-29 Akim Demaille <akim@epita.fr>
10981
10982 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
10983 the nodes.
10984 Be sure to tag the `detailmenu'.
10985
10986 2001-08-29 Akim Demaille <akim@epita.fr>
10987
10988 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
10989 download in a tmp dir.
10990
10991 2001-08-28 Marc Autret <autret_m@epita.fr>
10992
10993 * config/depcomp: New file.
10994
10995 2001-08-28 Marc Autret <autret_m@epita.fr>
10996
10997 * doc/bison.1 (mandoc): Adjust.
10998 From Juan Manuel Guerrero.
10999
11000 2001-08-28 Marc Autret <autret_m@epita.fr>
11001
11002 * src/print_graph.c (print_state): Fix.
11003
11004 2001-08-27 Marc Autret <autret_m@epita.fr>
11005
11006 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
11007 char * members.
11008 Echo modifications to the functions prototypes.
11009 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
11010
11011 2001-08-27 Marc Autret <autret_m@epita.fr>
11012
11013 * src/vcg.c: Include `xalloc.h'.
11014 (add_colorentry): New.
11015 (add_classname): New.
11016 (add_infoname): New.
11017 * src/vcg.h: Add new prototypes.
11018
11019 2001-08-27 Akim Demaille <akim@epita.fr>
11020
11021 * Makefile.maint: Sync. again with CVS Autoconf.
11022
11023 2001-08-27 Akim Demaille <akim@epita.fr>
11024
11025 * Makefile.maint: Formatting changes.
11026 (po-update, cvs-update, update): New targets.
11027 (AMTAR): Remove.
11028
11029 2001-08-27 Akim Demaille <akim@epita.fr>
11030
11031 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
11032 * Makefile.maint: Sync. with CVS Autoconf.
11033
11034 2001-08-27 Marc Autret <autret_m@epita.fr>
11035
11036 * src/vcg.h (struct infoname_s): New.
11037 (struct colorentry_s): New.
11038 (graph_s): New fields {vertical,horizontal}_order in structure.
11039 Add `infoname' field.
11040 Add `colorentry' field;
11041 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
11042 (G_HORIZONTAL_ORDER): New.
11043 (G_INFONAME): New.
11044 (G_COLORENTRY): New.
11045 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
11046 Add output of `infoname'.
11047 Add output of `colorentry'.
11048
11049 2001-08-27 Marc Autret <autret_m@epita.fr>
11050
11051 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
11052 This one shadowed a global parameter.
11053
11054 2001-08-24 Marc Autret <autret_m@epita.fr>
11055
11056 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
11057 instead of `unsigned'.
11058 (print_state): Do not call obstack_object_size () in obstack_grow ()
11059 to avoid macro variables shadowing.
11060
11061 2001-08-23 Marc Autret <autret_m@epita.fr>
11062
11063 * src/lex.c (percent_table): Typo: s/naem/name/.
11064 Add graph option.
11065 Normalize new options declarations.
11066
11067 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
11068
11069 * tests/suite.at: Exercise %header_extension and %source_extension.
11070
11071 2001-08-16 Marc Autret <autret_m@epita.fr>
11072
11073 * src/reader.c (parse_dquoted_param): New.
11074 (parse_header_extension_decl): Use it.
11075 (parse_source_extension_decl): Likewise.
11076
11077 2001-08-16 Marc Autret <autret_m@epita.fr>
11078
11079 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
11080 (get_xxxx_str): Use assert () instead of complain ().
11081 Remove return invokations in default cases.
11082 (get_decision_str): Modify default behaviour. Remove second argument.
11083 Echo modifications on calls.
11084 (output_graph): Fix.
11085
11086 2001-08-16 Marc Autret <autret_m@epita.fr>
11087
11088 * src/getargs.c (usage): Update with ``-g, --graph''.
11089
11090 2001-08-16 Marc Autret <autret_m@epita.fr>
11091
11092 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
11093 (Option Cross Key): Likewise.
11094 * doc/bison.1: Update.
11095
11096 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
11097
11098 * src/output.c (output_master_parser): Don't finish action_obstack.
11099 (output_parser): Don't care about the muscle action, here.
11100 (prepare): Copy the action_obstack in the action muscle.
11101 (output): Free action_obstack.
11102
11103 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
11104
11105 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
11106 will contain `%union' declaration.
11107 (parse_union_decl): Delete #line directive output.
11108 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
11109 informations about %union.
11110 (parse_union_decl): Copy the union_obstack in the muscle stype.
11111 * src/bison.simple: Add new #line directive.
11112 Add typdef %%stype YYSTYPE.
11113
11114 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
11115
11116 * src/bison.simple: Add new `#line' directive.
11117
11118 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
11119
11120 * src/bison.simple: New `#line' directive.
11121 * src/output.c (output_parser): Support new dynamic muscle input_line.
11122
11123 2001-09-22 Marc Autret <autret_m@epita.fr>
11124
11125 * src/output.c (output_master_parser): New.
11126 (output_parser): Be more re-entrant.
11127
11128 2001-09-21 Marc Autret <autret_m@epita.fr>
11129
11130 * src/reader.c (copy_definition, parse_union_decl): Update and use
11131 `linef' muscle.
11132 (copy_action): Likewise.
11133 Use obstack_1grow ().
11134 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
11135
11136 2001-09-21 Marc Autret <autret_m@epita.fr>
11137
11138 * src/options.c (option_table): Adjust.
11139 * src/lex.c (parse_percent_token): Fix.
11140
11141 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
11142
11143 * src/options.c (symtab.h): Include it, need by lex.h.
11144
11145 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
11146
11147 * src/lex.c (parse_percent_token): Change type of variable `tx', which
11148 is now an option_table_struct*.
11149 (option_strcmp): New function option_strcmp.
11150 (parse_percent_token): Call option_strcmp.
11151 * src/getargs.c (xalloc.h, options.h): Include it.
11152 (getargs): Call create_long_option_table.
11153 (getargs): Free longopts at the end of the function.
11154 (shortopts): Move in options.c.
11155 * src/options.c (create_long_option_table): New function. Convert
11156 information from option_table to option structure.
11157 * src/reader.c (options.h): Include it.
11158
11159 * src/Makefile.am: Adjust.
11160 * src/options.c (option_table): Create from longopts and percent_table.
11161 * src/getargs.c (longopts): Delete.
11162 * src/lex.c (struct percent_table_struct): Delete.
11163 (percent_table): Delete.
11164 (options.h): Include it.
11165 * src/options.c: Create.
11166 * src/options.h: Create.
11167 Declare enum opt_access_e.
11168 Define struct option_table_struct.
11169
11170 2001-09-20 Marc Autret <autret_m@epita.fr>
11171
11172 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
11173 sections of Bison.
11174
11175 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
11176
11177 * src/bison.simple: s/%%filename/%%skeleton.
11178 * src/muscle_tab.c (getargs.h): Include it.
11179 (muscle_init): Insert new muscle skeleton.
11180
11181 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
11182
11183 * src/output.c (output_parser): Delete unused variable actions_dumped.
11184
11185 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
11186
11187 * src/output.c (output): Delete call to reader_output_yylsp.
11188 * src/reader.c (reader): Likewise.
11189 * src/reader.h: Delete declaration of reader_output_yylsp.
11190
11191 2001-09-02 Marc Autret <autret_m@epita.fr>
11192
11193 * src/reader.c: Include muscle_tab.h.
11194 (parse_union_decl): Update.
11195 (parse_macro_decl): Rename parse_muscle_decl.
11196 Update to use renamed functions and variable.
11197 (read_declarations, copy_action, read_additionnal_code, : Updated
11198 with correct variables and functions names.
11199 (packsymbols, reader): Likewise.
11200
11201 * src/reader.h (muscle_obstack): Extern declaration update.
11202
11203 * src/output.c: Include muscle_tab.h
11204 In all functions using macro_insert, change by using muscle_insert ().
11205 (macro_obstack): Rename muscle_obstack.
11206 Echo modifications in the whole file.
11207 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
11208 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
11209 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
11210
11211 * src/muscle_tab.h: Update double inclusion macros.
11212 (macro_entry_s): Rename muscle_entry_s.
11213 Update prototypes.
11214
11215 * src/muscle_tab.c: Include muscle_tab.h.
11216 Rename macro_tabble to muscle_table.
11217 (mhash1, mhash2, mcmp): Use muscle_entry.
11218 (macro_init): Rename muscle_init. Update.
11219 (macro_insert): Rename muscle_insert. Update.
11220 (macro_find): Rename muscle_find. Update.
11221
11222 * src/main.c: Include muscle_tab.h.
11223 (main): Call muscle_init ().
11224 * src/Makefile.am (bison_SOURCES): Echo modifications.
11225
11226 2001-09-02 Marc Autret <autret_m@epita.fr>
11227
11228 Now the files macro_tab.[ch] are named muscle_tab.[ch].
11229
11230 * src/muscle_tab.c, src/muscle_tab.h: Add files.
11231
11232 2001-09-02 Marc Autret <autret_m@epita.fr>
11233
11234 * src/macrotab.c, src/macrotab.h: Remove.
11235
11236 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
11237
11238 * src/reader.c (copy_guard): Use muscle to specify the `#line'
11239 filename.
11240
11241 2001-09-01 Marc Autret <autret_m@epita.fr>
11242
11243 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
11244 to an explicit value to activate the feature. We do it here.
11245
11246 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11247
11248 * src/output.c (prepare): Delete the `filename' muscule insertion.
11249 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
11250 (parse_union_decl): Likewise.
11251 * src/macrotab.c (macro_init): Initialize filename by infile.
11252
11253 2001-08-31 Marc Autret <autret_m@epita.fr>
11254
11255 * src/bison.simple (YYLSP_NEEDED): New definition.
11256 * src/output.c (prepare): Add macro insertion of `locations_flag'
11257
11258 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11259
11260 * src/output.c (prepare): Delete insertion of previous muscles,
11261 and insert the `prefix' muscles.
11262 * src/macrotab.c (macro_init): Likewise.
11263 (macro_init): Initialization prefix directive by `yy'.
11264 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
11265 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
11266 yylval, yydebug, yyerror, yynerrs and yyparse.
11267 New directive `#define' to substitute yydebug, ... with option
11268 name_prefix.
11269
11270 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11271
11272 * src/main.c (main): Standardize.
11273 * src/output.c (output_table_data, output_parser): Likewise.
11274 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
11275
11276 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
11277
11278 * src/reader.c (read_additionnal_code): Rename %%user_code to
11279 %%epilogue.
11280 * src/output.c (output): Rename %%declarations to %%prologue.
11281 * src/bison.simple: Echo modifications.
11282
11283 2001-08-31 Marc Autret <autret_m@epita.fr>
11284
11285 * src/reader.c (readgram): CleanUp.
11286 (output_token_defines): Likewise.
11287 (packsymbols): Likewise.
11288 (reader): Likewise.
11289 * src/output.c (output): CPP-out useless code.
11290
11291 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
11292
11293 * src/reader.c (reader): Delete obsolete call to function
11294 output_trailers and output_headers.
11295 * src/output.h: Remove obsolete functions prototypes of output_headers
11296 and output_trailers.
11297
11298 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
11299
11300 * src/main.c: Include macrotab.h.
11301 * src/macrotab.h (macro_entry_s): Constify fields.
11302 Adjust functions prototypes.
11303 * src/macrotab.c (macro_insert): Constify key and value.
11304 (macro_find): Constify key.
11305 (macro_insert): Include 'xalloc.h'
11306 (macro_insert): Use XMALLOC.
11307 (macro_find): Constify return value.
11308 * src/output.c (output_table_data): Rename table to table_data.
11309 (output_parser): Constify macro_key, macro_value.
11310
11311 2001-08-30 Marc Autret <autret_m@epita.fr>
11312
11313 * src/reader.c (parse_skel_decl): New.
11314 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
11315 * src/lex.h (token_t): New token `tok_skel'.
11316 * src/lex.c (percent_table): Add skeleton option entry.
11317 Standardize.
11318
11319 2001-08-29 Marc Autret <autret_m@epita.fr>
11320
11321 * src/bison.simple: Add %%user_code directive at the end.
11322 * src/reader.c (read_additionnal_code): New.
11323 (reader): Use it.
11324 * src/output.c (output_program): Remove.
11325 (output): Update.
11326
11327 2001-08-28 Marc Autret <autret_m@epita.fr>
11328
11329 * src/output.c (output_actions): Clean up.
11330 (output_gram): CPP-out useless code.
11331 * src/reader.c (reader): Clean up, CPP-out useless code.
11332
11333 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
11334
11335 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
11336 directive.
11337 * src/bison.simple: Add `%%definitions'.
11338
11339 2001-08-28 Marc Autret <autret_m@epita.fr>
11340
11341 * config/depcomp: New file.
11342
11343 2001-08-27 Paul Eggert <eggert@twinsun.com>
11344
11345 * src/bison.simple (yyparse): Don't take the address of an
11346 item before the start of an array, as that doesn't conform to
11347 the C Standard.
11348
11349 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
11350
11351 * src/output.c (output): Remove the initialization of the macro
11352 obstack. It was done too late here.
11353
11354 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
11355 completely wrong.
11356 (reader): Initialize the macro obstack here, since we need it to grow
11357 '%define' directives.
11358
11359 * src/reader.h: Declare the macro obstack as extern.
11360
11361 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
11362
11363 * src/output.c (output_parser): Fix. Store single '%' characters in
11364 the output obstack instead of throwing them away.
11365
11366 2001-08-27 Akim Demaille <akim@epita.fr>
11367
11368 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
11369
11370 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11371
11372 * lib/Makefile.am: Adjust.
11373
11374 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11375
11376 * src/bison.simple: Update and add '%%' directives.
11377
11378 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11379
11380 * src/reader.c (reader): Remove calls to 'output_headers' and
11381 'output_trailers'. Remove some C output.
11382 (readgram): Disable a piece of code that was writing a default
11383 definition for 'YYSTYPE'.
11384 (reader_output_yylsp): Remove.
11385 (packsymbols): Output token defintions to a macro.
11386 (copy_definition): Disable C output.
11387
11388 * src/reader.c (parse_macro_decl): New function used to parse macro
11389 declarations.
11390 (copy_string2): Put the body of copy_string into this new function.
11391 Add a parameter to let the caller choose whether he wants to copy the
11392 string delimiters or not.
11393 (copy_string): Be a simple call to copy_string2 with the last argument
11394 bound to true.
11395 (read_declarations): Add case for macro definition.
11396 (copy_identifier): New.
11397 (parse_macro_decl): Read macro identifiers using copy_identifier
11398 rather than lex.
11399
11400 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11401
11402 * src/output.c (prepare): Add prefixed names.
11403 (output_parser): Output semantic actions.
11404 (output_parser): Fix bug on '%%line' directives.
11405
11406 * src/output.c (output_headers): Remove. The C code printed by this
11407 function should now be in the skeletons.
11408 (output_trailers): Remove.
11409 (output): Disable call to 'reader_output_yylsp'.
11410 (output_rule_data): Do not output tables to the table obstack.
11411
11412 * src/output.c: Remove some C dedicated output.
11413 Improve the use of macro and output obstacks.
11414 (output_defines): Remove.
11415
11416 * src/output.c (output_token_translations): Associate 'translate'
11417 table with a macro. No output to the table obstack.
11418 (output_gram): Same for 'rhs' and 'prhs'.
11419 (output_stos): Same for 'stos'.
11420 (output_rule_data): Same for 'r1' and 'r2'.
11421 (token_actions): Same for 'defact'.
11422 (goto_actions): Same for 'defgoto'.
11423 (output_base): Same for 'pact' and 'pgoto'.
11424 (output_table): Same for 'table'.
11425 (output_check): Same for 'check'.
11426
11427 * src/output.c (output_table_data): New function.
11428 (output_short_table): Remove.
11429 (output_short_or_char_table): Remove.
11430
11431 * src/output.c (output_parser): Replace most of the skeleton copy code
11432 with something new. Skeletons are now processed character by character
11433 rather than line by line, and Bison looks for '%%' macros. This is the
11434 first step in making Bison's output process (a lot) more flexible.
11435 (output_parser): Use the macro table.
11436
11437 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11438
11439 * src/main.c (main): Initialize the macro table.
11440
11441 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11442
11443 * src/lex.c (percent_table): Add tok_define.
11444 * src/lex.h: Add tok_define.
11445
11446 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11447
11448 * src/macrotab.c: New file.
11449 * src/macrotab.h: New file.
11450 * src/Makefile.am: Update.
11451
11452 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11453
11454 * lib/hash.c: New file.
11455 * lib/hash.h: New file.
11456 * lib/Makefile.am: Update.
11457
11458 2001-08-15 Akim Demaille <akim@epita.fr>
11459
11460 Version 1.28c.
11461
11462 2001-08-15 Marc Autret <autret_m@epita.fr>
11463
11464 * src/reader.c (readgram): Indent output macro YYSTYPE.
11465 (packsymbols): Likewise.
11466 (output_token_defines): Likewise.
11467 * src/files.c: Standardize.
11468 (compute_header_macro): New.
11469 (defines_obstack_save): New. Use compute_header_macro.
11470 (output_files): Update. Use defines_obstack_save.
11471
11472 2001-08-15 Akim Demaille <akim@epita.fr>
11473
11474 * doc/bison.texinfo (Table of Symbols): Document
11475 YYSTACK_USE_ALLOCA.
11476
11477 2001-08-15 Akim Demaille <akim@epita.fr>
11478
11479 * missing: Update from CVS Automake.
11480 * config/config.guess, config/config.sub, config/texinfo.tex:
11481 Update from gnu.org.
11482
11483 2001-08-15 Akim Demaille <akim@epita.fr>
11484
11485 * Makefile.maint: Sync with CVS Autoconf.
11486
11487 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
11488
11489 * doc/bison.texinfo: Include GNU Free Documentation License from
11490 `fdl.texi'.
11491 * doc/fdl.texi: Add to package.
11492
11493 2001-08-14 Marc Autret <autret_m@epita.fr>
11494
11495 Turn on %{source,header}_extension features.
11496
11497 * src/lex.c (percent_table): Un-CPP out header_extension and
11498 source_extension.
11499 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
11500 (compute_exts_from_src): Remove conditions. It restores priorities
11501 between options.
11502
11503 2001-08-14 Marc Autret <autret_m@epita.fr>
11504
11505 * src/files.c (compute_base_names): Add extensions computing when
11506 `--file-prefix' used.
11507 Standardize function calls.
11508
11509 2001-08-13 Marc Autret <autret_m@epita.fr>
11510
11511 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
11512 defining it (defined but null disables alloca).
11513
11514 2001-08-13 Marc Autret <autret_m@epita.fr>
11515
11516 * src/bison.simple (_yy_memcpy): CPP reformat.
11517
11518 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
11519
11520 * tests/atconfig.in (CPPFLAGS): Fix.
11521
11522 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
11523
11524 * doc/bison.texinfo: Include GNU General Public License from
11525 `gpl.texi'.
11526 * doc/gpl.texi: Add to package.
11527
11528 2001-08-10 Marc Autret <autret_m@epita.fr>
11529
11530 * src/print_graph.h: Fix.
11531 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
11532
11533 2001-08-10 Akim Demaille <akim@epita.fr>
11534
11535 * src/system.h: Provide default declarations for stpcpy, strndup,
11536 and strnlen.
11537
11538 2001-08-10 Robert Anisko <anisko_r@epita.fr>
11539
11540 * doc/bison.texinfo (Locations): Update @$ stuff.
11541
11542 2001-08-09 Robert Anisko <anisko_r@epita.fr>
11543
11544 * src/bison.simple (YYLLOC_DEFAULT): Update.
11545 (yyparse): Adjust.
11546
11547 2001-08-08 Marc Autret <autret_m@epita.fr>
11548
11549 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
11550 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
11551 Reported by Fabrice Bauzac.
11552
11553 2001-08-08 Marc Autret <autret_m@epita.fr>
11554
11555 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
11556 * src/vcg.c (output_node): Fix.
11557 * src/vcg.h: Cleanup.
11558 * src/print_graph.c: Add comments.
11559 (node_output_size): New global variable. Simplify the formatting of
11560 the VCG graph output.
11561 (print_actions): Unused code is now used. It notifies the final state
11562 and no action states in the VCG graph. It also give the reduce actions.
11563 The `shift and goto' edges are red and the `go to state' edges are
11564 blue.
11565 Get the current node name and node_obstack by argument.
11566 (node_obstack): New variable.
11567 (print_state): Manage node_obstack.
11568 (print_core): Use node_obstack given by argument.
11569 A node is not only computed here but in print_actions also.
11570 (print_graph): CPP out useless code instead of commenting it.
11571
11572 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
11573
11574 * tests/atconfig.in (CPPFLAGS): Fix.
11575
11576 2001-08-07 Akim Demaille <akim@epita.fr>
11577
11578 * src/print_graph.c (quote): New.
11579 (print_core): Use it.
11580
11581 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
11582
11583 * src/vcg.c (complain.h): Include it.
11584 Unepitaize `return' invocations.
11585 [NDEBUG] (main): Remove.
11586 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
11587 * src/files.c (open_files): Initialize graph_obstack.
11588 * src/print_graph.c (print_actions): CPP out useless code.
11589 (print_core): Don't output the last `\n' in labels.
11590 Use `quote'.
11591 * src/files.c (output_files): Output the VCG file.
11592 * src/main.c (main): Invoke print_graph ();
11593
11594 2001-08-06 Marc Autret <autret_m@epita.fr>
11595
11596 Automaton VCG graph output.
11597 Using option ``-g'' or long option ``--graph'', you can generate
11598 a gram_filename.vcg file containing a VCG description of the LALR (1)
11599 automaton of your grammar.
11600
11601 * src/main.c: Call to print_graph() function.
11602 * src/getargs.h: Update.
11603 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
11604 (graph_flag): New flag.
11605 (longopts): Update.
11606 (getargs): Add case `g'.
11607 * src/files.c (graph_obstack): New obstack struct.
11608 (open_files): Initialize new obstack.
11609 (output_files): Saves graph_obstack if required.
11610 * src/files.h (graph_obstack): New extern declaration.
11611 * src/Makefile.am: Add new source files.
11612
11613 2001-08-06 Marc Autret <autret_m@epita.fr>
11614
11615 * src/print_graph.c, src/print_graph.h (graph): New.
11616 * src/vcg.h: New file.
11617 * src/vcg.c: New file, VCG graph handling.
11618
11619 2001-08-06 Marc Autret <autret_m@epita.fr>
11620
11621 Add of %source_extension and %header_extension which specify
11622 the source or/and the header output file extension.
11623
11624 * src/files.c (compute_base_names): Remove initialisation of
11625 src_extension and header_extension.
11626 (compute_exts_from_gf): Update.
11627 (compute_exts_from_src): Update.
11628 (output_files): Update.
11629 * src/reader.c (parse_header_extension_decl): New.
11630 (parse_source_extension_decl): New.
11631 (read_declarations): New case statements for the new tokens.
11632 * src/lex.c (percent_table): Add entries for %source_extension
11633 and %header_extension.
11634 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
11635
11636 2001-08-06 Marc Autret <autret_m@epita.fr>
11637
11638 * configure.in: Bump to 1.28c.
11639 * doc/bison.texinfo: Texinfo thingies.
11640
11641 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
11642
11643 * tests/atconfig.in (CPPFLAGS): Add.
11644 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
11645
11646 2001-08-03 Akim Demaille <akim@epita.fr>
11647
11648 Version 1.28b.
11649
11650 2001-08-03 Akim Demaille <akim@epita.fr>
11651
11652 * tests/Makefile.am (check-local): Ship testsuite.
11653 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
11654 Include `string.h'.
11655
11656 2001-08-03 Akim Demaille <akim@epita.fr>
11657
11658 * configure.in: Try using -Wformat when compiling.
11659
11660 2001-08-03 Akim Demaille <akim@epita.fr>
11661
11662 * configure.in: Bump to 1.28b.
11663
11664 2001-08-03 Akim Demaille <akim@epita.fr>
11665
11666 * src/complain.c: Adjust strerror_r portability issues.
11667
11668 2001-08-03 Akim Demaille <akim@epita.fr>
11669
11670 Version 1.28a.
11671
11672 2001-08-03 Akim Demaille <akim@epita.fr>
11673
11674 * src/getargs.c, src/getarg.h (skeleton)): Constify.
11675 * src/lex.c (literalchar): Avoid name clashes on `buf'.
11676 * src/getargs.c: Include complain.h.
11677 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
11678 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
11679
11680 2001-08-03 Akim Demaille <akim@epita.fr>
11681
11682 * src/reader.c (readgram): Display hidden chars in error messages.
11683
11684 2001-08-03 Akim Demaille <akim@epita.fr>
11685
11686 Update to gettext 0.10.39.
11687
11688 2001-08-03 Akim Demaille <akim@epita.fr>
11689
11690 * lib/strspn.c: New.
11691
11692 2001-08-01 Marc Autret <autret_m@epita.fr>
11693
11694 * doc/bison.texinfo: Update.
11695 * doc/bison.1 (mandoc): Update.
11696 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
11697 * src/files.c: Support output files extensions computing.
11698 (src_extension): New static variable.
11699 (header_extension): New static variable.
11700 (tr): New function.
11701 (get_extension_index): New function, gets the index of an extension
11702 filename in a string.
11703 (compute_exts_from_gf): New function, computes extensions from the
11704 grammar file extension.
11705 (compute_exts_from_src): New functions, computes extensions from the
11706 C source file extension, file given by ``-o'' option.
11707 (compute_base_names): Update.
11708 (output_files): Update.
11709
11710 2001-08-01 Robert Anisko <anisko_r@epita.fr>
11711
11712 * doc/bison.texi: Document @$.
11713 (Locations): New section.
11714
11715 2001-07-18 Akim Demaille <akim@epita.fr>
11716
11717 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
11718 * config/prev-version.txt, config/move-if-change: New.
11719 * Makefile.am: Adjust.
11720
11721 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
11722
11723 * src/bison.simple (yyparse): Suppress warning `comparaison
11724 between signed and unsigned'.
11725
11726 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
11727
11728 * src/getargs.h (raw_flag): Remove.
11729 * src/getargs.c: Die on `-r'/`--raw'.
11730 * src/lex.c (parse_percent_token): Die on `%raw'.
11731 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
11732 * tests/calc.at: Suppress test with option `--raw'.
11733
11734 2001-07-14 Akim Demaille <akim@epita.fr>
11735
11736 * config/: New.
11737 * configure.in: Require Autoconf 2.50.
11738 Update to gettext 0.10.38.
11739
11740 2001-03-16 Akim Demaille <akim@epita.fr>
11741
11742 * doc/bison.texinfo: ANSIfy the examples.
11743
11744 2001-03-16 Akim Demaille <akim@epita.fr>
11745
11746 * getargs.c (skeleton): New variable.
11747 (longopts): --skeleton is a new option.
11748 (shortopts, getargs): -S is a new option.
11749 * getargs.h: Declare skeleton.
11750 * output.c (output_parser): Use it.
11751
11752 2001-03-16 Akim Demaille <akim@epita.fr>
11753
11754 * m4/strerror_r.m4: New.
11755 * m4/error.m4: Run AC_FUNC_STRERROR_R.
11756 * lib/error.h, lib/error.c: Update.
11757
11758 2001-03-16 Akim Demaille <akim@epita.fr>
11759
11760 * src/getargs.c (longopts): Clean up.
11761
11762 2001-02-21 Akim Demaille <akim@epita.fr>
11763
11764 * src/reader.c (gensym): `gensym_count' is your own.
11765 Use a static buf to create the symbol name, as token_buffer is no
11766 longer a buffer.
11767
11768 2001-02-08 Akim Demaille <akim@epita.fr>
11769
11770 * src/conflicts.c (conflict_report): Be sure not to append to res
11771 between two calls, which could happen if both first sprintf were
11772 skipped, but not the first cp += strlen.
11773
11774 2001-02-08 Akim Demaille <akim@epita.fr>
11775
11776 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
11777 New, from fileutils 4.0.37.
11778 * configure.in: Require Autoconf 2.49c. I took some time before
11779 making this decision. This is the only way out for portability
11780 issues in Bison, it would mean way too much duplicate effort to
11781 import in Bison features implemented in 2.49c since 2.13.
11782 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
11783
11784 2001-02-02 Akim Demaille <akim@epita.fr>
11785
11786 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
11787 * lib/xalloc.h, lib/xmalloc.c: Update.
11788
11789 2001-01-19 Akim Demaille <akim@epita.fr>
11790
11791 Get rid of the ad hoc handling of token_buffer in the scanner: use
11792 the obstacks.
11793
11794 * src/lex.c (token_obstack): New.
11795 (init_lex): Initialize it. No longer call...
11796 (grow_token_buffer): this. Remove it.
11797 Adjust all the places which used it to use the obstack.
11798
11799 2001-01-19 Akim Demaille <akim@epita.fr>
11800
11801 * src/lex.h: Rename all the tokens:
11802 s/\bENDFILE\b/tok_eof/g;
11803 s/\bIDENTIFIER\b/tok_identifier/g;
11804 etc.
11805 Let them be enums, not #define, to ease debugging.
11806 Adjust all the code.
11807
11808 2001-01-18 Akim Demaille <akim@epita.fr>
11809
11810 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
11811 * src/lex.c (maxtoken, grow_token_buffer): Static.
11812
11813 2001-01-18 Akim Demaille <akim@epita.fr>
11814
11815 Since we now use obstacks, more % directives can be enabled.
11816
11817 * src/lex.c (percent_table): Also accept `%yacc',
11818 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
11819 `%debug'.
11820 Handle the actions for `%semantic_parser' and `%pure_parser' here,
11821 instead of returning a token.
11822 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
11823 * src/reader.c (read_declarations): Adjust.
11824 * src/files.c (open_files): Don't call `compute_base_names', don't
11825 compute `attrsfile' since they depend upon data which might be
11826 *in* the input file now.
11827 (output_files): Do it here.
11828 * src/output.c (output_headers): Document the fact that this patch
11829 introduces a guaranteed SEGV for semantic parsers.
11830 * doc/bison.texinfo: Document them.
11831 * tests/suite.at: Exercise these %options.
11832
11833 2000-12-20 Akim Demaille <akim@epita.fr>
11834
11835 Also handle the output file (--verbose) with obstacks.
11836
11837 * files.c (foutput): Remove.
11838 (output_obstack): New.
11839 Adjust all dependencies.
11840 * src/conflicts.c: Return a string.
11841 * src/system.h (obstack_grow_string): Rename as...
11842 (obstack_sgrow): this. Be ready to work with non literals.
11843 (obstack_fgrow4): New.
11844
11845 2000-12-20 Akim Demaille <akim@epita.fr>
11846
11847 * src/files.c (open_files): Fix the computation of short_base_name
11848 in the case of `-o foo.tab.c'.
11849
11850 2000-12-20 Akim Demaille <akim@epita.fr>
11851
11852 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
11853 (copy_dollar): Now that everything uses obstacks, get rid of the
11854 FILE * parameters.
11855
11856 2000-12-20 Akim Demaille <akim@epita.fr>
11857
11858 * src/files.c (open_files): Actually the `.output' file is based
11859 on the short_base_name, not base_name.
11860 * tests/suite.at (Checking output file names): Adjust.
11861
11862 2000-12-20 Akim Demaille <akim@epita.fr>
11863
11864 * src/bison.s1: Remove, we now use directly...
11865 * src/bison.simple: this.
11866 * src/Makefile.am: Use pkgdata instead of data.
11867
11868 2000-12-20 Akim Demaille <akim@epita.fr>
11869
11870 * src/files.c (guard_obstack): New.
11871 (open_files): Initialize it.
11872 (output_files): Dump it...
11873 * src/files.h: Export it.
11874 * src/reader.c (copy_guard): Use it.
11875
11876 2000-12-19 Akim Demaille <akim@epita.fr>
11877
11878 * src/files.c (outfile, defsfile, actfile): Removed as global
11879 vars.
11880 (open_files): Don't compute them.
11881 (output_files): Adjust.
11882 (base_name, short_base_name): Be global.
11883 Adjust dependencies.
11884
11885 2000-12-19 Akim Demaille <akim@epita.fr>
11886
11887 * src/files.c (strsuffix): New.
11888 (stringappend): Be just like strcat but allocate.
11889 (base_names): Eve out from open_files.
11890 Try to simplify the rather hairy computation of base_name and
11891 short_base_name.
11892 (open_files): Use it.
11893 * tests/suite.at (Checking output file names): New test.
11894
11895 2000-12-19 Akim Demaille <akim@epita.fr>
11896
11897 * src/system.h (obstack_grow_literal_string): Rename as...
11898 (obstack_grow_string): this.
11899 * src/output.c (output_parser): Recognize `%% actions' instead of
11900 `$'.
11901 * src/bison.s1: s/$/%% actions/.
11902 * src/bison.hairy: Likewise.
11903
11904 2000-12-19 Akim Demaille <akim@epita.fr>
11905
11906 * src/output.c (output_parser): Compute the `#line' lines when
11907 there are.
11908 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
11909 Suggested by Hans Aberg.
11910
11911 2000-12-19 Akim Demaille <akim@epita.fr>
11912
11913 Let the handling of the skeleton files be local to the procedures
11914 that use it.
11915
11916 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
11917 longer static.
11918 (fparser, open_extra_files): Remove.
11919 (open_files, output_files): Don't take care of fparser.
11920 * src/files.h: Adjust.
11921 * src/output.c (output_parser): Open and close the file to the
11922 skeleton.
11923 * src/reader.c (read_declarations): When %semantic_parser, open
11924 fguard.
11925
11926 2000-12-19 Akim Demaille <akim@epita.fr>
11927
11928 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
11929 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
11930
11931 2000-12-19 Akim Demaille <akim@epita.fr>
11932
11933 * src/files.c (open_files): Yipee! We no longer need all the code
11934 looking for `/tmp' since we have no tmp file.
11935
11936 2000-12-19 Akim Demaille <akim@epita.fr>
11937
11938 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
11939 New macros.
11940 * src/files.c (open_files): Less dependency on MSDOS etc.
11941
11942 2000-12-14 Akim Demaille <akim@epita.fr>
11943
11944 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
11945 Provide a default definition.
11946 Use it when executing the default @ action.
11947 * src/reader.c (reader_output_yylsp): No longer include
11948 `timestamp' and `text' in the default YYLTYPE.
11949
11950 2000-12-12 Akim Demaille <akim@epita.fr>
11951
11952 * src/reader.c (copy_definition, parse_union_decl, copy_action)
11953 (copy_guard): Quote the file names.
11954 Reported by Laurent Mascherpa.
11955
11956 2000-12-12 Akim Demaille <akim@epita.fr>
11957
11958 * src/output.c (output_headers, output_program, output): Be sure
11959 to escape special characters when outputting filenames.
11960 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
11961 (output_headers): Don't depend on them, Use ACTSTR.
11962
11963 2000-11-17 Akim Demaille <akim@epita.fr>
11964
11965 * lib/obstack.h: Formatting changes.
11966 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
11967 prevents type checking.
11968 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
11969 cast the value to (void *): assigning a `foo *' to a `void *'
11970 variable is valid.
11971 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
11972 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
11973 append characters.
11974
11975 2000-11-17 Akim Demaille <akim@epita.fr>
11976
11977 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
11978 as...
11979 (suite.m4, regression.m4, calc.m4): these.
11980 * tests/atgeneral.m4: Update from CVS Autoconf.
11981
11982 2000-11-17 Akim Demaille <akim@epita.fr>
11983
11984 * tests/regression.m4 (%union and --defines): New test,
11985 demonstrating a current bug in the obstack implementation.
11986
11987 2000-11-17 Akim Demaille <akim@epita.fr>
11988
11989 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
11990 macros.
11991 Use them to declare the variables which are global or local to
11992 `yyparse'.
11993
11994 2000-11-17 Akim Demaille <akim@epita.fr>
11995
11996 * acconfig.h: Remove, no longer used.
11997
11998 2000-11-07 Akim Demaille <akim@epita.fr>
11999
12000 * src: s/Copyright (C)/Copyright/g.
12001
12002 2000-11-07 Akim Demaille <akim@epita.fr>
12003
12004 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
12005 defining.
12006 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
12007
12008 2000-11-07 Akim Demaille <akim@epita.fr>
12009
12010 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
12011 Merge in a single CPP if/else.
12012
12013 2000-11-07 Akim Demaille <akim@epita.fr>
12014
12015 * src/output.c (output): Remove useless variables.
12016 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
12017 argument `data' for consistency with the prototypes.
12018 Qualify it `const'.
12019 (obstack_copy, obstack_copy0): Rename the second argument as
12020 `address' for consistency. Qualify it `const'.
12021 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
12022 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
12023 `const' their input argument (`data' or `address').
12024 Adjust the corresponding macros to include `const' in casts.
12025
12026 2000-11-03 Akim Demaille <akim@epita.fr>
12027
12028 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
12029 s/PFILE1/BISON_HAIRY/.
12030 Adjust dependencies.
12031
12032 2000-11-03 Akim Demaille <akim@epita.fr>
12033
12034 For some reason, this was not applied.
12035
12036 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12037 `unlink': it's no longer used.
12038
12039 2000-11-03 Akim Demaille <akim@epita.fr>
12040
12041 * src/files.c (skeleton_find): New function, eved out of...
12042 (open_files, open_extra_files): here.
12043
12044 2000-11-03 Akim Demaille <akim@epita.fr>
12045
12046 Don't use `atexit'.
12047
12048 * src/files.c (obstack_save): New function.
12049 (done): Rename as...
12050 (output_files): this.
12051 Use `obstack_save'.
12052 * src/main.c (main): Don't use `atexit' to register `done', since
12053 it no longer has to remove tmp files, just call `output_files'
12054 when there are no errors.
12055
12056 2000-11-02 Akim Demaille <akim@epita.fr>
12057
12058 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
12059 `unlink': it's no longer used.
12060 * src/files.h: Formatting changes.
12061
12062 2000-11-02 Akim Demaille <akim@epita.fr>
12063
12064 Remove the last uses of mktemp and unlink/delete.
12065
12066 * src/files.c (fdefines, ftable): Removed.
12067 (defines_ostack, table_obstack): New.
12068 Adjust dependencies of the former into uses of the latter.
12069 * src/output.c (output_short_or_char_table, output_short_table):
12070 Convert to using obstacks.
12071 * src/reader.c (copy_comment2): Accept one FILE * and two
12072 obstacks.
12073 (output_token_defines, reader_output_yylsp): Use obstacks.
12074 * src/system.h (obstack_fgrow3): New.
12075 * po/POTFILES.in: Adjust.
12076
12077 2000-11-01 Akim Demaille <akim@epita.fr>
12078
12079 Change each use of `fattrs' into a use of `attrs_obstack'.
12080
12081 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
12082 * src/files.c (fattrs): Remove.
12083 (attrs_obstack): New.
12084 Adjust all dependencies.
12085 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
12086
12087 2000-11-01 Akim Demaille <akim@epita.fr>
12088
12089 Introduce obstacks.
12090 Change each use of `faction' into a use of `action_obstack'.
12091
12092 * lib/obstack.h, lib/obstack.c: New files.
12093 * src/files.c (faction): Remove.
12094 (action_obstack): New.
12095 Adjust all dependencies.
12096
12097 2000-10-20 Akim Demaille <akim@epita.fr>
12098
12099 * lib/quote.h (PARAMS): New macro. Use it.
12100
12101 2000-10-16 Akim Demaille <akim@epita.fr>
12102
12103 * src/output.c (output_short_or_char_table): New function.
12104 (output_short_table, output_token_translations): Use it.
12105 (goto_actions): Use output_short_table.
12106
12107 2000-10-16 Akim Demaille <akim@epita.fr>
12108
12109 * src/symtab.c (bucket_new): New function.
12110 (getsym): Use it.
12111
12112 * src/output.c (output_short_table): New argument to display the
12113 comment associated with the table.
12114 Adjust dependencies.
12115 (output_gram): Use it.
12116 (output_rule_data): Nicer output layout for YYTNAME.
12117
12118 2000-10-16 Akim Demaille <akim@epita.fr>
12119
12120 * src/lex.c (read_typename): New function.
12121 (lex): Use it.
12122 * src/reader.c (copy_dollar): Likewise.
12123
12124 2000-10-16 Akim Demaille <akim@epita.fr>
12125
12126 * src/reader.c (copy_comment2): Expect the input stream to be on
12127 the `/' which is suspected to open a comment, instead of being
12128 called after `//' or `/*' was read.
12129 (copy_comment, copy_definition, parse_union_decl, copy_action)
12130 (copy_guard): Adjust.
12131
12132 2000-10-16 Akim Demaille <akim@epita.fr>
12133
12134 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
12135 `read_signed_integer'.
12136
12137 2000-10-16 Akim Demaille <akim@epita.fr>
12138
12139 * src/reader.c (copy_dollar): New function.
12140 (copy_guard, copy_action): Use it.
12141
12142 2000-10-16 Akim Demaille <akim@epita.fr>
12143
12144 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
12145 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
12146 New files, from Fileutils 4.0.27.
12147 * src/main.c (printable_version): Remove.
12148 * src/lex.c, src/reader.c: Use `quote'.
12149
12150 2000-10-04 Akim Demaille <akim@epita.fr>
12151
12152 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
12153
12154 2000-10-04 Akim Demaille <akim@epita.fr>
12155
12156 * doc/bison.texinfo: Various typos spotted by Neil Booth.
12157
12158 2000-10-04 Akim Demaille <akim@epita.fr>
12159
12160 When a literal string is used to define two different tokens,
12161 `bison -v' segfaults.
12162 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
12163
12164 * tests/regression.m4: New file.
12165 Include the core of the sample provided by Piotr Gackiewicz.
12166 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
12167 properly.
12168
12169 2000-10-04 Akim Demaille <akim@epita.fr>
12170
12171 * src/reader.c (parse_expect_decl): Keep `count' within the size
12172 of `buffer'.
12173 From Neil Booth.
12174
12175 2000-10-02 Paul Eggert <eggert@twinsun.com>
12176
12177 * bison.s1 (yyparse): Assign the default value
12178 unconditionally, to avoid a GCC warning and make the parser a
12179 tad smaller.
12180
12181 2000-10-02 Akim Demaille <akim@epita.fr>
12182
12183 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
12184 options.
12185
12186 2000-10-02 Akim Demaille <akim@epita.fr>
12187
12188 * src/derives.c, src/print.c, src/reduce.c: To ease the
12189 translation, move some `\n' out of the translated strings.
12190
12191 2000-10-02 Akim Demaille <akim@epita.fr>
12192
12193 The location tracking mechanism is precious for parse error
12194 messages. Nevertheless, it is enabled only when `@n' is used in
12195 the grammar, which is a different issue (you can use it in error
12196 message, but not in the grammar per se). Therefore, there should
12197 be another means to enable it.
12198
12199 * src/getargs.c (getargs): Support `--locations'.
12200 (usage): Report it.
12201 * src/getargs.h (locationsflag): Export it.
12202 * src/lex.c (percent_table): Support `%locations'.
12203 * src/reader.c (yylsp_needed): Remove this variable, now replaced
12204 with `locationsflag'.
12205 * doc/bison.texinfo: Document `--locations' and `%locations'.
12206 Sort the options.
12207 * tests/calc.m4: Test it.
12208
12209 For regularity of the names, replace each
12210 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
12211 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
12212 In addition replace each `flag' with `_flag'.
12213
12214 2000-10-02 Akim Demaille <akim@epita.fr>
12215
12216 Also test parse error messages, including with YYERROR_VERBOSE.
12217
12218 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
12219 associative).
12220 Use it to check the computations.
12221 Use it to check `nonassoc' is honored.
12222 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
12223 `--yyerror-verbose'.
12224 (_AT_CHECK_CALC): Adjust to this option.
12225 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
12226
12227 2000-10-02 Akim Demaille <akim@epita.fr>
12228
12229 Test also `--verbose', `--defines' and `--name-prefix'. Testing
12230 the latter demonstrates a flaw in the handling of non debugging
12231 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
12232 was used in order to simplify:
12233
12234 #if YYDEBUG
12235 if (yydebug)
12236 {
12237 ...
12238 }
12239 #endif
12240
12241 into
12242
12243 if (yydebug)
12244 {
12245 ...
12246 }
12247
12248 unfortunately this leads to a CPP conflict when
12249 `--name-prefix=foo' is used since it produces `#define yydebug
12250 foodebug'.
12251
12252 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
12253 (YYDPRINTF): New macro.
12254 Spread its use.
12255 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
12256 the bison options.
12257 Also test `--verbose', `--defines' and `--name-prefix'.
12258
12259 2000-10-02 Akim Demaille <akim@epita.fr>
12260
12261 Improve the readability of the produced parsers.
12262
12263 * src/bison.s1: Formatting changes.
12264 Improve the comment related to the `$' mark.
12265 (yydefault): Don't fall through to `yyresume': `goto' there.
12266 * src/output.c (output_parser): When the `$' is met, skip the end
12267 of its line.
12268 New variable, `number_of_dollar_signs', to check there's exactly
12269 one `$' in the parser skeleton.
12270
12271 2000-10-02 Akim Demaille <akim@epita.fr>
12272
12273 * lib/xstrdup.c: New file, from the fileutils.
12274 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
12275 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
12276 instead of strlen + xmalloc + strcpy.
12277 * src/symtab.c (copys): Remove, use xstrdup instead.
12278
12279 2000-10-02 Akim Demaille <akim@epita.fr>
12280
12281 * src/gram.h (associativity): New enum type which replaces the
12282 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
12283 `right_assoc', `left_assoc' and `non_assoc'.
12284 Adjust all dependencies.
12285 * src/reader.c: Formatting changes.
12286 (LTYPESTR): Don't define it, use it as a literal in
12287 `reader_output_yylsp'.
12288 * src/symtab.h (symbol_class): New enum type which replaces the
12289 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
12290 `sunknown', `stoken and `snterm'.
12291
12292 2000-10-02 Akim Demaille <akim@epita.fr>
12293
12294 * src/getargs.c (fixed_outfiles): Rename as...
12295 (yaccflag): for consistency and accuracy.
12296 Adjust dependencies.
12297
12298 2000-10-02 Akim Demaille <akim@epita.fr>
12299
12300 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
12301 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
12302 difficult and introduced a lot of core dump. It turns out that
12303 Bison used an implementation of `xmalloc' based on `calloc', and
12304 at various places it does depend upon the initialization to 0. I
12305 have not tried to isolate the pertinent places, and all the former
12306 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
12307 someone should address this issue.
12308
12309 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
12310 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
12311 files.
12312 Adjust dependencies.
12313 * src/warshall.h: New file.
12314 Propagate.
12315
12316 2000-10-02 Akim Demaille <akim@epita.fr>
12317
12318 Various anti-`extern in *.c' changes.
12319
12320 * src/system.h: Include `assert.h'.
12321
12322 2000-10-02 Akim Demaille <akim@epita.fr>
12323
12324 * src/state.h (nstates, final_state, first_state, first_shift)
12325 (first_reduction): Move their exportation from here...
12326 * src/LR0.h: to here.
12327 Adjust dependencies.
12328 * src/getargs.c (statisticsflag): New variable.
12329 Add support for `--statistics'.
12330 Adjust dependencies.
12331
12332 Remove a lot of now useless `extern' statements in most files.
12333
12334 2000-10-02 Akim Demaille <akim@epita.fr>
12335
12336 * src/LR0.h: New file.
12337 Propagate its use.
12338
12339 2000-10-02 Akim Demaille <akim@epita.fr>
12340
12341 * src/print.h: New file.
12342 Propagate its use.
12343 * src/print.c: Formatting and ordering changes.
12344 (verbose, terse): Replace with...
12345 (print_results): this new function.
12346 Adjust dependencies.
12347
12348 2000-10-02 Akim Demaille <akim@epita.fr>
12349
12350 * src/conflicts.c (conflict_report): New function.
12351 (conflict_log, verbose_conflict_log): Replace with...
12352 (print_conflicts): this function.
12353 Adjust dependencies.
12354 * src/conflicts.h: New file.
12355 Propagate its inclusion.
12356
12357 2000-10-02 Akim Demaille <akim@epita.fr>
12358
12359 * src/nullable.h: New file.
12360 Propagate its inclusion.
12361 * src/nullable.c: Formatting changes.
12362
12363 2000-10-02 Akim Demaille <akim@epita.fr>
12364
12365 * src/reduce.h: New file.
12366 Propagate its inclusion.
12367 * src/reduce.c: Topological sort and other formatting changes.
12368 (bool, TRUE, FALSE): Move their definition to...
12369 * src/system.h: here.
12370
12371 2000-10-02 Akim Demaille <akim@epita.fr>
12372
12373 * src/files.c: Formatting changes.
12374 (tryopen, tryclose, openfiles): Rename as...
12375 (xfopen, xfclose, open_files): this.
12376 (stringappend): static.
12377 * src/files.h: Complete the list of exported symbols.
12378 Propagate its use.
12379
12380 2000-10-02 Akim Demaille <akim@epita.fr>
12381
12382 * src/reader.h: New file.
12383 Propagate its use instead of tedious list of `extern' and
12384 prototypes.
12385 * src/reader.c: Formatting changes, topological sort,
12386 s/register//.
12387
12388 2000-10-02 Akim Demaille <akim@epita.fr>
12389
12390 * src/lex.h: Prototype `lex.c' exported functions.
12391 * src/reader.c: Adjust.
12392 * src/lex.c: Formatting changes.
12393 (safegetc): Rename as...
12394 (xgetc): this.
12395
12396 2000-10-02 Akim Demaille <akim@epita.fr>
12397
12398 * src/lalr.h: New file.
12399 Propagate its inclusion instead of prototypes and `extern'.
12400 * src/lalr.c: Formatting changes, topological sorting etc.
12401
12402 2000-10-02 Akim Demaille <akim@epita.fr>
12403
12404 * src/output.c (token_actions): Introduce a temporary array,
12405 YYDEFACT, that makes it possible for this function to use
12406 output_short_table.
12407
12408 2000-10-02 Akim Demaille <akim@epita.fr>
12409
12410 `user_toknums' is output as a `short[]' in `output.c', while it is
12411 defined as a `int[]' in `reader.c'. For consistency with the
12412 other output tables, `user_toknums' is now defined as a table of
12413 shorts.
12414
12415 * src/reader.c (user_toknums): Be a short table instead of an int
12416 table.
12417 Adjust dependencies.
12418
12419 Factor the short table outputs.
12420
12421 * src/output.c (output_short_table): New function.
12422 * src/output.c (output_gram, output_stos, output_rule_data)
12423 (output_base, output_table, output_check): Use it.
12424
12425 2000-10-02 Akim Demaille <akim@epita.fr>
12426
12427 * src/output.c (output): Topological sort of the functions, in
12428 order to get rid of the `static' prototypes.
12429 No longer use `register'.
12430 * src/output.h: New file.
12431 Propagate its inclusion in files explicitly prototyping functions
12432 from output.c.
12433
12434 2000-09-21 Akim Demaille <akim@epita.fr>
12435
12436 * src/atgeneral.m4: Update from Autoconf.
12437
12438 2000-09-21 Akim Demaille <akim@epita.fr>
12439
12440 * src/closure.h: New file.
12441 * src/closure.c: Formatting changes, topological sort over the
12442 functions, use of closure.h.
12443 (initialize_closure, finalize_closure): Rename as...
12444 (new_closure, free_closure): these. Adjust dependencies.
12445 * src/LR0.c: Formatting changes, topological sort, use of
12446 cloture.h.
12447 (initialize_states): Rename as...
12448 (new_states): this.
12449 * src/Makefile.am (noinst_HEADERS): Adjust.
12450
12451 2000-09-20 Akim Demaille <akim@epita.fr>
12452
12453 * src/acconfig.h: Don't protect config.h against multiple
12454 inclusion.
12455 Don't define PARAMS.
12456 * src/system.h: Define PARAMS.
12457 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
12458 purpose of config.h. system.h must not try to fix wrong
12459 definitions in config.h.
12460
12461 2000-09-20 Akim Demaille <akim@epita.fr>
12462
12463 * src/derives.h: New file.
12464 * src/main.c, src/derives.h: Use it.
12465 Formatting changes.
12466 * src/Makefile.am (noinst_HEADERS): Adjust.
12467
12468 2000-09-20 Akim Demaille <akim@epita.fr>
12469
12470 * tests/atgeneral.m4: Update from Autoconf.
12471 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
12472 (AT_CHECK_CALC): New macros.
12473 Use these macros to test bison with options `', `--raw',
12474 `--debug', `--yacc', `--yacc --debug'.
12475
12476 2000-09-19 Akim Demaille <akim@epita.fr>
12477
12478 * src/output.c: Formatting changes.
12479 * src/machine.h: Remove, leaving its contents in...
12480 * src/system.h: here.
12481 Include stdio.h.
12482 Adjust all dependencies on stdio.h and machine.h.
12483 * src/getargs.h: New file.
12484 Let all `extern' declarations about getargs.c be replaced with
12485 inclusion of `getargs.h'.
12486 * src/Makefile.am (noinst_HEADERS): Adjust.
12487
12488 * tests/calc.m4 (yyin): Be initialized in main, not on the global
12489 scope.
12490 (yyerror): Returns void, not int.
12491 * doc/bison.texinfo: Formatting changes.
12492
12493 2000-09-19 Akim Demaille <akim@epita.fr>
12494
12495 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
12496 portable.
12497
12498 2000-09-18 Akim Demaille <akim@epita.fr>
12499
12500 * configure.in: Append WARNING_CFLAGS to CFLAGS.
12501 * src/Makefile.am (INCLUDES): Don't.
12502 Be ready to fetch headers in lib/.
12503
12504 2000-09-18 Akim Demaille <akim@epita.fr>
12505
12506 * doc/bison.texinfo: Update the copyright.
12507 ANSIfy and GNUify the examples.
12508 Remove the old menu.
12509
12510 2000-09-18 Akim Demaille <akim@epita.fr>
12511
12512 First set of tests: use the `calc' example from the documentation.
12513
12514 * src/bison.s1 (yyparse): Condition the code using `yytname' which
12515 is defined only when YYDEBUG is.
12516 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
12517 * src/files.c (tryopen, tryclose): Formatting changes.
12518 Move to the top and be static.
12519 * src/reader.c (read_signed_integer): Likewise.
12520 * tests/calc.m4: New file.
12521 * Makefile.am, suite.m4: Adjust.
12522 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
12523
12524 2000-09-18 Akim Demaille <akim@epita.fr>
12525
12526 Add support for an Autotest test suite for Bison.
12527
12528 * m4/m4.m4, m4/atconfig.m4: New files.
12529 * m4/Makefile.am (EXTRA_DIST): Adjust.
12530 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
12531 files.
12532 * src/getargs.c: Display a more standard --version message.
12533 * src/reader.c (reader): Formatting changes.
12534 No longer depend upon VERSION_STRING.
12535 * configure.in: No longer use `dnl'.
12536 Set up the test suite and the new directory `tests/.
12537 (VERSION_STRING): Remove.
12538
12539 2000-04-14 Akim Demaille <akim@epita.fr>
12540
12541 * src/reader.c (copy_comment2): New function, same as former
12542 `copy_comment', but outputs into two FILE *.
12543 (copy_comment): Use it.
12544 (parse_union_decl): Use it.
12545 (get_type, parse_start_decl): Use the same `invalid' message.
12546 (parse_start_decl, parse_union_decl): Use the same `multiple'
12547 message.
12548 (parse_union_decl, copy_guard, copy_action): Use the same
12549 `unmatched' message.
12550 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
12551
12552 2000-03-31 Akim Demaille <akim@epita.fr>
12553
12554 * src/files.c (tryopen, tryclose): Move to the top.
12555 Be static.
12556
12557 2000-03-31 Akim Demaille <akim@epita.fr>
12558
12559 * src/main.c (main): Don't call `done', exit does it.
12560
12561 2000-03-31 Akim Demaille <akim@epita.fr>
12562
12563 * allocate.c: s/return (foo)/return foo/.
12564 * lalr.c: Likewise.
12565 * LR0.c: Likewise.
12566 * output.c: Likewise.
12567 * reader.c: Likewise.
12568 * symtab.c: Likewise.
12569 * vmsgetargs.c: Likewise.
12570
12571 2000-03-31 Akim Demaille <akim@epita.fr>
12572
12573 Clean up the error reporting functions.
12574
12575 * src/report.c: New file.
12576 * src/report.h: Likewise.
12577 * src/Makefile.am: Adjust.
12578 * m4/error.m4: New file.
12579 * m4/Makefile.am: Adjust.
12580 * configure.in (jm_PREREQ_ERROR): Call it.
12581 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
12582 Remove.
12583 (fatal, fatals): Remove. All callers use complain.c::fatal.
12584 (warn, warni, warns, warnss, warnss): Remove. All callers use
12585 complain.c::complain.
12586 (toomany): Remove, use fatal instead.
12587 * src/files.c (done): No argument, use complain_message_count.
12588 * src/main.c (main): Register `done' to `atexit'.
12589
12590 * src/getargs.c (usage): More `fputs', less `fprintf'.
12591
12592 2000-03-28 Akim Demaille <akim@epita.fr>
12593
12594 * lib/: New directory.
12595 * Makefile.am (SUBDIRS): Adjust.
12596 * configure.in: Adjust.
12597 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
12598 useless.
12599 * src/alloca.c: Moved to lib/.
12600 * src/getopt.c: Likewise.
12601 * src/getopt1.c: Likewise.
12602 * src/getopt.h: Likewise.
12603 * src/ansi2knr.c: Likewise.
12604 * src/ansi2knr.1: Likewise.
12605 * src/Makefile.am: Adjust.
12606 * lib/Makefile.am: New file.
12607
12608 2000-03-28 Akim Demaille <akim@epita.fr>
12609
12610 * src/getargs.c (usage): Refresh the help message.
12611
12612 2000-03-17 Akim Demaille <akim@epita.fr>
12613
12614 * src/getopt1.c: Updated from textutils 2.0e
12615 * src/getopt.c: Likewise.
12616 * src/getopt.h: Likewise.
12617
12618 2000-03-17 Akim Demaille <akim@epita.fr>
12619
12620 * src/Makefile.am (bison.simple): Fix the awk program: quote only
12621 the file name, not the whole `#line LINE FILE'.
12622
12623 2000-03-17 Akim Demaille <akim@epita.fr>
12624
12625 On syntax errors, report the token on which we choked.
12626
12627 * src/bison.s1 (yyparse): In the label yyerrlab, when
12628 YYERROR_VERBOSE, add yychar in msg.
12629
12630 2000-03-17 Akim Demaille <akim@epita.fr>
12631
12632 * src/reader.c (copy_at): New function.
12633 (copy_guard): Use it.
12634 (copy_action): Use it.
12635
12636 2000-03-17 Akim Demaille <akim@epita.fr>
12637
12638 Be kind to translators, save some useless translations.
12639
12640 * src/main.c (banner): New function.
12641 (fatal_banner): Use it.
12642 (warn_banner): Use it.
12643
12644 2000-03-17 Akim Demaille <akim@epita.fr>
12645
12646 * src/reader.c (copy_definition): Use copy_string and
12647 copy_comment. Removed now unused `match', `ended',
12648 `cplus_comment'.
12649 (copy_comment, copy_string): Moved, to be visible from
12650 copy_definition.
12651
12652 2000-03-17 Akim Demaille <akim@epita.fr>
12653
12654 * src/reader.c (copy_string): Declare `static inline'. No
12655 problems with inline, since it is checked by configure.
12656 (copy_comment): Likewise.
12657
12658 2000-03-17 Akim Demaille <akim@epita.fr>
12659
12660 * src/reader.c (packsymbols): Formatting changes.
12661
12662 2000-03-17 Akim Demaille <akim@epita.fr>
12663
12664 * src/reader.c (copy_comment): New function, factored out from:
12665 (copy_action): Use it. Removed now unused `match', `ended',
12666 `cplus_comment'.
12667 (copy_guard): Likewise.
12668
12669 2000-03-17 Akim Demaille <akim@epita.fr>
12670
12671 * src/reader.c (copy_string): New function, factored out from:
12672 (copy_action): Use it.
12673 (copy_guard): Likewise.
12674
12675 2000-03-17 Akim Demaille <akim@epita.fr>
12676
12677 Change the handling of @s so that they behave exactly like $s.
12678 There is now a pseudo variable @$ (readble and writable), location
12679 of the lhs of the rule (by default ranging from the location of
12680 the first symbol of the rhs, to the location of the last symbol,
12681 or, if the rhs is empty, YYLLOC).
12682
12683 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
12684 yyval.
12685 (yyparse): When providing a default semantic action, provide a
12686 default location action.
12687 (after the $): No longer change `*YYLSP', just stack YYLOC the
12688 same way you stack YYVAL.
12689 * src/reader.c (read_declarations): Use warns.
12690 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
12691 (copy_action, case '@'): Likewise.
12692 Use a standard error message, to save useless work from
12693 translators.
12694
12695 2000-03-17 Akim Demaille <akim@epita.fr>
12696
12697 * src/bison.s1: Formatting and cosmetics changes.
12698 * src/reader.c: Likewise.
12699 Update the Copyright notice.
12700
12701 2000-03-17 Akim Demaille <akim@epita.fr>
12702
12703 * src/bison.s1 (#line): All set to `#line' only, since the
12704 Makefile now handles them.
12705
12706 2000-03-16 Akim Demaille <akim@epita.fr>
12707
12708 * src/output.c (output_rule_data): Output the documentation of
12709 some of the tables.
12710 (Copyright notice): Update.
12711 Formatting changes.
12712
12713 2000-03-16 Akim Demaille <akim@epita.fr>
12714
12715 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
12716 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
12717 One `#if YYDEBUG' remains, since it uses variables which are
12718 defined only if `YYDEBUG != 0'.
12719
12720 2000-03-16 Akim Demaille <akim@epita.fr>
12721
12722 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
12723 and related variables so that the similarities are highlighted.
12724
12725 2000-03-16 Akim Demaille <akim@epita.fr>
12726
12727 * src/bison.s1: Properly indent CPP directives.
12728
12729 2000-03-16 Akim Demaille <akim@epita.fr>
12730
12731 * src/bison.s1: Properly indent the `alloca' CPP section.
12732
12733 2000-03-16 Akim Demaille <akim@epita.fr>
12734
12735 Do not hard code values of directories in `configure.in'.
12736 Update the `configure' tool chain.
12737
12738 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
12739 src/makefile.am.
12740 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
12741 (AC_OUTPUT): Add m4/Makefile.
12742 Bump to bison 1.28a, 1.29 has never been released.
12743 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
12744 handled via src/Makefile.am.
12745 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
12746 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
12747 autoheader.
12748 * Makefile.am (SUBDIRS): Add m4.
12749 (ACLOCAL_AM_FLAGS): New variable.
12750 (AUTOMAKE_OPTIONS): Add check-news.
12751 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
12752 the proper line number and file name.
12753 (DEFS): Propagate the location of bison library files and of the
12754 locale files.
12755 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
12756 builddir.
12757 * acinclude.m4: Remove, replaced by the directory m4.
12758 * m4/Makefile.am (EXTRA_DIST): New variable.
12759 * m4/gettext.m4: New file, from the fileutils.
12760 * m4/lcmessage.m4: Likewise
12761 * m4/progtest.m4: Likewise.
12762 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
12763
12764 2000-03-10 Akim Demaille <akim@epita.fr>
12765
12766 * src/closure.c:
12767 Formatting changes of various comments.
12768 Respect the GNU coding standards at various places.
12769 Don't use `_()' when no translation is needed.
12770
12771 1999-12-13 Jesse Thilo <jthilo@gnu.org>
12772
12773 * src/files.c:
12774 OS/2 honors TMPDIR environment variable.
12775
12776 1999-12-13 Jesse Thilo <jthilo@gnu.org>
12777
12778 * doc/bison.texinfo: Tweaked spelling and grammar.
12779 Updated ISBN.
12780 Removed reference to price of printed copy.
12781 Mention BISON_SIMPLE and BISON_HAIRY.
12782
12783 1999-12-13 Jesse Thilo <jthilo@gnu.org>
12784
12785 * configure.in, NEWS:
12786 Bison 1.29 released.
12787
12788 1999-10-27 Jesse Thilo <jthilo@gnu.org>
12789
12790 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
12791 Added reference card.
12792
12793 1999-07-26 Jesse Thilo <jthilo@gnu.org>
12794
12795 * po/ru.po: Added Russian translation.
12796
12797 1999-07-26 Jesse Thilo <jthilo@gnu.org>
12798
12799 * configure.in: Added Russian translation.
12800
12801 1999-07-06 Jesse Thilo <jthilo@gnu.org>
12802
12803 * configure.in, NEWS, README:
12804 Released version 1.28.
12805
12806 1999-06-14 Jesse Thilo <jthilo@gnu.org>
12807
12808 * src/system.h:
12809 Squashed redefinition warning on some systems.
12810
12811 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
12812 Have configure build version string instead of relying on ANSI string
12813 concatentation.
12814
12815 1999-06-14 Jesse Thilo <jthilo@gnu.org>
12816
12817 * po/POTFILES.in: Got rid of version.c.
12818
12819 1999-06-14 Jesse Thilo <jthilo@gnu.org>
12820
12821 * acconfig.h, configure.in:
12822 Have configure build version string instead of relying on ANSI string
12823 concatentation.
12824
12825 1999-06-08 Jesse Thilo <jthilo@gnu.org>
12826
12827 * doc/bison.1:
12828 Dropped mention of `+' for long-named options.
12829
12830 1999-05-30 Jesse Thilo <jthilo@gnu.org>
12831
12832 * src/files.c: Added <unistd.h> for unlink().
12833
12834 * src/Makefile.am, src/system.h:
12835 I18n fixes.
12836
12837 1999-05-30 Jesse Thilo <jthilo@gnu.org>
12838
12839 * README: Added a FAQ list.
12840
12841 * configure.in, acconfig.h:
12842 I18n fixes.
12843
12844 1999-05-30 Jesse Thilo <jthilo@gnu.org>
12845
12846 * doc/FAQ, doc/Makefile.am:
12847 Added a FAQ list.
12848
12849 1999-05-19 Jesse Thilo <jthilo@gnu.org>
12850
12851 * src/alloc.h, src/symtab.h, src/version.c:
12852 Protected inclusion of "config.h" with HAVE_CONFIG_H.
12853
12854 1999-04-18 Jesse Thilo <jthilo@gnu.org>
12855
12856 * src/.cvsignore, src/Makefile.am:
12857 Reorganized: sources in `src', documentation in `doc'.
12858
12859 * src/lex.c (literalchar):
12860 fixed the code for escaping double quotes (thanks
12861 Jonathan Czisny.)
12862
12863 1999-04-18 Jesse Thilo <jthilo@gnu.org>
12864
12865 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
12866 Adjusted paths to reflect directory reorganization.
12867
12868 1999-04-18 Jesse Thilo <jthilo@gnu.org>
12869
12870 * doc/.cvsignore, doc/Makefile.am:
12871 Reorganized: sources in `src', documentation in `doc'.
12872
12873 1999-04-18 Jesse Thilo <jthilo@gnu.org>
12874
12875 * configure.in:
12876 Updated AC_INIT file to reflect directory reorganization.
12877
12878 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
12879 Reorganized: sources in `src', documentation in `doc'.
12880
12881 1999-04-13 Jesse Thilo <jthilo@gnu.org>
12882
12883 * src/allocate.c:
12884 Don't declare calloc() and realloc() if not necessary.
12885
12886 1999-04-13 Jesse Thilo <jthilo@gnu.org>
12887
12888 * configure.in, acconfig.h, acinclude.m4:
12889 Don't declare calloc() and realloc() if not necessary.
12890
12891 1999-03-23 Jesse Thilo <jthilo@gnu.org>
12892
12893 * po/.cvsignore: Added i18n support.
12894
12895 1999-03-23 Jesse Thilo <jthilo@gnu.org>
12896
12897 * acconfig.h, configure.in, Makefile.am:
12898 Added i18n support.
12899
12900 1999-03-22 Jesse Thilo <jthilo@gnu.org>
12901
12902 * src/bison.s1: Fixed #line numbers.
12903
12904 1999-03-15 Jesse Thilo <jthilo@gnu.org>
12905
12906 * po/es.po, po/fr.po, po/nl.po, po/de.po:
12907 Added PO files from Translation Project.
12908
12909 1999-03-03 Jesse Thilo <jthilo@gnu.org>
12910
12911 * Makefile.am:
12912 Added support for non-ANSI compilers (ansi2knr).
12913
12914 1999-02-16 Jesse Thilo <jthilo@gnu.org>
12915
12916 * configure.in: Bumped version number to 1.27.
12917
12918 * Makefile.am:
12919 Added `bison.simple' to list of files removed by `make distclean'.
12920
12921 1999-02-12 Jesse Thilo <jthilo@gnu.org>
12922
12923 * src/files.c, src/files.h:
12924 Defined locations of parser files in config.h instead of Makefile.
12925
12926 1999-02-12 Jesse Thilo <jthilo@gnu.org>
12927
12928 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
12929 Defined locations of parser files in config.h instead of Makefile.
12930
12931 1999-02-09 Jesse Thilo <jthilo@gnu.org>
12932
12933 * Makefile.am:
12934 Removed inappropriate use of $< macro.
12935
12936 1999-02-05 Jesse Thilo <jthilo@gnu.org>
12937
12938 * po/Makefile.in.in, po/POTFILES.in:
12939 Add `po' directory skeleton.
12940
12941 1999-01-27 Jesse Thilo <jthilo@gnu.org>
12942
12943 * README: Document help-bison list.
12944
12945 * configure.in: Add check for mkstemp().
12946
12947 1999-01-20 Jesse Thilo <jthilo@gnu.org>
12948
12949 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
12950 Hush a few compiler warnings.
12951
12952 * src/files.c:
12953 Add tryclose(), which verifies that fclose was successful.
12954 Hush a couple of compiler warnings.
12955
12956 1999-01-20 Jesse Thilo <jthilo@gnu.org>
12957
12958 * Makefile.am, OChangeLog:
12959 ChangeLog is now automatically generated. Include the old version as
12960 OChangeLog.
12961
12962 1999-01-14 Jesse Thilo <jthilo@gnu.org>
12963
12964 * 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:
12965 Update FSF address.
12966
12967 1999-01-14 Jesse Thilo <jthilo@gnu.org>
12968
12969 * doc/bison.texinfo: Fix formatting glitch.
12970
12971 * doc/bison.texinfo: Update FSF address.
12972
12973 1999-01-14 Jesse Thilo <jthilo@gnu.org>
12974
12975 * acconfig.h: Update FSF address.
12976
12977 1999-01-08 Jesse Thilo <jthilo@gnu.org>
12978
12979 * src/system.h:
12980 Don't define PACKAGE here, since config.h defines it.
12981
12982 1998-12-30 Jesse Thilo <jthilo@gnu.org>
12983
12984 * src/reader.c: Update copyright date.
12985
12986 * src/main.c:
12987 Ditch sprintf to statically-sized buffers in fatal/warn functions in
12988 favor of output directly to stderr (avoids buffer overruns).
12989
12990 * src/reader.c: Some checks for premature EOF.
12991
12992 * 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:
12993 Use prototypes if the compiler understands them.
12994
12995 * src/files.c: Honor TMPDIR on Unix hosts.
12996 Use prototypes if the compiler understands them.
12997
12998 * src/reader.c:
12999 Fix a couple of buffer overrun bugs.
13000 Use prototypes if the compiler understands them.
13001
13002 * src/system.h: Include unistd.h and ctype.h.
13003 Use #ifdef instead of #if for NLS symbols.
13004
13005 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13006
13007 * doc/bison.texinfo:
13008 Delete comment "consider using @set for edition number, etc..." since
13009 we now are doing so.
13010
13011 1998-12-30 Jesse Thilo <jthilo@gnu.org>
13012
13013 * configure.in:
13014 Use prototypes if the compiler understands them.
13015
13016 * NEWS: Document 1.26 highlights.
13017
13018 * Makefile.am: Require Automake 1.3 or later.
13019
13020 * acconfig.h:
13021 Use prototypes if the compiler understands them.
13022
13023 1998-12-29 Jesse Thilo <jthilo@gnu.org>
13024
13025 * src/version.c:
13026 Use VERSION symbol from automake for version number.
13027
13028 1998-12-29 Jesse Thilo <jthilo@gnu.org>
13029
13030 * acconfig.h, configure.in, version.cin:
13031 Use VERSION symbol from automake for version number.
13032
13033 1998-11-28 Jesse Thilo <jthilo@gnu.org>
13034
13035 * Makefile.am:
13036 Distribute original version of simple parser (bison.s1), not built
13037 version (bison.simple).
13038
13039 1998-11-28 Jesse Thilo <jthilo@gnu.org>
13040
13041 * doc/bison.texinfo: Add info dir entry.
13042
13043 * doc/bison.texinfo:
13044 Let automake put version number into documentation.
13045
13046 1998-11-26 Jesse Thilo <jthilo@gnu.org>
13047
13048 * src/bison.cld, src/build.com, src/vmshlp.mar:
13049 Add non-RCS files from /gd/gnu/bison.
13050
13051 1998-11-26 Jesse Thilo <jthilo@gnu.org>
13052
13053 * doc/bison.1:
13054 Document the BISON_HAIRY and BISON_SIMPLE variables.
13055
13056 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13057
13058 * src/version.c: Build version.c automatically.
13059
13060 * src/reader.c:
13061 Fix token numbering (used to start at 258, not 257).
13062
13063 * src/system.h: Include config.h.
13064
13065 * src/getargs.c: Update bug report address.
13066
13067 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
13068 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
13069
13070 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13071
13072 * Makefile.am:
13073 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13074
13075 * configure.in, version.cin:
13076 Build version.c automatically.
13077
13078 * AUTHORS: Add AUTHORS file.
13079
13080 * README: Update bug report address.
13081
13082 * bison.simple:
13083 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
13084
13085 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
13086 Add automake stuff.
13087
13088 1998-11-25 Jesse Thilo <jthilo@gnu.org>
13089
13090 * doc/bison.texinfo: Clean up some formatting.
13091
13092 1998-05-05 Richard Stallman <rms@gnu.org>
13093
13094 * doc/bison.texinfo:
13095 Explain better why to make a pure parser.
13096
13097 1998-01-05 Richard Stallman <rms@gnu.org>
13098
13099 * src/files.c (openfiles):
13100 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
13101 find a temporary directory, if possible. Do not unlink files while
13102 they are open.
13103
13104 1997-08-25 Richard Stallman <rms@gnu.org>
13105
13106 * src/reader.c (stack_offset;):
13107 Change some warni to warns.
13108
13109 * src/lex.c (literalchar): Use warns, not warni.
13110
13111 1997-06-28 Richard Stallman <rms@gnu.org>
13112
13113 * src/bison.s1: Add a Bison version comment.
13114
13115 * src/main.c (fatal, warn, berror):
13116 Use program_name.
13117
13118 1997-06-28 Richard Stallman <rms@gnu.org>
13119
13120 * Makefile.in (bison_version): New variable.
13121 (dist): Use that variable.
13122 (bison.s1): Substitute the Bison version into bison.simple.
13123
13124 * bison.simple: Add a Bison version comment.
13125
13126 1997-06-18 Richard Stallman <rms@gnu.org>
13127
13128 * src/main.c (fatal, warn, berror):
13129 Make error messages standard.
13130 (toomany): Improve error message text.
13131
13132 * 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:
13133 new.h renamed to alloc.h.
13134
13135 1997-06-18 Richard Stallman <rms@gnu.org>
13136
13137 * Makefile.in: new.h renamed to alloc.h.
13138
13139 1997-05-24 Richard Stallman <rms@gnu.org>
13140
13141 * src/lex.c (literalchar):
13142 Fix the code for escaping \, " and '.
13143
13144 (lex): Avoid trouble when there are many chars
13145 to discard in a char literal with just several chars in it.
13146
13147 1997-05-17 Richard Stallman <rms@gnu.org>
13148
13149 * src/bison.s1:
13150 Use malloc, if using alloca is troublesome.
13151 (YYSTACK_USE_ALLOCA): New flag macro.
13152 Define it for some systems and compilers.
13153 (YYSTACK_ALLOC): New macro.
13154 (yyparse): Use YYSTACK_ALLOC to allocate stack.
13155 If it was malloc'd, free it.
13156
13157 1997-05-17 Richard Stallman <rms@gnu.org>
13158
13159 * bison.simple:
13160 Use malloc, if using alloca is troublesome.
13161 (YYSTACK_USE_ALLOCA): New flag macro.
13162 Define it for some systems and compilers.
13163 (YYSTACK_ALLOC): New macro.
13164 (yyparse): Use YYSTACK_ALLOC to allocate stack.
13165 If it was malloc'd, free it.
13166
13167 1997-04-23 Richard Stallman <rms@gnu.org>
13168
13169 * src/bison.s1:
13170 (alloca) [__hpux]: Always define as __builtin_alloca.
13171
13172 1997-04-23 Richard Stallman <rms@gnu.org>
13173
13174 * bison.simple:
13175 (alloca) [__hpux]: Always define as __builtin_alloca.
13176
13177 1997-04-22 Richard Stallman <rms@gnu.org>
13178
13179 * src/bison.s1:
13180 [__hpux]: Include alloca.h (right for HPUX 10)
13181 instead of declaring alloca (right for HPUX 9).
13182
13183 * src/bison.s1 (__yy_memcpy):
13184 Declare arg `count' as unsigned int.
13185 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
13186
13187 1997-04-22 Richard Stallman <rms@gnu.org>
13188
13189 * bison.simple:
13190 [__hpux]: Include alloca.h (right for HPUX 10)
13191 instead of declaring alloca (right for HPUX 9).
13192
13193 * bison.simple (__yy_memcpy):
13194 Declare arg `count' as unsigned int.
13195 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
13196
13197 1997-01-03 Richard Stallman <rms@gnu.org>
13198
13199 * src/allocate.c: [__STDC__ or _MSC_VER]:
13200 Declare calloc and realloc to return void *.
13201
13202 1997-01-02 Richard Stallman <rms@gnu.org>
13203
13204 * src/system.h:
13205 [_MSC_VER]: Include stdlib.h and process.h.
13206 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
13207
13208 * src/main.c (main): Return FAILURE as a value.
13209 (printable_version): Declare arg as int, not char.
13210
13211 1997-01-02 Richard Stallman <rms@gnu.org>
13212
13213 * Makefile.in (dist):
13214 Explicitly check for symlinks, and copy them.
13215
13216 1996-12-19 Richard Stallman <rms@gnu.org>
13217
13218 * src/files.c:
13219 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
13220
13221 1996-12-18 Paul Eggert <eggert@gnu.org>
13222
13223 * src/bison.s1 (yyparse):
13224 If __GNUC__ and YYPARSE_PARAM are both defined,
13225 declare yyparse to have a void * argument.
13226
13227 1996-12-18 Paul Eggert <eggert@gnu.org>
13228
13229 * bison.simple (yyparse):
13230 If __GNUC__ and YYPARSE_PARAM are both defined,
13231 declare yyparse to have a void * argument.
13232
13233 1996-12-17 Richard Stallman <rms@gnu.org>
13234
13235 * src/reduce.c (nbits): Add some casts.
13236
13237 1996-08-12 Richard Stallman <rms@gnu.org>
13238
13239 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
13240
13241 1996-08-12 Richard Stallman <rms@gnu.org>
13242
13243 * bison.simple: Test _MSDOS as well as _MSDOS_.
13244
13245 1996-07-31 Richard Stallman <rms@gnu.org>
13246
13247 * src/bison.s1:
13248 [__sun && __i386]: Include alloca.h.
13249
13250 1996-07-31 Richard Stallman <rms@gnu.org>
13251
13252 * bison.simple:
13253 [__sun && __i386]: Include alloca.h.
13254
13255 1996-07-30 Richard Stallman <rms@gnu.org>
13256
13257 * src/bison.s1: Comment change.
13258
13259 * src/bison.s1: Test _MSDOS_, not MSDOS.
13260
13261 1996-07-30 Richard Stallman <rms@gnu.org>
13262
13263 * bison.simple: Comment change.
13264
13265 * bison.simple: Test _MSDOS_, not MSDOS.
13266
13267 1996-06-01 Richard Stallman <rms@gnu.org>
13268
13269 * 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:
13270 Insert `_' macro around many string constants.
13271
13272 * src/main.c:
13273 Insert `_' macro around many string constants.
13274
13275 (main): Call setlocale, bindtextdomain and textdomain.
13276
13277 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
13278 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
13279 [ENABLE_NLS]: Include libintl.h.
13280 [ENABLE_NLS] (gettext): Define.
13281 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
13282 (N_, PACKAGE, LOCALEDIR): New macros.
13283
13284 1996-06-01 Richard Stallman <rms@gnu.org>
13285
13286 * POTFILES.in: New file.
13287
13288 * Makefile.in (allocate.o):
13289 Define target explicitly.
13290
13291 * Makefile.in (CFLAGS): Set to @CFLAGS@.
13292 (LDFLAGS): Set to @LDFLAGS@.
13293 (configure): Run autoconf only if preceding `cd' succeeds.
13294 (bison.s1): Redirect output to temporary file then move the
13295 temporary to the target, rather than redirecting directly to bison.s1.
13296 (clean): Remove config.status and config.log.
13297 (distclean): Don't remove config.status here.
13298
13299 1996-05-12 Richard Stallman <rms@gnu.org>
13300
13301 * src/bison.s1:
13302 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
13303
13304 1996-05-12 Richard Stallman <rms@gnu.org>
13305
13306 * bison.simple:
13307 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
13308
13309 1996-05-11 Richard Stallman <rms@gnu.org>
13310
13311 * src/bison.s1 (__yy_memcpy):
13312 Really reorder the args, as was supposedly done on Feb 14 1995.
13313 (yyparse): Calls changed accordingly.
13314
13315 1996-05-11 Richard Stallman <rms@gnu.org>
13316
13317 * Makefile.in (dist): Don't use $(srcdir).
13318
13319 * bison.simple (__yy_memcpy):
13320 Really reorder the args, as was supposedly done on Feb 14 1995.
13321 (yyparse): Calls changed accordingly.
13322
13323 1996-01-27 Richard Stallman <rms@gnu.org>
13324
13325 * src/output.c (output_rule_data):
13326 Test YYERROR_VERBOSE in the conditional
13327 around the definition of ttyname.
13328
13329 1995-12-29 Richard Stallman <rms@gnu.org>
13330
13331 * src/bison.s1:
13332 Fix line numbers in #line commands.
13333
13334 1995-12-29 Richard Stallman <rms@gnu.org>
13335
13336 * bison.simple:
13337 Fix line numbers in #line commands.
13338
13339 1995-12-27 Richard Stallman <rms@gnu.org>
13340
13341 * src/bison.s1 (YYPARSE_PARAM_DECL):
13342 In C++, make it always null.
13343 (YYPARSE_PARAM_ARG): New macro.
13344 (yyparse): Use YYPARSE_PARAM_ARG.
13345
13346 1995-12-27 Richard Stallman <rms@gnu.org>
13347
13348 * bison.simple (YYPARSE_PARAM_DECL):
13349 In C++, make it always null.
13350 (YYPARSE_PARAM_ARG): New macro.
13351 (yyparse): Use YYPARSE_PARAM_ARG.
13352
13353 1995-11-29 Richard Stallman <rms@gnu.org>
13354
13355 * doc/bison.texinfo:
13356 Describe literal string tokens, %raw, %no_lines, %token_table.
13357
13358 1995-11-29 Daniel Hagerty <hag@gnu.org>
13359
13360 * doc/bison.texinfo: Fixed update date
13361
13362 1995-10-16 Richard Stallman <rms@gnu.org>
13363
13364 * src/version.c: Version 1.25.
13365
13366 1995-10-16 Richard Stallman <rms@gnu.org>
13367
13368 * NEWS: *** empty log message ***
13369
13370 1995-10-16 Richard Stallman <rms@gnu.org>
13371
13372 * doc/bison.1, doc/bison.rnh:
13373 Add new options.
13374
13375 1995-10-15 Richard Stallman <rms@gnu.org>
13376
13377 * src/vmsgetargs.c, src/getargs.c:
13378 Added -n, -k, and -raw switches.
13379 (noparserflag, toknumflag, rawtoknumflag): New variables.
13380
13381 * src/symtab.h (SALIAS):
13382 New #define for adding aliases to %token.
13383 (struct bucket): Added `alias' field.
13384
13385 * src/reduce.c (reduce_grammar):
13386 Revise error message.
13387 (print_notices): Remove final `.' from error message.
13388
13389 * src/reader.c (reader_output_yylsp):
13390 New function.
13391 (readgram): Use `#if 0' around code that accepted %command
13392 inside grammar rules: The documentation doesn't allow it,
13393 and it will fail since the %command processors scan for the next %.
13394 (parse_token_decl): Extended the %token
13395 declaration to allow a multi-character symbol as an alias.
13396 (parse_thong_decl): New function.
13397 (read_declarations): Added %thong declarations.
13398 (read_declarations): Handle NOOP to deal with allowing
13399 % declarations as another means to specify the flags.
13400 (readgram): Allow %prec prior to semantics embedded in a rule.
13401 (skip_to_char, read_declarations, copy_definition)
13402 (parse_token_decl, parse_start_decl, parse_type_decl)
13403 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
13404 (get_type_name, copy_guard, copy_action, readgram)
13405 (get_type, packsymbols): Revised most error messages.
13406 Changed `fatal' to `warnxxx' to avoid aborting for error.
13407 Revised and use multiple warnxxx functions to avoid using VARARGS1.
13408 (read_declarations): Improve the error message for
13409 an invalid character. Do not abort.
13410 (read_declarations, copy_guard, copy_action): Use
13411 printable_version to avoid unprintable characters in printed output.
13412 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
13413 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
13414 Allow the type of a non-terminal can be given
13415 more than once, as long as all specifications give the same type.
13416
13417 * src/output.c:
13418 (output_headers, output_trailers, output, output_gram)
13419 (output_rule_data): Implement noparserflag variable.
13420 Implement toknumflag variable.
13421 (output): Call reader_output_yylsp to output LTYPESTR.
13422
13423 * src/main.c (main):
13424 If reader sees an error, don't process the grammar.
13425 (fatals): Updated to not use VARARGS1.
13426 (printable_version, int_to_string, warn, warni, warns, warnss)
13427 (warnsss): New error reporting functions. Avoid abort for error.
13428
13429 * src/lex.h:
13430 Added THONG and NOOP for alias processing.
13431 Added SETOPT for the new code that allows setting options with %flags.
13432
13433 * src/lex.c:
13434 Include getopt.h. Add some extern decls.
13435 (safegetc): New function to deal with EOF gracefully.
13436 (literalchar); new function to deal with reading \ escapes.
13437 (lex): Use literalchar.
13438 (lex): Implemented "..." tokens.
13439 (literalchar, lex, parse_percent_token): Made tokenbuffer
13440 always contain the token. This includes growing the token
13441 buffer while reading an integer.
13442 (parse_percent_token): Replaced if-else statement with percent_table.
13443 (parse_percent_token): Added % declarations as another
13444 way to specify the flags -n, -l, and -r. Also added hooks for
13445 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
13446 major changes to files.c.
13447 (lex) Retain in the incoming stream a character following
13448 an incorrect '/'.
13449 (skip_white_space, lex): Revised most error messages
13450 and changed fatal to warn to avoid aborting.
13451 (percent_table): Added %thong declarations.
13452
13453 * src/gram.h: Comment changes.
13454
13455 * src/files.c (openfiles, open_extra_files, done):
13456 Add faction flag
13457 and actfile file. Handle noparserflag. Both for -n switch.
13458
13459 * src/conflicts.c (resolve_sr_conflict):
13460 Remove use of alloca.
13461
13462 1995-06-01 Jim Meyering <meyering@gnu.org>
13463
13464 * doc/bison.texinfo: *** empty log message ***
13465
13466 1995-05-06 Richard Stallman <rms@gnu.org>
13467
13468 * src/bison.s1: Comment change.
13469
13470 1995-05-06 Richard Stallman <rms@gnu.org>
13471
13472 * bison.simple: Comment change.
13473
13474 1995-05-03 Richard Stallman <rms@gnu.org>
13475
13476 * src/version.c: Version now 1.24.
13477
13478 * src/bison.s1: Change distribution terms.
13479
13480 * src/version.c: Version now 1.23.
13481
13482 1995-05-03 Richard Stallman <rms@gnu.org>
13483
13484 * doc/bison.texinfo:
13485 Rewrite "Conditions for Using Bison".
13486 Update version to 1.24.
13487
13488 1995-05-03 Richard Stallman <rms@gnu.org>
13489
13490 * bison.simple: Change distribution terms.
13491
13492 1995-02-23 Richard Stallman <rms@gnu.org>
13493
13494 * src/files.c: Test __VMS_POSIX as well as VMS.
13495
13496 1995-02-14 Jim Meyering <meyering@gnu.org>
13497
13498 * src/bison.s1 (__yy_memcpy):
13499 Renamed from __yy_bcopy to avoid
13500 confusion. Reverse FROM and TO arguments to be consistent with
13501 those of memcpy.
13502
13503 1995-02-14 Jim Meyering <meyering@gnu.org>
13504
13505 * bison.simple (__yy_memcpy):
13506 Renamed from __yy_bcopy to avoid
13507 confusion. Reverse FROM and TO arguments to be consistent with
13508 those of memcpy.
13509
13510 1994-11-10 David J. MacKenzie <djm@gnu.org>
13511
13512 * NEWS: reformat
13513
13514 * NEWS: New file.
13515
13516 * Makefile.in (DISTFILES): Include NEWS.
13517
13518 * Makefile.in (DISTFILES):
13519 Include install-sh, not install.sh.
13520
13521 * configure.in: Update to Autoconf v2 macro names.
13522
13523 1994-10-05 David J. MacKenzie <djm@gnu.org>
13524
13525 * Makefile.in: fix typo
13526
13527 * Makefile.in (prefix, exec_prefix):
13528 Let configure set them.
13529
13530 1994-09-28 David J. MacKenzie <djm@gnu.org>
13531
13532 * Makefile.in: Set datadir to $(prefix)/share.
13533
13534 1994-09-15 Richard Stallman <rms@gnu.org>
13535
13536 * src/bison.s1:
13537 Update copyright notice and GPL version.
13538
13539 1994-09-15 Richard Stallman <rms@gnu.org>
13540
13541 * bison.simple:
13542 Update copyright notice and GPL version.
13543
13544 1994-07-12 Richard Stallman <rms@gnu.org>
13545
13546 * src/reduce.c, src/reader.c:
13547 entered into RCS
13548
13549 1994-05-05 David J. MacKenzie <djm@gnu.org>
13550
13551 * Makefile.in: entered into RCS
13552
13553 1994-03-26 Richard Stallman <rms@gnu.org>
13554
13555 * src/bison.s1: entered into RCS
13556
13557 1994-03-26 Richard Stallman <rms@gnu.org>
13558
13559 * bison.simple: entered into RCS
13560
13561 1994-03-25 Richard Stallman <rms@gnu.org>
13562
13563 * src/main.c: entered into RCS
13564
13565 1994-03-24 Richard Stallman <rms@gnu.org>
13566
13567 * src/conflicts.c: entered into RCS
13568
13569 1994-01-02 Richard Stallman <rms@gnu.org>
13570
13571 * Makefile.in: *** empty log message ***
13572
13573 1993-11-21 Richard Stallman <rms@gnu.org>
13574
13575 * src/bison.s1: *** empty log message ***
13576
13577 1993-11-21 Richard Stallman <rms@gnu.org>
13578
13579 * doc/bison.texinfo: entered into RCS
13580
13581 * doc/bison.texinfo: *** empty log message ***
13582
13583 1993-11-21 Richard Stallman <rms@gnu.org>
13584
13585 * bison.simple: *** empty log message ***
13586
13587 1993-10-25 David J. MacKenzie <djm@gnu.org>
13588
13589 * doc/bison.texinfo: *** empty log message ***
13590
13591 1993-10-19 Richard Stallman <rms@gnu.org>
13592
13593 * src/bison.s1: *** empty log message ***
13594
13595 1993-10-19 Richard Stallman <rms@gnu.org>
13596
13597 * bison.simple: *** empty log message ***
13598
13599 1993-10-14 Richard Stallman <rms@gnu.org>
13600
13601 * src/bison.s1: *** empty log message ***
13602
13603 1993-10-14 Richard Stallman <rms@gnu.org>
13604
13605 * bison.simple: *** empty log message ***
13606
13607 1993-09-14 David J. MacKenzie <djm@gnu.org>
13608
13609 * doc/bison.texinfo: *** empty log message ***
13610
13611 1993-09-13 Noah Friedman <friedman@gnu.org>
13612
13613 * Makefile.in: *** empty log message ***
13614
13615 1993-09-10 Richard Stallman <rms@gnu.org>
13616
13617 * src/conflicts.c: *** empty log message ***
13618
13619 * src/system.h: entered into RCS
13620
13621 1993-09-10 Richard Stallman <rms@gnu.org>
13622
13623 * doc/bison.1: entered into RCS
13624
13625 1993-09-06 Noah Friedman <friedman@gnu.org>
13626
13627 * src/version.c: entered into RCS
13628
13629 1993-09-06 Noah Friedman <friedman@gnu.org>
13630
13631 * Makefile.in: *** empty log message ***
13632
13633 1993-07-30 David J. MacKenzie <djm@gnu.org>
13634
13635 * Makefile.in: *** empty log message ***
13636
13637 1993-07-24 Richard Stallman <rms@gnu.org>
13638
13639 * src/bison.s1: *** empty log message ***
13640
13641 1993-07-24 Richard Stallman <rms@gnu.org>
13642
13643 * bison.simple: *** empty log message ***
13644
13645 1993-07-08 David J. MacKenzie <djm@gnu.org>
13646
13647 * Makefile.in: *** empty log message ***
13648
13649 1993-07-04 Richard Stallman <rms@gnu.org>
13650
13651 * src/bison.s1: *** empty log message ***
13652
13653 1993-07-04 Richard Stallman <rms@gnu.org>
13654
13655 * bison.simple: *** empty log message ***
13656
13657 1993-06-26 David J. MacKenzie <djm@gnu.org>
13658
13659 * src/getargs.c: entered into RCS
13660
13661 1993-06-26 David J. MacKenzie <djm@gnu.org>
13662
13663 * doc/bison.texinfo: *** empty log message ***
13664
13665 * doc/bison.1: New file.
13666
13667 1993-06-25 Richard Stallman <rms@gnu.org>
13668
13669 * src/getargs.c: New file.
13670
13671 1993-06-16 Richard Stallman <rms@gnu.org>
13672
13673 * src/bison.s1: *** empty log message ***
13674
13675 1993-06-16 Richard Stallman <rms@gnu.org>
13676
13677 * bison.simple: *** empty log message ***
13678
13679 1993-06-03 Richard Stallman <rms@gnu.org>
13680
13681 * src/bison.s1: New file.
13682
13683 1993-06-03 Richard Stallman <rms@gnu.org>
13684
13685 * doc/bison.texinfo: *** empty log message ***
13686
13687 1993-06-03 Richard Stallman <rms@gnu.org>
13688
13689 * bison.simple: New file.
13690
13691 1993-05-19 Richard Stallman <rms@gnu.org>
13692
13693 * doc/bison.texinfo: New file.
13694
13695 1993-05-07 Noah Friedman <friedman@gnu.org>
13696
13697 * Makefile.in: *** empty log message ***
13698
13699 1993-04-28 Noah Friedman <friedman@gnu.org>
13700
13701 * src/reader.c: *** empty log message ***
13702
13703 1993-04-23 Noah Friedman <friedman@gnu.org>
13704
13705 * src/alloc.h: entered into RCS
13706
13707 1993-04-20 David J. MacKenzie <djm@gnu.org>
13708
13709 * src/version.c: *** empty log message ***
13710
13711 * src/files.c, src/allocate.c:
13712 entered into RCS
13713
13714 * src/reader.c: *** empty log message ***
13715
13716 * src/lex.c: entered into RCS
13717
13718 * src/conflicts.c: New file.
13719
13720 * src/symtab.c: entered into RCS
13721
13722 * src/alloc.h: New file.
13723
13724 * src/LR0.c: entered into RCS
13725
13726 1993-04-18 Noah Friedman <friedman@gnu.org>
13727
13728 * src/reader.c: New file.
13729
13730 * src/version.c: *** empty log message ***
13731
13732 1993-04-18 Noah Friedman <friedman@gnu.org>
13733
13734 * Makefile.in: *** empty log message ***
13735
13736 1993-04-17 Noah Friedman <friedman@gnu.org>
13737
13738 * Makefile.in: *** empty log message ***
13739
13740 1993-04-15 Richard Stallman <rms@gnu.org>
13741
13742 * src/main.c, src/files.c:
13743 New file.
13744
13745 1993-04-15 Noah Friedman <friedman@gnu.org>
13746
13747 * configure.in: entered into RCS
13748
13749 * configure.in: *** empty log message ***
13750
13751 * configure.in: New file.
13752
13753 1993-04-14 Richard Stallman <rms@gnu.org>
13754
13755 * Makefile.in: New file.
13756
13757 1993-04-13 Richard Stallman <rms@gnu.org>
13758
13759 * src/version.c: New file.
13760
13761 1993-03-25 Richard Stallman <rms@gnu.org>
13762
13763 * src/output.c: entered into RCS
13764
13765 1992-09-25 Richard Stallman <rms@gnu.org>
13766
13767 * configure.bat: entered into RCS
13768
13769 1992-06-22 Richard Stallman <rms@gnu.org>
13770
13771 * src/vmsgetargs.c: entered into RCS
13772
13773 1992-06-22 Richard Stallman <rms@gnu.org>
13774
13775 * doc/bison.rnh: entered into RCS
13776
13777 1992-04-20 David J. MacKenzie <djm@gnu.org>
13778
13779 * README: entered into RCS
13780
13781 1992-01-22 Richard Stallman <rms@gnu.org>
13782
13783 * src/machine.h: entered into RCS
13784
13785 1991-12-21 Richard Stallman <rms@gnu.org>
13786
13787 * src/lalr.c, src/closure.c:
13788 entered into RCS
13789
13790 1991-12-20 Richard Stallman <rms@gnu.org>
13791
13792 * src/state.h: entered into RCS
13793
13794 1991-12-18 Richard Stallman <rms@gnu.org>
13795
13796 * src/print.c, src/nullable.c, src/derives.c:
13797 entered into RCS
13798
13799 1991-11-03 David J. MacKenzie <djm@gnu.org>
13800
13801 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
13802 entered into RCS
13803
13804 1988-09-09 Richard Stallman <rms@gnu.org>
13805
13806 * src/bison.hairy: entered into RCS
13807
13808 1987-12-16 Richard Stallman <rms@gnu.org>
13809
13810 * REFERENCES: entered into RCS
13811
13812 -----
13813
13814 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
13815 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
13816
13817 This file is part of Bison, the GNU Compiler Compiler.
13818
13819 Bison is free software; you can redistribute it and/or modify
13820 it under the terms of the GNU General Public License as published by
13821 the Free Software Foundation; either version 2, or (at your option)
13822 any later version.
13823
13824 Bison is distributed in the hope that it will be useful,
13825 but WITHOUT ANY WARRANTY; without even the implied warranty of
13826 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13827 GNU General Public License for more details.
13828
13829 You should have received a copy of the GNU General Public License
13830 along with Bison; see the file COPYING. If not, write to
13831 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
13832 Boston, MA 02110-1301, USA.