]> git.saurik.com Git - bison.git/blob - ChangeLog
* data/lalr1.cc (_): New.
[bison.git] / ChangeLog
1 2005-05-30 Akim Demaille <akim@epita.fr>
2
3 * data/lalr1.cc (_): New.
4 Translate the various messages.
5
6 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
7
8 Fix infringement on user name space reported by Bruno Haible.
9 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
10 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
11 the user's name space.
12 (alloca): Include <stdlib.h> to get it, if it's not built in.
13 (YYMALLOC, YYFREE): Define only if needed.
14 (malloc, free): Declare, but only if needed, as this infringes on
15 the user name space.
16
17 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
18
19 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
20 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
21 with %d format.
22 * lib/ebitset.c (min, max): Undef before defining.
23 * lib/vbitset.c (min, max): Likewise.
24 * lib/subpipe.c (create_subpipe): Save local variables in case
25 vfork clobbers them.
26
27 2005-05-24 Bruno Haible <bruno@clisp.org>
28
29 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
30 error message syntax used by gcc-4.0.
31
32 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
33
34 * README: Mention m4 1.4.3. Remove obsolete advice about
35 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
36
37 * bootstrap: Remove workaround for problem I encountered with
38 gettext 0.14.1; it seems to be fixed now.
39
40 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
41
42 * NEWS: Version 2.0a.
43
44 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
45 the previous change.
46
47 Various maintainer cleanups.
48 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
49 conftest*, for benefit of CVS commands run at the same time as
50 "configure". Add build-aux, since "bootstrap" now creates it and
51 its subfiles.
52 * Makefile.cfg (move_if_change): Remove.
53 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
54 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
55 (po_repo, do-po-update, po-update, wget_files, get-targets):
56 (config.guess-url_prefix, config.sub-url_prefix):
57 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
58 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
59 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
60 Remove.
61 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
62 this is now the recommended name.
63 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
64 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
65 ylwrap. These files now go into build-aux.
66 * config/move-if-change: Remove.
67 * config/prev-version.txt: Bump from 1.75 to 2.0.
68
69 * bootstrap: Add stdio-safer, unistd-safer modules.
70 Remove m4/glibc2.m4 (introduced by latest gnulib, but
71 we don't need it).
72 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
73 fopen-safer.c, stdio-safer.h, unistd-safer.h.
74 * lib/subpipe.c: Include "unistd-safer.h".
75 (create_subpipe): Make sure all the newly-created
76 file descriptors are > 2, so that diagnostics don't
77 get sent down them (which might cause Bison to hang, in theory).
78 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
79 * src/files.c (xfopen): Use fopen_safer, not fopen.
80
81 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
82 yesterday's yacc.c fix.
83
84 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
85
86 * data/glr.c, data/lalr1.cc: Update copyright date.
87
88 Fix a destructor bug reported by Wolfgang Spraul in
89 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
90 * data/yacc.c (yyabortlab): Don't call destructor, and
91 don't set yychar to EMPTY.
92 (yyoverflowlab): Don't call destructor.
93 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
94 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
95 since we no longer output the message "discarding lookahead token
96 end of input ()".
97
98 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
99
100 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
101 fix a small glitch in debugging output.
102 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
103 after YY_SYMBOL_PRINT where needed.
104
105 (struct yyGLRState): Add some comments.
106 (struct yySemanticOption): Add some comments.
107 (union yyGLRStackItem): Add comment.
108
109 (yymergeOptionSets): Correct this to properly perform the union,
110 avoiding infinite reported by Michael Rosien.
111 Update comment.
112
113 * tests/glr-regression.at: Add test for GLR merging error reported
114 by M. Rosien.
115
116 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
117
118 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
119 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
120 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
121 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
122 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
123 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
124 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
125 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
126 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
127 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
128 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
129 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
130 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
131 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
132 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
133 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
134 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
135 src/derives.h, src/files.c, src/files.h, src/getargs.c,
136 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
137 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
138 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
139 src/output.h, src/parse-gram.c, src/parse-gram.h,
140 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
141 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
142 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
143 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
144 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
145 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
146 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
147 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
148 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
149 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
150 tests/reduce.at, tests/regression.at, tests/sets.at,
151 tests/synclines.at, tests/testsuite.at, tests/torture.at:
152 Update FSF postal mail address.
153
154 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
155
156 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
157 Problem reported by Ralf Menzel.
158
159 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
160
161 * tests/actions.at: Test that stack overflow invokes destructors.
162 From Marcus Holland-Moritz.
163 * data/yacc.c (yyerrlab): Move the code that destroys the stack
164 from here....
165 (yyreturn): to here. That way, destructors are called properly
166 even if the stack overflows, or the user calls YYACCEPT or
167 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
168 (yyoverflowlab): Destroy the lookahead.
169
170 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
171
172 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
173
174 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
175
176 * NEWS: Bison-generated C parsers no longer quote literal strings
177 associated with tokens.
178 * src/output.c (prepare_symbols): Don't escape strings,
179 since users don't want to see C escapes.
180 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
181 in diagnostics.
182 * tests/input.at (Torturing the Scanner): Likewise.
183 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
184
185 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
186
187 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
188 the data size is known to be too small and we can't increase it.
189 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
190
191 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
192
193 * src/parse-gram.y: Include quotearg.h.
194 (string_as_id): Quote $1 before using it as a key, since the
195 lexer no longer quotes it for us.
196 (string_content): Don't strip quotes, since lexer no longer
197 quotes it for us.
198 * src/scan-gram.l: Include quotearg.h.
199 ("\""): Omit quote.
200 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
201 a key, since the rest of the lexer doesn't quote it.
202 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
203 * tests/regression.at (Token definitions): Check for backslashes
204 in token strings.
205
206 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
207 (YYSIZE_T): Define to unsigned long int when using an older compiler.
208 (yyparse): Revamp code to generate long syntax error message, to
209 make it easier to translate, and to avoid problems with arithmetic
210 overflow. Change "virtual memory" to "memory" in diagnostic, since
211 we don't know whether the memory is virtual.
212
213 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
214
215 * NEWS: Bison-generated C parsers now use the _ macro to
216 translate strings.
217 * data/yacc.c (_) [!defined _]: New macro.
218 All English strings wrapped inside this macro.
219 * doc/bison.texinfo (Bison Parser): Document _.
220 * po/POTFILES.in: Include src/parse-gram.c, since it now
221 includes translateable strings that parse-gram.y doesn't.
222
223 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
224
225 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
226 reverting the 2004-10-11 change to this function.
227 (symbol_check_alias_consistency): Don't call symbol_type_set
228 if the type name is already correct.
229 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
230
231 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
232
233 * tests/regression.at (Token definitions): Don't use a token named
234 c, as that generates a "#define c ..." that runs afoul of buggy
235 stdlib.h that uses the identifier c as a member of struct
236 drand48_data. Problem reported by Horst Wente.
237
238 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
239
240 * bootstrap: Change translation URL from
241 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
242 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
243 redirection glitches. Problem reported by twlevo@xs4all.nl.
244
245 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
246
247 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
248 after operands; POSIX says this isn't portable for the c99 command.
249
250 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
251
252 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
253 immediately if a data overrun has occurred; this may help us track
254 down what may be a spurious failure on MacOS.
255
256 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
257
258 Respond to problems reported by twlevo@xs4all.nl.
259
260 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
261
262 * src/vcg.h: Comment fix.
263 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
264 (G_CMAX): Change to -1 instead of INT_MAX.
265
266 * data/yacc.c (yyparse): Omit spaces before #line.
267
268 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
269
270 * src/tables.c (state_number_to_vector_number): Put it inside an
271 "#if 0", since it's not currently used. Problem reported by
272 Roland McGrath.
273
274 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
275
276 * src/output.c (escaped_output): Renamed from
277 escaped_file_name_output, since we now use it for symbol tags as
278 well. All uses changed.
279 (symbol_destructors_output, symbol_printers_output):
280 Escape symbol tags too.
281 Problem reported by Matyas Forstner in
282 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
283
284 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
285 not needed.
286 * src/output.c (user_actions_output, token_definitions_output,
287 symbol_destructors_output, symbol_printers_output): Likewise.
288 * src/reader.c (prologue_augment): Likewise.
289 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
290
291 * src/vcg.c (output_edge): Don't quote linestyle arg.
292 Problem reported by twlevo@xs4all.nl.
293
294 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
295
296 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
297 example, reported by Derek M Jones. Also, make the example even
298 more outrageous, to better illustrate how bad the problem is.
299
300 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
301
302 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
303 putsym. Typo reported by Sebastian Piping.
304
305 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
306
307 * doc/bison.texinfo (Language and Grammar): some -> same
308 (Epilogue): int he -> in the
309 Typos reported by Sebastian Piping via Justin Pence.
310
311 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
312
313 * tests/glr-regression.at (Improper handling of embedded actions
314 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
315 embedded actions and $-N in GLR parsers", work around an Autoconf bug
316 with dollar signs in test names.
317 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
318 for a similar reason.
319
320 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
321
322 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
323 wants to redefine G_VIEW.
324
325 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
326
327 * src/vcg.c (get_view_str): Remove case for normal_view.
328 Problem reported by twlevo@xs4all.nl.
329
330 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
331
332 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
333 Problem reported by twlevo@xs4all.nl.
334
335 * doc/bison.texinfo: Change @dircategory from "GNU programming
336 tools" to "Software development". Requested by Richard Stallman
337 via Karl Berry.
338
339 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
340
341 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
342 Problem reported by twlevo@xs4all.nl.
343
344 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
345
346 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
347 keyword; it's not needed with modern compilers, and it doesn't
348 affect correctness with older compilers. Suggested by
349 twlevo@xs4all.nl.
350
351 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
352
353 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
354 gcc -Wswitch-default.
355 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
356 * data/yacc.c (yyparse): Likewise.
357
358 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
359
360 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
361 already. Let config.h define any nonstandard values.
362
363 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
364
365 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
366 for the benefit of slower hosts. Problem reported by
367 Nelson H. F. Beebe.
368
369 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
370
371 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
372 being defined and not used.
373 * data/lalr1.cc (yyparse): Likewise.
374 Use "if (false)" rather than "if (0)".
375
376 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
377
378 * TODO: Mention that we should allow NUL bytes in tokens.
379
380 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
381
382 * src/scan-skel.l (<<EOF>>): Don't close standard output.
383 Problem reported by Hans Aberg.
384
385 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
386
387 * src/getargs.c (version): Happy new year; update overall
388 program copyright date from 2004 to 2005.
389
390 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
391 Problem reported by Hans Aberg.
392 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
393 (Output file names.): Add a test for the case when standard output
394 is closed.
395
396 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
397
398 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
399 to fix an oversight in the Bison 2.0 manual.
400
401 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
402
403 * NEWS: Version 2.0. Reformat the existing news items since
404 1.875, so that related items are grouped together.
405 * configure.ac (AC_INIT): Bump version to 2.0.
406 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
407
408 * tests/torture.at (Exploding the Stack Size with Alloca): Set
409 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
410 otherwise, we're not testing alloca. Unfortunately there's no
411 simple way to consult HAVE_ALLOCA here.
412
413 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
414 for yymsg, too.
415
416 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
417 hand. This avoids a warning about comparing int to size_t when
418 GCC warnings are enabled.
419
420 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
421
422 * NEWS: Bison-generated parsers no longer default to using the
423 alloca function (when available) to extend the parser stack, due
424 to widespread problems in unchecked stack-overflow detection.
425 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
426 responsibility to set it to a positive value. This lets the user
427 specify a value that is not a preprocessor constant.
428 * data/yacc.c (YYMAXDEPTH): Likewise.
429 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
430 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
431 to be a compile-time constant. However, explain the constraints on it.
432 Also, explain the constraints on YYINITDEPTH.
433 (Table of Symbols): Explain that alloca is no longer the default.
434 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
435 to 1.
436
437 * doc/bison.texinfo (Location Default Action): Mention that n must
438 be zero when k is zero. Suggested by Frank Heckenbach.
439
440 2004-12-22 Akim Demaille <akim@epita.fr>
441
442 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
443 (parser::state_type, parser::semantic_type, parser::location_type):
444 Private, not public.
445 (parser::parse): Return ints, not bool.
446 Returning a bool introduces a problem: 0 corresponds to false, and
447 it seems weird to return false on success. Returning true changes
448 the conventions for yyparse.
449 Alternatively we could return void and send an exception.
450 There is no clear consensus (yet?).
451 (state_stack, semantic_stack, location_stack): Rename as...
452 (state_stack_type, semantic_stack_type, location_stack_type): these.
453 Private, not public.
454 * tests/c++.at: New.
455 * tests/testsuite.at, tests/Makefile.am: Adjust.
456
457 2004-12-21 Akim Demaille <akim@epita.fr>
458
459 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
460
461 2004-12-21 Akim Demaille <akim@epita.fr>
462
463 Don't impose std::string for filenames.
464
465 * data/lalr1.cc (b4_filename_type): New.
466 (position::filename): Use it.
467 (parser.hh): Move the inclusion of stack.hh and location.hh below
468 the user code, so that needed headers for the filename type can be
469 included first.
470 Forward declare them before the user code.
471 * tests/Makefile.am (check-local, installcheck-local): Pass
472 TESTSUITEFLAGS to the TESTSUITE.
473
474 2004-12-20 Akim Demaille <akim@epita.fr>
475
476 Use more STL like names: my_class instead of MyClass.
477
478 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
479 (SemanticStack, SemanticType, StateStack, StateType)
480 (TokenNumberType, Stack, Slice, Traits, Parser::location)
481 (Parser::value): Rename as...
482 (location_stack, location_type, rhs_number_type, semantic_stack)
483 (semantic_type, state_stack, state_type, token_number_type, stack)
484 (slice, traits, parser::yylloc, parser::yylval): these.
485
486 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
487
488 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
489
490 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
491 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
492
493 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
494
495 Remove uses of 'short int' and 'unsigned short int'. This raises
496 some arbitrary limits. It uses more memory but nowadays that's
497 not much of an issue.
498
499 This change does not affect the generated parsers; that's a different
500 task, as some users will want to conserve memory there.
501
502 Ideally we should use size_t to represent all object counts, and
503 something like ptrdiff_t to represent signed differences of object
504 counts; but that will require more code-cleanup than I have the
505 time to do right now.
506
507 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
508 Use size_t, not int or short int, to count objects.
509 * src/closure.c (nritemset, closure): Likewise.
510 * src/closure.h (nritemset, closure): Likewise.
511 * src/nullable.c (nullable_compute): Likewise.
512 * src/print.c (print_core): Likewise.
513 * src/print_graph.c (print_core): Likewise.
514 * src/state.c (state_compare, state_hash): Likewise.
515 * src/state.h (struct state): Likewise.
516 * src/tables.c (default_goto, goto_actions): Likewise.
517
518 * src/gram.h (rule_number, rule): Use int, not short int.
519 * src/output.c (prepare_rules): Likewise.
520 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
521 errs, reductions): Likewise.
522 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
523 Likewise.
524 * src/tables.c (vector_number, tally, action_number,
525 ACTION_NUMBER_MINIMUM): Likewise.
526 * src/output.c (muscle_insert_short_int_table): Remove.
527
528 2004-12-17 Akim Demaille <akim@epita.fr>
529
530 * data/lalr1.cc: Extensive Doxygenation.
531 (error_): Rename as...
532 (error): this, since it is visible to the user.
533 Adjust callers.
534 (Parser::message): Now an automatic variable from...
535 (Parser::yyreport_syntax_error_): here.
536 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
537 Parser::error.
538 * tests/input.at: Escape $.
539
540 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
541
542 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
543 Parenthesize rhs to avoid obscure problems with mistakes like
544 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
545 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
546 b4_rhs_location): Likewise.
547 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
548 b4_rhs_location): Likewise.
549
550 2004-12-16 Akim Demaille <akim@epita.fr>
551
552 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
553 yacc.c: be sure to stay within yycheck_.
554 * tests/actions.at: Re-enable C++ tests.
555
556 2004-12-16 Akim Demaille <akim@epita.fr>
557
558 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
559 real.
560
561 2004-12-16 Akim Demaille <akim@epita.fr>
562
563 Use #define to handle the %name-prefix.
564
565 * data/glr.c, data/yacc.c: Comment changes.
566 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
567 so that one can refer to yylex in the parser file, and have it
568 renamed, as is the case with other skeletons.
569
570 2004-12-16 Akim Demaille <akim@epita.fr>
571
572 Move lalr1.cc internals into yy*.
573
574 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
575 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
576 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
577 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
578 (empty_, final_, terror_, errcode_, ntokens_)
579 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
580 (looka_, ilooka_, error_range_, nerrs_):
581 Rename as...
582 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
583 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
584 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
585 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
586 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
587 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
588 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
589 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
590 these.
591
592 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
593
594 Fix some problems reported by twlevo at xs4all.
595 * src/symtab.c (symbol_new): Report an error if the input grammar
596 contains too many symbols. This is better than calling abort() later.
597 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
598 (struct node, struct graph):
599 Rename member expand to stretch. All uses changed.
600 (struct graph): Remove member layoutalgorithm. All uses removed.
601 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
602 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
603 All uses changed.
604 (N_STRETCH): Rename from N_EXPAND. All uses changed.
605
606 2004-12-15 Akim Demaille <akim@epita.fr>
607
608 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
609 Add more Doxygen comments.
610 (symprint_, stack_print_, reduce_print_, destruct_, pop)
611 (report_syntax_error_, translate_): Rename as...
612 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
613 (yypop_, yyreport_syntax_error_, yytranslate_): this.
614
615 2004-12-15 Akim Demaille <akim@epita.fr>
616
617 * data/lalr1.cc (lex_): Rename as...
618 (yylex_): this.
619 Move the trace here.
620 Take the %name-prefix into account.
621 Reported by Alexandre Duret-Lutz.
622
623 2004-12-15 Akim Demaille <akim@epita.fr>
624
625 Simplify the C++ parser constructor.
626
627 * data/lalr1.cc (debug_): Rename as...
628 (yydebug_): so that the parser's internals are always in the yy*
629 pseudo namespace.
630 Adjust uses.
631 (b4_parse_param_decl): Remove the leading comma as it is now only
632 called as unique argument list.
633 (Parser::Parser): Remove the constructor accepting a location and
634 an initial debugging level.
635 Remove from the other ctor the argument for the debugging level.
636 (debug_level_type, debug_level, set_debug_level): New.
637
638 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
639 constructor calls.
640
641 2004-12-15 Akim Demaille <akim@epita.fr>
642
643 Remove b4_root related material: failure experiment
644 (which goal was to allow to derive from a class).
645
646 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
647 definitions and uses.
648
649 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
650
651 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
652 not 2, since it's not portable to subtract 1 from the start of an
653 array. The new item 0 is never set or used. All uses changed.
654
655 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
656 the default definition of YYLLOC_DEFAULT. Problem reported
657 by Frank Heckenbach.
658
659 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
660
661 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
662 the normal case and one for the error case. Just use the
663 first one uniformly. Problem reported by Frank Heckenbach.
664 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
665 use exactly the same macro in both places.
666 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
667 so that the normal-case YYRHSLOC works for the error case too.
668 All uses changed.
669 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
670 (YYLLOC_DEFAULT): Use the same macro as glr.c.
671 * doc/bison.texinfo (Location Default Action): Don't claim that
672 we have an array of locations. Use the same macro for both glr
673 and lalr parsers. Mention YYRHSLOC. Mention what happens when
674 the index is 0.
675
676 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
677
678 * HACKING: Update email addresses to send announcements to.
679
680 * configure.ac (AC_INIT): Bump version to 1.875f.
681
682 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
683
684 * NEWS: Version 1.875e.
685 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
686
687 * src/scan-skel.l: Include "complain.h", for "fatal".
688
689 * src/relation.h (relation_print, relation_digraph):
690 Relation sizes are of type relation_node, not size_t (this is
691 merely a doc fix, since the two types are equivalent).
692 (relation_transpose): Relation sizes are of type relation_node,
693 not int.
694 * src/relation.c: Likewise.
695 (top, infinity): Now of type relation_node, not int.
696 (traverse, relation_transpose): Use relation_node, not int.
697
698 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
699 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
700 (yyparse): Remove unused local introduced in 2004-10-25 patch.
701
702 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
703 specifying whether the test should be skipped. Use it tp
704 specify that the [%defines %skeleton "lalr1.cc"] tests currently
705 fail on some hosts, and should be skipped.
706
707 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
708
709 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
710 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
711 unless otherwise specified below.
712
713 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
714 to allocate kernel_base, kernel_items, kernel_size, since
715 they needn't be initialized to 0.
716 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
717 * src/closure.c (new_closure): Likewise, for itemset.
718 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
719 * src/lalr.c (set_goto_map): Likewise, for temp_map.
720 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
721 (build_relations): Likewise for edge, states1, includes.
722 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
723 * src/reader.c (packgram): Likewise, for ritem, rules.
724 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
725 * src/relation.c (relation_digraph): Likewise for VERTICES.
726 (relation_transpose): Likewise for new_R, end_R.
727 * src/symtab.c (symbols_token_translations_init): Likewise for
728 token_translations.
729 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
730 (token_actions): Likewise for yydefact, actrow, conflrow,
731 conflict_list.
732 (save_column): Likewise for froms[symno], tos[symno].
733 (goto_actions): Likewise for state_count.
734 (pack_table): Likewise for base, pos, check.
735 (tables_generate): Likewise for width.
736
737 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
738 for initial core. Just have a separate core, so we needn't worry
739 about whether kernel_size and kernel_base are initialized.
740
741 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
742 kernel_size, kernel_items): Remove unnecessary initialization.
743 * src/conflicts.c (conflicts): Likewise.
744 * src/derives.c (derives): Likewise.
745 * src/muscle_tablc (muscle_insert): Likewise.
746 * src/relation.c (relation_digraph): Likewise.
747 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
748 conflrow, conflict_table, conflict_list, table, check):
749 Likewise.
750
751 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
752 This is because all callers pass unsigned int.
753 * src/closure.h (new_closure): Likewise.
754
755 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
756 (build_relations): Initialize includes[i] in all cases.
757 * src/reader.c (packgram): Always initialize rules[ruleno].prec
758 and rules[ruleno].precsym. Initialize members in order.
759 * src/relation.c (relation_transpose): Always initialize new_R[i]
760 and end_R[i].
761 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
762
763 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
764 conflict_list[0] was always 0, but now it isn't initialized.
765
766 * src/table.c (table_grow): When conflict_table grew, the grown
767 area wasn't cleared. Fix this.
768
769 * lib/.cvsignore: Add strdup.c, strdup.h.
770 * m4/.cvsignore: Add strdup.m4.
771
772 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
773
774 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
775 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
776 GOTO_NUMBER_MAXIMUM, since we occasionally compute
777 ngotos + 1 without checking for overflow.
778 (build_relations): Use END_NODE, not -1, to denote end of edges.
779 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
780 build_relations): Use goto_number, not int, for goto numbers.
781 * src/tables.c (save_column, default_goto): Likewise.
782
783 2004-11-23 Akim Demaille <akim@epita.fr>
784
785 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
786 of #defining from yystype.
787 Don't typedef yystype, C++ does not need it.
788 This lets it possible to forward declare it as union.
789
790 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
791
792 * bootstrap (gnulib_modules): Add extensions.
793 Problem reported by Jim Meyering.
794
795 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
796
797 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
798 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
799 src/system.h, src/tables.c: XFREE -> free, to accommodate
800 recent change to gnulib xalloc.h.
801 Problem reported by Jim Meyering.
802
803 2004-11-17 Akim Demaille <akim@epita.fr>
804
805 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
806
807 2004-10-28 Akim Demaille <akim@epita.fr>,
808 Alexandre Duret-Lutz <adl@gnu.org>
809
810 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
811 changes.
812 (YYCDEBUG): Adjust.
813 Use it instead of cdebug_.
814 (Parser::debug_stream, Parser::set_debug_stream): New.
815 (Parser::symprint_): Define cdebug_ for temporary backward
816 compatibility.
817 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
818 debug_stream ().
819
820 2004-11-17 Akim Demaille <akim@epita.fr>
821
822 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
823 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
824 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
825 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
826
827 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
828
829 * data/glr.c (yyloc_default): Remove; not used.
830 Problem reported by Frank Heckenbach.
831
832 2004-10-25 Akim Demaille <akim@epita.fr>
833
834 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
835 Introduce another definition to address simple location arrays.
836 (yyGLRStack): New member: yyerror_range.
837 (yyrecoverSyntaxError, yyparse): Update it.
838 (yyrecoverSyntaxError): Use it when shifting the error token to
839 have an accurate range, equivalent to the one computed by both
840 yacc.c and lalr1.cc.
841 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
842 that column numbers start at column 0, as per GNU Coding
843 Standards, the others tests, and the doc.
844 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
845 Adjust to the above change (first column is 0).
846 And adjust the location of the "<error>", now covering the whole
847 line.
848
849 2004-10-22 Akim Demaille <akim@epita.fr>
850 and Paul Eggert <eggert@cs.ucla.edu>
851
852 Remove some arbitrary limits on goto numbers and relations.
853 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
854 initial values, since they're never used.
855 (set_goto_map): ngotos is now unsigned, so test for overflow
856 by seeing whether it wraps around to zero.
857 * src/lalr.h (goto_number): Now size_t, not short int.
858 (GOTO_NUMBER_MAXIMUM): Remove.
859 * src/relation.c (relation_print, traverse, relation_transpose):
860 Check for END_NODE rather than looking at sign.
861 * src/relation.h (END_NODE): New macro.
862 (relation_node): Now size_t, not short int.
863
864 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
865
866 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
867 keyword, not an identifier. Problem reported by Baron Schwartz in
868 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
869
870 2004-10-11 Akim Demaille <akim@epita.fr>
871
872 * src/symtab.c (symbol_check_alias_consistency): Also check
873 type names, destructors, and printers.
874 Reported by Alexandre Duret-Lutz.
875 Recode the handling of associativity and precedence in terms
876 of symbol_precedence_set.
877 Accept no redeclaration at all, not even equal to the previous
878 value.
879 (redeclaration): New.
880 Use it to factor redeclaration complaints.
881 (symbol_make_alias): Don't set the type of the alias, let
882 symbol_check_alias_consistency do it as for other features.
883 * src/symtab.h (symbol): Add new member prec_location, and
884 type_location.
885 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
886 * tests/input.at (Incompatible Aliases): New.
887
888 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
889
890 .cvsignore fixes to accommodate gnulib changes,
891 and the practice of naming build directories "_build".
892 * .cvsignore: Add "_*". Sort.
893 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
894 * m4/.cvsignore: Add "*_gl.m4".
895
896 2004-10-06 Akim Demaille <akim@epita.fr>
897
898 * src/parse-gram.y (add_param): Fix the truncation of trailing
899 spaces.
900
901 2004-10-05 Akim Demaille <akim@epita.fr>
902
903 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
904 whether the reducion was empty or not. This leaves room to
905 improve the use of YYLLOC_DEFAULT in such a case.
906 lalr1.cc is still experimental, so changing this is acceptable.
907 And finally, there are probably not many users who changed the
908 handling of locations in GLR, so changing is admissible too.
909
910 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
911 empty reduction, set @$ to an empty location ending the previously
912 stacked symbol.
913 Adjust uses to make sure the code is triggered on empty
914 reductions.
915 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
916 expected output: empty reductions have empty locations.
917
918 2004-09-29 Akim Demaille <akim@epita.fr>
919
920 * data/lalr1.cc: Move towards a more standard C++ coding style
921 for templates: Class < T > -> Class<T>.
922
923 2004-09-29 Akim Demaille <akim@epita.fr>
924
925 * data/lalr1.cc: Reinstall the former ctor, for sake of
926 compatibility, but warn it will be removed.
927 Move towards a more standard C++ coding style (i.e., type *var ->
928 type* var).
929
930 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
931
932 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
933 since it's less likely to work if NULs are involved in the future.
934
935 2004-09-27 Akim Demaille <akim@epita.fr>
936
937 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
938
939 2004-09-27 Akim Demaille <akim@epita.fr>
940
941 * data/lalr1.cc (b4_parse_param_decl_1): New.
942 (b4_parse_param_decl): Use it to have different names between attribute
943 and argument names.
944 (b4_cc_constructor_call): Likewise.
945
946 2004-09-24 Akim Demaille <akim@epita.fr>
947
948 * src/parse-gram.y (add_param): Strip the leading and trailing
949 blanks from a formal argument declaration.
950 (YY_LOCATION_PRINT): New.
951
952 2004-09-24 Akim Demaille <akim@epita.fr>
953
954 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
955 after the location.
956
957 2004-09-24 Akim Demaille <akim@epita.fr>
958
959 * doc/bison.texinfo (Table of Symbols): Sort.
960
961 2004-09-21 Akim Demaille <akim@epita.fr>
962
963 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
964 the useless parentheses.
965 Suggested by Paul Eggert.
966
967 2004-09-20 Akim Demaille <akim@epita.fr>
968
969 Let the initial-action act on the look-ahead, and use it for the
970 "initial push" (corresponding to an hypothetical beginning-of-file).
971 And let lalr1.cc honor %initial-action.
972
973 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
974 example.
975 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
976 (Parser::Parser): Remove the ctor that used to initialize it.
977 (Parser::parse): Like in the other skeletons, issue the "starting
978 parse" message before any action.
979 Honor %initial-action.
980 Initialize the stacks with the lookahead.
981 * data/yacc.c: Let $$ and @$ in %initial-action designate the
982 look-ahead.
983 Push them in the stacks.
984 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
985
986 2004-09-20 Akim Demaille <akim@epita.fr>
987
988 * doc/bison.texinfo (Initial Action Decl): New.
989
990 2004-09-20 Akim Demaille <akim@epita.fr>
991
992 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
993 clearer criterion to define it.
994 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
995 When reducing on an empty RHS, use the latest stacked location as
996 location.
997 yylloc is not always available.
998 * data/glr.c: Likewise.
999 Also, honor initial-actions.
1000
1001 2004-09-20 Akim Demaille <akim@epita.fr>
1002
1003 * data/yacc.c (YY_LOCATION_PRINT): New.
1004 Define when we know YYLTYPE's structure, i.e., when the default
1005 YYLLOC_DEFAULT is used.
1006 * data/c.m4 (b4_yysymprint_generate): Use it.
1007 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
1008 value of the result.
1009 (error_start_): Replace with...
1010 (error_range_): this location array.
1011 This allows to replace code relying on the implementation of
1012 locations by portable code.
1013 * data/yacc.c (yylerrsp): Replace with...
1014 (yyerror_range): this.
1015 Every time a token is popped, update yyerror_range[0], to have an
1016 accurate location for the error token.
1017 * data/glr.c (YY_LOCATION_PRINT): New.
1018 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
1019 deference a pointer.
1020 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
1021 report the location in %printers.
1022
1023 * src/scan-skel.l: Instead of abort, report error messages to ease
1024 understanding skeleton scanning failures.
1025
1026 2004-09-16 Akim Demaille <akim@epita.fr>
1027
1028 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
1029 (iterator, const_iterator): these, to be more in the C++ spirit.
1030 Also, return reverse iterators so that when displaying the stack
1031 we display its bottom first.
1032 (Parser::stack_print_, Parser::reduce_print_): Match the messages
1033 from yacc.c.
1034 We should probably use vector here though.
1035
1036 2004-09-16 Akim Demaille <akim@epita.fr>
1037
1038 Have more complete shift traces.
1039
1040 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
1041 to report Shifts instead of ad hoc YYDPRINTF invocations,
1042 including for the error token.
1043 * data/lalr1.cc (symprint_): Output the location.
1044 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
1045 output the location within the %printer.
1046 Activate GLR tests, at least to make sure they compile properly.
1047 They still don't pass though.
1048 * tests/calc.at: Adjust expect verbose output, since now "Entering
1049 state..." is on a different line than the "Shifting" message.
1050
1051 2004-09-08 Akim Demaille <akim@epita.fr>
1052
1053 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
1054 Bison directive from the Bison file to the invocation of this
1055 macro, so that these directives are passed to
1056 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
1057 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
1058 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
1059 the extra Bison directives instead of the whole series.
1060 Change the grammar so that there are recoverable errors, and
1061 unrecoverable errors. Now we can have the parser give up before
1062 consuming the whole input. As a result we now can observe that
1063 the lookahead is freed when needed.
1064 Change the parser source to parse argv[1] instead of a hard coded
1065 string.
1066 Simplify yylex, and give a value and location to EOF.
1067 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
1068 passed directives already coded in the file.
1069 Add some tests to check the location of "error".
1070 For some tests, the C++ parser is correct, and not yacc.c.
1071 For other tests, they provide different, but unsatisfying, values,
1072 so keep the C++ value so that at least one parser is "correct"
1073 according to the test suite.
1074 (Actions after errors): Remove, this is subsumed by the
1075 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
1076
1077 2004-09-06 Akim Demaille <akim@epita.fr>
1078
1079 * data/lalr1.cc: Adjust the indentation of the labels.
1080 (Parser::pop): New.
1081 Use it.
1082
1083 2004-09-06 Akim Demaille <akim@epita.fr>
1084
1085 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
1086 argument, an informative message.
1087 Call YY_SYMBOL_PRINT.
1088 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
1089 * data/lalr1.cc (destruct_): Likewise.
1090 In addition, no longer depend on b4_yysymprint_generate and
1091 b4_yydestruct_generate to generate these functions, do it "by
1092 hand".
1093
1094 2004-09-03 Akim Demaille <akim@epita.fr>
1095
1096 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
1097 invoked, yydestruct the lookahead.
1098 * tests/calc.at (Calculator $1): Update the expected lengths of
1099 traces: there is an added line for the discarded lookahead.
1100 * doc/bison.texinfo (Destructor Decl): Some rewording.
1101 Define "discarded" symbols.
1102
1103 2004-09-02 Akim Demaille <akim@epita.fr>
1104
1105 * data/lalr1.cc (translate_, destruct_): No reason to be static.
1106
1107 2004-09-02 Akim Demaille <akim@epita.fr>
1108
1109 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
1110 (YYDSYMPRINTF): Rename as...
1111 (YY_SYMBOL_PRINT): this.
1112 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
1113 two.
1114 Use it instead of direct symprint_ calls.
1115 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
1116 one.
1117
1118 2004-09-02 Akim Demaille <akim@epita.fr>
1119
1120 * data/lalr1.cc (b4_yysymprint_generate): New.
1121 (symprint_): New member function, defined when YYDEBUG.
1122 Use it consistently instead of token/nterm debugging output by
1123 hand.
1124 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
1125 %printer calls to use cdebug_ when using lalr1.cc.
1126
1127 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
1128
1129 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
1130 with #ifdef YYDEBUG.
1131
1132 2004-08-26 Akim Demaille <akim@epita.fr>
1133
1134 * doc/bison.texinfo (Implementing Loops): Rename as...
1135 (Implementing Gotos/Loops): this.
1136
1137 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
1138
1139 Adjust to latest gnulib.
1140 * bootstrap (gnulib_modules): Add xalloc-die.
1141 Set LC_ALL=C so that file names sort consistently.
1142 Prefer the gnulib copies of gettext.m4, glibc21.m4,
1143 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
1144 uintmax_t.m4, ulonglong.m4.
1145 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
1146 po.m4 since we are now using _gl.m4 instead.
1147
1148 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
1149
1150 * src/scan-action.l: Remove. Scanning of semantic actions is
1151 handled in scan-gram.l.
1152
1153 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
1154
1155 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
1156
1157 * src/location.h (struct): The file member is a uniqstr.
1158 (equal_boundaries): Use UNIQSTR_EQ for comparison.
1159
1160 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
1161
1162 Fix bug with non-%union parsers that have printers or destructors,
1163 which led to a Bison core dump. Reported by Peter Fales in
1164 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
1165
1166 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
1167 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
1168 not to our own type.
1169 * src/output.c (symbol_destructors_output, symbol_printers_output):
1170 Don't assume %union.
1171 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
1172 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
1173 UNION-FLAG. All callers changed.
1174 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
1175 Use type char, not unsigned int, when declaring an array of char;
1176 this lets us remove a cast.
1177 (Printers and Destructors): Add non-%union test cases.
1178
1179 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
1180
1181 * doc/bison.texinfo: Minor editorial changes, mostly to the new
1182 GLR writeups. E.g., avoid frenchspacing and the future tense,
1183 change "lookahead" to "look-ahead", and change "wrt" to "with
1184 respect to".
1185
1186 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1187
1188 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
1189 New sections, split off from the GLR Parsers section. Put the new
1190 Simple GLR Parser near the start of the GLR section, for clarity.
1191 Rewrite connective text.
1192
1193 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
1194
1195 * doc/bison.texinfo (Simple GLR Parsers): New section.
1196
1197 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
1198
1199 * NEWS, TODO, doc/bison.texinfo:
1200 Use "look-ahead" instead of "lookahead", to be consistent.
1201 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
1202 while we're fixing "look-ahead".
1203 * src/conflicts.c (shift_set): Renamed from shiftset.
1204 (look_ahead_set): Renamed from lookaheadset.
1205 * src/print.c: Likewise.
1206 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
1207 name for "lookahead".
1208 (report_types, usage): Likewise.
1209 * src/getargs.h (report_look_ahead_tokens): Renamed from
1210 report_lookaheads.
1211 * src/lalr.c (compute_look_ahead_tokens): Renamed from
1212 compute_lookaheads.
1213 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
1214 (look_ahead_tokens_print): Renamed from lookaheads_print.
1215 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
1216 state_rule_lookaheads_print.
1217 * src/state.h: Likewise.
1218 (reductions.look_ahead_tokens): Renamed from lookaheads.
1219 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
1220 AT_DATA_LOOKAHEADS_GRAMMAR.
1221
1222 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
1223
1224 * README: Update location of patched M4 distribution.
1225
1226 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
1227
1228 Don't assume the C++ compiler takes the same arguments as the C compiler
1229 (trivial change).
1230 * configure.ac (O0CXXFLAGS): New var.
1231 * tests/atlocal.in (CXXFLAGS): Use it.
1232
1233 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
1234
1235 Fix some "make check" problems with C++ reported by
1236 Albert Chin-A-Young for Tru64 C++ in this thread:
1237 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
1238
1239 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
1240 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
1241 Output to a .cc file for C++, not to a .c file.
1242 * tests/calc.at (AT_CHECK_CALC): Likewise.
1243 * tests/regression.at (AT_CHECK_DANCER): Likewise.
1244 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
1245
1246 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
1247
1248 * tests/calc.at, tests/actions.at: Workaround for SGI
1249 C++ compiler. (trivial change)
1250
1251 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
1252
1253 Spent a few hours checking out which prerequisite versions the
1254 current sources actually require. I went all the way back to
1255 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
1256 a seemingly endless set of combinations of versions more recent
1257 than that. The bottom line is that the current sources require
1258 fairly recent versions of the build tools, and it'll be some work
1259 to change this.
1260 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
1261 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
1262 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
1263 Add comments explaining why those particular versions are
1264 currently needed.
1265
1266 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
1267 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
1268 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
1269
1270 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
1271 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
1272
1273 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
1274
1275 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
1276 0.11.5. Suggested by Bruno Haible.
1277 * bootstrap: Remove gettext version checking.
1278
1279 * doc/bison.texinfo (Decl Summary): Also mention that %union
1280 can depend on prerequisite types. Problem reported by Tim
1281 Van Holder.
1282
1283 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
1284
1285 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
1286 * README-alpha: Don't tell people not to package this.
1287
1288 * bootstrap: Don't assume $(...) works; use `...` instead.
1289 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
1290 gettext better.
1291
1292 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
1293 put into the -d output file, and mention what to do if YYSTYPE is
1294 defined as a macro.
1295
1296 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
1297
1298 Undo change made earlier today: it caused autopoint to not bring
1299 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
1300 autopoint's.
1301
1302 * bootstrap: Check that gettext version matches what's in
1303 configure.ac. Warn users to ignore robots.txt ERROR 404.
1304 * bootstrap: Undo today's earlier change (logged below).
1305 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
1306
1307 The gettext version checking is causing more trouble than it's
1308 curing; remove it. Problem reported by Paul Hilfinger.
1309
1310 * bootstrap: Issue a warning that one can expect a message
1311 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
1312 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
1313
1314 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
1315
1316 Ensure that the C++ compiler used for testing actually works on a
1317 simple test program; if not, skip the C++-related tests. Problem
1318 reported by Vin Shelton in:
1319 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
1320
1321 * m4/cxx.m4: New file.
1322 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
1323 * tests/atlocal.in (BISON_CXX_WORKS): Add.
1324 * tests/local.at (AT_COMPILE_CXX): Use it.
1325
1326 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
1327
1328 * data/glr.c (yylloc): Output this macro even if locations are not
1329 being generated, as the GLR parser needs it even in that case.
1330 Problem reported by Troy A. Johnson
1331 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
1332
1333 * configure.ac (AC_INIT): Update to 1.875e.
1334
1335 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
1336
1337 * NEWS: Version 1.875d.
1338 * configure.ac (AC_INIT): Likewise.
1339 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
1340
1341 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
1342 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
1343 lalr1.cc runs afoul of the first, and the last two are no longer
1344 supported by GCC 3.4.0.
1345 * README: Mention GNU m4 1.4 or later; mention m4 patches.
1346 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
1347
1348 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
1349
1350 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
1351 unsigned int, for compatibility with latest gnulib hash module.
1352 * src/state.c (state_hash, state_hasher): Likewise.
1353 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
1354 * src/uniqstr.c (hash_uniqstr): Likewise.
1355
1356 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
1357
1358 * NEWS: Unescaped newlines are no longer allowed in char & strings.
1359
1360 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
1361 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
1362 character and string literals.
1363 (unexpected_end): New function.
1364 (unexpected_eof): Use it.
1365 (unexpected_newline): New function.
1366 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
1367 actions.
1368
1369 * NEWS: Document %expect-rr.
1370
1371 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
1372 Fix typo by replacing $1 with $option.
1373 Remove more 'intl'-related files.
1374 Don't DEFUN AM_INTL_SUBDIR twice.
1375
1376 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
1377 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
1378 strtoul.c.
1379 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
1380 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
1381 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
1382 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
1383 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
1384 * src/.cvsignore: Add *.output.
1385
1386 * src/parse-gram.y: Put copyright notice inside %{ %} so it
1387 gets copied to the output file.
1388
1389 2004-04-28 Paul Eggert <eggert@twinsun.com>
1390
1391 Get files from the gnulib and po repositories, instead of relying
1392 on them being in our CVS. Upgrade to latest versions of gnulib
1393 and Automake.
1394
1395 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
1396 * bootstrap: Bootstrap from gnulib and po repositories.
1397 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
1398 * README-cvs: Document these changes. Remove version numbers from
1399 mentions of build tools, since they change so often. Mention Flex.
1400
1401 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
1402 (gl_USE_SYSTEM_EXTENSIONS): Add.
1403 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
1404 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1405 does this for us.
1406 (AC_ISC_POSIX): Remove; we no longer support this
1407 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1408 (AC_HEADER_STDC): Remove: we now assume C89 or better.
1409 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
1410 Do not check for C89 headers, except for locale.h which is used
1411 by the Yacc library and must port to K&R hosts.
1412 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
1413 Do not check for C89 functions, except for setlocale which is
1414 used by the Yacc library.
1415 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
1416 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
1417 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
1418 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
1419 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
1420 AM_GNU_GETTEXT): Remove; now done by:
1421 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
1422 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
1423 for us.
1424
1425 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
1426 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
1427 Define to empty, as gnulib.mk will do the rest for us.
1428 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
1429 for us.
1430 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
1431 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
1432
1433 * src/files.c: Include gnulib's xstrndup.h.
1434
1435 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
1436 (REALLOC): Use xnrealloc, for likewise.
1437 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
1438 (strnlen, memrchr): Remove decls; functions no longer used.
1439 Include <stpcpy.h>.
1440
1441 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
1442 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
1443 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
1444 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
1445 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
1446 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
1447 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
1448 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
1449 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
1450 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
1451 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
1452 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
1453 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
1454 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
1455 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
1456 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
1457 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
1458 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
1459 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
1460 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
1461 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
1462 Remove, as these files are now generated automatically
1463 by bootstrap or automake.
1464
1465 * po/ChangeLog: Remove: all but one entry was a duplicate
1466 of this file, and I moved that 2000-11-02 entry here.
1467
1468 * config/.cvsignore: Add Makefile, depcomp, install-sh.
1469 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
1470 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
1471 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
1472 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
1473 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
1474 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
1475 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
1476 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
1477 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
1478 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
1479 xstrndup.h.
1480 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
1481 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
1482 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
1483 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
1484 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
1485 * src/.cvsignore: Remove *_.c.
1486
1487
1488 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
1489 support it. (The latest stable gzip doesn't.)
1490
1491 2004-04-27 Paul Eggert <eggert@twinsun.com>
1492
1493 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
1494 case, as stos_ is now used by destructors due to the 2004-02-09
1495 change.
1496
1497 Remove more K&R C support.
1498 * lib/libiberty.y (PARAMS): Remove. All uses removed.
1499 * lib/subpipe.c (errno): Remove decl.
1500 Include <stdlib.h> unconditionally.
1501 (EXIT_FAILURE): Remove macro.
1502 * src/complain.c (vfprintf, strerror): Remove.
1503 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
1504 unconditionally.
1505 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
1506 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
1507 (strchr, strspn, memchr): Remove decls.
1508 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
1509 unconditionally. Do not declare perror.
1510 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
1511 unconditionally.
1512
1513 * src/complain.c (_): Remove useless defn, as system.h defines this.
1514
1515 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
1516 with latest obstack.h.
1517 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
1518 to procedure types, as obstack.h now does that for us.
1519 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
1520
1521 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
1522 so that this include file can stand alone.
1523 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
1524 does this now. Include subpipe.h first after config.h, to
1525 test whether it can stand alone.
1526
1527 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
1528 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
1529 unused declaration.
1530
1531 * tests/synclines.at (%union synch line): Put a dummy member in
1532 the union, because empty unions aren't allowed in C. Caught
1533 by GCC 3.4.0.
1534
1535 2004-04-13 Jim Meyering <jim@meyering.net>
1536
1537 * src/conflicts.c (conflicts_print): Correct format string typo:
1538 use `%%' to produce literal `%'. (trivial change)
1539
1540 2004-03-30 Paul Eggert <eggert@twinsun.com>
1541
1542 * src/getargs.c (version): Update copyright year to 2004.
1543
1544 * data/c.m4 (b4_int_type): Use 'short int' rather than
1545 'short', and similarly for 'long', 'unsigned', etc.
1546 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
1547 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
1548 yy_yypstack, yydumpstack): Likewise.
1549 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
1550 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
1551 Likewise.
1552 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
1553 yy_stack_print, yyparse): Likewise.
1554 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
1555 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
1556 * lib/bitset.c (bitset_print): Likewise.
1557 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
1558 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
1559 * lib/bitsetv.c (bitsetv_dump): Likewise.
1560 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
1561 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
1562 Likewise.
1563 * src/LR0.c (allocate_itemsets): Likewise.
1564 * src/gram.h (rule_number, rule): Likewise.
1565 * src/lalr.h (goto_number): Likewise.
1566 * src/nullable.c (nullable_compute): Likewise.
1567 * src/output.c (prepare_rules): Likewise.
1568 * src/relation.c (relation_print, relation_digraph): Likewise.
1569 * src/relation.h (relation_node): Likewise.
1570 * src/state.h (state_number, transitions, errs, reductions,
1571 struct state): Likewise.
1572 * src/symtab.h (symbol_number, struct symbol): Likewise.
1573 * src/tables.c (vector_number, tally, action_number,
1574 default_goto, goto_actions): Likewise.
1575 * tests/existing.at (GNU Cim Grammar): Likewise.
1576 * tests/regression.at (Web2c Actions): Likewise.
1577
1578 * src/output.c (muscle_insert_short_int_table): Renamed from
1579 muscle_insert_short_table. All uses changed.
1580
1581 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
1582
1583 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
1584 (declaration): Replace expected_conflicts with expected_sr_conflicts.
1585 Add %expect-rr rule.
1586
1587 * src/scan-gram.l: Recognize %expect-rr.
1588
1589 * src/conflicts.h (expected_sr_conflicts): Rename from
1590 expected_conflicts.
1591 (expected_rr_conflicts): Declare.
1592
1593 * src/conflicts.c (expected_sr_conflicts): Rename from
1594 expected_conflicts.
1595 (expected_rr_conflicts): Define.
1596 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
1597 for GLR parsers.
1598 Use expected_sr_conflicts in place of expected_conflicts.
1599 Warn if expected_rr_conflicts used in non-GLR parser.
1600
1601 * doc/bison.texinfo: Add documentation for %expect-rr.
1602
1603 2004-03-08 Paul Eggert <eggert@gnu.org>
1604
1605 Add support for hex token numbers. Suggested by Odd Arild Olsen in
1606 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1607
1608 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
1609 in lalr1.cc.
1610 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
1611 * src/scan-gram.l (scan_integer): New function.
1612 ({int}): Use it.
1613 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
1614 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
1615 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
1616 Say "long int", not "long", for uniformity with GNU style.
1617
1618 2004-02-25 Paul Eggert <eggert@twinsun.com>
1619
1620 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
1621 compilers. This fixes a problem with Intel's C++ compiler being
1622 chatty, reported by Guido Trentalancia in
1623 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
1624
1625 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
1626
1627 Support %destructor and merge error locations in lalr1.cc.
1628
1629 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
1630 (Parser::stos_): Define unconditionally.
1631 (Parser::destruct_): New method. Generate its body with
1632 b4_yydestruct_generate.
1633 (Parser::error_start_): New attribute.
1634 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
1635 token which are discarded.
1636 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
1637 error_start_ when erroneous token are discarded.
1638 (Parser::parse) <yyerrlab1>: Compute the location of the error
1639 token so that it covers all the discarded tokens.
1640 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
1641 it can be called with `%skeleton "lalr1.cc"', and do that.
1642
1643 2004-02-02 Paul Eggert <eggert@twinsun.com>
1644
1645 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
1646 $(top_srcdir)/lib and ../lib. This fixes a bug reported
1647 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
1648 There's no need to mention top_builddir since Automake does that
1649 for us.
1650 (INCLUDES): Remove, as Automake says it's obsolescent.
1651 Contents migrated into AM_CPPFLAGS as described above.
1652 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
1653
1654 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
1655
1656 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
1657 (yyreportSyntaxError): Handle case where lookahead token is
1658 YYEMPTY.
1659
1660 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1661
1662 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
1663 resulting parsers are compilable with C++.
1664
1665 2003-12-23 Paul Eggert <eggert@twinsun.com>
1666
1667 * config/depcomp, config/install-sh: Sync with Automake 1.8.
1668 * src/output.c (output_skeleton): Rename local var.
1669 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
1670 Bison tokens, as this runs afoul of the 2003-10-07 change that
1671 disallowed NUL bytes in character constants or string literals.
1672
1673 * tests/local.at: Require Autoconf 2.59's Autotest.
1674 * tests/testsuite.at: Don't include local.at, since we now assume
1675 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
1676 including it.
1677 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
1678 multiple inclusion warnings.
1679
1680 2003-12-02 Akim Demaille <akim@epita.fr>
1681
1682 * doc/bison.texinfo (How Can I Reset the Parser): More about start
1683 conditions.
1684 From Bruno Haible.
1685
1686 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
1687
1688 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
1689
1690 2003-10-07 Paul Eggert <eggert@twinsun.com>
1691
1692 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
1693 if testsuite doesn't exist.
1694
1695 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
1696 literals, unfortunately.
1697 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
1698 Complain about NUL bytes in character constants or string literals.
1699
1700 2003-10-05 Paul Eggert <eggert@twinsun.com>
1701
1702 * NEWS: Don't document %no-default-prec, as it's still
1703 too experimental.
1704 * doc/bison.texinfo: Document %no-default-prec only if
1705 the defaultprec flag is set. Normally it's not.
1706
1707 2003-10-04 Paul Eggert <eggert@twinsun.com>
1708
1709 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
1710 non-modifiable lvalue, instead of a modifiable one.
1711 * doc/bison.texinfo (Actions): Document that $$ can
1712 be assigned to. Do not claim that $$ and $N are
1713 array element references: user code should not rely on this.
1714
1715 2003-10-01 Paul Eggert <eggert@twinsun.com>
1716
1717 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
1718 (grammar_declaration): Use it.
1719 * src/scan-gram.l: New token %no-default-prec.
1720 * tests/conflicts.at: Revamp tests to use %no-default-prec.
1721 * NEWS, doc/bison.texinfo: Document the above.
1722
1723 2003-10-01 Akim Demaille <akim@epita.fr>
1724
1725 VCG no longer supports long_straight_phase.
1726
1727 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
1728 * src/print_graph.c (print_graph): Adjust.
1729
1730 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
1731 and Paul Eggert <eggert@twinsun.com>
1732
1733 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
1734 Table of Symbols): Document %default-prec.
1735 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
1736 (grammar_declaration): Set default_prec on %default-prec.
1737 * src/scan-gram.l (%default-prec): New token.
1738 * src/reader.h (default_prec): New flag.
1739 * src/reader.c: Likewise.
1740 (packgram): Handle it.
1741 * tests/conflicts.at (%default-prec without %prec,
1742 %default-prec with %prec, %default-prec 1): New tests.
1743
1744 2003-09-30 Paul Eggert <eggert@twinsun.com>
1745
1746 * tests/testsuite.at: Include local.at, not input.at, fixing
1747 a typo in the 2003-08-25 patch.
1748
1749 2003-08-27 Akim Demaille <akim@epita.fr>
1750
1751 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
1752 GCC warnings.
1753
1754 2003-08-26 Akim Demaille <akim@epita.fr>
1755
1756 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
1757 "<\#" to avoid magic from Gnus when posting parts of this script.
1758
1759 2003-08-26 Akim Demaille <akim@epita.fr>
1760
1761 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
1762 (Parser::parse): here.
1763 Adjust: nerrs and errstatus is now replaced by...
1764 (Parser::nerrs_, Parser::errstatus_): New.
1765
1766 2003-08-25 Akim Demaille <akim@epita.fr>
1767
1768 * config/announce-gen, Makefile.cfg: New.
1769 * Makefile.am: Adjust.
1770 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
1771 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
1772
1773 2003-08-25 Akim Demaille <akim@epita.fr>
1774
1775 When reducing initial empty rules, Bison parser read an initial
1776 location that is not defined. This results in garbage, and that
1777 affects Bison's own parser. Therefore we need (i) to extend Bison
1778 to support a means to initialize this location, and (ii) to use
1779 this CVS Bison to fix CVS Bison's parser.
1780
1781 * src/reader.h, reader.c (epilogue_augment): Remove, replace
1782 with...
1783 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
1784 * src/parse-gram.y: Adjust.
1785 (%initial-action): New.
1786 (%error-verbose): Since we require CVS Bison, there is no reason
1787 not to use it.
1788 * src/scan-gram.l: Adjust.
1789 * src/Makefile.am (YACC): New, to make sure we use our own parser.
1790 * data/yacc.c (yyparse): Use b4_initial_action.
1791
1792 2003-08-25 Akim Demaille <akim@epita.fr>
1793
1794 * doc/bison.texinfo: Don't promote stdout for error messages.
1795
1796 2003-08-25 Akim Demaille <akim@epita.fr>
1797
1798 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
1799 From Alexandre Duret-Lutz.
1800
1801 2003-08-25 Akim Demaille <akim@epita.fr>
1802
1803 Version 1.875c.
1804
1805 2003-08-25 Akim Demaille <akim@epita.fr>
1806
1807 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
1808 Use them.
1809
1810 2003-08-25 Akim Demaille <akim@epita.fr>
1811
1812 * data/lalr1.cc (Parser::reduce_print_): New.
1813 Use it.
1814
1815 2003-08-25 Akim Demaille <akim@epita.fr>
1816
1817 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
1818 error recovery loops. This patch is based on
1819 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
1820 Also, augment the similarity between lalr1.cc and yacc.c.
1821 Note: the locations of error recovery rules are not correct yet.
1822
1823 * data/lalr1.cc: Comment changes to augment the similarity between
1824 lalr1.cc and yacc.c.
1825 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
1826 (yyerrlab1): Remove, but where it used to be (now the bottom part of
1827 yyerrlab), when hitting EOF, pop the whole stack here instead of
1828 merely falling thru the default error handling mechanism.
1829 (yyerrorlab): New label, with the old contents of YYERROR,
1830 plus the following change: pop the stack of rhs corresponding
1831 to the production that invoked YYERROR. That is how Yacc
1832 behaves (required by POSIX).
1833 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
1834 fail.
1835
1836 2003-08-25 Akim Demaille <akim@epita.fr>
1837
1838 Tune local.at so that people can "autom4te -l autotest calc.at -o
1839 calc" for instance, to extract a sub test suite.
1840
1841 * tests/testsuite.at: Move the initialization, Autotest version
1842 requirement, and AT_TESTED invocation into...
1843 * tests/local.at: here.
1844 * tests/testsuite.at: Include it for compatibility with Autoconf
1845 2.57.
1846 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
1847 be ignore.
1848
1849 2003-08-04 Paul Eggert <eggert@twinsun.com>
1850
1851 Rework code slightly to avoid gcc -Wtraditional warnings.
1852 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
1853 The returned value is now stored in *YY0. All callers changed.
1854 * src/output.c (merge_output): Adjust to the above change.
1855
1856 2003-07-26 Paul Eggert <eggert@twinsun.com>
1857
1858 * data/glr.c (YYASSERT): New macro.
1859 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
1860 yyresolveStates, yyprocessOneStack):
1861 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
1862 Derived from a suggestion by Frank Heckenbach.
1863
1864 2003-07-25 Paul Eggert <eggert@twinsun.com>
1865
1866 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
1867 for portability to K&R C (after ansi2knr, presumably). See
1868 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
1869 by Frank Heckenbach, though I have omitted the structure-initialization
1870 part of his glr-knr.diff patch since I recall that the Portable
1871 C Compiler didn't require that change.
1872
1873 Let the user specify how to allocate and free memory.
1874 Derived from a suggestion by Frank Heckenbach in
1875 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
1876 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
1877 All uses of free, malloc, realloc changed to use these macros,
1878 and unnecessary casts removed.
1879 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
1880
1881 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
1882
1883 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
1884 use s.empty() rather than s == "" to test for empty string; see
1885 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
1886 (trivial change)
1887
1888 2003-06-25 Akim Demaille <akim@epita.fr>
1889
1890 * config/depcomp, config/install-sh: Update from masters.
1891
1892 2003-06-20 Paul Eggert <eggert@twinsun.com>
1893
1894 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
1895 and return properly parenthesized result.
1896 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
1897 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
1898 Remove unnecessary parentheses from uses.
1899 * doc/bison.texinfo (Location Default Action): Describe the
1900 conventions for parentheses.
1901
1902 2003-06-19 Paul Eggert <eggert@twinsun.com>
1903
1904 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
1905 yyreportTree): Do not assume that size_t is the same width as int,
1906 when printing sizes. Print sizes using an unsigned format.
1907 Problem reported by Frank Heckenbach in
1908 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
1909
1910 Port to Forte Developer 7 C compiler.
1911 * data/glr.c (struct YYLTYPE): If locations are not being used,
1912 declare a single dummy member, as empty structs do not conform
1913 to the C standard.
1914 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
1915 the Forte Developer 7 C compiler complains that end-of-loop
1916 code is not reached.
1917
1918 2003-06-17 Paul Eggert <eggert@twinsun.com>
1919
1920 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
1921 avoid warnings from picky compilers about redefinition of PARAMS.
1922
1923 2003-06-17 Paul Eggert <eggert@twinsun.com>
1924
1925 Version 1.875b.
1926
1927 * NEWS: Document 1.875b.
1928
1929 * lib/bbitset.h: Do not include config.h; that's the includer's job.
1930 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
1931 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
1932 Don't use 'index' in comments, as it's a builtin fn on some hosts.
1933 * lib/bitset_stats.c: Include gettext.h unconditionally, as
1934 per recent gettext manual's suggestion.
1935 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
1936 Use prototypes, not old-style definitions.
1937 * lib/lbitset.c (lbitset_unused_clear): Likewise.
1938 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
1939 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
1940 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
1941 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
1942 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
1943 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
1944 vbitset_or_and_cmp, vbitset_copy): Likewise.
1945
1946 * lib/libiberty.h: Do not include config.h; that's the includer's job.
1947 Do not include <stdlib.h>.
1948 (PARAMS): Define unconditionally for C89.
1949 (ATTRIBUTE_NORETURN): Remove.
1950 (ATTRIBUTE_UNUSED): Define unconditionally.
1951
1952 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
1953 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
1954 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
1955 * lib/vbitset.c, lib/vbitset.h: New files.
1956 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
1957 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
1958 from libbitset.
1959
1960 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
1961 `How Can I Reset @code{yyparse}', since texinfo does not allow
1962 arbitrary @ in node names.
1963
1964 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
1965 shouldn't be needed according to the gettext 0.12.1 documentation
1966 but which seem to be needed anyway: codeset.m4 glibc21.m4
1967 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
1968 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
1969 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
1970
1971 * lib/.cvsignore: Add stdbool.h.
1972 * m4/.cvsignore: Add nls.m4, po.m4.
1973
1974 Upgrade to CVS gnulib.
1975 * stdbool_.h: File renamed from stdbool.h.in.
1976 * configure.ac (AM_STDBOOL_H): Invoke this instead of
1977 AC_HEADER_STDBOOL.
1978 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
1979 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
1980 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
1981 (MOSTLYCLEANFILES): New var.
1982 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
1983 (stdbool.h): New rule.
1984 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
1985 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
1986 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
1987 m4/quote.m4: Upgrade to today's gnulib.
1988
1989 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
1990 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
1991 the tests right now.
1992 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
1993 yyerror are declared before use; C99 requires this.
1994
1995 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
1996
1997 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
1998 first.
1999 (yyrecoverSyntaxError): Correct the logic for setting and testing
2000 yyerrState.
2001 Correct comment on handling EOF.
2002 Allow states with only a default reduction, rather than failing
2003 (I can't quite reconstruct why these were not allowed before).
2004
2005 Fixes to avoid problem that $-N rules in GLR parsers can cause
2006 buffer overruns, corrupting state.
2007
2008 * src/output.c (prepare_rules): Output max_left_semantic_context
2009 definition.
2010 * src/reader.h (max_left_semantic_context): New variable declaration.
2011 * src/scan-gram.l (max_left_semantic_context): Define.
2012 (handle_action_dollar): Update max_left_semantic_context.
2013 * data/glr.c (YYMAXLEFT): New definition.
2014 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
2015 (yyresolveAction): Ditto.
2016
2017 Fixes to problems with location handling in GLR parsers reported by
2018 Frank Heckenbach (2003/06/05).
2019
2020 * data/glr.c (YYLTYPE): Make trivial if locations not used.
2021 (YYRHSLOC): Add parentheses, and define only if locations used.
2022 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
2023 locations not used.
2024 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
2025 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
2026
2027 * tests/cxx-type.at: Exercise location information; update tests
2028 to differentiate output with and without locations.
2029 Remove forward declarations of yylex and yyerror---caused errors
2030 because default YYLTYPE not yet defined.
2031 Change semantic actions to compute strings, rather than printing
2032 them directly (to test proper passing of semantics values). Change
2033 output to prefix notation and update test data and expected results.
2034 (yylex): Track locations.
2035 (stmtMerge): Return value rather than printing, and include arguments
2036 in value.
2037
2038 2003-06-03 Paul Eggert <eggert@twinsun.com>
2039
2040 Avoid warnings generated by GCC 2.95.4 when Bison is
2041 configured with --enable-gcc-warnings.
2042 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
2043 yy::]b4_parser_class_name[::translate_,
2044 yy::Stack::operator[] (unsigned),
2045 yy::Stack::operator[] (unsigned) const,
2046 yy::Slice::operator[] (unsigned),
2047 yy::Slice::operator[] (unsigned) const):
2048 Rename local vars to avoid warnings.
2049 * tests/glr-regression.at (Improper handling of embedded actions
2050 and $-N in GLR parsers): Remove unused local variable from yylex.
2051 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
2052 (void) as arg when not pure, since we now assume C89 when building
2053 Bison. Pacify GCC by using parameter.
2054
2055 2003-06-02 Paul Eggert <eggert@twinsun.com>
2056
2057 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
2058 yy::Location::lines, yy::Location::columns): Rename arguments
2059 to avoid shadowing; this removes a warning generated by GCC 3.3.
2060
2061 2003-06-01 Paul Eggert <eggert@twinsun.com>
2062
2063 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
2064 to g++, as GCC 3.3 complains if you do it.
2065 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
2066 everything that WARNING_CFLAGS has, except omit warnings
2067 not suitable for C++.
2068 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
2069 * tests/atlocal.in (CXXFLAGS): New var.
2070 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
2071
2072 Fix a GLR parser bug I reported in February; see
2073 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
2074 The problem was that GLR parsers did not conform to the C standard,
2075 because actions like { $1 = $2 + $3; } expanded to expressions
2076 that invoked YYFILL in separate subexpressions, and YYFILL assigned
2077 to a local variable. The C standard says that expressions
2078 like (var = f ()) + (var = f ()) have undefined behavior.
2079 Another problem was that GCC sometimes issues warnings that
2080 yyfill and its parameters are unused.
2081
2082 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
2083 as possibly unused.
2084 (yyfill): New function.
2085 (YYFILL): Use it.
2086 (yyuserAction): Change type of yynormal to bool, so that it matches
2087 the new yyfill signature. Mark it as possibly unused.
2088
2089
2090 Follow up on a bug I reported in February, where a Bison-generated
2091 parser can loop. Provide a test case and a fix for yacc.c. I
2092 don't have a fix for lalr1.cc or for glr.c, unfortunately.
2093 The original bug report is in:
2094 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
2095
2096 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
2097 macro's size was becoming unwieldy.
2098 (yyerrlab): Do not discard an empty lookahead symbol, as this
2099 might destroy garbage.
2100 (yyerrorlab): New label, with the old contents of YYERROR,
2101 plus the following change: pop the stack of rhs corresponding
2102 to the production that invoked YYERROR. That is how Yacc
2103 behaves, and POSIX requires this behavior.
2104 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
2105 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
2106 Define 'alarm' to do nothing if unistd.h is not available.
2107 Add a new rule "exp: '-' error;" to test the above change to
2108 data/yacc.c. Use 'alarm' to abort any test taking longer than
2109 10 seconds, as it's probably looping.
2110 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
2111 Also, the new yacc.c generates two fewer diagnostics for an
2112 existing test.
2113
2114 2003-05-24 Paul Eggert <eggert@twinsun.com>
2115
2116 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
2117 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
2118 This fixes a problem reported by John Bowman when the Compaq/HP
2119 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
2120 -ansi -Wall -gall).
2121 * data/yacc.c (union yyalloc): Likewise.
2122 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
2123
2124 Switch from 'int' to 'bool' where that makes sense.
2125
2126 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
2127 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
2128 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
2129 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
2130 Return or accept bool, not int. All callers changed.
2131 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
2132 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
2133 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
2134 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
2135 bitset_or_and_cmp_): Likewise.
2136 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
2137 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
2138 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
2139 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
2140 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
2141 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
2142 bitset_stats_or_and_cmp): Likewise.
2143 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
2144 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
2145 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
2146 ebitset_xor_cmp): Likewise.
2147 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
2148 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
2149 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
2150 lbitset_xor_cmp): Likewise.
2151 * lib/bbitset.h: Include <stdbool.h>.
2152 (struct bitset_vtable): The following members now return bool, not
2153 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
2154 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
2155 or_and_cmp).
2156 * src/conflicts.c (count_rr_conflicts): Likewise.
2157 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
2158 All uses changed.
2159 * lib/ebitset.c (ebitset_obstack_init): Likewise.
2160 * lib/lbitset.c (lbitset_obstack_init): Likewise.
2161 * src/getargs.c (debug_flag, defines_flag, locations_flag,
2162 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
2163 graph_flag): Likewise.
2164 * src/getargs.h (debug_flag, defines_flag, locations_flag,
2165 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
2166 graph_flag): Likewise.
2167 * src/output.c (error_verbose): Likewise.
2168 * src/output.h (error_verbose): Likewise.
2169 * src/reader.c (start_flag, typed): Likewise.
2170 * src/reader.h (typed): Likewise.
2171 * src/getargs.c (LOCATIONS_OPTION): New constant.
2172 (long_options, getargs): Use it.
2173 * src/lalr.c (build_relations): Use bool, not int.
2174 * src/nullable.c (nullable_compute): Likewise.
2175 * src/print.c (print_reductions): Likewise.
2176 * src/tables.c (action_row, pack_vector): Likewise.
2177 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
2178 * src/output.c (prepare): Use it.
2179 * src/output.c (token_definitions_output,
2180 symbol_destructors_output, symbol_destructors_output): Use string,
2181 not boolean integer, to keep track of whether to output separator.
2182 * src/print_graph.c (print_core): Likewise.
2183 * src/state.c (state_rule_lookaheads_print): Likewise.
2184
2185 * config/install-sh: Sync from automake 1.7.5.
2186
2187 2003-05-14 Paul Eggert <eggert@twinsun.com>
2188
2189 * src/parse-gram.y (rules_or_grammar_declaration): Require a
2190 semicolon after a grammar declaration, in the interest of possible
2191 future changes to the Bison input language.
2192 Do not allow a stray semicolon at the start of the grammar.
2193 (rhses.1): Allow one or more semicolons after any rule, including
2194 just before "|" as required by POSIX.
2195 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
2196 grammar.
2197
2198 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
2199
2200 %parse-param support for lalr1.cc.
2201
2202 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
2203 b4_cc_constructor_calls, b4_cc_constructor_call,
2204 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
2205 definitions.
2206 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
2207 parse-param arguments.
2208 (yy::b4_parser_class_name): Declare instance variables to
2209 hold parse-param arguments.
2210 * tests/calc.at: s/value/semantic_value/ because value clashes
2211 with a member of yy::b4_parser_class_name. Adjust C++ code
2212 to handle %parse-param. Enable %parse-param test in C++.
2213
2214 2003-05-12 Paul Eggert <eggert@twinsun.com>
2215
2216 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
2217 English a bit. Fix fclose typo. Change "const char" to "char
2218 const", and use ANSI C rather than K&R for "main". Suggest
2219 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
2220 and suggest yy_switch_to_buffer.
2221
2222 2003-05-05 Paul Eggert <eggert@twinsun.com>
2223
2224 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
2225 C89. This avoids a diagnostic on compilers that define __STDC__
2226 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
2227 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
2228
2229 2003-05-03 Paul Eggert <eggert@twinsun.com>
2230
2231 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
2232 Do not overrun array bounds.
2233 This should fix a bug reported today by Olatunji Oluwabukunmi in
2234 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
2235
2236 2003-04-29 Akim Demaille <akim@epita.fr>
2237
2238 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
2239 * src/getargs.c, src/getargs.h: here, as bool, not int.
2240 (nondeterministic_parser): New.
2241 * src/parse-gram.y, src/scan-gram.l: Support
2242 %nondeterministic-parser.
2243 * src/output.c (prepare): Use nondeterministic_parser instead
2244 of glr_parser where appropriate.
2245 * src/tables.c (conflict_row, action_row, save_row)
2246 (token_actions, token_actions, pack_vector): Ditto.
2247
2248 2003-04-29 Akim Demaille <akim@epita.fr>
2249
2250 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
2251
2252 2003-04-29 Akim Demaille <akim@epita.fr>
2253
2254 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
2255 with %pure-parser and %locations to exercise the patch from Yakov
2256 Markovitch below.
2257
2258 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
2259
2260 * data/yacc.c: (b4_lex_param): Corrected for the case where
2261 %lex-param is provided and %pure-parser isn't.
2262
2263 2003-04-27 Paul Eggert <eggert@twinsun.com>
2264
2265 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
2266 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
2267 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
2268 if it is not defined.
2269 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
2270
2271 2003-04-26 Paul Eggert <eggert@twinsun.com>
2272
2273 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
2274 Declare to be of type suitable for the ninf value itself, not of
2275 type suitable for the corresponding table, since the latter might
2276 be unsigned but the ninf value might be negative. This fixes a
2277 bug reported by Alexandre Duret-Lutz in
2278 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
2279
2280 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
2281 invokes it. We shouldn't invoke it twice because it will attempt
2282 to put error.o in the archive twice. This fixes a glitch reported
2283 by Martin Mokrejs in
2284 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
2285
2286 2003-04-21 Paul Eggert <eggert@twinsun.com>
2287
2288 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
2289 to gnulib.
2290
2291 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
2292
2293 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
2294 Fix obvious typo that results in uncompilable GLR parsers
2295 when both %pure-parser and %locations are used. (trivial change)
2296
2297 2003-04-17 Paul Eggert <eggert@twinsun.com>
2298
2299 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
2300 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
2301 Do not insert the expected token via unput, as this runs afoul
2302 of a POSIX-compatibility bug in flex 2.5.31.
2303 All uses changed to BEGIN the parent state,
2304 since we no longer insert the expected token via unput.
2305 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
2306 that is no longer emitted after the above change.
2307
2308 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
2309 the first one. This change is from Paul Hilfinger, and it fixes
2310 regression reported by Werner Lemberg in
2311 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2312
2313 (resolve_sr_conflict): Don't invoke state_errs_set
2314 unless one or more tokens have been explicitly made errors.
2315 Otherwise, the above change causes Bison to abort.
2316
2317 * tests/existing.at (GNU pic Grammar): New test case, taken from
2318 Lemberg's email.
2319
2320 2003-03-31 Akim Demaille <akim@epita.fr>
2321
2322 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
2323
2324 2003-03-31 Akim Demaille <akim@epita.fr>
2325
2326 * src/output.c (prepare_symbols): Avoid trailing spaces in the
2327 output.
2328
2329 2003-03-31 Akim Demaille <akim@epita.fr>
2330
2331 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
2332 From Paul Hilfinger.
2333
2334 2003-03-29 Akim Demaille <akim@epita.fr>
2335
2336 * m4/error.m4: Do not put under dynamic conditions some code which
2337 expansion is under static control.
2338
2339 2003-03-29 Akim Demaille <akim@epita.fr>
2340
2341 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
2342
2343 2003-03-29 Akim Demaille <akim@epita.fr>
2344
2345 * doc/bison.texinfo (Strings are Destroyed): New.
2346
2347 2003-03-13 Paul Eggert <eggert@twinsun.com>
2348
2349 * .cvsignore: Add configure.lineno.
2350 * src/.cvsignore: Add yacc.
2351 * tests/.cvsignore: Add testsuite.log.
2352 * doc/fdl.texi: Sync with latest FSF version.
2353
2354 2003-03-12 Paul Eggert <eggert@twinsun.com>
2355
2356 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
2357 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
2358 cursor, instead of leaving it undefined. This fixes a bug
2359 reported by Tim Van Holder in
2360 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
2361 * tests/input.at (Torturing the Scanner): Test the scanner on
2362 an empty input file, which was Tim Van Holder's test case.
2363
2364 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
2365 <sys/resource.h> can be included, include sys/time.h and
2366 sys/times.h first, if available. This works around the SunOS
2367 4.1.4 porting bug reported by Bruce Becker in
2368 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
2369
2370 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
2371 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
2372 AC_HEADER_SYS_WAIT.
2373
2374 Merge changes from gnulib. This was prompted because the CVS
2375 snapshot didn't build on Solaris 7 due to strnlen problems.
2376
2377 These changes need to be merged back into gnulib:
2378 * lib/hash.c: Include <stdbool.h> unconditionally.
2379 * m4/onceonly.m4 (m4_quote): New macro.
2380 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
2381 Quote AC_FOREACH variable-expansions properly.
2382 The 2003-01-03 obstack.h change also needs merging.
2383 {end of changes requiring merging}
2384
2385 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
2386 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
2387 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
2388 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
2389 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
2390 New files, imported from gnulib.
2391 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
2392 above.
2393
2394 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
2395 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
2396 gnulib sources.
2397
2398 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
2399 Add.
2400 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
2401 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
2402 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
2403 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
2404 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
2405 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
2406 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
2407 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
2408 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
2409 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
2410 (jm_PREREQ_ARGMATCH): Remove.
2411 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
2412 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
2413
2414 * src/system.h: Include <stdbool.h> unconditionally.
2415
2416 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
2417 assuming at least C89 in the bitset code for some time now.
2418
2419 2003-03-03 Akim Demaille <akim@epita.fr>
2420
2421 * ro.po: New.
2422
2423 2003-03-02 Akim Demaille <akim@epita.fr>
2424
2425 * doc/bison.texinfo (Table of Symbols): Reactivate the
2426 documentation for %lex-param, and %parse-param.
2427
2428 2003-03-02 Akim Demaille <akim@epita.fr>
2429
2430 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
2431 generate verbose error messages.
2432 Use the number of tokens as an upper bound in yytname, as it
2433 cannot be a non terminal.
2434
2435 2003-03-02 Akim Demaille <akim@epita.fr>
2436
2437 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
2438 message.
2439
2440 2003-03-02 Akim Demaille <akim@epita.fr>
2441
2442 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
2443 Use them to exercise yycheck overrun.
2444 Based on Andrew Suffield's grammar.
2445
2446 2003-03-02 Akim Demaille <akim@epita.fr>
2447
2448 Create tests/local.at for Bison generic testing macros.
2449
2450 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
2451 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
2452 This new file.
2453 * tests/calc.at (AT_CHECK_CALC): Adjust.
2454 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
2455 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
2456 * tests/local.at: here.
2457 (AT_COMPILE_CXX): Tags the tests using it as c++.
2458 Ignore the test if CXX is not functional.
2459
2460 2003-03-01 Paul Eggert <eggert@twinsun.com>
2461
2462 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
2463 not loc->end, since loc->end might contain garbage and this leads
2464 to undefined behavior on some platforms.
2465 (id_loc, token_start): Use (IF_LINTed) initial values that do not
2466 depend on *loc, so that the reader doesn't give the the false
2467 impression that *loc is initialized.
2468 (<INITIAL>"%%"): Do not bother setting code_start, since its value
2469 does not survive the return.
2470
2471 2003-03-01 Akim Demaille <akim@epita.fr>
2472
2473 * src/scan-gram.l (code_start): Always initialize it when entering
2474 into yylex, as SC_EPILOGUE is activated *before* the corresponding
2475 yylex invocation. An alternative would be making it static, but
2476 then it starts with the second %%'s beginning, instead of its end.
2477
2478 2003-02-28 Paul Eggert <eggert@twinsun.com>
2479
2480 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
2481 around a UnixWare 7.1.1 porting bug reported by John Hughes in
2482 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
2483
2484 2003-02-26 Paul Eggert <eggert@twinsun.com>
2485
2486 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
2487 Remove Sequent/Pyramid discussion (nobody uses them any more).
2488 Merge VMS and MS-DOS discussion; these ports may well be dead
2489 but let's keep mentioning them for now. Put <> around email
2490 addresses. Add copyright notice.
2491
2492 2003-02-24 Paul Eggert <eggert@twinsun.com>
2493
2494 * data/glr.c (yy_reduce_print): yylineno -> yylno,
2495 to avoid collision with flex use of yylineno.
2496 Problem reported by Bruce Lilly in
2497 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
2498 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
2499 * data/yacc.c (yy_reduce_print): Likewise.
2500
2501 * config/depcomp: Sync with Automake 1.7.3.
2502
2503 2003-02-21 Akim Demaille <akim@epita.fr>
2504
2505 * data/lalr1.cc: Use temporary variables instead of casts to
2506 change integer types.
2507 Suggested by Paul Eggert.
2508
2509 2003-02-21 Akim Demaille <akim@epita.fr>
2510
2511 * doc/bison.texinfo: Use "location" consistently to refer to @n,
2512 to avoid confusions with lalr1.cc's notion of Position.
2513 Suggested by Paul Eggert.
2514
2515 2003-02-20 Akim Demaille <akim@epita.fr>
2516
2517 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
2518 before initial_columns.
2519 (location.hh): Use consistent variable names when defining the
2520 operator<<.
2521 Use "last" so that we subtract from Positions, not from unsigned.
2522
2523 2003-02-20 Akim Demaille <akim@epita.fr>
2524
2525 * data/lalr1.cc (position.hh): New subfile, including the extended
2526 and Doxygen'ed documentation of class Position.
2527 (location.hh): Use it.
2528 Document a` la Doxygen.
2529 With the help of Benoit Perrot.
2530
2531 2003-02-20 Akim Demaille <akim@epita.fr>
2532
2533 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
2534 AT_YACC_IF.
2535 Redefine AT_YYERROR_SEES_LOC_IF using it.
2536 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
2537 not defined.
2538 Don't use the location in yy::Parser::error_ and
2539 yy::Parser::print_ when not %locations.
2540 Activate more lalr1.cc tests.
2541
2542 2003-02-19 Akim Demaille <akim@epita.fr>
2543
2544 * data/lalr1.cc: When displaying a line number, be sure to make it
2545 an int.
2546
2547 2003-02-19 Akim Demaille <akim@epita.fr>
2548
2549 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
2550 Remove, useless.
2551 (YYABORT, YYACCEPT, YYERROR): New.
2552 * tests/calc.at: Renable the lalr1.cc test.
2553
2554 2003-02-19 Akim Demaille <akim@epita.fr>
2555
2556 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
2557 error recovery, mixing with/without pops and discarding of the
2558 lookahead.
2559 Exercise YYERROR.
2560 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
2561
2562 2003-02-17 Paul Eggert <eggert@twinsun.com>
2563
2564 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
2565 * tests/testsuite.at (AT_COMPILE): Use them.
2566 This fixes the testsuite problem reported by Robert Lentz in
2567 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
2568
2569 2003-02-12 Paul Eggert <eggert@twinsun.com>
2570
2571 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
2572 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
2573 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
2574 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
2575 Check for malloc failure, for consistency with yacc.c.
2576 (yytname_size): Remove, for consistency with yacc.c.
2577
2578 The bug still remains in data/lalr1.cc, as I didn't have time
2579 to fix it there.
2580
2581 2003-02-06 Akim Demaille <akim@epita.fr>
2582
2583 * configure.ac (GXX): Rename as...
2584 (CXX): this, to keep the original Autoconf semantics.
2585 Require 2.57.
2586 * data/lalr1.cc: Fix b4_copyright invocations.
2587 If YYDEBUG is not defined, don't depend upon name_ being defined.
2588 (location.hh): Include string and iostream.
2589 (Position::filename): New member.
2590 (Position::Position ()): New.
2591 (operator<< (Position)): New.
2592 (operator- (Position, int)): New.
2593 (Location::first, Location::last): Rename as...
2594 (Location::begin, Location::end): these, to mock the conventional
2595 iterator names.
2596 (operator<< (Location)): New.
2597 * tests/atlocal.in (CXX): New.
2598 * tests/testsuite.at (AT_COMPILE_CXX): New.
2599 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
2600 locations in a more synthetic way.
2601 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
2602 lalr1.cc is used.
2603 Adjust the C locations to match those from Emacs: first column is
2604 column 0.
2605 Change all the expected results.
2606 Conform to the GCS: simplify the locations when applicable.
2607 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
2608 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
2609 these CPP macros with the m4 macros new defined by...
2610 (AT_CHECK_PUSHDEFS): this, i.e.:
2611 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
2612 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
2613 New macros.
2614 (AT_CHECK_POPDEFS): Undefine them.
2615 (AT_CHECK_CALC_LALR1_CC): New.
2616 Use it for the first lalr1.cc test.
2617
2618 2003-02-04 Akim Demaille <akim@epita.fr>
2619
2620 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
2621 Location as is defined.
2622
2623 2003-02-04 Akim Demaille <akim@epita.fr>
2624
2625 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
2626 name_ being defined.
2627
2628 2003-02-03 Paul Eggert <eggert@twinsun.com>
2629
2630 * src/gram.h (start_symbol): Remove unused decl.
2631
2632 Use more-consistent naming conventions for local vars.
2633
2634 * src/derives.c (derives_compute): Change type of local var from
2635 int to rule_number.
2636 * src/gram.c (grammar_rules_partial_print): Likewise.
2637 * src/print.c (print_core): Likewise.
2638 * src/reduce.c (reduce_grammar_tables): Likewise.
2639
2640 * src/gram.c (grammar_dump): Change name of item_number *
2641 local var from r to rp.
2642 * src/nullable.c (nullable_compute): Likewise.
2643
2644 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
2645
2646 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
2647 for symbol or symbol_number var.
2648 * src/reader.c (grammar_start_symbol_set): Likewise.
2649 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
2650 Likewise.
2651 * src/state.c (transitions_to): Likewise.
2652 * src/state.h: Likewise.
2653 * src/tables.c (symbol_number_to_vector_number): Likewise.
2654
2655 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
2656 char * var.
2657
2658 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
2659 var.
2660
2661 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
2662 var.
2663
2664 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
2665 Use str, not s, for char * var. Use ch, not c, for character var.
2666 Use size for size var.
2667
2668 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
2669 char * var.
2670 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
2671 uniqstr var.
2672 * src/uniqstr.h: Likewise.
2673
2674 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
2675 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
2676 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
2677 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
2678 param to have same name as that of enum, so that we don't use
2679 "s" to stand for a non-state.
2680
2681 2003-02-02 Akim Demaille <akim@epita.fr>
2682
2683 * src/scan-skel.l: Scan more than one inert character per yylex
2684 invocation.
2685
2686 2003-02-01 Paul Eggert <eggert@twinsun.com>
2687
2688 Version 1.875a.
2689
2690 * po/LINGUAS: Add ms.
2691
2692 2003-01-30 Akim Demaille <akim@epita.fr>
2693
2694 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
2695
2696 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2697
2698 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
2699 of $1.
2700
2701 Changes in response to error report by S. Eken: GLR mode does not
2702 handle negative $ indices or $ indices in embedded rules correctly.
2703 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
2704
2705 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
2706 (b4_rhs_location): Ditto.
2707 (yyfill): New function to copy from stack tree into array
2708 incrementally.
2709 (yyuserAction): Modify to allow incremental move of semantic values
2710 to rhs array when in GLR mode.
2711 Define YYFILL to use in user-defined actions to fill semantic array
2712 as needed.
2713 Remove dummy use of yystack, as there is now a guaranteed use.
2714 (yydoAction): Modify to allow incremental move of semantic values
2715 to rhs array when in GLR mode.
2716 (yyresolveAction): Ditto.
2717 (yyglrShiftDefer): Update comment.
2718 (yyresolveStates): Use X == NULL for pointers, not !X.
2719 (yyglrReduce): Ditto.
2720 (yydoAction): Ditto
2721
2722 * tests/glr-regr1.at: Rename to ...
2723 * tests/glr-regression.at: Add new regression test for the problems
2724 described above (adapted from S. Eken).
2725 Update copyright notice.
2726 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
2727 * tests/Makefile.am: Ditto.
2728
2729 2003-01-28 Paul Eggert <eggert@twinsun.com>
2730
2731 * data/lalr1.cc: Do not use @output_header_name@ unless
2732 b4_defines_flag is set. This fixes two bugs reported by
2733 Tim Van Holder in
2734 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
2735 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
2736
2737 2003-01-21 Paul Eggert <eggert@twinsun.com>
2738
2739 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
2740 we don't need to worry about yyerrlab1 being reported as an
2741 "unused label" by non-GCC C compilers. The downside is that if
2742 locations are used then a couple of statements are duplicated each
2743 time YYERROR is invoked, but the upside is that the warnings
2744 should vanish.
2745 (yyerrlab1): Move code to YERROR.
2746 (yyerrlab2): Remove. Change uses back to yyerrlab1.
2747 This reverts some of the 2002-12-27 change.
2748
2749 2003-01-17 Paul Eggert <eggert@twinsun.com>
2750
2751 * src/output.c (symbol_printers_output): Fix typo that led
2752 to core dump. Problem reported by Antonio Rus in
2753 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
2754
2755 2003-01-13 Akim Demaille <akim@epita.fr>,
2756 Quoc Peyrot <chojin@lrde.epita.fr>,
2757 Robert Anisko <anisko_r@lrde.epita.fr>
2758
2759 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
2760 when the stacks contain one element, as the loop would otherwise
2761 free the last state, and then use the top state (the one we just
2762 popped). This means that the initial elements will not be freed
2763 explicitly, as is the case in yacc.c; it is not a problem, as
2764 these elements have fake values.
2765
2766 2003-01-11 Paul Eggert <eggert@twinsun.com>
2767
2768 * NEWS: %expect-violations are now just warnings, reverting
2769 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
2770 bootstrapping problem reported by Matthias Klose; see
2771 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
2772 * src/conflicts.c (conflicts_print): Likewise.
2773 * tests/conflicts.at (%expect not enough, %expect too much,
2774 %expect with reduce conflicts): Likewise.
2775 * doc/bison.texinfo (Expect Decl): Document this. Also mention
2776 that the warning is enabled if the number of conflicts changes
2777 (not necessarily increases).
2778
2779 * src/getargs.c (version): Update copyright year.
2780
2781 2003-01-09 Akim Demaille <akim@epita.fr>
2782
2783 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
2784
2785 2003-01-08 Paul Eggert <eggert@twinsun.com>
2786
2787 * Makefile.maint (WGETFLAGS):
2788 New macro, containing "-C off" to disable proxy caches.
2789 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
2790 (rel-check): Use $(WGET) instead of wget.
2791
2792 2003-01-06 Paul Eggert <eggert@twinsun.com>
2793
2794 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
2795 the GLR paper of Scott, Johnstone and Hussain.
2796
2797 2003-01-04 Paul Eggert <eggert@twinsun.com>
2798
2799 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
2800 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
2801 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
2802 (EXTRA_LIBRARIES): New var, for liby.a.
2803 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
2804 (EXTRA_SCRIPTS): New var, for yacc.
2805
2806 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
2807 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
2808 Problem reported by Nelson H. F. Beebe.
2809
2810 2003-01-03 Paul Eggert <eggert@twinsun.com>
2811
2812 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
2813 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
2814 when compiling Bison 1.875's `bitset bset = obstack_alloc
2815 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
2816
2817 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
2818 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
2819 grow to a huge size with typical invocation.
2820
2821 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
2822 Use the pattern recommended by Autoconf 2.57, except also protect
2823 against double-definition.
2824 * src/system.h: Likewise.
2825 Portability issues reported by Nelson H. F. Beebe.
2826
2827 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
2828 All uses changed. Provide a definition in both C and C++.
2829 (yytrue, yyfalse): Define even if defined (__cplusplus).
2830
2831 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
2832 Reported by Nelson H. F. Beebe.
2833
2834 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
2835
2836 2003-01-02 Paul Eggert <eggert@twinsun.com>
2837
2838 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
2839 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
2840 Bug reported by Nelson H. F. Beebe.
2841
2842 2003-01-01 Paul Eggert <eggert@twinsun.com>
2843
2844 * Version 1.875.
2845
2846 2002-12-30 Paul Eggert <eggert@twinsun.com>
2847
2848 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
2849 Moved here from...
2850 (<INITIAL>","): Here. This causes stray "," to be treated
2851 more uniformly.
2852
2853 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2854 last brace in braced code when not in Yacc mode, for compatibility
2855 with Bison 1.35. This resurrects the 2001-12-15 patch to
2856 src/reader.c.
2857
2858 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
2859 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
2860
2861 2002-12-28 Paul Eggert <eggert@twinsun.com>
2862
2863 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
2864 that of SYM's type. This fixes Debian bug 168069, reported by
2865 Thomas Olsson.
2866
2867 2002-12-28 Paul Eggert <eggert@twinsun.com>
2868
2869 Version 1.75f.
2870
2871 Switch back to the Yacc style of conflict reports, undoing some
2872 of the 2002-07-30 change.
2873 * doc/bison.texinfo (Understanding): Use Yacc style for
2874 conflict reports. Also, use new way of locating rules.
2875 * src/conflicts.c (conflict_report):
2876 Renamed from conflict_report_yacc, removing the old
2877 'conflict_report'. Translate the entire conflict report at once,
2878 so that we don't assume that "," has the same interpretation in
2879 all languages.
2880 (conflicts_output): Use Yacc-style conflict report for each state,
2881 instead of our more-complicated style.
2882 (conflicts_print): Use Yacc-style conflict report, except print
2883 the input file name when not emulating Yacc.
2884 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
2885 Conflicted Reduction, %expect not enough, %expect too much,
2886 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
2887 * tests/existing.at (GNU Cim Grammar): Likewise.
2888 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
2889
2890 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
2891 fatal): Don't invoke fflush; it's not needed and it might even be
2892 harmful for stdout, as stdout might not be open.
2893 * src/reduce.c (reduce_print): Likewise.
2894
2895 2002-12-27 Paul Eggert <eggert@twinsun.com>
2896
2897 Fix a bug where error locations were not being recorded correctly.
2898 This problem was originally reported by Paul Hilfinger in
2899 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
2900
2901 * data/yacc.c (yyparse): New local var yylerrsp, to record the
2902 top of the location stack's error locations.
2903 (yyerrlab): Set it. When discarding a token, push its location
2904 onto yylerrsp so that we don't lose track of the error's end.
2905 (yyerrlab1): Now is only the target of YYERROR, so that we can
2906 properly record the location of the action that failed. For GCC
2907 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
2908 GCC warning about yyerrlab1 being unused if YYERROR is unused.
2909 (yyerrlab2): New label, which yyerrlab now falls through to.
2910 Compute the error's location by applying YYLLOC_DEFAULT to
2911 the locations of all the symbols that went into the error.
2912 * doc/bison.texinfo (Location Default Action): Mention that
2913 YYLLOC_DEFAULT is also invoked for syntax errors.
2914 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
2915 Error locations include the locations of all the tokens that were
2916 discarded, not just the last token.
2917
2918 2002-12-26 Paul Eggert <eggert@twinsun.com>
2919
2920 * src/files.c: Include quote.h.
2921 (compute_output_file_names): Warn if we detect conflicting
2922 outputs to the same file. This should catch the misunderstanding
2923 exemplified by Debian Bug 165349, reported by Bruce Stephens..
2924
2925 * src/conflicts.c (conflicts_print): If the user specifies
2926 "%expect N", report an error if there are any reduce/reduce
2927 conflicts. This is what the manual says should happen.
2928 This fixes Debian bug 130890, reported by Anthony DeRobertis.
2929 * tests/conflicts.at (%expect with reduce conflicts): New test.
2930
2931 Don't use m4_include on relative file names, as it doesn't work as
2932 desired if there happens to be a file with that name under ".".
2933
2934 * m4sugar/version.m4: Remove; it was included but it wasn't used.
2935 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
2936 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
2937 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
2938 * src/output.c (output_skeleton): Use full path names when
2939 specifying a file to include; don't rely on include path, as
2940 it's unreliable when the working file contains a file with
2941 that name.
2942
2943 2002-12-25 Paul Eggert <eggert@twinsun.com>
2944
2945 Remove obsolete references to bison.simple and bison.hairy.
2946 Problem mentioned by Aubin Mahe in
2947 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
2948 * data/glr.c: Comment fix.
2949 * doc/bison.1: Remove references. Also, mention "yacc".
2950
2951 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
2952 with -g option.
2953
2954 * src/parse-gram.y (declaration): Use enum "report_states" rather
2955 than its numeric value 1.
2956
2957 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
2958 opening a new one. This fixes Debian bug 165349, reported by
2959 Bruce Stephens.
2960
2961 2002-12-24 Paul Eggert <eggert@twinsun.com>
2962
2963 Version 1.75e.
2964
2965 * Makefile.maint (cvs-update): Don't assume that the shell
2966 supports $(...), as Solaris sh doesn't.
2967
2968 * src/parse-gram.y (lloc_default): Remove test for empty
2969 nonterminals at the end, since it didn't change the result.
2970
2971 2002-12-24 Paul Eggert <eggert@twinsun.com>
2972
2973 If the user does not define YYSTYPE as a macro, Bison now declares it
2974 using typedef instead of defining it as a macro. POSIX requires this.
2975 For consistency, YYLTYPE is also declared instead of defined.
2976
2977 %union directives can now have a tag before the `{', e.g., the
2978 directive `%union foo {...}' now generates the C code
2979 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
2980 The default union tag is `YYSTYPE', for compatibility with Solaris 9
2981 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
2982 instead of `yyltype'.
2983
2984 `yystype' and `yyltype' are now obsolescent macros instead of being
2985 typedefs or tags; they are no longer documented and will be
2986 withdrawn in a future release.
2987
2988 * data/glr.c (b4_location_type): Remove.
2989 (YYSTYPE): Renamed from yystype.
2990 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
2991 (struct YYLTYPE): Renamed from struct yyltype.
2992 (YYLTYPE): Renamed from yyltype.
2993 (yyltype, yystype): New (and obsolescent) macros,
2994 for backward compatibility.
2995 * data/yacc.c: Likewise.
2996
2997 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
2998 does not specify a union tag. This is for compatibility with
2999 Solaris 9 yacc.
3000
3001 * src/parse-gram.y (add_param): 2nd arg is now char * not char
3002 const *, since it is now modified by stripping surrounding { }.
3003 (current_braced_code): Remove.
3004 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
3005 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
3006 trailing " {...}". Now of type <chars>.
3007 (grammar_declaration): Adjust to bundled tokens.
3008 (code_content): Remove; stripping is now done by add_param.
3009 (print_token_value): Print contents of bundled tokens.
3010 (token_name): New function.
3011
3012 * src/reader.h (braced_code, current_braced_code): Remove.
3013 (token_name): New decl.
3014
3015 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
3016 token_type, not braced_code code_kind. All uses changed.
3017 (SC_PRE_CODE): New state, for scanning after a keyword that
3018 has (or usually has) an immediately-following braced code.
3019 (token_type): New local var, to keep track of which token type
3020 to return when scanning braced code.
3021 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
3022 <INITIAL>"%parse-param", <INITIAL>"%printer",
3023 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
3024 instead of returning a token type immediately.
3025 (<INITIAL>"{"): Set token type.
3026 (<SC_BRACED_CODE>"}"): Use it.
3027 (handle_action_dollar, handle_action_at): Now returns bool
3028 indicating success. Fail if ! current_rule; this prevents a core dump.
3029 (handle_symbol_code_dollar, handle_symbol_code_at):
3030 Remove; merge body into caller.
3031 (handle_dollar, handle_at): Complain in invalid contexts.
3032
3033 * NEWS, doc/bison.texinfo: Document the above.
3034 * NEWS: Fix years and program names in copyright notice.
3035
3036 2002-12-17 Paul Eggert <eggert@twinsun.com>
3037
3038 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
3039 Reporting, Table of Symbols): Omit mentions of %lex-param and
3040 %parse-param from the documentation for now.
3041
3042 2002-12-15 Paul Eggert <eggert@twinsun.com>
3043
3044 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
3045 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
3046 lookahead symbol, and which sets yychar in parser actions) and it
3047 disagreed with the Bison documentation. Bug
3048 reported by Andrew Walrond.
3049
3050 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
3051 as the caller now does that.
3052 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
3053 (YYEMPTY): Parenthesize right hand side, since others use it.
3054 (yyparse): Don't assume that our generated code is the only code
3055 that sets yychar.
3056
3057 2002-12-13 Paul Eggert <eggert@twinsun.com>
3058
3059 Version 1.75d.
3060
3061 POSIX requires a "yacc" command.
3062 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
3063 (MOSTLYCLEANFILES): Add yacc.
3064 (yacc): New rule.
3065 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
3066 as an alias for bison y.
3067
3068 * po/LINGUAS: Add da.
3069
3070 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
3071 problem with latest <getopt.h>.
3072 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
3073
3074 * doc/fdl.texi: Upgrade to 1.2.
3075 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
3076 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
3077 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
3078 gnulib.
3079 * config/install-sh: Sync with autotools.
3080
3081 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
3082 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
3083 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
3084 locations are requested.
3085 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
3086 locations are requested.
3087
3088 2002-12-12 Paul Eggert <eggert@twinsun.com>
3089
3090 Remove unportable casts and storage allocation tricks.
3091 While we're at it, remove almost all casts, since they
3092 usually aren't needed and are a sign of trouble.
3093
3094 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
3095
3096 * src/derives.c (derives_compute): Do not subtract NTOKENS from
3097 the pointer DSET returned by malloc; this isn't portable.
3098 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
3099 Similarly for DERIVES.
3100 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
3101 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
3102 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
3103
3104 * src/derives.c (derives_compute): Do not bother invoking
3105 int_of_rule_number, since rule numbers are integers.
3106
3107 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
3108 rather than XMALLOC (char, N).
3109
3110 * src/files.c (filename_split): Rewrite to avoid cast.
3111
3112 * src/gram.h (symbol_number_as_item_number,
3113 item_number_as_symbol_number, rule_number_as_item_number,
3114 item_number_as_rule_number):
3115 Now inline functions rather than macros, to avoid casts.
3116 * src/state.h (state_number_as_int): Likewise.
3117 * src/tables.c (state_number_to_vector_number,
3118 symbol_number_to_vector_number): Likewise.
3119
3120 * src/gram.h (int_of_rule_number): Remove; no longer used.
3121
3122 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
3123 since the resulting storage is always stored into.
3124
3125 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
3126 where it's needed.
3127
3128 * src/muscle_tab.c (muscle_m4_output):
3129 Now inline. Return bool, not int.
3130 * src/state.c (state_compare): Likewise.
3131 * src/symtab.c (symbol_check_defined,
3132 symbol_check_alias_consistency, symbol_pack, symbol_translation,
3133 hash_compare_symbol, hash_symbol):
3134 Likewise.
3135 * src/uniqstr.c (uniqstr_print): Likewise.
3136 * src/muscle_tab.c (muscle_m4_output_processor):
3137 New function, to avoid casts.
3138 * src/state.c (state_comparator, stage_hasher): Likewise.
3139 * src/symtab.c (symbol_check_defined_processor,
3140 symbol_check_alias_consistency_processor, symbol_pack_processor,
3141 symbol_translation_processor, hash_symbol_comparator,
3142 hash_symbol_hasher): Likewise.
3143 * src/uniqstr.c (uniqstr_print_processor): Likewise.
3144 * src/muscle_tab.c (muscles_m4_output):
3145 Use new functions instead of casting old functions unportably.
3146 * src/state.c (state_hash_new): Likewise.
3147 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
3148 symbols_token_translations_init):
3149 Likewise.
3150 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
3151
3152 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
3153 var instead of casting to long, to avoid casts.
3154 (prepare_states): Use MALLOC rather than alloca, so that we don't
3155 have to worry about alloca.
3156 * src/state.c (state_hash_lookup): Likewise.
3157
3158 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
3159 local var instead of casting to unsigned char, to avoid casts.
3160
3161 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
3162 STATE_ALLOC): Remove.
3163 (transitions_new, errs_new, reductions_new, state_new): Use malloc
3164 rather than calloc, and use offsetof to avoid allocating slightly
3165 too much storage.
3166 (state_new): Initialize all members.
3167
3168 * src/state.c (state_hash): Use unsigned accumulator, not signed.
3169
3170 * src/symtab.c (symbol_free): Remove; unused.
3171 (symbol_get): Remove cast in lhs of assignment.
3172 (symbols_do): Now static. Accept generic arguments, not
3173 hashing-related ones.
3174
3175 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
3176 (symbol_processor): Remove.
3177 (symbols_do): Remove decl; now static.
3178
3179 * src/system.h (alloca): Remove; decl no longer needed.
3180 (<stddef.h>): Include, for offsetof.
3181 (<inttypes.>, <stdint.h>): Include if available.
3182 (uintptr_t): New type, if system lacks it.
3183 (CALLOC, MALLOC, REALLOC): New macros.
3184 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
3185 new macros.
3186
3187 * src/tables.c (table_size): Now int, to pacify GCC.
3188 (table_grow, table_ninf_remap): Use signed table size.
3189 (save_row): Don't bother initializing locals when not needed.
3190 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
3191 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
3192
3193 * src/vcg.h: Correct misspellings.
3194
3195 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
3196
3197
3198 * src/getargs.c (getargs): Don't assume EOF == -1.
3199
3200 2002-12-09 Paul Eggert <eggert@twinsun.com>
3201
3202 Change identifier spellings to avoid collisions with names
3203 that are reserved by POSIX.
3204
3205 Don't use names ending in _t, since POSIX reserves them.
3206 For consistency, remove _e and _s endings -- they're weren't
3207 needed to remove ambiguity. All uses changed.
3208 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
3209 turn was just renamed from struniq_t.
3210 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
3211 which in turn was just renamed from struniq_processor_t.
3212 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
3213 in turn was renamed from hash_compare_struniq_t.
3214 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
3215 (state_list): Renamed from state_list_t.
3216 * src/assoc.h (assoc): Renamed from assoc_t.
3217 * src/conflicts.c (enum conflict_resolution): Renamed from
3218 enum conflict_resolution_e.
3219 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
3220 (rule_list): Renamed from rule_list_t.
3221 * src/getargs.h (enum trace): Renamed from enum trace_e.
3222 (enum report): Renamed from enum report_e.
3223 * src/gram.h (item_number): Renamed from item_number_t.
3224 (rule_number): Renamed from rule_number_t.
3225 (struct rule_s): Remove the "rule_s" part; not used.
3226 (rule): Renamed from rule_t.
3227 (rule_filter): Renamed from rule_filter_t.
3228 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
3229 (goto_list): Renamed from goto_list_t.
3230 * src/lalr.h (goto_number): Renamed from goto_number_t.
3231 * src/location.h (location): Renamed from location_t.
3232 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
3233 and moved here from:
3234 * src/muscle_tab.h (muscle_entry_t): here.
3235 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
3236 (rule_list): Renamed from rule_list_t.
3237 * src/print_graph.c (static_graph): Renamed from graph.
3238 * src/reader.h (braced_code): Renamed from braced_code_t.
3239 Remove brace_code_e tag.
3240 * src/relation.h (relation_node): Renamed from relation_node_t.
3241 (relation_nodes): Renamed from relation_nodes_t.
3242 (relation): Renamed from relation_t.
3243 * src/state.h (state_number): Renamed from state_number_t.
3244 (struct state): Renamed from struct state_s.
3245 (state): Renamed from state_t.
3246 (transitions): Renamed from transitions_t. Unused (and
3247 misspelled) transtion_s tag removed.
3248 (errs): Renamed from errs_t. Unused errs_s tag removed.
3249 (reductions): Renamed from reductions_t. Unused tag
3250 reductions_s removed.
3251 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
3252 (struct symbol_list): Renamed from struct symbol_list_s.
3253 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
3254 (struct symbol): Renamed from struct symbol_s.
3255 (symbol): Renamed from symbol_t.
3256 * src/tables.c (vector_number): Renamed from vector_number_t.
3257 (action_number): Renamed from action_t.
3258 * src/tables.h (base_number): Renamed from base_t.
3259 * src/vcg.h (enum color): Renamed from enum color_e.
3260 (enum textmode): Renamed from enum textmode_e.
3261 (enum shape): Renamed from enum shape_e.
3262 (struct colorentry): Renamed from struct colorentry_s.
3263 (struct classname): Renamed from struct classname_s.
3264 (struct infoname): Renamed from struct infoname_s.
3265 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
3266 (enum decision): Renamed from enum decision_e.
3267 (enum orientation): Renamed from enum orientation_e.
3268 (enum alignment): Renamed from enum alignment_e.
3269 (enum arrow_mode): Renamed from enum arrow_mode_e.
3270 (enum crossing_type): Renamed from enum crossing_type_e.
3271 (enum view): Renamed from enum view_e.
3272 (struct node): Renamed from struct node_s.
3273 (node): Renamed from node_t.
3274 (enum linestyle): Renamed from enum linestyle_e.
3275 (enum arrowstyle): Renamed from enum arrowstyle_e.
3276 (struct edge): Renamed from struct edge.
3277 (edge): Renamed from edge_t.
3278 (struct graph): Renamed from struct graph_s.
3279 (graph): Renamed from graph_t.
3280 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
3281 Rename value_t -> value.
3282 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
3283 value_t_as_yystype -> value_as_yystype.
3284
3285 Don't include <errno.h> in the mainstream code, since it
3286 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
3287 * lib/get-errno.c, lib/get-errno.h: New files.
3288 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
3289 get-errno.c.
3290 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
3291 * src/output.c (output_skeleton): Likewise.
3292 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
3293 instead of errno.
3294 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
3295 Likewise.
3296 (handle_action_dollar, handle_action_at): Likewise.
3297 * src/system.h: Do not include <errno.h>.
3298 (TAB_EXT): Renamed from EXT_TAB.
3299 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
3300
3301 Avoid str[a-z]*, since <string.h> reserves that name space.
3302 Change all instances of "struniq" in names to "uniqstr", and
3303 likewise for "STRUNIQ" and "UNIQSTR".
3304 * src/uniqstr.c: Renamed from src/struniq.c.
3305 * src/uniqstr.h: Renamed from src/struniq.h.
3306 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
3307 * src/files.c (strsuffix): Remove; unused.
3308 (concat2): Renamed from stringappend. Now static.
3309 * src/files.h (strsuffix, stringappend): Remove; unused.
3310 * src/parse-gram.y (<chars>): Renamed from <string>.
3311 (<uniqstr>): Renamed from <struniq>.
3312 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
3313 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
3314 (struct graph_s.expand): Renamed from struct graph_s.stretch.
3315 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
3316 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
3317 (N_EXPAND): Renamed from N_STRETCH.
3318
3319 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
3320 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
3321 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
3322 Remove; unused.
3323 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
3324 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
3325 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
3326 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
3327 (BASE_MAXIMUM): Renamed from BASE_MAX.
3328 (BASE_MINIMUM): Renamed from BASE_MIN.
3329 (ACTION_MAX): Remove; unused.
3330 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
3331 Unnecessary casts removed from above defines.
3332
3333
3334 Fix misspelling in names.
3335 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
3336 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
3337 G_NODE_ALIGNEMENT.
3338
3339
3340 * lib/timevar.c (timevar_report): Renamed from time_report,
3341 for consistency with other names.
3342 * lib/timevar.h (timevar_report): New decl.
3343 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
3344
3345
3346 Sort include-file uses.
3347
3348 Reorder all include files under src to be in the order "system.h".
3349 then the ../lib include files in angle brackets (alphabetized),
3350 then the . include files in double-quotes (alphabetized). Fix
3351 dependency breakages encountered in this process, as follows:
3352 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
3353 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
3354 * src/state.h: Include "symtab.h".
3355
3356 2002-12-08 Paul Eggert <eggert@twinsun.com>
3357
3358 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
3359 since this causes problems when __file__ contains character
3360 sequences like "@" that are treated specially by src/scan-skel.l.
3361 Instead, just use the file's basename. This fixes the bug
3362 reported by Martin Mokrejs in
3363 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
3364
3365 2002-12-06 Paul Eggert <eggert@twinsun.com>
3366
3367 Add support for rules that do not have trailing semicolons, as
3368 POSIX requires. Improve the quality of locations in Bison
3369 diagnostics.
3370
3371 * src/location.c: Include <quotearg.h>.
3372 (empty_location): Now const.
3373 (location_print): New function. Follow the recommendation of the
3374 GNU Coding Standards for locations that span file boundaries.
3375 * src/location.h: Do not include <quotearg.h>; no longer needed.
3376 (boundary): New type.
3377 (location_t): Use it. This allows locations to span file boundaries.
3378 All member uses changed: file -> start.file or end.file (as needed),
3379 first_line -> start.line, first_column -> start.column,
3380 last_line -> end.line, last_column -> end.column.
3381 (equal_boundaries): New function.
3382 (LOCATION_RESET, LOCATION_STEP): Remove.
3383 (LOCATION_PRINT): Remove. All callers changed to use location_print.
3384 (empty_location): Now const.
3385 (location_print): New decl.
3386 * src/parse-gram.y (lloc_default): New function, which handles
3387 empty locations more accurately.
3388 (YYLLOC_DEFAULT): Use it.
3389 (%token COLON): Remove.
3390 (%token ID_COLON): New token.
3391 (rules): Use it.
3392 (declarations, rules): Remove trailing semicolon.
3393 (declaration, rules_or_grammar_declaration):
3394 Allow empty (";") declaration.
3395 (symbol_def): Remove empty actions; no longer needed.
3396 (rules_or_grammar_declaration): Remove trailing semicolon.
3397 (semi_colon.opt): Remove.
3398 * src/reader.h: Include location.h.
3399 (scanner_cursor): New decl.
3400 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
3401 rolling our own.
3402 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
3403 of *loc.
3404 (STEP): Remove. No longer needed, now that adjust_location does
3405 the work. All uses removed.
3406 (scanner_cursor): New var.
3407 (adjust_location): Renamed from extend_location. It now sets
3408 *loc and adjusts the scanner cursor. All uses changed.
3409 Don't bother testing for CR.
3410 (handle_syncline): Remove location arg; now updates scanner cursor.
3411 All callers changed.
3412 (unexpected_end_of_file): Now accepts start boundary of token or
3413 comment, not location. All callers changed. Update scanner cursor,
3414 not the location.
3415 (SC_AFTER_IDENTIFIER): New state.
3416 (context_state): Renamed from c_context. All uses changed.
3417 (id_loc, code_start, token_start): New local vars.
3418 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
3419 processing of Yacc white space and equivalents here.
3420 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
3421 instead of returning ID immediately, since we need to search for
3422 a subsequent colon.
3423 (<INITIAL>"'", "\""): Save token_start.
3424 (<INITIAL>"%{", "{", "%%"): Save code_start.
3425 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
3426 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
3427 BEGIN context_state at end, not INITIAL.
3428 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
3429 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
3430 Return correct token start.
3431 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
3432 the start of a character, string or multiline comment is found.
3433 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
3434 Reduction): Adjust reported locations to match the more-precise
3435 results now expected.
3436 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
3437 * tests/reduce.at (Useless Rules, Reduced Automaton,
3438 Underivable Rules): Likewise.
3439 * tests/regression.at (Invalid inputs): No longer `expecting ";"
3440 or "|"' now that so many other tokens are allowed by the new grammar.
3441
3442 * src/complain.h (current_file): Remove duplicate decl;
3443 current_file is now owned by files.h.
3444 * src/complain.c, src/scan-gram.l: Include files.h.
3445
3446 2002-12-06 Paul Eggert <eggert@twinsun.com>
3447
3448 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
3449 promotes to int; it might be unsigned int.
3450 * data/yacc.c (yy_reduce_print): Likewise.
3451
3452 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
3453 be #defined in the prologue, not in the Bison declarations.
3454 This fixes Debian Bug 102878, reported by Shaul Karl.
3455
3456 2002-12-02 Paul Eggert <eggert@twinsun.com>
3457
3458 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
3459 * lib/strtoul.c: New file, from gnulib.
3460 This fixes a porting bug reported by Peter Klein in
3461 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
3462
3463 2002-11-30 Paul Eggert <eggert@twinsun.com>
3464
3465 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
3466 and put only a forward declaration in the prologue. This is for
3467 consistency with the other scanner helper functions.
3468
3469 Type clashes now generate warnings, not errors, since it
3470 appears that POSIX may allow some grammars with type clashes.
3471 * src/reader.c (grammar_current_rule_check): Warn about
3472 type clashes instead of complaining.
3473 * tests/input.at (Type Clashes): Expect warnings, not complaints.
3474
3475 Add Yacc library, since POSIX requires it.
3476 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
3477 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
3478 * lib/main.c, lib/yyerror.c: New files.
3479
3480 gram_error can be static; it need not be extern.
3481 * src/reader.h (gram_error): Remove decl.
3482 * src/parse-gram.y (gram_error): Now static. Add static decl.
3483 (print_token_value): Omit parameter names from forward decl,
3484 for consistency.
3485
3486 2002-11-29 Paul Eggert <eggert@twinsun.com>
3487
3488 * doc/bison.texinfo: Emphasize that yylex and yyerror must
3489 be declared before being used. E.g., one should typically
3490 declare them in the prologue. Use GNU coding style in examples.
3491 Put "const" consistently after the type it modifies. Mention
3492 that C99 supports "inline". Mention that yyerror traditionally
3493 returns "int".
3494
3495 %parse-param and %lex-param now take just one argument, the
3496 declaration; the argument name is deduced from the declaration.
3497
3498 * doc/bison.texinfo (Parser Function, Pure Calling, Error
3499 Reporting, Table of Symbols): Document this.
3500 * src/parse-gram.y (add_param): New function.
3501 (COMMA): Remove.
3502 (declaration): Implement new rule for %parse-param and %lex-param.
3503 * src/scan-gram.l: "," now elicits a warning, rather than being
3504 a token; this is more compatible with byacc.
3505 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
3506
3507 2002-11-27 Paul Eggert <eggert@twinsun.com>
3508
3509 Rename identifiers to avoid real and potential collisions.
3510
3511 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
3512 to avoid collision with lex macro described by Bruce Lilly in
3513 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
3514 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
3515 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
3516 * src/parse-gram.y (print_token_value): Renamed from yyprint.
3517 All uses changed.
3518 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
3519 The name "yycontrol" violates the name space rules, and this stuff
3520 wasn't being used anyway.
3521 (input): Remove action; this stuff wasn't being used.
3522 (gram_error): Rename local variable yylloc -> loc.
3523 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
3524 (YY_DECL): Don't use "yy" at start of local variables.
3525 All uses changed, e.g., yylloc -> loc.
3526 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
3527 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
3528 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
3529 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
3530
3531 * src/parse-gram.y (gram_error): loc is now const *.
3532 * src/reader.h (gram_error): Likewise.
3533
3534 2002-11-24 Paul Eggert <eggert@twinsun.com>
3535
3536 Version 1.75c.
3537
3538 * tests/actions.at (Actions after errors): Use an output format
3539 more similar to that of the Printers and Destructors test.
3540 Test the position of the ';' token too.
3541 (Printers and Destructors): Likewise.
3542 (Printers and Destructors: %glr-parser): Remove for now, to avoid
3543 unnecessarily alarming people when the test fails.
3544
3545 * data/yacc.c (yyerrlab1): Move this label down, so that the
3546 parser does not discard the lookahead token if the user code
3547 invokes YYERROR. This change is required for POSIX conformance.
3548
3549 * lib/error.c: Sync with gnulib.
3550
3551 2002-11-22 Paul Eggert <eggert@twinsun.com>
3552
3553 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
3554 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
3555 * lib/xmalloc.c: Likewise.
3556
3557 2002-11-20 Paul Eggert <eggert@twinsun.com>
3558
3559 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
3560
3561 2002-11-20 Paul Eggert <eggert@twinsun.com>
3562
3563 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
3564 should use `if (! x) abort ();' rather than `assert (x);', and
3565 anyway it's one less thing to worry about configuring.
3566
3567 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
3568 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
3569 and replace all instances of assert with abort.
3570 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
3571 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
3572
3573 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
3574 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
3575 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
3576 hash_find_entry, hash_rehash, hash_insert): Likewise.
3577 * src/conflicts.c (resolve_sr_conflict): Likewise.
3578 * src/lalr.c (set_goto_map, map_goto): Likewise.
3579 * src/nullable.c (nullable_compute): Likewise.
3580 * src/output.c (prepare_rules, token_definitions_output): Likewise.
3581 * src/reader.c (packgram, reader): Likewise.
3582 * src/state.c (state_new, state_free, state_transitions_set,
3583 state_reduction_find): Likewise.
3584 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
3585 symbol_pack): Likewise.
3586 * src/tables.c (conflict_row, pack_vector): Likewise.
3587 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
3588 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
3589 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
3590 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
3591
3592 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
3593 (ARGMATCH_CONSTRAINT): New macro.
3594 (ARGMATCH_ASSERT): Use it.
3595
3596 * src/system.h (verify): New macro.
3597 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
3598 rather than assert.
3599 * src/tables.c (tables_generate): Likewise.
3600
3601 * src/struniq.c (struniq_assert): Now returns void, and aborts
3602 if the assertion is false.
3603 (struniq_assert_p): Remove.
3604 * src/struniq.h: Likewise.
3605
3606 2002-11-18 Paul Eggert <eggert@twinsun.com>
3607
3608 * data/glr.c (yygetLRActions): Replace `yyindex' with
3609 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
3610 This fixes the regression with Sun ONE Studio 7 cc that I reported in
3611 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
3612
3613 2002-11-18 Akim Demaille <akim@epita.fr>
3614
3615 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
3616 space.
3617 From Tim Van Holder.
3618
3619 2002-11-17 Paul Eggert <eggert@twinsun.com>
3620
3621 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
3622 to "SyntaxError" for consistency with my 2002-11-15 change.
3623
3624 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
3625 not define to {}, since this breaks the common use of `YYDPRINTF
3626 ((...));' if a single statement is desired (e.g. before `else').
3627 Work around GCC warnings by surrounding corresponding calls with
3628 {} if needed.
3629 (yyhasResolvedValue): Remove unused function.
3630 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
3631 loop body.
3632 (yyreportSyntaxError): Renamed from yyreportParseError.
3633 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
3634 All uses changed.
3635 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
3636 extern when possible. Remove unused initializations.
3637
3638 2002-11-16 Akim Demaille <akim@epita.fr>
3639
3640 Augment the similarity between GLR and LALR traces.
3641
3642 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
3643 (YY_REDUCE_PRINT): New.
3644 (yyparse): Use them.
3645 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
3646 YYDPRINT here.
3647 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
3648 state reached after the reduction/recovery, since...
3649 (yyparse, yyprocessOneStack): Report the state we are entering in.
3650
3651 2002-11-16 Akim Demaille <akim@epita.fr>
3652
3653 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
3654 Add support for --trace=skeleton.
3655 * src/scan-skel.l: %option debug.
3656 Scan strings of non-@ or \n instead of character by character.
3657 (scan_skel): Handle trace_skeleton.
3658 (QPUTS): New.
3659 (@output_parser_name@, @output_header_name@): ``Restore'' their
3660 support (used to be M4 macros).
3661 * data/yacc.c: Quote larger chunks, a la glr.c.
3662 * data/lalr1.cc: Likewise.
3663 The header guards are no longer available, so use some other
3664 string than `YYLSP_NEEDED'.
3665
3666 2002-11-16 Akim Demaille <akim@epita.fr>
3667
3668 Make the ``Printers and Destructors'' test more verbose, taking
3669 `yacc.c''s behavior as (possibly wrong) reference.
3670
3671 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
3672 instead of fprint on stdout.
3673 Set and report the last_line of the symbols.
3674 Consistently display values and locations.
3675
3676 2002-11-16 Paul Eggert <eggert@twinsun.com>
3677
3678 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
3679
3680 2002-11-15 Paul Eggert <eggert@twinsun.com>
3681
3682 * tests/actions.at (Actions after errors): New test case.
3683
3684 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
3685 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
3686 tests/action.at, tests/calc.at, tests/conflicts.at,
3687 tests/cxx-type.at, tests/regression.at:
3688 "parse error" -> "syntax error" for POSIX compatibility.
3689 "parsing stack overflow..." -> "parser stack overflow" so
3690 that code matches Bison documentation.
3691
3692 2002-11-15 Akim Demaille <akim@epita.fr>
3693
3694 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
3695 take two BRACED_CODE, not two string_content.
3696 Free the scanner's obstack when we are done.
3697 (code_content): New.
3698 * tests/calc.at: Adjust.
3699 * doc/bison.texinfo: Adjust.
3700 Also, make sure to include the `,' for these declarations.
3701
3702 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
3703
3704 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
3705 definition; avoids potential autoreconf problems.
3706
3707 2002-11-15 Akim Demaille <akim@epita.fr>
3708
3709 Always check the value returned by yyparse.
3710
3711 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
3712 returned by yyparse.
3713 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
3714 Adjust calls.
3715 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
3716 returned by yyparse.
3717
3718 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3719
3720 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
3721 on input.at test.
3722
3723 2002-11-14 Paul Eggert <eggert@twinsun.com>
3724
3725 * src/output.c (output_skeleton): Call xfopen instead of
3726 duplicating xfopen's body.
3727
3728 Fix bugs reported by Nelson H. F. Beebe in
3729 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
3730
3731 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
3732 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
3733 Group compiler. Instead, use "$CC -E bar.c". Include the .h
3734 file twice in the grammar, as an extra check.
3735
3736 * tests/input.at (Torturing the Scanner): Surround the
3737 backslash-newline tests with "#if 0", to make it less likely that
3738 we'll run into compiler bugs. Bring back solitary \ inside
3739 comment, but add a closing comment to work around HP C bug. Don't
3740 test backslash-newline in C character constant.
3741
3742 2002-11-14 Akim Demaille <akim@epita.fr>
3743
3744 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
3745 status of the compiler.
3746 Calling `exit 1' is no longer needed.
3747 Reported by Nelson H. F. Beebe.
3748
3749 2002-11-14 Akim Demaille <akim@epita.fr>
3750
3751 * tests/atlocal.in (CPPFLAGS): We have config.h.
3752 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
3753 New.
3754 * tests/actions.at, tests/calc.at, tests/conflicts.at,
3755 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
3756 * tests/regression.at, tests/torture.at: Use them for all the
3757 grammars that are to be compiled.
3758 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
3759 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
3760 * doc/bison.texinfo (GLR Parsers): Document `inline'.
3761
3762 2002-11-14 Akim Demaille <akim@epita.fr>
3763
3764 * doc/bison.texinfo: Various formatting changes (alignments in
3765 samples, additional @group/@end group, GCS in samples.
3766 Use @deffn instead of simple @table to define the directives,
3767 macros, variables etc.
3768
3769 2002-11-13 Paul Eggert <eggert@twinsun.com>
3770
3771 Fix some bugs reported by Albert Chin-A-Young in
3772 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
3773
3774 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
3775 -o c"; the HP C compiler chatters during compilation.
3776 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
3777 * tests/headers.at (export YYLTYPE): Likewise.
3778
3779 * tests/input.at (Torturing the Scanner): Remove lines containing
3780 solitary backslashes, as they tickle a bug in the HP C compiler.
3781
3782 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
3783 comments, since they're not portable. Use GNU coding style.
3784
3785 2002-11-13 Akim Demaille <akim@epita.fr>
3786
3787 * data/yacc.c: Leave bigger chunks of quoted text.
3788 (YYDSYMPRINTF): New.
3789 Use it to report symbol activities.
3790 * data/glr.c (YYDSYMPRINTF): New.
3791 Use it.
3792
3793 2002-11-12 Paul Eggert <eggert@twinsun.com>
3794
3795 Version 1.75b.
3796
3797 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
3798 (yyglrReduce): Return yyok, not 0.
3799 This should avoid the enumerated-type warnings reported
3800 by Nelson H. F. Beebe in
3801 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
3802
3803 * lib/bbitset.h (BITSET_INLINE): Remove.
3804 * lib/bitset.h [! BITSET_INLINE]: Remove.
3805 (bitset_set, bitset_reset, bitset_test): Rename local vars
3806 to avoid shadowing warnings by GCC.
3807
3808 * data/glr.c (inline): Remove #define. It's the user's
3809 responsibility to #define it away, just like 'const'.
3810 This fixes one of the bugs reported by Nelson H. F. Beebe in
3811 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
3812
3813 * Makefile.maint (po-check): Scan .l and .y files instead of the
3814 .c and the .h files that they generate. This fixes the bug
3815 reported by Tim Van Holder in:
3816 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
3817 Look for N_ as well as for _. Try to avoid matching #define for
3818 N_ and _.
3819 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
3820 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
3821 * src/scan-gram.l: Revamp regular expressions so that " and '
3822 do not confuse xgettext.
3823
3824 * src/struniq.h (struniq_new): Do not declare the return type
3825 to be 'const'; this violates the C standard.
3826 * src/struniq.c (struniq_new): Likewise.
3827
3828 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
3829
3830 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
3831 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
3832 linker.
3833
3834 2002-11-12 Akim Demaille <akim@epita.fr>
3835
3836 * Makefile.maint: Sync with Autoconf:
3837 (local_updates): New.
3838
3839 2002-11-12 Akim Demaille <akim@epita.fr>
3840
3841 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
3842
3843 2002-11-12 Akim Demaille <akim@epita.fr>
3844
3845 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
3846 locations.
3847
3848 2002-11-12 Akim Demaille <akim@epita.fr>
3849
3850 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
3851 not yyvalue.
3852
3853 2002-11-12 Akim Demaille <akim@epita.fr>
3854
3855 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
3856 Use it to test the GLR parser.
3857
3858 2002-11-12 Akim Demaille <akim@epita.fr>
3859
3860 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
3861 defines it.
3862 * data/glr.c (yystos): New.
3863 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
3864 (YYDSYMPRINT): New.
3865 (yyval): Don't define it, it is handled via M4.
3866 (yyrecoverParseError): Free verbosely the discarded symbols.
3867 * data/yacc.c (yysymprint): Remove, rather...
3868 (b4_yysymprint_generate): invoke.
3869 * data/c.m4 (b4_yysymprint_generate): New.
3870 Accept pointers as arguments, as opposed to the version from
3871 yacc.c.
3872 (b4_yydestruct_generate): Likewise.
3873 * tests/cations.at (Printers and Destructors): Use Bison directives
3874 instead of CPP macros.
3875 Don't rely on internal details.
3876
3877 2002-11-12 Akim Demaille <akim@epita.fr>
3878
3879 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
3880 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
3881 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
3882 it against YYEMPTY and so forth), work on yytoken (i.e., set
3883 it to YYEMPTY etc.).
3884 (yydestruct): Replace with a b4_yydestruct_generate invocation.
3885 (b4_symbol_actions): Remove.
3886 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
3887 for 0, end-of-input.
3888
3889 2002-11-12 Akim Demaille <akim@epita.fr>
3890
3891 * doc/bison.texinfo (Destructor Decl): New.
3892
3893 2002-11-12 Akim Demaille <akim@epita.fr>
3894
3895 * src/tables.c (tables_generate): Use free for pointers that
3896 cannot be NULL, not XFREE.
3897 (pack_vector): Use assert, not fatal, for bound violations.
3898 * src/state.c (state_new): Likewise.
3899 * src/reader.c (reader): Likewise.
3900 * src/lalr.c (set_goto_map): Likewise.
3901 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
3902 the file name.
3903
3904 2002-11-12 Akim Demaille <akim@epita.fr>
3905
3906 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
3907 Restore.
3908 * src/scan-gram.l (last_string): Is global to the file, not to
3909 yylex.
3910 * src/parse-gram.y (input): Don't append the epilogue here,
3911 (epilogue.opt): do it here, and free the scanner's obstack.
3912 * src/reader.c (epilogue_set): Rename as...
3913 (epilogue_augment): this.
3914 * data/c.m4 (b4_epilogue): Defaults to empty.
3915
3916 2002-11-12 Akim Demaille <akim@epita.fr>
3917
3918 * src/getargs.c (long_options): Remove duplicates.
3919 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
3920 Remove.
3921 * doc/bison.rnh: Remove.
3922 * doc/bison.texinfo (VMS Invocation): Remove.
3923
3924 2002-11-12 Akim Demaille <akim@epita.fr>
3925
3926 * src/struniq.h, src/struniq.c (struniq_t): Is const.
3927 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
3928
3929 Use struniq for symbols.
3930
3931 * src/symtab.h (symbol_t): The tag member is a struniq.
3932 (symbol_type_set): Adjust.
3933 * src/symtab.c (symbol_new): Takes a struniq.
3934 (symbol_free): Don't free the tag member.
3935 (hash_compare_symbol_t, hash_symbol_t): Rename as...
3936 (hash_compare_symbol, hash_symbol): these.
3937 Use the fact that tags as struniqs.
3938 (symbol_get): Use struniq_new.
3939 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
3940 Returns a strniq.
3941 * src/reader.h (merger_list, grammar_currentmerge_set): The name
3942 and type members are struniqs.
3943 * src/reader.c (get_merge_function)
3944 (grammar_current_rule_merge_set): Adjust.
3945 (TYPE, current_type): Are struniq.
3946
3947 Use struniq for file names.
3948
3949 * src/files.h, src/files.c (infile): Split into...
3950 (grammar_file, current_file): these.
3951 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
3952 * src/reduce.c (reduce_print): Likewise.
3953 * src/getargs.c (getargs): Likewise.
3954 * src/complain.h, src/complain.c: Likewise.
3955 * src/main.c (main): Call struniqs_new early enough to use it for
3956 file names.
3957 Don't free the input file name.
3958
3959 2002-11-12 Akim Demaille <akim@epita.fr>
3960
3961 * src/symtab.c (symbol_free): Remove dead deactivated code:
3962 type_name are properly removed.
3963 Don't use XFREE to free items that cannot be NULL.
3964 * src/struniq.h, src/struniq.c: New.
3965 * src/main.c (main): Initialize/free struniqs.
3966 * src/parse-gram.y (%union): Add astruniq member.
3967 (yyprint): Adjust.
3968 * src/scan-gram.l (<{tag}>): Return a struniq.
3969 Free the obstack bit that used to store it.
3970 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
3971
3972 2002-11-11 Paul Eggert <eggert@twinsun.com>
3973
3974 Revamp to fix many (but not all) of the C- and M4-related quoting
3975 problems. Among other things, this fixes the Bison bug reported
3976 by Jan Hubicka when processing the Bash grammar; see:
3977 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
3978
3979 Use new @ escapes consistently. Represent brackets with @{ and @}
3980 rather than @<:@ and @:>@, since this works a bit better with dumb
3981 editors like vi. Represent @ with @@, since @ is now consistently
3982 an escape. Use @oline@ and @ofile@ rather than __oline__ and
3983 __ofile__, to avoid unexpected expansions. Similarly, use @output
3984 rather than #output.
3985
3986 * data/c.m4 (b4_copyright): Omit file name from comment, since
3987 the file name could contain "*/".
3988 (b4_synclines_flag): Don't quote the 2nd argument; it should already
3989 be quoted. All uses changed.
3990
3991 * data/glr.c: Use new @ escapes consistently.
3992 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
3993 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
3994 Remove, since they couldn't handle arbitrary characters in file
3995 names.
3996 * data/lalr1.cc: Likewise.
3997 * data/yacc.c: Likewise.
3998
3999 * src/files.c (output_infix): Remove; all uses removed.
4000 * src/files.h: Likewise.
4001
4002 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
4003 mishandled funny characters in file names, and anyway it isn't
4004 needed any more.
4005 * data/yacc.c: Likewise.
4006 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
4007
4008 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
4009 * data/yacc.c: Likewise.
4010
4011 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
4012 strings now.
4013 (muscle_init): Quote filename as a C string.
4014 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
4015 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
4016 * src/output.c (escaped_file_name_output): New function.
4017 (prepare_symbols): Quote tokens for M4.
4018 (prepare): Don't insert output_infix, output_prefix,
4019 output_parser_name, output_header_name; this is now down by scan-skel.
4020 Insert skeleton as a C string.
4021
4022 * src/output.c (user_actions_output, symbol_destructors_output,
4023 symbol_printers_output): Quote filenames for C and M4.
4024 * src/reader.c (prologue_augment, epilogue_set): Likewise.
4025
4026 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
4027 escapes other than \\ and \'; this simplifies the code.
4028 (<SC_STRING>): Likewise, for \\ and \".
4029 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
4030 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
4031 Use new escapes @{ and @} for [ and ].
4032
4033 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
4034 them with auto vars.
4035 Switch to new escape scheme, where @ is the escape character uniformly.
4036 Abort if a stray escape character is found. Avoid unbounded input
4037 buffer when parsing non-escaped text.
4038
4039 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
4040 __oline__, #output, $@, and @{ do not have unintended meanings.
4041
4042 2002-11-09 Paul Eggert <eggert@twinsun.com>
4043
4044 Fix the test failure due to GCC warnings described in
4045 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
4046 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
4047 evaluate to 0 if it's impossible for NINF to be in the respective
4048 table.
4049 (yygetLRActions, yyrecoverParseError): Use them.
4050
4051 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
4052 counted in the token inserted at end of file. Now takes
4053 location_t *, not location_t, so that the location can be
4054 adjusted. All uses changed.
4055
4056 * tests/regression.at (Invalid inputs): Adjust wording in
4057 diagnostic to match the new behavior.
4058
4059 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
4060 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
4061 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
4062 abort ();'. This reduces the runtime of the "Many lookaheads"
4063 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
4064 GCC 3.2.
4065
4066 2002-11-07 Paul Eggert <eggert@twinsun.com>
4067
4068 * src/parse-gram.y (CHARACTER): Remove unused token.
4069 All uses removed.
4070
4071 * src/scan-gram.l: Remove stack option. We no longer use the
4072 stack, since the stack was never deeper than 1; instead, use the
4073 new auto var c_context to record the stacked value.
4074
4075 Remove nounput option. At an unexpected end of file, we now unput
4076 the minimal input necessary to end cleanly; this simplifies the
4077 code.
4078
4079 Avoid unbounded token sizes where this is easy.
4080
4081 (unexpected_end_of_file): New function.
4082 Use it to systematize the error message on unexpected EOF.
4083 (last-string): Now auto, not static.
4084 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
4085 (scanner_last_string_free): Remove; not used.
4086 (percent_percent_count): Move decl to just before use.
4087 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
4088 not the (never otherwised-used) CHARACTER.
4089
4090 2002-11-07 Akim Demaille <akim@epita.fr>
4091
4092 Let yyerror always receive the msg as last argument, so that
4093 yyerror can be variadic.
4094
4095 * data/yacc.c (b4_yyerror_args): New.
4096 Use it when calling yyerror.
4097 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
4098 Use it when calling yyerror.
4099 * doc/bison.texinfo (Error Reporting): Adjust.
4100 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
4101 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
4102
4103 2002-11-06 Akim Demaille <akim@epita.fr>
4104
4105 #line should have quoted strings.
4106 Ideally, this should be done by m4_quotearg.
4107
4108 * src/scan-skel.l: Include quotearg.h.
4109 Quote __ofile__.
4110 * src/output.c (symbol_printers_output)
4111 (symbol_destructors_output): Quote the file name.
4112
4113 2002-11-06 Akim Demaille <akim@epita.fr>
4114
4115 * tests/regression.at (Invalid inputs): Adjust to the recent
4116 messages.
4117
4118 2002-11-06 Akim Demaille <akim@epita.fr>
4119
4120 Restore --no-lines.
4121 Reported by Jim Kent.
4122
4123 * data/c.m4 (b4_syncline): New.
4124 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
4125 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
4126 * src/output.c (user_actions_output): Likewise.
4127 (prepare): Define 'b4_synclines_flag'.
4128 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
4129
4130 2002-11-06 Akim Demaille <akim@epita.fr>
4131
4132 * src/main.c (main): Free `infile'.
4133 * src/scan-gram.l (handle_syncline): New.
4134 Recognize `#line'.
4135 * src/output.c (user_actions_output, symbol_destructors_output)
4136 (symbol_printers_output): Use the location's file name, not
4137 infile.
4138 * src/reader.c (prologue_augment, epilogue_set): Likewise.
4139
4140 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4141
4142 * src/tables.c (matching_state): Don't allow states to match if
4143 either has GLR conflict entries.
4144
4145 2002-11-05 Paul Eggert <eggert@twinsun.com>
4146
4147 * src/scan-gram.l: Use more accurate diagnostics, e.g.
4148 "integer out of range" rather than "invalid value".
4149 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
4150 accordingly.
4151
4152 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
4153 Also, remove one static variable in the scanner.
4154
4155 * src/scan-gram.l (braces_level): Now auto, not static.
4156 Initialize to zero if the compiler is being picky.
4157 (INITIAL): Clear braces_level instead of incrementing it.
4158 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
4159 as POSIX 1003.1-2001 requires.
4160 * src/system.h (IF_LINT): New macro, taken from coreutils.
4161 * configure.ac: Define "lint" if --enable-gcc-warnings.
4162
4163 2002-11-05 Akim Demaille <akim@epita.fr>
4164
4165 * src/scan-gram.l: When it starts with `%', complain about the
4166 whole directive, not just that `invalid character: %'.
4167
4168 2002-11-04 Akim Demaille <akim@epita.fr>
4169
4170 * Makefile.maint: Update from Autoconf.
4171 (update, cvs-update, po-update, do-po-update): New.
4172
4173 2002-11-04 Akim Demaille <akim@epita.fr>
4174
4175 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
4176 and yyerror.
4177 Have yyerror `use' its arguments.
4178 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
4179 returns true when location & yacc & pure & parse-param.
4180 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
4181
4182 2002-11-04 Akim Demaille <akim@epita.fr>
4183
4184 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
4185 clashes.
4186 * src/scan-gram.l: Use [\'] instead of ['] to pacify
4187 font-lock-mode.
4188 Use complain_at.
4189 Use quote, not quote_n since LOCATION_PRINT no longer uses the
4190 slot 0.
4191
4192 2002-11-03 Paul Eggert <eggert@twinsun.com>
4193
4194 * src/reader.c (get_merge_function, grammar_current_rule_check):
4195 Use consistent diagnostics for reporting type name clashes.
4196 Quote the types with <>, for consistency with Yacc.
4197 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
4198
4199 2002-11-03 Akim Demaille <akim@epita.fr>
4200
4201 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
4202 New.
4203 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
4204 (b4_parse_param): Remove.
4205 Use b4_identification.
4206 Propagate b4_pure_args where needed to pass them to yyerror.
4207 * data/glr.m4 (b4_parse_param): Remove.
4208 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
4209 (b4_lpure_formals): New.
4210 Use b4_identification.
4211 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
4212 b4_user_formals and b4_user_args.
4213 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
4214 (yyreportAmbiguity): When using a pure parser, also need
4215 the location, and the parse-params.
4216 Adjust callers.
4217 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
4218 When using a pure parser, also need the parse-params.
4219 Adjust callers.
4220 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
4221 (%pure-parser + %parse-param) LALR and GLR parsers.
4222 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
4223 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
4224 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
4225 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
4226 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
4227 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
4228 * doc/bison.texinfo: Untabify the whole file.
4229 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
4230 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
4231 (Error Reporting): Adjust to these new directives.
4232 Document %error-verbose, deprecate YYERROR_VERBOSE.
4233
4234 2002-11-03 Akim Demaille <akim@epita.fr>
4235
4236 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
4237 AT_CHECK_CALC_GLR invocations to use % directives, instead of
4238 command line options.
4239 * tests/cxx-type.at: Formatting changes.
4240
4241 2002-11-03 Paul Eggert <eggert@twinsun.com>
4242
4243 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
4244 to count columns correctly, and to check for invalid inputs.
4245
4246 Use mbsnwidth to count columns correctly. Account for tabs, too.
4247 Include mbswidth.h.
4248 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
4249 (extend_location): New function.
4250 (YY_LINES): Remove.
4251
4252 Handle CRLF in C code rather than in Lex code.
4253 (YY_INPUT): New macro.
4254 (no_cr_read): New function.
4255
4256 Scan UCNs, even though we don't fully handle them yet.
4257 (convert_ucn_to_byte): New function.
4258
4259 Handle backslash-newline correctly in C code.
4260 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
4261 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
4262 all uses changed.
4263 (tag, splice): New EREs. Do not allow NUL or newline in tags.
4264 Use {splice} wherever C allows backslash-newline.
4265 YY_STEP after space, newline, vertical-tab.
4266 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
4267
4268 (letter, id): Don't assume ASCII; e.g., spell out a-z.
4269
4270 ({int}, handle_action_dollar, handle_action_at): Check for integer
4271 overflow.
4272
4273 (YY_STEP): Omit trailing semicolon, so that it's more like C.
4274
4275 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
4276 as well as \000. Check for UCHAR_MAX, not 255.
4277 Allow \x with an arbitrary positive number of digits, as in C.
4278 Check for overflow here.
4279 Allow \? and UCNs, for compatibility with C.
4280
4281 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
4282 with quote slot used by complain_at.
4283
4284 * tests/input.at: Add tests for backslash-newline, m4 quotes
4285 in symbols, long literals, and funny escapes in strings.
4286
4287 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
4288 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
4289 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
4290 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
4291 * m4/mbswidth.m4: New file, from GNU coreutils.
4292
4293 * doc/bison.texinfo (Grammar Outline): Document // comments.
4294 (Symbols): Document that trigraphs have no special meaning in Bison,
4295 nor is backslash-newline allowed.
4296 (Actions): Document that trigraphs have no special meaning.
4297
4298 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
4299 no longer used.
4300
4301 2002-11-02 Paul Eggert <eggert@twinsun.com>
4302
4303 * src/reader.c: Don't include quote.h; not needed.
4304 (get_merge_function): Reword warning to be consistent with
4305 type clash diagnostic in grammar_current_rule_check.
4306
4307 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
4308 bug in trigraph handling.
4309
4310 * src/output.c (prepare_symbols): When printing token names,
4311 escape "[" as "@<:@" and likewise for "]".
4312
4313 * src/system.h (errno): Remove declaration, as we are now
4314 assuming C89 or better, and C89 guarantees errno.
4315
4316 2002-10-30 Paul Eggert <eggert@twinsun.com>
4317
4318 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
4319 Check for close failures.
4320 * src/files.h (xfclose): Return void, not int, since it always
4321 returned zero.
4322 * src/files.c (xfclose): Likewise. Report I/O error if ferror
4323 indicates one.
4324 * src/output.c (output_skeleton): Use xfclose rather than fclose
4325 and ferror. xfclose now checks ferror.
4326
4327 * data/glr.c (YYLEFTMOST_STATE): Remove.
4328 (yyreportTree): Use a stack-based leftmost state. This avoids
4329 our continuing battles with bogus warnings about initializers.
4330
4331 2002-10-30 Akim Demaille <akim@epita.fr>
4332
4333 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
4334 #if.
4335
4336 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
4337
4338 * tests/glr-regr1.at: New test for reported regressions.
4339 * tests/testsuite.at: Add glr-regr1.at test.
4340 * tests/Makefile.am: Add glr-regr1.at test.
4341
4342 2002-10-24 Paul Eggert <eggert@twinsun.com>
4343
4344 Version 1.75a.
4345
4346 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
4347 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
4348 we use malloc. Don't assume 'A' through 'Z' are contiguous.
4349 Don't assume strdup exists; POSIX says its an XSI extension.
4350 Check for buffer overflow on input.
4351
4352 2002-10-24 Akim Demaille <akim@epita.fr>
4353
4354 * src/output.c (output_skeleton): Don't disable M4sugar comments
4355 too soon: it results in comments being expanded.
4356 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
4357 first output.
4358
4359 2002-10-24 Akim Demaille <akim@epita.fr>
4360
4361 * data/yacc.c (m4_int_type): New.
4362 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
4363 char' as only yacc.c wants K&R portability.
4364 * data/glr.c (yysigned_char): Remove.
4365 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
4366 Reported by Quoc Peyrot.
4367
4368 2002-10-23 Paul Eggert <eggert@twinsun.com>
4369
4370 * src/main.c (main): With --trace=time, report times even if a
4371 non-fatal error occurs. Formerly, the times were reported in some
4372 such cases but not in others.
4373 * src/reader.c (reader): Just return if a complaint has been issued,
4374 instead of exiting, so that 'main' can report times.
4375
4376 2002-10-22 Akim Demaille <akim@epita.fr>
4377
4378 * src/system.h: Include sys/types.
4379 Reported by Bert Deknuydt.
4380
4381 2002-10-23 Paul Eggert <eggert@twinsun.com>
4382
4383 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
4384 Suggested by Art Haas.
4385
4386 2002-10-22 Paul Eggert <eggert@twinsun.com>
4387
4388 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
4389 decl; not needed any more.
4390 * src/main.c (main): Use return to exit, undoing yesterday's change.
4391 The last OS that we could find where this wouldn't work is
4392 SunOS 3.5, and that's too old to worry about now.
4393
4394 * data/glr.c (struct yyltype): Define members even when not
4395 doing locations. This is more consistent with yacc.c, and it
4396 works around the following bug reports:
4397 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
4398 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
4399
4400 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
4401 @acronym consistently. Standardize on "Yacc" instead of "YACC",
4402 "Algol" instead of "ALGOL". Give a bit more history about BNF.
4403
4404 2002-10-22 Akim Demaille <akim@epita.fr>
4405
4406 * data/README: New.
4407
4408 2002-10-21 Paul Eggert <eggert@twinsun.com>
4409
4410 Be consistent about 'bool'; the old code used an enum in one
4411 module and an int in another, and this violates the C standard.
4412 * m4/stdbool.m4: New file, from coreutils 4.5.3.
4413 * configure.ac (AC_HEADER_STDBOOL): Add.
4414 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
4415 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
4416 * src/symtab.c (hash_compare_symbol_t): Likewise.
4417 * src/system.h (bool, false, true): Use a definition consistent
4418 with ../lib/hash.c. All uses changed.
4419
4420 * src/complain.c (warning_issued): Renamed from warn_message_count,
4421 so that we needn't worry about integer overflow (!).
4422 Now of type bool. All uses changed.
4423 (complaint_issued): Renamed from complain_message_count; likewise.
4424
4425 * src/main.c (main): Use exit to exit with failure.
4426
4427 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
4428 rather than 1 and 0.
4429 * src/main.c (main): Likewise.
4430 * src/getargs.c (getargs): Likewise.
4431 * src/reader.c (reader): Likewise.
4432
4433 * src/getarg.c (getargs): Remove duplicate code for
4434 "Try `bison --help'".
4435
4436 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
4437 What was that "2" for?
4438
4439 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
4440 * src/getargs.c (usage): Likewise.
4441
4442 * src/getargs.c (getargs): When there are too few operands, report
4443 the last one. When there are too many, report the first extra
4444 one. This is how diffutils does it.
4445
4446 2002-10-20 Paul Eggert <eggert@twinsun.com>
4447
4448 Remove K&R vestiges.
4449 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
4450 * src/complain.c (VA_START): Remove. Assume prototypes.
4451 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
4452 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
4453 fatal): Assume prototypes.
4454 * src/complain.h: Assume prototypes.
4455 * src/system.h (PARAMS): Remove.
4456 Include <limits.h> unconditionally, since it's guaranteeed even
4457 for a freestanding C89 compiler.
4458 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
4459 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
4460
4461 2002-10-20 Akim Demaille <akim@epita.fr>
4462
4463 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
4464 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
4465 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
4466 (yyresolveStates, yyresolveAction, yyresolveStack)
4467 (yyprocessOneStack): Use them.
4468 (yy_reduce_print): New.
4469 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
4470
4471 2002-10-20 Akim Demaille <akim@epita.fr>
4472
4473 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
4474 arguments and output `void'.
4475 (b4_c_function): Rename as...
4476 (b4_c_function_def): this.
4477 (b4_c_function_decl, b4_c_ansi_function_def)
4478 (b4_c_ansi_function_decl): New.
4479 Change the interpretation of the arguments: before `int, foo', now
4480 `int foo, foo'.
4481 * data/yacc.c (yyparse): Prototype and define thanks to these.
4482 Adjust b4_c_function_def uses.
4483 * data/glr.c (yyparse): Likewise, but ANSI only.
4484
4485 2002-10-20 Akim Demaille <akim@epita.fr>
4486
4487 * src/output.c (prepare): Move the definition of `tokens_number',
4488 `nterms_number', `undef_token_number', `user_token_number_max'
4489 to...
4490 (prepare_tokens): Here.
4491 (prepare_tokens): Rename as...
4492 (prepare_symbols): this.
4493 (prepare): Move the definition of `rules_number' to...
4494 (prepare_rules): here.
4495 (prepare): Move the definition of `last', `final_state_number',
4496 `states_number' to...
4497 (prepare_states): here.
4498 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
4499
4500 2002-10-20 Akim Demaille <akim@epita.fr>
4501
4502 * src/tables.h, src/tables.c, src/output.c: Comment changes.
4503
4504 2002-10-20 Akim Demaille <akim@epita.fr>
4505
4506 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
4507 * data/c.m4: here.
4508
4509 2002-10-20 Akim Demaille <akim@epita.fr>
4510
4511 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
4512 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
4513 `pair'.
4514 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
4515 `name' to...
4516 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
4517 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
4518 These.
4519
4520 2002-10-19 Paul Eggert <eggert@twinsun.com>
4521
4522 Do not create a temporary file, as that involves security and
4523 cleanup headaches. Instead, use a pair of pipes.
4524 Derived from a suggestion by Florian Krohm.
4525 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
4526 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
4527 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
4528 (BISON_PREREQ_SUBPIPE): Add.
4529 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
4530 Add subpipe.h, subpipe.c.
4531 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
4532 * po/POTFILES.in: Add lib/subpipe.c.
4533 * src/output.c: Include "subpipe.h".
4534 (m4_invoke): Remove decl.
4535 (scan_skel): New decl.
4536 (output_skeleton): Use pipe rather than temporary file for m4 input.
4537 Check that m4sugar.m4 is readable, to avoid deadlock.
4538 Check for pipe I/O error.
4539 * src/scan-skel.l (readpipe): Remove decl.
4540 (scan_skel): New function, to be used in place of m4_invoke.
4541 Read from stream rather than file.
4542
4543 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
4544 float, as this generates a warning on Solaris 8 + GCC 3.2 with
4545 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
4546 this generates a more-accurate value anyway.
4547
4548 * lib/timevar.c (timervar_accumulate): Rename locals to
4549 avoid confusion with similarly-named more-global.
4550 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
4551
4552 * src/output.c (prepare): Use xstrdup to convert char const *
4553 to char *, to avoid GCC warning.
4554
4555 2002-10-19 Akim Demaille <akim@epita.fr>
4556
4557 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
4558 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
4559 Use them to have `calc.y' ready for %pure-parser.
4560 * data/yacc.c (YYLEX): Pass a yylex return type to
4561 b4_c_function_call.
4562
4563 2002-10-19 Akim Demaille <akim@epita.fr>
4564
4565 Prototype support of %lex-param and %parse-param.
4566
4567 * src/parse-gram.y: Add the definition of the %lex-param and
4568 %parse-param tokens, plus their rules.
4569 Drop the `_' version of %glr-parser.
4570 Add the "," token.
4571 * src/scan-gram.l (INITIAL): Scan them.
4572 * src/muscle_tab.c: Comment changes.
4573 (muscle_insert, muscle_find): Rename `pair' as `probe'.
4574 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
4575 (muscle_entry_s): The `value' member is no longer const.
4576 Adjust all dependencies.
4577 * src/muscle_tab.c (muscle_init): Adjust: use
4578 MUSCLE_INSERT_STRING.
4579 Initialize the obstack earlier.
4580 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
4581 (muscle_pair_list_grow): New.
4582 * data/c.m4 (b4_c_function_call, b4_c_args): New.
4583 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
4584 * tests/calc.at: Use %locations, not --locations.
4585 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
4586
4587 2002-10-19 Akim Demaille <akim@epita.fr>
4588
4589 * src/getargs.c (usage): Take status as argument and exit
4590 accordingly.
4591 Report the traditional `Try ... --help' message when status != 0.
4592 (usage, version): Don't take a FILE * as arg, it is pointless.
4593 (getargs): When there is an incorrect number of arguments, make it
4594 an error, and report it GNUlically thanks to `usage ()'.
4595
4596 2002-10-18 Paul Eggert <eggert@twinsun.com>
4597
4598 * data/glr.c (yyreportParseError): Don't assume that sprintf
4599 yields the length of the printed string, as this is not true
4600 on SunOS 4.1.4. Reported by Peter Klein.
4601
4602 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
4603 * tests/conflicts.at (%nonassoc and eof): Likewise.
4604 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
4605
4606 2002-10-17 Akim Demaille <akim@epita.fr>
4607
4608 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
4609 * src/getargs.c (trace_types, trace_args): Adjust.
4610 * src/reader.c (grammar_current_rule_prec_set)
4611 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
4612 Standardize error messages.
4613 And s/@prec/%prec/!
4614 (reader): Use trace_flag to enable scanner/parser debugging,
4615 instead of an adhoc scheme.
4616 * src/scan-gram.l: Remove trailing debugging code.
4617
4618 2002-10-16 Paul Eggert <eggert@twinsun.com>
4619
4620 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
4621 MUSCLE_TAB_H.
4622
4623 * NEWS: Officially drop support for building Bison with K&R C,
4624 since it didn't work anyway and it's not worth worrying about.
4625 * Makefile.maint (wget_files): Remove ansi2knr.c.
4626 (ansi2knr.c-url_prefix): Remove.
4627 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
4628 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4629 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4630
4631 2002-10-15 Paul Eggert <eggert@twinsun.com>
4632
4633 Stop using the "enum_" trick for K&R-style function definitions;
4634 it confused me, and I was the author! Instead, assume that people
4635 who want to use K&R C compilers (when using these modules in GCC,
4636 perhaps?) will run ansi2knr.
4637
4638 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
4639 All uses of "enum_" changed to "enum ".
4640 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
4641 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
4642
4643 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
4644 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
4645 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
4646 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
4647 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
4648 abitset_not, abitset_ones, abitset_or, abitset_or_and,
4649 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
4650 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
4651 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
4652 Use function prototypes; this removes the need for declaring
4653 static functions simply to provide their prototypes.
4654 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
4655 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
4656 bitset_count_, bitset_create, bitset_dump, bitset_first,
4657 bitset_free, bitset_init, bitset_last, bitset_next,
4658 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
4659 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
4660 bitset_print, bitset_release_memory, bitset_toggle_,
4661 bitset_type_choose, bitset_type_get, bitset_type_name_get,
4662 debug_bitset): Likewise.
4663 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
4664 * lib/bitset_stats.c (bitset_log_histogram_print,
4665 bitset_percent_histogram_print, bitset_stats_and,
4666 bitset_stats_and_cmp, bitset_stats_and_or,
4667 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
4668 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
4669 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
4670 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
4671 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
4672 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
4673 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
4674 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
4675 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
4676 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
4677 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
4678 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
4679 bitset_stats_zero): Likewise.
4680 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
4681 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
4682 bitsetv_dump, debug_bitsetv): Likewise.
4683 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
4684 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
4685 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
4686 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
4687 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
4688 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
4689 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
4690 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
4691 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
4692 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
4693 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
4694 Likewise.
4695 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
4696 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
4697 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
4698 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
4699 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
4700 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
4701 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
4702 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
4703 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
4704 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
4705 lbitset_xor_cmp, lbitset_zero): Likewise.
4706
4707 2002-10-14 Akim Demaille <akim@epita.fr>
4708
4709 Version 1.75.
4710
4711 2002-10-14 Akim Demaille <akim@epita.fr>
4712
4713 * tests/Makefile.am (maintainer-check-posix): New.
4714
4715 2002-10-14 Akim Demaille <akim@epita.fr>
4716
4717 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
4718 member.
4719
4720 2002-10-14 Akim Demaille <akim@epita.fr>
4721
4722 * src/tables.c (table_ninf_remap): base -> tab.
4723 Reported by Matt Rosing.
4724
4725 2002-10-14 Paul Eggert <eggert@twinsun.com>
4726
4727 * tests/action.at, tests/calc.at, tests/conflicts.at,
4728 tests/cxx-type.at, tests/headers.at, tests/input.at,
4729 tests/regression.at, tests/synclines.at, tests/torture.at:
4730 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
4731 so that the tests still work even if POSIXLY_CORRECT is set.
4732 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
4733
4734 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
4735 for portability to K&R hosts. Fix typo: signed char is guaranteed
4736 only to 127, not to 128.
4737 * data/glr.c (yysigned_char): New type.
4738 * data/yacc.c (yysigned_char): Likewise.
4739 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
4740
4741 2002-10-13 Paul Eggert <eggert@twinsun.com>
4742
4743 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
4744 true due to limited range of data type" warning from GCC.
4745
4746 * data/c.m4 (b4_token_defines): Protect against double-inclusion
4747 by wrapping enum yytokentype's definition inside #ifndef
4748 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
4749
4750 2002-10-13 Akim Demaille <akim@epita.fr>
4751
4752 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
4753 Un yy- yyrhs to avoid the name clash with the global YYRHS.
4754
4755 2002-10-13 Akim Demaille <akim@epita.fr>
4756
4757 * Makefile.maint: Update from Autoconf 2.54.
4758 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
4759
4760 2002-10-13 Akim Demaille <akim@epita.fr>
4761
4762 * src/print.c (print_state): Separate the list of solved conflicts
4763 from the other items.
4764 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
4765
4766 2002-10-13 Akim Demaille <akim@epita.fr>
4767
4768 Let nondeterministic skeletons be usable with deterministic
4769 tables.
4770
4771 With the patch, GAWK compiled by GCC without -O2 passes its test
4772 suite using a GLR parser driven by LALR tables. It fails with -O2
4773 because `struct stat' gives two different answers on my machine:
4774 88 (definition of an auto var) and later 96 (memset on this var).
4775 Hence the stack is badly corrumpted. The headers inclusion is to
4776 blame: if I move the awk.h inclusion before GLR's system header
4777 inclusion, the two struct stat have the same size.
4778
4779 * src/tables.c (pack_table): Always create conflict_table.
4780 (token_actions): Always create conflict_list.
4781 * data/glr.c (YYFLAG): Remove, unused.
4782
4783 2002-10-13 Akim Demaille <akim@epita.fr>
4784
4785 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
4786 (O0FLAGS): New.
4787 (VALGRIND, GXX): New.
4788 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
4789 * tests/bison.in: Run $PREBISON a pre-command.
4790 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
4791 (maintainer-check-g++): New.
4792 * Makefile.am (maintainer-check): New.
4793
4794 2002-10-13 Akim Demaille <akim@epita.fr>
4795
4796 * data/glr.c: Formatting changes.
4797 Tweak some trace messages to match yacc.c's.
4798
4799 2002-10-13 Akim Demaille <akim@epita.fr>
4800
4801 GLR parsers sometimes raise parse errors instead of performing the
4802 default reduction.
4803 Reported by Charles-Henry de Boysson.
4804
4805 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
4806 check the length of the traces when %glr.
4807 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
4808 GLR's traces.
4809 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
4810 Test GLR parsers.
4811 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
4812 (yyltype): Remove the yy prefix from the member names.
4813 (yytable): Complete its comment.
4814 (yygetLRActions): Map error action number from YYTABLE from
4815 YYTABLE_NINF to 0.
4816 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
4817 (which was a bug: it should have been YYTABEL_NINF, and yet it was
4818 not satisfying as we could compare an YYACTION computed from
4819 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
4820 only value for error actions.
4821 (yyreportParseError): In verbose parse error messages, don't issue
4822 `error' in the list of expected tokens.
4823 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
4824 next action to perform to match glr.c's decoding.
4825 (yytable): Complete its comment.
4826
4827 2002-10-13 Paul Eggert <eggert@twinsun.com>
4828
4829 Fix problem reported by Henrik Grubbstroem in
4830 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
4831 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
4832 because the Bison parser reads the second action before reducing
4833 the first one.
4834 * src/scan-gram.l (rule_length): New static var.
4835 Use it to keep track of the rule length in the scanner, since
4836 we can't expect the parser to be in lock-step sync with the scanner.
4837 (handle_action_dollar, handle_action_at): Use this var.
4838 * tests/actions.at (Exotic Dollars): Test for the problem.
4839
4840 2002-10-12 Paul Eggert <eggert@twinsun.com>
4841
4842 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
4843 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
4844 Include <sys/time.h> when checking for clock_t and struct tms.
4845 Use same include order as source.
4846 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
4847 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
4848
4849 * lib/timevar.c: Update copyright date and clarify comments.
4850 (get_time) [IN_GCC]: Keep the GCC version for reference.
4851
4852 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
4853 GCC version as of today, then merge Bison's changes.
4854 Change "GCC" to "Bison" in copyright notice. timevar.def's
4855 author is Akim, so change that too.
4856
4857 * src/reader.c (grammar_current_rule_check):
4858 Don't worry about the default action if $$ is untyped.
4859 Prevents bogus warnings reported by Jim Gifford in
4860 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
4861
4862 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
4863 * data/glr.c, data/lalr1.cc, data/yacc.c:
4864 Output token definitions before the first part of user declarations.
4865 Fixes compatibility problem reported by Jim Gifford for kbd in
4866 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
4867
4868 2002-10-11 Paul Eggert <eggert@twinsun.com>
4869
4870 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
4871 (yyparse): here. This undoes some of the 2002-07-25 change.
4872 Compatibility problem reported by Ralf S. Engelschall with
4873 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
4874
4875 2002-10-11 Akim Demaille <akim@epita.fr>
4876
4877 * tests/regression.at Characters Escapes): New.
4878 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
4879 characters.
4880 Reported by Jan Nieuwenhuizen.
4881
4882 2002-10-11 Akim Demaille <akim@epita.fr>
4883
4884 * po/id.po: New.
4885
4886 2002-10-10 Paul Eggert <eggert@twinsun.com>
4887
4888 Portability fixes for bitsets; this also avoids several GCC
4889 warnings.
4890
4891 * lib/abitset.c: Include <stddef.h>, for offsetof.
4892 * lib/lbitset.c: Likewise.
4893
4894 * lib/abitset.c (abitset_bytes): Return a size that is aligned
4895 properly for vectors of objects. Do not assume that adding a
4896 header size to a multiple of a word size yields a value that is
4897 properly aligned for the whole union.
4898 * lib/bitsetv.c (bitsetv_alloc): Likewise.
4899
4900 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
4901 unique names for structures.
4902 * lib/ebitset.c (ebitset_bytes): Likewise.
4903 * lib/lbitset.c (lbitset_bytes): Likewise.
4904
4905 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
4906 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
4907 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
4908 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
4909 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
4910 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
4911 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
4912 to improve the type-checking that GCC can do.
4913 * lib/bitset.c (bitset_op4_cmp): Likewise.
4914 * lib/bitset_stats.c (bitset_stats_count,
4915 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
4916 bitset_stats_copy, bitset_stats_disjoint_p,
4917 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
4918 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
4919 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
4920 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
4921 bitset_stats_and_or_cmp, bitset_stats_andn_or,
4922 bitset_stats_andn_or_cmp, bitset_stats_or_and,
4923 bitset_stats_or_and_cmp): Likewise.
4924 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
4925 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
4926 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
4927 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
4928
4929 * lib/abitset.h: Include bitset.h, not bbitset.h.
4930 * lib/ebitset.h: Likewise.
4931 * lib/lbitset.h: Likewise.
4932
4933 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
4934 All instances of parameters of type enum bitset_opts are now of
4935 type enum_bitset_opts, to conform to the C Standard, and similarly
4936 for enum_bitset_type.
4937 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
4938 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
4939
4940 Do not use "struct bitset_struct" to mean different things in
4941 different modules. Not only is this confusing, it violates
4942 the C Standard, which requires that structure types in different
4943 modules must be compatible if one is to be passed to the other.
4944 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
4945 All instances of "struct bitset_struct *" replaced with "bitset".
4946 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
4947 (union bitset_union, struct abitset_struct, struct ebitset_struct,
4948 struct lbitset_struct, struct bitset_stats_struct): New types.
4949 All uses of struct bitset_struct changed to union bitset_union,
4950 etc.
4951 * lib/abitset.c (struct abitset_struct, abitset,
4952 struct bitset_struct): Remove.
4953 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
4954 struct bitset_struct): Remove.
4955 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
4956 bitset_struct): Remove.
4957 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
4958 Likewise.
4959
4960 Do not call a function of type T using a call that assumes the
4961 function is of a different type U. Standard C requires that a
4962 function must be called with a type that is compatible with its
4963 definition.
4964 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
4965 New decls.
4966 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
4967 New functions.
4968 * lib/ebitset.c (PFV): Remove.
4969 * lib/lbitset.c (PFV): Likewise.
4970 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
4971 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
4972 decls.
4973 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
4974 (ebitset_vtable): Use them.
4975 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
4976 lbitset_xor): New functions.
4977 (lbitset_vtable): Use them.
4978
4979 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
4980 Declare.
4981
4982 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
4983 GCC warning.
4984 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
4985 Use offsetof, for simplicity.
4986
4987 2002-10-06 Paul Eggert <eggert@twinsun.com>
4988
4989 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
4990 the same width as int. This reapplies a hunk of the 2002-08-12 patch
4991 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
4992 which was inadvertently undone by the 2002-09-30 patch.
4993 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
4994 the same width as int.
4995
4996 2002-10-04 Paul Eggert <eggert@twinsun.com>
4997
4998 Version 1.50.
4999
5000 * configure.ac (AC_INIT), NEWS: Increment version number.
5001
5002 * doc/bison.texinfo: Minor spelling, grammar, and white space
5003 fixes.
5004 (Symbols): Mention that any negative value returned from yylex
5005 signifies end-of-input. Warn about negative chars. Mention
5006 the portable Standard C character set.
5007
5008 The GNU coding standard says CFLAGS and YFLAGS are reserved
5009 for the installer to set.
5010 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
5011 * src/Makefile.am (AM_CFLAGS): Likewise.
5012 (AM_YFLAGS): Renamed from YFLAGS.
5013
5014 Fix some MAX and MIN problems.
5015 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
5016 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
5017 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
5018 * src/reader.c (reader): Use it.
5019
5020 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
5021 POSIX 1003.1-2001 has removed fgrep.
5022
5023 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5024
5025 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
5026 interpreted as signed.
5027 * lib/ebitset.c (ebitset_list): Fix bug.
5028
5029 2002-10-01 Paul Eggert <eggert@twinsun.com>
5030
5031 More fixes for 64-bit hosts and large bitsets.
5032
5033 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
5034 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
5035 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
5036 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
5037 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
5038 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
5039 bitset_count_): Likewise.
5040 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
5041 bitset_first, bitset_last): Likewise.
5042 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
5043 bitset_stats_list_reverse, bitset_stats_size,
5044 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
5045 Likewise.
5046 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5047 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
5048 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
5049 bitsetv_reflexive_transitive_closure): Likewise.
5050 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
5051 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
5052 Likewise.
5053 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
5054 Likewise.
5055
5056 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
5057 Use size_t, not unsigned int, to count bytes.
5058 * lib/abitset.h (abitset_bytes): Likewise.
5059 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
5060 Likewise.
5061 * lib/bitset.h (bitset_bytes): Likewise.
5062 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
5063 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
5064 * lib/bitsetv.c (bitsetv_alloc): Likewise.
5065 * lib/ebitset.c (ebitset_bytes): Likewise.
5066 * lib/ebitset.h (ebitset_bytes): Likewise.
5067 * lib/lbitset.c (lbitset_bytes): Likewise.
5068 * lib/lbitset.h (lbitset_bytes): Likewise.
5069
5070 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
5071 abitset_subset_p, abitset_disjoint_p, abitset_and,
5072 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
5073 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
5074 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
5075 abitset_or_and, abitset_or_and_cmp):
5076 Use bitset_windex instead of unsigned int.
5077 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
5078 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
5079 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
5080 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
5081 Likewise.
5082 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
5083
5084 * lib/bitset.c (bitset_print):
5085 Use proper printf formats for widths of integer types.
5086 * lib/bitset_stats.c (bitset_percent_histogram_print,
5087 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
5088 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
5089 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
5090 * lib/lbitset.c (lbitset_bytes): Likewise.
5091
5092 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
5093 BITSET_SIZE_MAX): New macros.
5094 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
5095 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
5096 to BITSET_WINDEX_MAX.
5097
5098 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
5099 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
5100 since we now return the bitset_bindex type (not int).
5101
5102 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
5103 when computing sizes.
5104 * lib/ebitset.c (ebitset_elts_grow): Likewise.
5105
5106 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
5107 and avoid cast to unsigned.
5108
5109 2002-09-30 Akim Demaille <akim@epita.fr>
5110
5111 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
5112 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
5113 Updates from Michael Hayes.
5114
5115 2002-09-30 Art Haas <ahaas@neosoft.com>
5116
5117 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
5118 invocations.
5119 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
5120 defined.
5121
5122 2002-09-27 Akim Demaille <akim@epita.fr>
5123
5124 Version 1.49c.
5125
5126 2002-09-27 Akim Demaille <akim@epita.fr>
5127
5128 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
5129 (Because of AC_LIBSOURCE).
5130
5131 2002-09-27 Akim Demaille <akim@epita.fr>
5132
5133 Playing with Autoscan.
5134
5135 * configure.ac: Remove the old LIBOBJ tweaks.
5136 (AC_REPLACE_FUNCS): Add strrchr and strtol.
5137 * lib/strrchr.c: New.
5138 * lib/strtol.c: New, from the Coreutils 4.5.1.
5139
5140 2002-09-27 Akim Demaille <akim@epita.fr>
5141
5142 Playing with Autoscan.
5143
5144 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
5145 * lib/Makefile.am (libbison_a_SOURCES): No longer include
5146 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
5147 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
5148 Coreutils 4.5.1.
5149
5150 2002-09-24 Akim Demaille <akim@epita.fr>
5151
5152 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
5153 (Frequently Asked Questions, Parser Stack Overflow): New.
5154
5155 2002-09-13 Akim Demaille <akim@epita.fr>
5156
5157 Playing with autoscan.
5158
5159 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
5160 * src/files.c (skeleton_find): Remove, unused.
5161 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
5162 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
5163
5164 2002-09-13 Akim Demaille <akim@epita.fr>
5165
5166 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
5167 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
5168
5169 2002-09-13 Akim Demaille <akim@epita.fr>
5170
5171 * configure.ac: Require 2.54.
5172 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
5173 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
5174 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
5175 Remove, provided by Autoconf macros.
5176
5177 2002-09-12 Akim Demaille <akim@epita.fr>
5178
5179 * m4/prereq.m4: Update, from Coreutils 4.5.1.
5180
5181 2002-09-12 Akim Demaille <akim@epita.fr>
5182
5183 * m4/prereq.m4: Update, from Fileutils 4.1.5.
5184 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
5185 Reported by Martin Mokrejs.
5186
5187 2002-09-10 Akim Demaille <akim@epita.fr>
5188
5189 * src/parse-gram.y: Associate a human readable string to each
5190 token type.
5191 * tests/regression.at (Invalid inputs): Adjust.
5192
5193 2002-09-10 Gary V. Vaughan <gary@gnu.org>
5194
5195 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
5196 with an Autoconf-2.5x style configure.ac.
5197
5198 2002-09-06 Paul Eggert <eggert@twinsun.com>
5199
5200 * doc/bison.texinfo (Conditions): Make explicit that the GPL
5201 exception applies only to yacc.c. This is a modification of a
5202 patch originally suggested by Akim Demaille.
5203
5204 2002-09-06 Akim Demaille <akim@epita.fr>
5205
5206 * data/c.m4 (b4_copyright): Move the GPL exception comment from
5207 here to...
5208 * data/yacc.c: here.
5209
5210 * data/lalr1.cc (struct yyltype): Don't define it, since we use
5211 LocationType.
5212 (b4_ltype): Default to yy::Location from location.hh.
5213
5214 2002-09-04 Jim Meyering <jim@meyering.net>
5215
5216 * data/yacc.c: Guard the declaration of yytoknum also with
5217 `#ifdef YYPRINT', so it is declared only when used.
5218
5219 2002-09-04 Akim Demaille <akim@epita.fr>
5220
5221 * configure.in: Rename as...
5222 * configure.ac: this.
5223 Bump to 1.49c.
5224
5225 2002-09-04 Akim Demaille <akim@epita.fr>
5226
5227 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
5228 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
5229 translate maintainer only messages.
5230
5231 2002-08-12 Paul Eggert <eggert@twinsun.com>
5232
5233 Version 1.49b.
5234
5235 * Makefile.am (SUBDIRS): Remove intl.
5236 (DISTCLEANFILES): Remove.
5237 * NEWS: Mention that GNU M4 is now required. Clarify what is
5238 meant by "larger grammars". Mention the pt_BR translation.
5239 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
5240 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
5241 Bump version from 0.11.2 to 0.11.5.
5242 (BISON_PREREQ_STAGE): Remove.
5243 (AM_GNU_GETTEXT): Use external gettext.
5244 (AC_OUTPUT): Remove intl/Makefile.
5245
5246 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
5247
5248 * data/glr.c: Include string.h, for strlen.
5249 (yyreportParseError): Use size_t for yysize.
5250 (yy_yypstack): No longer nested inside yypstates, as nested
5251 functions are not portable. Do not assume size_t is the
5252 same width as int.
5253 (yypstates): Do not assume that ptrdiff_t is the same width
5254 as int, and similarly for yyposn and YYINDEX.
5255
5256 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
5257
5258 * lib/Makefile.am (INCLUDES): Do not include from the intl
5259 directory, which has been removed.
5260 * src/Makefile.am (INCLUDES): Likewise.
5261
5262 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
5263 (bitsets_sources, additional_bitsets_sources, timevars_sources):
5264 New vars.
5265
5266 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
5267 * tests/Makefile.am (EXTRA_DIST): Likewise.
5268
5269 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
5270 Do not assume that bitset_windex is the same width as unsigned.
5271
5272 * lib/abitset.c (abitset_unused_clear): Do not assume that
5273 bitset_word is the same width as int.
5274 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
5275 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
5276 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
5277 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
5278 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
5279
5280 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
5281 portability to one's complement hosts!).
5282 * lib/ebitset.c (ebitset_op1): Likewise.
5283 * lib/lbitset.c (lbitset_op1): Likewise.
5284
5285 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
5286 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
5287 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
5288 Sync with fileutils.
5289 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
5290 lib/gettext.h: Sync with diffutils.
5291
5292 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
5293 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
5294
5295 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
5296 PROTOTYPES to check for prototypes, and "defined __STDC__" to
5297 check for void *.
5298
5299 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
5300 size_t; the old version tried to do this but casted improperly.
5301 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
5302 (bitset_test): Now returns int, not unsigned long.
5303
5304 * lib/bitset_stats.c: Include "gettext.h".
5305 (_): New macro.
5306 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
5307 name locals "index", as it generates unnecessary warnings on some
5308 hosts that have an "index" function.
5309
5310 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
5311 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
5312 they need translation.
5313 * src/LR0.c (state_list_append, new_itemsets, get_state,
5314 append_states, generate_states): Likewise.
5315 * src/assoc.c (assoc_to_string): Likewise.
5316 * src/closure.c (print_closure, set_firsts, closure): Likewise.
5317 * src/gram.c (grammar_dump): Likewise.
5318 * src/injections.c (injections_compute): Likewise.
5319 * src/lalr.c (lookaheads_print): Likewise.
5320 * src/relation.c (relation_transpose): Likewise.
5321 * src/scan-gram.l: Likewise.
5322 * src/tables.c (table_grow, pack_vector): Likewise.
5323
5324 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
5325 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
5326 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
5327 * m4/mbstate_t.m4: Sync with fileutils.
5328 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
5329
5330 * po/LINGUAS: Add pt_BR.
5331 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
5332 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
5333 lib/timevar.c.
5334 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
5335 manual recommends.
5336 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
5337
5338 * src/complain.c (strerror_r): Remove decl; not needed.
5339 (strerror): Use same pattern as ../lib/error.c.
5340
5341 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
5342
5343 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
5344
5345 * src/main.c (main): Cast result of bindtextdomain and textdomain
5346 to void, to avoid a GCC warning when --disable-nls is in effect.
5347
5348 * src/scan-gram.l: Use strings rather than escapes when possible,
5349 to minimize the number of warnings from xgettext.
5350 (handle_action_dollar, handle_action_at): Don't use isdigit,
5351 as it mishandles negative chars and it may not work as expected
5352 outside the C locale.
5353
5354 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
5355 this is a GCC extension and is not portable to other compilers.
5356
5357 * src/system.h (alloca): Use same pattern as ../lib/error.c.
5358 Do not include <ctype.h>; no longer needed.
5359 Do not include <malloc.h>; no longer needed (and generates
5360 warnings on OpenBSD 3.0).
5361
5362 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
5363 it's not portable.
5364
5365 * tests/regression.at: Do not use 'cc -c input.c -o input';
5366 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
5367
5368 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
5369 exit status as failure, not just exit status 1. Sun C exits
5370 with status 2 sometimes.
5371
5372 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
5373 Use it for the two large tests.
5374
5375 2002-08-02 Akim Demaille <akim@epita.fr>
5376
5377 * src/conflicts.c (conflicts_output): Don't output rules never
5378 reduced here, since anyway that computation doesn't work.
5379 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
5380 (rule_useless_p, rule_never_reduced_p): New.
5381 (grammar_rules_partial_print): Use a filter instead of a range.
5382 Display the title only if needed.
5383 (grammar_rules_print): Adjust.
5384 (grammar_rules_never_reduced_report): New.
5385 * src/tables.c (action_row): Move the computation of rules never
5386 reduced to...
5387 (token_actions): here.
5388 * src/main.c (main): Make the parser before making the report, so
5389 that rules never reduced are computed.
5390 Call grammar_rules_never_reduced_report.
5391 * src/print.c (print_results): Report rules never reduced.
5392 * tests/conflicts.at, tests/reduce.at: Adjust.
5393
5394 2002-08-01 Akim Demaille <akim@epita.fr>
5395
5396 Instead of attaching lookaheads and duplicating the rules being
5397 reduced by a state, attach the lookaheads to the reductions.
5398
5399 * src/state.h (state_t): Remove the `lookaheads',
5400 `lookaheads_rule' member.
5401 (reductions_t): Add a `lookaheads' member.
5402 Use a regular array for the `rules'.
5403 * src/state.c (reductions_new): Initialize the lookaheads member
5404 to 0.
5405 (state_rule_lookaheads_print): Adjust.
5406 * src/state.h, src/state.c (state_reductions_find): New.
5407 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
5408 (count_rr_conflicts): Adjust.
5409 * src/lalr.c (LArule): Remove.
5410 (add_lookback_edge): Adjust.
5411 (state_lookaheads_count): New.
5412 (states_lookaheads_initialize): Merge into...
5413 (initialize_LA): this.
5414 (lalr_free): Adjust.
5415 * src/main.c (main): Don't free nullable and derives too early: it
5416 is used by --verbose.
5417 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
5418
5419 2002-08-01 Akim Demaille <akim@epita.fr>
5420
5421 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
5422 `rule_number_t**'.
5423 (set_derives, free_derives): Rename as...
5424 (derives_compute, derives_free): this.
5425 Adjust all dependencies.
5426 * src/nullable.c (set_nullable, free_nullable): Rename as...
5427 (nullable_compute, nullable_free): these.
5428 (rule_list_t): Store rule_t *, not rule_number_t.
5429 * src/state.c (state_rule_lookaheads_print): Directly compare rule
5430 pointers, instead of their numbers.
5431 * src/main.c (main): Call nullable_free, and derives_free earlier,
5432 as they were lo longer used.
5433
5434 2002-08-01 Akim Demaille <akim@epita.fr>
5435
5436 * lib/timevar.c (get_time): Include children time.
5437 * src/lalr.h (LA, LArule): Don't export them: used with the
5438 state_t.
5439 * src/lalr.c (LA, LArule): Static.
5440 * src/lalr.h, src/lalr.c (lalr_free): New.
5441 * src/main.c (main): Call it.
5442 * src/tables.c (pack_vector): Check whether loc is >= to the
5443 table_size, not >.
5444 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
5445 (tables_generate): do it, since that's also it which allocates
5446 them.
5447 Don't free LA and LArule, main does.
5448
5449 2002-07-31 Akim Demaille <akim@epita.fr>
5450
5451 Separate parser tables computation and output.
5452
5453 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
5454 (conflict_list, conflict_list_cnt, table, check, table_ninf)
5455 (yydefgoto, yydefact, high): Move to...
5456 * src/tables.h, src/tables.c: here.
5457 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
5458 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
5459 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
5460 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
5461 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
5462 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
5463 (action_row, save_row, token_actions, save_column, default_goto)
5464 (goto_actions, sort_actions, matching_state, pack_vector)
5465 (table_ninf_remap, pack_table, prepare_actions): Move to...
5466 * src/tables.c: here.
5467 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
5468 * src/output.c (token_actions, output_base, output_conflicts)
5469 (output_check): Merge into...
5470 (prepare_actions): this.
5471 (actions_output): Rename as...
5472 (user_actions_output): this.
5473 * src/main.c (main): Call tables_generate and tables_free.
5474
5475 2002-07-31 Akim Demaille <akim@epita.fr>
5476
5477 Steal GCC's --time-report support.
5478
5479 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
5480 stolen/adjusted from GCC.
5481 * m4/stage.m4: Remove time related checks.
5482 * m4/timevar.m4: New.
5483 * configure.in: Adjust.
5484 * src/system.h: Adjust to using timevar.h.
5485 * src/getargs.h, src/getargs.c: Support trace_time for
5486 --trace=time.
5487 * src/main.c (stage): Remove.
5488 (main): Replace `stage' invocations with timevar calls.
5489 * src/output.c: Insert pertinent timevar calls.
5490
5491 2002-07-31 Akim Demaille <akim@epita.fr>
5492
5493 Let --trace have arguments.
5494
5495 * src/getargs.h (enum trace_e): New.
5496 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
5497 (long_options, short_options): --trace/-T takes an optional
5498 argument.
5499 Change all the uses of trace_flag to reflect the new flags.
5500 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
5501
5502 Strengthen `stage' portability.
5503
5504 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
5505 * configure.in: Use it.
5506 Don't check for malloc.h and sys/times.h.
5507 * src/system.h: Include them when appropriate.
5508 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
5509 times and struct tms are available.
5510
5511 2002-07-30 Akim Demaille <akim@epita.fr>
5512
5513 In verbose parse error message, don't report `error' as an
5514 expected token.
5515 * tests/actions.at (Printers and Destructors): Adjust.
5516 * tests/calc.at (Calculator $1): Adjust.
5517 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
5518 error message, do not report the parser accepts the error token in
5519 that state.
5520
5521 2002-07-30 Akim Demaille <akim@epita.fr>
5522
5523 Normalize conflict related messages.
5524
5525 * src/complain.h, src/complain.c (warn, complain): New.
5526 * src/conflicts.c (conflicts_print): Use them.
5527 (conflict_report_yacc): New, extracted from...
5528 (conflicts_print): here.
5529 * tests/conflicts.at, tests/existing.at: Adjust.
5530
5531 2002-07-30 Akim Demaille <akim@epita.fr>
5532
5533 Report rules which are never reduced by the parser: those hidden
5534 by conflicts.
5535
5536 * src/LR0.c (save_reductions): Don't make the final state too
5537 different: save its reduction (accept) instead of having a state
5538 without any action (no shift or goto, no reduce).
5539 Note: the final state is now a ``regular'' state, i.e., the
5540 parsers now contain `reduce 0' as default reduction.
5541 Nevertheless, since they decide to `accept' when yystate =
5542 final_state, they still will not reduce rule 0.
5543 * src/print.c (print_actions, print_reduction): Adjust.
5544 * src/output.c (action_row): Track reduced rules.
5545 (token_actions): Report rules never reduced.
5546 * tests/conflicts.at, tests/regression.at: Adjust.
5547
5548 2002-07-30 Akim Demaille <akim@epita.fr>
5549
5550 `stage' was accidently included in a previous patch.
5551 Initiate its autoconfiscation.
5552
5553 * configure.in: Look for malloc.h and sys/times.h.
5554 * src/main.c (stage): Adjust.
5555 Report only when trace_flag.
5556
5557 2002-07-29 Akim Demaille <akim@epita.fr>
5558
5559 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
5560 state_number_t.
5561 (errs_t): symbol_t*, not symbol_number_t.
5562 (reductions_t): rule_t*, not rule_number_t.
5563 (FOR_EACH_SHIFT): New.
5564 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
5565 * src/print.c, src/print_graph.c: Adjust.
5566
5567 2002-07-29 Akim Demaille <akim@epita.fr>
5568
5569 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
5570
5571 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
5572 (endtoken, accept): these.
5573 * src/reader.c (reader): Set endtoken's default tag to "$end".
5574 Set undeftoken's tag to "$undefined" instead of "$undefined.".
5575 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
5576 Adjust.
5577
5578 2002-07-29 Akim Demaille <akim@epita.fr>
5579
5580 * src/reduce.c (reduce_grammar): When the language is empty,
5581 complain about the start symbol, not the axiom.
5582 Use its location.
5583 * tests/reduce.at (Empty Language): New.
5584
5585 2002-07-26 Akim Demaille <akim@epita.fr>
5586
5587 * src/reader.h, src/reader.c (gram_error): ... can't get
5588 yycontrol without making too strong assumptions on the parser
5589 itself.
5590 * src/output.c (prepare_tokens): Use the real 0th value of
5591 token_translations instead of `0'.
5592 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
5593 visible here.
5594 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
5595 for the time being: %locations ought to provide it to yyerror.
5596
5597 2002-07-25 Akim Demaille <akim@epita.fr>
5598
5599 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
5600 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
5601 * tests/regression.at (Web2c Actions): Adjust.
5602
5603 2002-07-25 Akim Demaille <akim@epita.fr>
5604
5605 Stop storing rules from 1 to nrules + 1.
5606
5607 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
5608 * src/nullable.c, src/output.c, src/print.c, src/reader.c
5609 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
5610 Iterate from 0 to nrules.
5611 Use rule_number_as_item_number and item_number_as_rule_number.
5612 Adjust to `derive' now containing possibly 0.
5613 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
5614 Handle the `- 1' part in rule numbers from/to item numbers.
5615 * src/conflicts.c (log_resolution): Fix the message which reversed
5616 shift and reduce.
5617 * src/output.c (action_row): Initialize default_rule to -1.
5618 (token_actions): Adjust.
5619 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
5620 expected output.
5621 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
5622
5623 2002-07-25 Akim Demaille <akim@epita.fr>
5624
5625 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
5626 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
5627 (b4_c_knr_arg_decl): New.
5628 * data/yacc.c: Use it to define yysymprint, yydestruct, and
5629 yyreport_parse_error.
5630
5631 2002-07-25 Akim Demaille <akim@epita.fr>
5632
5633 * data/yacc.c (yyreport_parse_error): New, extracted from...
5634 (yyparse): here.
5635 (yydestruct, yysymprint): Move above yyparse.
5636 Be K&R compliant.
5637
5638 2002-07-25 Akim Demaille <akim@epita.fr>
5639
5640 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
5641 replace...
5642 (b4_sint_type, b4_uint_type): these.
5643 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
5644 * tests/regression.at (Web2c Actions): Adjust.
5645
5646 2002-07-25 Akim Demaille <akim@epita.fr>
5647
5648 * src/gram.h (TIEM_NUMBER_MAX): New.
5649 (item_number_of_rule_number, rule_number_of_item_number): Rename
5650 as...
5651 (rule_number_as_item_number, item_number_as_rule_number): these.
5652 Adjust dependencies.
5653 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
5654 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
5655 (symbol_number_to_vector_number): New.
5656 (order): Of vector_number_t* type.
5657 (base_t, BASE_MAX, BASE_MIN): New.
5658 (froms, tos, width, pos, check): Of base_t type.
5659 (action_number_t, ACTION_MIN, ACTION_MAX): New.
5660 (actrow): Of action_number_t type.
5661 (conflrow): Of unsigned int type.
5662 (table_ninf, base_ninf): New.
5663 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
5664 (muscle_insert_int_table, muscle_insert_base_table)
5665 (muscle_insert_rule_number_table): New.
5666 (prepare_tokens): Output `toknum' as int_table.
5667 (action_row): Returns a rule_number_t.
5668 Use ACTION_MIN, not SHRT_MIN.
5669 (token_actions): yydefact is rule_number_t*.
5670 (table_ninf_remap): New.
5671 (pack_table): Use it for `base' and `table'.
5672 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
5673 replaced with...
5674 (YYPACT_NINF, YYTABLE_NINF): these.
5675 (yypact, yytable): Compute their types instead of hard-coded
5676 `short'.
5677 * tests/regression.at (Web2c Actions): Adjust.
5678
5679 2002-07-19 Akim Demaille <akim@epita.fr>
5680
5681 * src/scan-gram.l (id): Can start with an underscore.
5682
5683 2002-07-16 Akim Demaille <akim@epita.fr>
5684
5685 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
5686 Adjust all former `associativity' dependencies.
5687 * src/symtab.c (symbol_new): Default associativity is `undef', not
5688 `right'.
5689 (symbol_check_alias_consistence): Adjust.
5690
5691 2002-07-09 Akim Demaille <akim@epita.fr>
5692
5693 * doc/bison.texinfo: Properly set the ``header'' part.
5694 Use @dircategory ``GNU programming tools'' as per Texinfo's
5695 documentation.
5696 Use @copying.
5697
5698 2002-07-09 Akim Demaille <akim@epita.fr>
5699
5700 * lib/quotearg.h: Protect against multiple inclusions.
5701 * src/location.h (location_t): Add a `file' member.
5702 (LOCATION_RESET, LOCATION_PRINT): Adjust.
5703 * src/complain.c (warn_at, complain_at, fatal_at): Drop
5704 `error_one_per_line' support.
5705
5706 2002-07-09 Akim Demaille <akim@epita.fr>
5707
5708 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
5709 * src/reader.c (lineno): Remove.
5710 Adjust all dependencies.
5711 (get_merge_function): Take a location and use complain_at.
5712 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
5713 * tests/regression.at (Invalid inputs, Mixing %token styles):
5714 Adjust.
5715
5716 2002-07-09 Akim Demaille <akim@epita.fr>
5717
5718 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
5719 recovery rule, and forbid extensions when --yacc.
5720 (gram_error): Use complain_at.
5721 * src/reader.c (reader): Exit if there were parse errors.
5722
5723 2002-07-09 Akim Demaille <akim@epita.fr>
5724
5725 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
5726 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
5727 Reported by R Blake <blakers@mac.com>.
5728
5729 2002-07-09 Akim Demaille <akim@epita.fr>
5730
5731 * data/yacc.c: Output the copyright notive in the header.
5732
5733 2002-07-03 Akim Demaille <akim@epita.fr>
5734
5735 * src/output.c (froms, tos): Are state_number_t.
5736 (save_column): sp, sp1, and sp2 are state_number_t.
5737 (prepare): Rename `final' as `final_state_number', `nnts' as
5738 `nterms_number', `nrules' as `rules_number', `nstates' as
5739 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
5740 unused.
5741 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
5742 * data/lalr1.cc (nsym_): Remove, unused.
5743
5744 2002-07-03 Akim Demaille <akim@epita.fr>
5745
5746 * src/lalr.h, src/lalr.c (goto_number_t): New.
5747 * src/lalr.c (goto_list_t): New.
5748 Propagate them.
5749 * src/nullable.c (rule_list_t): New.
5750 Propagate.
5751 * src/types.h: Remove.
5752
5753 2002-07-03 Akim Demaille <akim@epita.fr>
5754
5755 * src/closure.c (print_fderives): Use rule_rhs_print.
5756 * src/derives.c (print_derives): Use rule_rhs_print.
5757 (rule_list_t): New, replaces `shorts'.
5758 (set_derives): Add comments.
5759 * tests/sets.at (Nullable, Firsts): Adjust.
5760
5761 2002-07-03 Akim Demaille <akim@epita.fr>
5762
5763 * src/output.c (prepare_actions): Free `tally' and `width'.
5764 (prepare_actions): Allocate and free `order'.
5765 * src/symtab.c (symbols_free): Free `symbols'.
5766 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
5767 * src/output.c (m4_invoke): Move to...
5768 * src/scan-skel.l: here.
5769 (<<EOF>>): Close yyout, and free its name.
5770
5771 2002-07-03 Akim Demaille <akim@epita.fr>
5772
5773 Fix some memory leaks, and fix a bug: state 0 was examined twice.
5774
5775 * src/LR0.c (new_state): Merge into...
5776 (state_list_append): this.
5777 (new_states): Merge into...
5778 (generate_states): here.
5779 (set_states): Don't ensure a proper `errs' state member here, do it...
5780 * src/conflicts.c (conflicts_solve): here.
5781 * src/state.h, src/state.c: Comment changes.
5782 (state_t): Rename member `shifts' as `transitions'.
5783 Adjust all dependencies.
5784 (errs_new): For consistency, also take the values as argument.
5785 (errs_dup): Remove.
5786 (state_errs_set): New.
5787 (state_reductions_set, state_transitions_set): Assert that no
5788 previous value was assigned.
5789 (state_free): New.
5790 (states_free): Use it.
5791 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
5792 temporary storage: use `errs' and `nerrs' as elsewhere.
5793 (set_conflicts): Allocate and free this `errs'.
5794
5795 2002-07-02 Akim Demaille <akim@epita.fr>
5796
5797 * lib/libiberty.h: New.
5798 * lib: Update the bitset implementation from upstream.
5799 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
5800 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
5801 * src/main.c: Adjust bitset stats calls.
5802
5803 2002-07-01 Paul Eggert <eggert@twinsun.com>
5804
5805 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
5806 char, so that negative chars don't collide with $.
5807
5808 2002-06-30 Akim Demaille <akim@epita.fr>
5809
5810 Have the GLR tests be `warning' checked, and fix the warnings.
5811
5812 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
5813 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
5814 (yyremoveDeletes): `yyi' and `yyj' are size_t.
5815 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
5816 (yyaddDeferredAction): static.
5817 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
5818 (yyreportParseError): yyprefix is const.
5819 yytokenp is used only when verbose.
5820 (yy__GNUC__): Replace with __GNUC__.
5821 (yypdumpstack): yyi is size_t.
5822 (yypreference): Un-yy local variables and arguments, to avoid
5823 clashes with `yyr1'. Anyway, we are not in the user name space.
5824 (yytname_size): be an int, as is compared with ints.
5825 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
5826 Use them.
5827 * tests/cxx-gram.at: Use quotation to protect $1.
5828 Use AT_COMPILE to enable warnings hunts.
5829 Prototype yylex and yyerror.
5830 `Use' argc.
5831 Include `string.h', not `strings.h'.
5832 Produce and prototype stmtMerge only when used.
5833 yylex takes a location.
5834
5835 2002-06-30 Akim Demaille <akim@epita.fr>
5836
5837 We spend a lot of time in quotearg, in particular when --verbose.
5838
5839 * src/symtab.c (symbol_get): Store a quoted version of the key.
5840 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
5841 Adjust all callers.
5842
5843 2002-06-30 Akim Demaille <akim@epita.fr>
5844
5845 * src/state.h (reductions_t): Rename member `nreds' as num.
5846 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
5847 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
5848
5849 2002-06-30 Akim Demaille <akim@epita.fr>
5850
5851 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
5852 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
5853 (shifts_to): Rename as...
5854 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
5855 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
5856 (TRANSITION_IS_DISABLED, transitions_to): these.
5857
5858 2002-06-30 Akim Demaille <akim@epita.fr>
5859
5860 * src/print.c (print_shifts, print_gotos): Merge into...
5861 (print_transitions): this.
5862 (print_transitions, print_errs, print_reductions): Align the
5863 lookaheads columns.
5864 (print_core, print_transitions, print_errs, print_state,
5865 print_grammar): Output empty lines separator before, not after.
5866 (state_default_rule_compute): Rename as...
5867 (state_default_rule): this.
5868 * tests/conflicts.at (Defaulted Conflicted Reduction),
5869 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
5870 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
5871
5872 2002-06-30 Akim Demaille <akim@epita.fr>
5873
5874 Display items as we display rules.
5875
5876 * src/gram.h, src/gram.c (rule_lhs_print): New.
5877 * src/gram.c (grammar_rules_partial_print): Use it.
5878 * src/print.c (print_core): Likewise.
5879 * tests/conflicts.at (Defaulted Conflicted Reduction),
5880 (Unresolved SR Conflicts): Adjust.
5881 (Unresolved SR Conflicts): Adjust and rename as...
5882 (Resolved SR Conflicts): this, as was meant.
5883 * tests/regression.at (Web2c Report): Adjust.
5884
5885 2002-06-30 Akim Demaille <akim@epita.fr>
5886
5887 * src/print.c (state_default_rule_compute): New, extracted from...
5888 (print_reductions): here.
5889 Pessimize, but clarify the code.
5890 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
5891
5892 2002-06-30 Akim Demaille <akim@epita.fr>
5893
5894 * src/output.c (action_row): Let default_rule be always a rule
5895 number.
5896
5897 2002-06-30 Akim Demaille <akim@epita.fr>
5898
5899 * src/closure.c (print_firsts, print_fderives, closure):
5900 Use BITSET_EXECUTE.
5901 * src/lalr.c (lookaheads_print): Likewise.
5902 * src/state.c (state_rule_lookaheads_print): Likewise.
5903 * src/print_graph.c (print_core): Likewise.
5904 * src/print.c (print_reductions): Likewise.
5905 * src/output.c (action_row): Likewise.
5906 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
5907
5908 2002-06-30 Akim Demaille <akim@epita.fr>
5909
5910 * src/print_graph.c: Use report_flag.
5911
5912 2002-06-30 Akim Demaille <akim@epita.fr>
5913
5914 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
5915 to...
5916 * src/relation.h, src/relation.c (traverse, relation_digraph)
5917 (relation_print, relation_transpose): New.
5918
5919 2002-06-30 Akim Demaille <akim@epita.fr>
5920
5921 * src/state.h, src/state.c (shifts_to): New.
5922 * src/lalr.c (build_relations): Use it.
5923
5924 2002-06-30 Akim Demaille <akim@epita.fr>
5925
5926 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
5927 (item_number_of_rule_number, rule_number_of_item_number): New.
5928 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
5929 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
5930 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
5931 Propagate their use.
5932 Much remains to be done, in particular wrt `shorts' from types.h.
5933
5934 2002-06-30 Akim Demaille <akim@epita.fr>
5935
5936 * src/symtab.c (symbol_new): Initialize the `printer' member.
5937
5938 2002-06-30 Akim Demaille <akim@epita.fr>
5939
5940 * src/LR0.c (save_reductions): Remove, replaced by...
5941 * src/state.h, src/state.c (state_reductions_set): New.
5942 (reductions, errs): Rename as...
5943 (reductions_t, errs_t): these.
5944 Adjust all dependencies.
5945
5946 2002-06-30 Akim Demaille <akim@epita.fr>
5947
5948 * src/LR0.c (state_list_t, state_list_append): New.
5949 (first_state, last_state): Now symbol_list_t.
5950 (this_state): Remove.
5951 (new_itemsets, append_states, save_reductions): Take a state_t as
5952 argument.
5953 (set_states, generate_states): Adjust.
5954 (save_shifts): Remove, replaced by...
5955 * src/state.h, src/state.c (state_shifts_set): New.
5956 (shifts): Rename as...
5957 (shifts_t): this.
5958 Adjust all dependencies.
5959 * src/state.h (state_t): Remove the `next' member.
5960
5961 2002-06-30 Akim Demaille <akim@epita.fr>
5962
5963 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
5964 escaped in slot 0.
5965
5966 2002-06-30 Akim Demaille <akim@epita.fr>
5967
5968 Use hash.h for the state hash table.
5969
5970 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
5971 (allocate_storage): Use state_hash_new.
5972 (free_storage): Use state_hash_free.
5973 (new_state, get_state): Adjust.
5974 * src/lalr.h, src/lalr.c (states): Move to...
5975 * src/states.h (state_t): Remove the `link' member, no longer
5976 used.
5977 * src/states.h, src/states.c: here.
5978 (state_hash_new, state_hash_free, state_hash_lookup)
5979 (state_hash_insert, states_free): New.
5980 * src/states.c (state_table, state_compare, state_hash): New.
5981 * src/output.c (output_actions): Do not free states now, since we
5982 still need to know the final_state number in `prepare', called
5983 afterwards. Do it...
5984 * src/main.c (main): here: call states_free after `output'.
5985
5986 2002-06-30 Akim Demaille <akim@epita.fr>
5987
5988 * src/state.h, src/state.c (state_new): New, extracted from...
5989 * src/LR0.c (new_state): here.
5990 * src/state.h (STATE_ALLOC): Move to...
5991 * src/state.c: here.
5992 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
5993 * src/state.h, src/state.c: here.
5994
5995 2002-06-30 Akim Demaille <akim@epita.fr>
5996
5997 * src/reader.c (gensym): Rename as...
5998 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
5999 (getsym): Rename as...
6000 (symbol_get): this.
6001
6002 2002-06-30 Akim Demaille <akim@epita.fr>
6003
6004 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
6005 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
6006 * src/output.c, src/print.c, src/print_graph.c: Propagate.
6007 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
6008
6009 2002-06-30 Akim Demaille <akim@epita.fr>
6010
6011 Make the test suite pass with warnings checked.
6012
6013 * tests/actions.at (Printers and Destructors): Improve.
6014 Avoid unsigned vs. signed issues.
6015 * tests/calc.at: Don't exercise the scanner here, do it...
6016 * tests/input.at (Torturing the Scanner): here.
6017
6018 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6019
6020 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
6021 reorganize first lines parallel to yacc.c.
6022
6023 2002-06-28 Akim Demaille <akim@epita.fr>
6024
6025 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
6026 (b4_token_enum, b4_token_defines): New, factored from...
6027 * data/lalr1.cc, data/yacc.c, glr.c: here.
6028
6029 2002-06-28 Akim Demaille <akim@epita.fr>
6030
6031 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
6032 unused variables.
6033 * src/output.c (merger_output): static.
6034
6035 2002-06-28 Akim Demaille <akim@epita.fr>
6036
6037 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
6038 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
6039 pacify GCC.
6040 * src/output.c (save_row): Initialize all the variables to pacify GCC.
6041
6042 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6043
6044 Accumulated changelog for new GLR parsing features.
6045
6046 * src/conflicts.c (count_total_conflicts): Change name to
6047 conflicts_total_count.
6048 * src/conflicts.h: Ditto.
6049 * src/output.c (token_actions): Use the new name.
6050 (output_conflicts): Change conflp => conflict_list_heads, and
6051 confl => conflict_list for better readability.
6052 * data/glr.c: Use the new names.
6053 * NEWS: Add self to GLR announcement.
6054
6055 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
6056
6057 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
6058 Akim Demaille.
6059
6060 * data/bison.glr: Change name to glr.c
6061 * data/glr.c: Renamed from bison.glr.
6062 * data/Makefile.am: Add glr.c
6063
6064 * src/getargs.c:
6065
6066 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
6067 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
6068
6069 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6070
6071 * data/bison.glr: Be sure to restore the
6072 current #line when returning to the skeleton contents after having
6073 exposed the input file's #line.
6074
6075 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6076
6077 * data/bison.glr: Bring up to date with changes to bison.simple.
6078
6079 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6080
6081 * data/bison.glr: Correct definitions that use b4_prefix.
6082 Various reformatting.
6083 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
6084 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
6085 yytokenp argument; now part of stack.
6086 (yychar): Define to behave as documented.
6087 (yyclearin): Ditto.
6088
6089 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6090
6091 * src/reader.h: Add declaration for free_merger_functions.
6092
6093 * src/reader.c (merge_functions): New variable.
6094 (get_merge_function): New function.
6095 (free_merger_functions): New function.
6096 (readgram): Check for %prec that is not followed by a symbol.
6097 Handle %dprec and %merge declarations.
6098 (packgram): Initialize dprec and merger fields in rules array.
6099
6100 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
6101 conflict_list_cnt, conflict_list_free): New variables.
6102 (table_grow): Also grow conflict_table.
6103 (prepare_rules): Output dprec and merger tables.
6104 (conflict_row): New function.
6105 (action_row): Output conflict lists for GLR parser. Don't use
6106 default reduction in conflicted states for GLR parser so that there
6107 are spaces for the conflict lists.
6108 (save_row): Also save conflict information.
6109 (token_actions): Allocate conflict list.
6110 (merger_output): New function.
6111 (pack_vector): Pack conflict table, too.
6112 (output_conflicts): New function to output yyconflp and yyconfl.
6113 (output_check): Allocate conflict_tos.
6114 (output_actions): Output conflict tables, also.
6115 (output_skeleton): Output b4_mergers definition.
6116 (prepare): Output b4_max_rhs_length definition.
6117 Use 'bison.glr' as default skeleton for GLR parsers.
6118
6119 * src/gram.c (glr_parser): New flag.
6120 (grammar_free): Call free_merger_functions.
6121
6122 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
6123 all pairs of conflicting reductions, rather than just all tokens
6124 causing conflicts. Needed to size conflict tables.
6125 (conflicts_output): Modify call to count_rr_conflicts for new
6126 interface.
6127 (conflicts_print): Ditto.
6128 (count_total_conflicts): New function.
6129
6130 * src/reader.h (merger_list): New type.
6131 (merge_functions): New variable.
6132
6133 * src/lex.h (tok_dprec, tok_merge): New token types.
6134
6135 * src/gram.h (rule_s): Add dprec and merger fields.
6136 (glr_parser): New flag.
6137
6138 * src/conflicts.h (count_total_conflicts): New function.
6139
6140 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
6141
6142 * doc/bison.texinfo (Generalized LR Parsing): New section.
6143 (GLR Parsers): New section.
6144 (Language and Grammar): Mention GLR parsing.
6145 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
6146 Correct typo ("tge" -> "the").
6147
6148 * data/bison.glr: New skeleton for GLR parsing.
6149
6150 * tests/cxx-gram.at: New tests for GLR parsing.
6151
6152 * tests/testsuite.at: Include cxx-gram.at.
6153
6154 * tests/Makefile.am: Add cxx-gram.at.
6155
6156 * src/parse-gram.y:
6157
6158 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
6159
6160 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
6161
6162 2002-06-27 Akim Demaille <akim@epita.fr>
6163
6164 * src/options.h, src/options.c: Remove.
6165 * src/getargs.c (short_options, long_options): New.
6166
6167 2002-06-27 Akim Demaille <akim@epita.fr>
6168
6169 * data/bison.simple, data/bison.c++: Rename as...
6170 * data/yacc.c, data/lalr1.cc: these.
6171 * doc/bison.texinfo (Environment Variables): Remove.
6172
6173 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
6174
6175 * src/getargs.c (report_argmatch): Initialize strtok().
6176
6177 2002-06-20 Akim Demaille <akim@epita.fr>
6178
6179 * data/bison.simple (b4_symbol_actions): New, replaces...
6180 (b4_symbol_destructor, b4_symbol_printer): these.
6181 (yysymprint): Be sure to call YYPRINT only for tokens, and using
6182 user token numbers.
6183
6184 2002-06-20 Akim Demaille <akim@epita.fr>
6185
6186 * data/bison.simple (yydestructor): Rename as...
6187 (yydestruct): this.
6188
6189 2002-06-20 Akim Demaille <akim@epita.fr>
6190
6191 * src/symtab.h, src/symtab.c (symbol_type_set)
6192 (symbol_destructor_set, symbol_precedence_set): The location is
6193 the last argument.
6194 Adjust all callers.
6195
6196 2002-06-20 Akim Demaille <akim@epita.fr>
6197
6198 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
6199 internals.
6200 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
6201 Takes a location.
6202 * src/symtab.h, src/symtab.c (symbol_class_set)
6203 (symbol_user_token_number_set): Likewise.
6204 Adjust all callers.
6205 Promote complain_at.
6206 * tests/input.at (Type Clashes): Adjust.
6207
6208 2002-06-20 Akim Demaille <akim@epita.fr>
6209
6210 * data/bison.simple (YYLEX): Fix the declaration when
6211 %pure-parser.
6212
6213 2002-06-20 Akim Demaille <akim@epita.fr>
6214
6215 * data/bison.simple (yysymprint): Don't print the token number,
6216 just its name.
6217 * tests/actions.at (Destructors): Rename as...
6218 (Printers and Destructors): this.
6219 Also exercise %printer.
6220
6221 2002-06-20 Akim Demaille <akim@epita.fr>
6222
6223 * data/bison.simple (YYDSYMPRINT): New.
6224 Use it to remove many of the #if YYDEBUG/if (yydebug).
6225
6226 2002-06-20 Akim Demaille <akim@epita.fr>
6227
6228 * src/symtab.h, src/symtab.c (symbol_t): printer and
6229 printer_location are new members.
6230 (symbol_printer_set): New.
6231 * src/parse-gram.y (PERCENT_PRINTER): New token.
6232 Handle its associated rule.
6233 * src/scan-gram.l: Adjust.
6234 (handle_destructor_at, handle_destructor_dollar): Rename as...
6235 (handle_symbol_code_at, handle_symbol_code_dollar): these.
6236 * src/output.c (symbol_printers_output): New.
6237 (output_skeleton): Call it.
6238 * data/bison.simple (yysymprint): New. Cannot be named yyprint
6239 since there are already many grammar files with a user `yyprint'.
6240 Replace the calls to YYPRINT to calls to yysymprint.
6241 * tests/calc.at: Adjust.
6242 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
6243 taking advantage of parser very internal details (stack size!).
6244
6245 2002-06-20 Akim Demaille <akim@epita.fr>
6246
6247 * src/scan-gram.l: Complete the scanner with the missing patterns
6248 to pacify Flex.
6249 Use `quote' and `symbol_tag_get' where appropriate.
6250
6251 2002-06-19 Akim Demaille <akim@epita.fr>
6252
6253 * tests/actions.at (Destructors): Augment to test locations.
6254 * data/bison.simple (yydestructor): Pass it the current location
6255 if locations are enabled.
6256 Prototype only when __STDC__ or C++.
6257 Change the argument names to move into the yy name space: there is
6258 user code here.
6259
6260 2002-06-19 Akim Demaille <akim@epita.fr>
6261
6262 * data/bison.simple (b4_pure_if): New.
6263 Use it instead of #ifdef YYPURE.
6264
6265 2002-06-19 Akim Demaille <akim@epita.fr>
6266
6267 * data/bison.simple (b4_location_if): New.
6268 Use it instead of #ifdef YYLSP_NEEDED.
6269
6270 2002-06-19 Akim Demaille <akim@epita.fr>
6271
6272 Prepare @$ in %destructor, but currently don't bind it in the
6273 skeleton, as %location use is not cleaned up yet.
6274
6275 * src/scan-gram.l (handle_dollar, handle_destructor_at)
6276 (handle_action_at): New.
6277 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
6278 a braced_code_t and a location as additional arguments.
6279 (handle_destructor_dollar): Instead of requiring `b4_eval', just
6280 unquote one when outputting `b4_dollar_dollar'.
6281 Adjust callers.
6282 * data/bison.simple (b4_eval): Remove.
6283 (b4_symbol_destructor): Adjust.
6284 * tests/input.at (Invalid @n): Adjust.
6285
6286 2002-06-19 Zack Weinberg <zack@codesourcery.com>
6287
6288 * doc/bison.texinfo: Document ability to have multiple
6289 prologue sections.
6290
6291 2002-06-18 Akim Demaille <akim@epita.fr>
6292
6293 * src/files.c (compute_base_names): When computing the output file
6294 names from the input file name, strip the directory part.
6295
6296 2002-06-18 Akim Demaille <akim@epita.fr>
6297
6298 * data/bison.simple.new: Comment changes.
6299 Reported by Andreas Schwab.
6300
6301 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
6302
6303 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
6304 there are no `label `yyoverflowlab' defined but not used' warnings
6305 when yyoverflow is defined.
6306
6307 2002-06-18 Akim Demaille <akim@epita.fr>
6308
6309 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
6310 new member.
6311 (symbol_destructor_set): Adjust.
6312 * src/output.c (symbol_destructors_output): Output the destructor
6313 locations.
6314 Output the symbol name.
6315 * data/bison.simple (b4_symbol_destructor): Adjust.
6316
6317 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
6318 and Akim Demaille <akim@epita.fr>
6319
6320 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
6321 what's left on the stack when the error recovery hits EOF.
6322 * tests/actions.at (Destructors): Complete to exercise this case.
6323
6324 2002-06-17 Akim Demaille <akim@epita.fr>
6325
6326 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
6327 arguments is really empty, not only equal to `[]'.
6328 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
6329 member.
6330 (symbol_destructor_set): New.
6331 * src/output.c (symbol_destructors_output): New.
6332 * src/reader.h (brace_code_t, current_braced_code): New.
6333 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
6334 (handle_dollar): Rename as...
6335 (handle_action_dollar): this.
6336 (handle_destructor_dollar): New.
6337 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
6338 (grammar_declaration): Use it.
6339 * data/bison.simple (yystos): Is always defined.
6340 (yydestructor): New.
6341 * tests/actions.at (Destructors): New.
6342 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
6343
6344 2002-06-17 Akim Demaille <akim@epita.fr>
6345
6346 * src/symlist.h, src/symlist.c (symbol_list_length): New.
6347 * src/scan-gram.l (handle_dollar, handle_at): Compute the
6348 rule_length only when needed.
6349 * src/output.c (actions_output, token_definitions_output): Output
6350 the full M4 block.
6351 * src/symtab.c: Don't access directly to the symbol tag, use
6352 symbol_tag_get.
6353 * src/parse-gram.y: Use symbol_list_free.
6354
6355 2002-06-17 Akim Demaille <akim@epita.fr>
6356
6357 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
6358 (symbol_list_prepend, get_type_name): Move to...
6359 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
6360 (symbol_list_prepend, symbol_list_n_type_name_get): here.
6361 Adjust all callers.
6362 (symbol_list_free): New.
6363 * src/scan-gram.l (handle_dollar): Takes a location.
6364 * tests/input.at (Invalid $n): Adjust.
6365
6366 2002-06-17 Akim Demaille <akim@epita.fr>
6367
6368 * src/reader.h, src/reader.c (symbol_list_new): Export it.
6369 (symbol_list_prepend): New.
6370 * src/parse-gram.y (%union): `list' is a new member.
6371 (symbols.1): New, replaces...
6372 (terms_to_prec.1, nterms_to_type.1): these.
6373 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
6374 Take a location as additional argument.
6375 Adjust all callers.
6376
6377 2002-06-15 Akim Demaille <akim@epita.fr>
6378
6379 * src/parse-gram.y: Move %token in the declaration section so that
6380 we don't depend upon CVS Bison.
6381
6382 2002-06-15 Akim Demaille <akim@epita.fr>
6383
6384 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
6385 * src/print.c (print_core): Use it.
6386
6387 2002-06-15 Akim Demaille <akim@epita.fr>
6388
6389 * src/conflicts.c (log_resolution): Accept the rule involved in
6390 the sr conflicts instead of the lookahead number that points to
6391 that rule.
6392 (flush_reduce): Accept the current lookahead vector as argument,
6393 instead of the index in LA.
6394 (resolve_sr_conflict): Accept the current number of lookahead
6395 bitset to consider for the STATE, instead of the index in LA.
6396 (set_conflicts): Adjust.
6397 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
6398
6399 2002-06-15 Akim Demaille <akim@epita.fr>
6400
6401 * src/state.h (state_t): Replace the `lookaheadsp' member, a
6402 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
6403 Adjust all dependencies.
6404 * src/lalr.c (initialize_lookaheads): Split into...
6405 (states_lookaheads_count, states_lookaheads_initialize): these.
6406 (lalr): Adjust.
6407
6408 2002-06-15 Akim Demaille <akim@epita.fr>
6409
6410 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
6411 out of...
6412 (grammar_rules_print): here.
6413 * src/reduce.c (reduce_output): Use it.
6414 * tests/reduce.at (Useless Rules, Reduced Automaton)
6415 (Underivable Rules): Adjust.
6416
6417 2002-06-15 Akim Demaille <akim@epita.fr>
6418
6419 Copy BYacc's nice way to report the grammar.
6420
6421 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
6422 New.
6423 Don't print the rules' location, it is confusing and useless.
6424 (rule_print): Use grammar_rhs_print.
6425 * src/print.c (print_grammar): Use grammar_rules_print.
6426
6427 2002-06-15 Akim Demaille <akim@epita.fr>
6428
6429 Complete and rationalize `useless thing' warnings.
6430
6431 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
6432 (symbol_tag_print): New.
6433 Use them everywhere in place of accessing directly the tag member.
6434 * src/gram.h, src/gram.c (rule_print): New.
6435 Use it where a rule used to be printed `by hand'.
6436 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
6437 (reduce_grammar_tables): Report the useless rules.
6438 (reduce_print): Useless things are a warning, not an error.
6439 Report it as such.
6440 * tests/reduce.at (Useless Nonterminals, Useless Rules):
6441 (Reduced Automaton, Underivable Rules): Adjust.
6442 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
6443 * tests/conflicts.at (Unresolved SR Conflicts)
6444 (Solved SR Conflicts): Adjust.
6445
6446 2002-06-15 Akim Demaille <akim@epita.fr>
6447
6448 Let symbols have a location.
6449
6450 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
6451 (getsym): Adjust.
6452 Adjust all callers.
6453 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
6454 Use location_t, not int.
6455 * src/symtab.c (symbol_check_defined): Take advantage of the
6456 location.
6457 * tests/regression.at (Invalid inputs): Adjust.
6458
6459 2002-06-15 Akim Demaille <akim@epita.fr>
6460
6461 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
6462 (input): Don't try to initialize yylloc here, do it in the
6463 scanner.
6464 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
6465 * src/gram.h (rule_t): Change line and action_line into location
6466 and action_location, of location_t type.
6467 Adjust all dependencies.
6468 * src/location.h, src/location.c (empty_location): New.
6469 * src/reader.h, src/reader.c (grammar_start_symbol_set)
6470 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
6471 (grammar_current_rule_symbol_append)
6472 (grammar_current_rule_action_append): Expect a location as argument.
6473 * src/reader.c (grammar_midrule_action): Adjust to attach an
6474 action's location as dummy symbol location.
6475 * src/symtab.h, src/symtab.c (startsymbol_location): New.
6476 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
6477 the line numbers.
6478
6479 2002-06-14 Akim Demaille <akim@epita.fr>
6480
6481 Grammar declarations may be found in the grammar section.
6482
6483 * src/parse-gram.y (rules_or_grammar_declaration): New.
6484 (declarations): Each declaration may end with a semicolon, not
6485 just...
6486 (grammar_declaration): `"%union"'.
6487 (grammar): Branch to rules_or_grammar_declaration.
6488
6489 2002-06-14 Akim Demaille <akim@epita.fr>
6490
6491 * src/main.c (main): Invoke scanner_free.
6492
6493 2002-06-14 Akim Demaille <akim@epita.fr>
6494
6495 * src/output.c (m4_invoke): Extracted from...
6496 (output_skeleton): here.
6497 Free tempfile.
6498
6499 2002-06-14 Akim Demaille <akim@epita.fr>
6500
6501 * src/parse-gram.y (directives, directive, gram)
6502 (grammar_directives, precedence_directives, precedence_directive):
6503 Rename as...
6504 (declarations, declaration, grammar, grammar_declaration)
6505 (precedence_declaration, precedence_declarator): these.
6506 (symbol_declaration): New.
6507
6508 2002-06-14 Akim Demaille <akim@epita.fr>
6509
6510 * src/files.c (action_obstack): Remove, unused.
6511 (output_obstack): Remove it, and all its dependencies, as it is no
6512 longer needed.
6513 * src/reader.c (epilogue_set): Build the epilogue in the
6514 muscle_obstack.
6515 * src/output.h, src/output.c (muscle_obstack): Move to...
6516 * src/muscle_tab.h, src/muscle_tab.h: here.
6517 (muscle_init): Initialize muscle_obstack.
6518 (muscle_free): New.
6519 * src/main.c (main): Call it.
6520
6521 2002-06-14 Akim Demaille <akim@epita.fr>
6522
6523 * src/location.h: New, extracted from...
6524 * src/reader.h: here.
6525 * src/Makefile.am (noinst_HEADERS): Merge into
6526 (bison_SOURCES): this.
6527 Add location.h.
6528 * src/parse-gram.y: Use location_t instead of Bison's.
6529 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
6530 Use location_t instead of ints.
6531
6532 2002-06-14 Akim Demaille <akim@epita.fr>
6533
6534 * data/bison.simple, data/bison.c++: Be sure to restore the
6535 current #line when returning to the skeleton contents after having
6536 exposed the input file's #line.
6537
6538 2002-06-12 Akim Demaille <akim@epita.fr>
6539
6540 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
6541 eager.
6542 * tests/actions.at (Exotic Dollars): New.
6543
6544 2002-06-12 Akim Demaille <akim@epita.fr>
6545
6546 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
6547 ['"/] too eagerly.
6548 * tests/input.at (Torturing the Scanner): New.
6549
6550 2002-06-11 Akim Demaille <akim@epita.fr>
6551
6552 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
6553 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
6554 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
6555 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
6556 * src/reader.c (reader): Use it.
6557
6558 2002-06-11 Akim Demaille <akim@epita.fr>
6559
6560 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
6561 Adjust all callers.
6562 (scanner_last_string_free): New.
6563
6564 2002-06-11 Akim Demaille <akim@epita.fr>
6565
6566 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
6567 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
6568 (last_string, YY_OBS_FREE): New.
6569 Use them when returning an ID.
6570
6571 2002-06-11 Akim Demaille <akim@epita.fr>
6572
6573 Have Bison grammars parsed by a Bison grammar.
6574
6575 * src/reader.c, src/reader.h (prologue_augment): New.
6576 * src/reader.c (copy_definition): Remove.
6577
6578 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
6579 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
6580 (grammar_current_rule_prec_set, grammar_current_rule_check)
6581 (grammar_current_rule_symbol_append)
6582 (grammar_current_rule_action_append): Export.
6583 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
6584 (symbol_list_action_append): Remove.
6585 Hook the routines from reader.
6586 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
6587 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
6588
6589 * src/reader.c (read_declarations): Remove, unused.
6590
6591 * src/parse-gram.y: Handle the epilogue.
6592 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
6593 (grammar_start_symbol_set): this.
6594 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
6595 * src/reader.c (readgram): Remove, unused.
6596 (reader): Adjust to insert eoftoken and axiom where appropriate.
6597
6598 * src/reader.c (copy_dollar): Replace with...
6599 * src/scan-gram.h (handle_dollar): this.
6600 * src/parse-gram.y: Remove `%thong'.
6601
6602 * src/reader.c (copy_at): Replace with...
6603 * src/scan-gram.h (handle_at): this.
6604
6605 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
6606 New.
6607
6608 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
6609 time being.
6610
6611 * src/reader.h, src/reader.c (grammar_rule_end): New.
6612
6613 * src/parse.y (current_type, current_class): New.
6614 Implement `%nterm', `%token' support.
6615 Merge `%term' into `%token'.
6616 (string_as_id): New.
6617 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
6618 type name.
6619
6620 * src/parse-gram.y: Be sure to handle properly the beginning of
6621 rules.
6622
6623 * src/parse-gram.y: Handle %type.
6624 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
6625
6626 * src/parse-gram.y: More directives support.
6627 * src/options.c: No longer handle source directives.
6628
6629 * src/parse-gram.y: Fix %output.
6630
6631 * src/parse-gram.y: Handle %union.
6632 Use the prologue locations.
6633 * src/reader.c (parse_union_decl): Remove.
6634
6635 * src/reader.h, src/reader.c (epilogue_set): New.
6636 * src/parse-gram.y: Use it.
6637
6638 * data/bison.simple, data/bison.c++: b4_stype is now either not
6639 defined, then default to int, or to the contents of %union,
6640 without `union' itself.
6641 Adjust.
6642 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
6643
6644 * src/output.c (actions_output): Don't output braces, as they are
6645 already handled by the scanner.
6646
6647 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
6648 characters to themselves.
6649
6650 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
6651 that the epilogue has a proper #line.
6652
6653 * src/parse-gram.y: Handle precedence/associativity.
6654
6655 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
6656 a terminal.
6657 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
6658 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
6659 at all to define terminals that cannot be emitted.
6660
6661 * src/scan-gram.l: Escape M4 characters.
6662
6663 * src/scan-gram.l: Working properly with escapes in user
6664 strings/characters.
6665
6666 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
6667 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
6668 grammar.
6669 Use more modest sizes, as for the time being the parser does not
6670 release memory, and therefore the process swallows a huge amount
6671 of memory.
6672
6673 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
6674 stricter %token grammar.
6675
6676 * src/symtab.h (associativity): Add `undef_assoc'.
6677 (symbol_precedence_set): Do nothing when passed an undef_assoc.
6678 * src/symtab.c (symbol_check_alias_consistence): Adjust.
6679
6680 * tests/regression.at (Invalid %directive): Remove, as it is now
6681 meaningless.
6682 (Invalid inputs): Adjust to the new error messages.
6683 (Token definitions): The new grammar doesn't allow too many
6684 eccentricities.
6685
6686 * src/lex.h, src/lex.c: Remove.
6687 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
6688 (copy_character, copy_string2, copy_string, copy_identifier)
6689 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
6690 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
6691 (parse_action): Remove.
6692 * po/POTFILES.in: Adjust.
6693
6694 2002-06-11 Akim Demaille <akim@epita.fr>
6695
6696 * src/reader.c (parse_action): Don't store directly into the
6697 rule's action member: return the action as a string.
6698 Don't require `rule_length' as an argument: compute it.
6699 (grammar_current_rule_symbol_append)
6700 (grammar_current_rule_action_append): New, eved out from
6701 (readgram): here.
6702 Remove `action_flag', `rulelength', unused now.
6703
6704 2002-06-11 Akim Demaille <akim@epita.fr>
6705
6706 * src/reader.c (grammar_current_rule_prec_set).
6707 (grammar_current_rule_check): New, eved out from...
6708 (readgram): here.
6709 Remove `xaction', `first_rhs': useless.
6710 * tests/input.at (Type clashes): New.
6711 * tests/existing.at (GNU Cim Grammar): Adjust.
6712
6713 2002-06-11 Akim Demaille <akim@epita.fr>
6714
6715 * src/reader.c (grammar_midrule_action): New, Eved out from
6716 (readgram): here.
6717
6718 2002-06-11 Akim Demaille <akim@epita.fr>
6719
6720 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
6721 New.
6722 (readgram): Use them as replacement of inlined code, crule and
6723 crule1.
6724
6725 2002-06-11 Akim Demaille <akim@epita.fr>
6726
6727 * src/reader.c (grammar_end, grammar_symbol_append): New.
6728 (readgram): Use them.
6729 Make the use of `p' as local as possible.
6730
6731 2002-06-10 Akim Demaille <akim@epita.fr>
6732
6733 GCJ's parser requires the tokens to be defined before the prologue.
6734
6735 * data/bison.simple: Output the token definition before the user's
6736 prologue.
6737 * tests/regression.at (Braces parsing, Duplicate string)
6738 (Mixing %token styles): Check the output from bison.
6739 (Early token definitions): New.
6740
6741 2002-06-10 Akim Demaille <akim@epita.fr>
6742
6743 * src/symtab.c (symbol_user_token_number_set): Don't complain when
6744 assigning twice the same user number to a token, so that we can
6745 use it in...
6746 * src/lex.c (lex): here.
6747 Also use `symbol_class_set' instead of hand written code.
6748 * src/reader.c (parse_assoc_decl): Likewise.
6749
6750 2002-06-10 Akim Demaille <akim@epita.fr>
6751
6752 * src/symtab.c, src/symtab.c (symbol_class_set)
6753 (symbol_user_token_number_set): New.
6754 * src/reader.c (parse_token_decl): Use them.
6755 Use a switch instead of ifs.
6756 Use a single argument.
6757
6758 2002-06-10 Akim Demaille <akim@epita.fr>
6759
6760 Remove `%thong' support as it is undocumented, unused, duplicates
6761 `%token's job, and creates useless e-mail traffic with people who
6762 want to know what it is, why it is undocumented, unused, and
6763 duplicates `%token's job.
6764
6765 * src/reader.c (parse_thong_decl): Remove.
6766 * src/options.c (option_table): Remove "thong".
6767 * src/lex.h (tok_thong): Remove.
6768
6769 2002-06-10 Akim Demaille <akim@epita.fr>
6770
6771 * src/symtab.c, src/symtab.c (symbol_type_set)
6772 (symbol_precedence_set): New.
6773 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
6774 (value_components_used): Remove, unused.
6775
6776 2002-06-09 Akim Demaille <akim@epita.fr>
6777
6778 Move symbols handling code out of the reader.
6779
6780 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
6781 (axiom): Move to...
6782 * src/symtab.h, src/symtab.c: here.
6783
6784 * src/gram.c (start_symbol): Remove: use startsymbol->number.
6785 * src/reader.c (startval): Rename as...
6786 * src/symtab.h, src/symtab.c (startsymbol): this.
6787 * src/reader.c: Adjust.
6788
6789 * src/reader.c (symbol_check_defined, symbol_make_alias)
6790 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
6791 (token_translations_init)
6792 Move to...
6793 * src/symtab.c: here.
6794 * src/reader.c (packsymbols): Move to...
6795 * src/symtab.h, src/symtab.c (symbols_pack): here.
6796 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
6797 argument.
6798
6799 2002-06-03 Akim Demaille <akim@epita.fr>
6800
6801 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
6802 then statements.
6803
6804 2002-06-03 Akim Demaille <akim@epita.fr>
6805
6806 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
6807 structs with non literals.
6808 * src/scan-skel.l: never-interactive.
6809 * src/conflicts.c (enum conflict_resolution_e): No trailing
6810 comma.
6811 * src/getargs.c (usage): Split long literal strings.
6812 Reported by Hans Aberg.
6813
6814 2002-05-28 Akim Demaille <akim@epita.fr>
6815
6816 * data/bison.c++: Use C++ ostreams.
6817 (cdebug_): New member.
6818
6819 2002-05-28 Akim Demaille <akim@epita.fr>
6820
6821 * src/output.c (output_skeleton): Be sure to allocate enough room
6822 for `/' _and_ for `\0' in full_skeleton.
6823
6824 2002-05-28 Akim Demaille <akim@epita.fr>
6825
6826 * data/bison.c++: Catch up with bison.simple:
6827 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6828 and Paul Eggert <eggert@twinsun.com>: `error' handing.
6829 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
6830 and popping traces.
6831
6832 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6833
6834 * src/output.c (output_skeleton): Put an explicit path in front of
6835 the skeleton file name, rather than relying on the -I directory,
6836 to partially alleviate effects of having a skeleton file lying around
6837 in the current directory.
6838
6839 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6840
6841 * src/conflicts.c (log_resolution): Correct typo:
6842 obstack_printf should be obstack_fgrow1.
6843
6844 2002-05-26 Akim Demaille <akim@epita.fr>
6845
6846 * src/state.h (state_t): `solved_conflicts' is a new member.
6847 * src/LR0.c (new_state): Set it to 0.
6848 * src/conflicts.h, src/conflicts.c (print_conflicts)
6849 (free_conflicts, solve_conflicts): Rename as...
6850 (conflicts_print, conflicts_free, conflicts_solve): these.
6851 Adjust callers.
6852 * src/conflicts.c (enum conflict_resolution_e)
6853 (solved_conflicts_obstack): New, used by...
6854 (log_resolution): this.
6855 Adjust to attach the conflict resolution to each state.
6856 Complete the description with the precedence/associativity
6857 information.
6858 (resolve_sr_conflict): Adjust.
6859 * src/print.c (print_state): Output its solved_conflicts.
6860 * tests/conflicts.at (Unresolved SR Conflicts)
6861 (Solved SR Conflicts): Exercise --report=all.
6862
6863 2002-05-26 Akim Demaille <akim@epita.fr>
6864
6865 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
6866 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
6867 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
6868 (token_number_t, item_number_as_token_number)
6869 (token_number_as_item_number, muscle_insert_token_number_table):
6870 Rename as...
6871 (symbol_number_t, item_number_as_symbol_number)
6872 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
6873 these, since it is more appropriate.
6874
6875 2002-05-26 Akim Demaille <akim@epita.fr>
6876
6877 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
6878 `Error:' lines.
6879 * data/bison.simple (yystos) [YYDEBUG]: New.
6880 (yyparse) [YYDEBUG]: Display the symbols which are popped during
6881 error recovery.
6882 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
6883
6884 2002-05-25 Akim Demaille <akim@epita.fr>
6885
6886 * doc/bison.texinfo (Debugging): Split into...
6887 (Tracing): this new section, its former contents, and...
6888 (Understanding): this new section.
6889 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
6890 by...
6891 (report_flag): this.
6892 Adjust all dependencies.
6893 (report_args, report_types, report_argmatch): New.
6894 (usage, getargs): Report/support -r, --report.
6895 * src/options.h
6896 (struct option_table_struct): Rename as..,
6897 (struct option_table_s): this.
6898 Rename the `set_flag' member to `flag' to match with getopt_long's
6899 struct.
6900 * src/options.c (option_table): Split verbose into an entry for
6901 %verbose, and another for --verbose.
6902 Support --report/-r, so remove -r from the obsolete --raw.
6903 * src/print.c: Attach full item sets and lookaheads reports to
6904 report_flag instead of trace_flag.
6905 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
6906
6907 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6908 and Paul Eggert <eggert@twinsun.com>
6909
6910 * data/bison.simple (yyparse): Correct error handling to conform to
6911 POSIX and yacc. Specifically, after syntax error is discovered,
6912 do not reduce further before shifting the error token.
6913 Clean up the code a bit by removing the labels yyerrdefault,
6914 yyerrhandle, yyerrpop.
6915 * NEWS: Document the above.
6916
6917 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6918
6919 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
6920 type; it isn't always big enough, since it doesn't necessarily
6921 include non-terminals.
6922 (yytranslate): Expand definition of yy_token_number_type, so that
6923 the latter can be removed.
6924 (yy_token_number_type): Remove, only one use.
6925 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
6926 don't use TokenNumberType as element type.
6927
6928 * tests/regression.at: Modify expected output to agree with change
6929 to yyr1 and yytranslate.
6930
6931 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
6932
6933 * src/reader.c (parse_action): Use copy_character instead of
6934 obstack_1grow.
6935
6936 2002-05-13 Akim Demaille <akim@epita.fr>
6937
6938 * tests/regression.at (Token definitions): Prototype yylex and
6939 yyerror.
6940
6941 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
6942
6943 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
6944 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
6945 32-bit arithmetic.
6946 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
6947
6948 2002-05-07 Akim Demaille <akim@epita.fr>
6949
6950 * tests/synclines.at: Be sure to prototype yylex and yyerror to
6951 avoid GCC warnings.
6952
6953 2002-05-07 Akim Demaille <akim@epita.fr>
6954
6955 Kill GCC warnings.
6956
6957 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
6958 over the RHS of each rule.
6959 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
6960 * src/state.h (state_t): Member `nitems' is unsigned short.
6961 * src/LR0.c (get_state): Adjust.
6962 * src/reader.c (packgram): Likewise.
6963 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
6964 `Type'.
6965 (muscle_insert_int_table): Remove, unused.
6966 (prepare_rules): Remove `max'.
6967
6968 2002-05-06 Akim Demaille <akim@epita.fr>
6969
6970 * src/closure.c (print_firsts): Display of the symbol tags.
6971 (bitmatrix_print): Move to...
6972 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
6973 here.
6974 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
6975
6976 2002-05-06 Akim Demaille <akim@epita.fr>
6977
6978 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
6979 hash_do_for_each.
6980
6981 2002-05-06 Akim Demaille <akim@epita.fr>
6982
6983 * src/LR0.c (new_state, get_state): Instead of using the global
6984 `kernel_size' and `kernel_base', have two new arguments:
6985 `core_size' and `core'.
6986 Adjust callers.
6987
6988 2002-05-06 Akim Demaille <akim@epita.fr>
6989
6990 * src/reader.c (packgram): No longer end `ritem' with a 0
6991 sentinel: it is not used.
6992
6993 2002-05-05 Akim Demaille <akim@epita.fr>
6994
6995 New experimental feature: display the lookaheads in the report and
6996 graph.
6997
6998 * src/print (print_core): When --trace-flag, display the rules
6999 lookaheads.
7000 * src/print_graph.c (print_core): Likewise.
7001 Swap the arguments.
7002 Adjust caller.
7003
7004 2002-05-05 Akim Demaille <akim@epita.fr>
7005
7006 * tests/torture.at (Many lookaheads): New test.
7007
7008 2002-05-05 Akim Demaille <akim@epita.fr>
7009
7010 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
7011 (GENERATE_MUSCLE_INSERT_TABLE): this.
7012 (output_int_table, output_unsigned_int_table, output_short_table)
7013 (output_token_number_table, output_item_number_table): Replace with...
7014 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
7015 (muscle_insert_short_table, muscle_insert_token_number_table)
7016 (muscle_insert_item_number_table): these.
7017 Adjust all callers.
7018 (prepare_tokens): Don't free `translations', since...
7019 * src/reader.h, src/reader.c (grammar_free): do it.
7020 Move to...
7021 * src/gram.h, src/gram.c (grammar_free): here.
7022 * data/bison.simple, data/bison.c++: b4_token_number_max is now
7023 b4_translate_max.
7024
7025 2002-05-05 Akim Demaille <akim@epita.fr>
7026
7027 * src/output.c (output_unsigned_int_table): New.
7028 (prepare_rules): `i' is unsigned.
7029 `prhs', `rline', `r2' are unsigned int.
7030 Rename muscle `rhs_number_max' as `rhs_max'.
7031 Output muscles `prhs_max', `rline_max', and `r2_max'.
7032 Free rline and r1.
7033 * data/bison.simple, data/bison.c++: Adjust to use these muscles
7034 to compute types instead of constant types.
7035 * tests/regression.at (Web2c Actions): Adjust.
7036
7037 2002-05-04 Akim Demaille <akim@epita.fr>
7038
7039 * src/symtab.h (SALIAS, SUNDEF): Rename as...
7040 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
7041 Adjust dependencies.
7042 * src/output.c (token_definitions_output): Be sure not to output a
7043 `#define 'a'' when fed with `%token 'a' "a"'.
7044 * tests/regression.at (Token definitions): New.
7045
7046 2002-05-03 Paul Eggert <eggert@twinsun.com>
7047
7048 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
7049 for K&R C.
7050
7051 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
7052
7053 * Makefile.am (SUBDIRS): Remove intl.
7054 (EXTRA_DIST): Add config/config.rpath.
7055
7056 2002-05-03 Akim Demaille <akim@epita.fr>
7057
7058 * data/bison.simple (m4_if): Don't output empty enums.
7059 And actually, output valid enum definitions :(.
7060
7061 2002-05-03 Akim Demaille <akim@epita.fr>
7062
7063 * configure.bat: Remove, completely obsolete.
7064 * Makefile.am (EXTRA_DIST): Adjust.
7065 Don't distribute config.rpath...
7066 * config/Makefile.am (EXTRA_DIST): Do it.
7067
7068 2002-05-03 Akim Demaille <akim@epita.fr>
7069
7070 * configure.in (GETTEXT_VERSION): New.
7071 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
7072
7073 2002-05-03 Akim Demaille <akim@epita.fr>
7074
7075 * data/bison.simple (b4_token_enum): New.
7076 (b4_token_defines): Use it to output tokens both as #define and
7077 enums.
7078 Suggested by Paul Eggert.
7079 * src/output.c (token_definitions_output): Don't output spurious
7080 white spaces.
7081
7082 2002-05-03 Akim Demaille <akim@epita.fr>
7083
7084 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
7085
7086 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
7087
7088 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
7089 Update the stack class, give a try to deque as the default container.
7090
7091 2002-05-02 Akim Demaille <akim@epita.fr>
7092
7093 * data/bison.simple (yyparse): Do not implement @$ = @1.
7094 (YYLLOC_DEFAULT): Adjust to do it.
7095 * doc/bison.texinfo (Location Default Action): Fix.
7096
7097 2002-05-02 Akim Demaille <akim@epita.fr>
7098
7099 * src/reader.c (parse_braces): Merge into...
7100 (parse_action): this.
7101
7102 2002-05-02 Akim Demaille <akim@epita.fr>
7103
7104 * configure.in (ALL_LINGUAS): Remove.
7105 * po/LINGUAS, hr.po: New.
7106
7107 2002-05-02 Akim Demaille <akim@epita.fr>
7108
7109 Remove the so called hairy (semantic) parsers.
7110
7111 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
7112 * src/gram.h, src/gram.c (semantic_parser): Remove.
7113 (rule_t): Remove the guard and guard_line members.
7114 * src/lex.h (token_t): remove tok_guard.
7115 * src/options.c (option_table): Remove %guard and %semantic_parser
7116 support.
7117 * src/output.c, src/output.h (guards_output): Remove.
7118 (prepare): Adjust.
7119 (token_definitions_output): Don't output the `T'
7120 tokens (???).
7121 (output_skeleton): Don't output the guards.
7122 * src/files.c, src/files.c (attrsfile): Remove.
7123 * src/reader.c (symbol_list): Remove the guard and guard_line
7124 members.
7125 Adjust dependencies.
7126 (parse_guard): Remove.
7127 * data/bison.hairy: Remove.
7128 * doc/bison.texinfo (Environment Variables): Remove occurrences of
7129 BISON_HAIRY.
7130
7131 2002-05-02 Akim Demaille <akim@epita.fr>
7132
7133 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
7134 (parse_guard): Rename the formal argument `stack_offset' as
7135 `rule_length', which is more readable.
7136 Adjust callers.
7137 (copy_at, copy_dollar): Instead of outputting the hard coded
7138 values of $$, $n and so forth, output invocation to b4_lhs_value,
7139 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
7140 Note: this patch partially drops `semantic-parser' support: it
7141 always does `rule_length - n', where semantic parsers ought to
7142 always use `-n'.
7143 * data/bison.simple, data/bison.c++ (b4_lhs_value)
7144 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
7145
7146 2002-05-02 Akim Demaille <akim@epita.fr>
7147
7148 * configure.in (AC_INIT): Bump to 1.49b.
7149 (AM_INIT_AUTOMAKE): Short invocation.
7150
7151 2002-05-02 Akim Demaille <akim@epita.fr>
7152
7153 Version 1.49a.
7154
7155 2002-05-01 Akim Demaille <akim@epita.fr>
7156
7157 * src/skeleton.h: Remove.
7158
7159 2002-05-01 Akim Demaille <akim@epita.fr>
7160
7161 * src/skeleton.h: Fix the #endif.
7162 Reported by Magnus Fromreide.
7163
7164 2002-04-26 Paul Eggert <eggert@twinsun.com>
7165
7166 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
7167 Define if we define YYSTYPE and YYLTYPE, respectively.
7168 (YYCOPY): Fix [] quoting problem in the non-GCC case.
7169
7170 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
7171
7172 * src/scan-skel.l: Postprocess quadrigraphs.
7173
7174 * src/reader.c (copy_character): New function, used to output
7175 single characters while replacing `[' and `]' with quadrigraphs, to
7176 avoid troubles with M4 quotes.
7177 (copy_comment): Output characters with copy_character.
7178 (read_additionnal_code): Likewise.
7179 (copy_string2): Likewise.
7180 (copy_definition): Likewise.
7181
7182 * tests/calc.at: Exercise M4 quoting.
7183
7184 2002-04-25 Akim Demaille <akim@epita.fr>
7185
7186 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
7187 between `!' and the command.
7188 Reported by Paul Eggert.
7189
7190 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
7191
7192 * tests/calc.at: Exercise prologue splitting.
7193
7194 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
7195 `b4_post_prologue' instead of `b4_prologue'.
7196
7197 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
7198 muscles.
7199 (output): Free pre_prologue_obstack and post_prologue_obstack.
7200 * src/files.h, src/files.c (attrs_obstack): Remove.
7201 (pre_prologue_obstack, post_prologue_obstack): New.
7202 * src/reader.c (copy_definition): Add a parameter to specify the
7203 obstack to fill, instead of using attrs_obstack unconditionally.
7204 (read_declarations): Pass pre_prologue_obstack to copy_definition if
7205 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
7206
7207 2002-04-23 Paul Eggert <eggert@twinsun.com>
7208
7209 * data/bison.simple: Remove unnecessary commentary and white
7210 space differences from 1_29-branch.
7211 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
7212
7213 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
7214 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
7215 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
7216 constructors or destructors.
7217
7218 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
7219
7220 2002-04-23 Akim Demaille <akim@epita.fr>
7221
7222 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
7223 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
7224 location with columns.
7225 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
7226 All reported by Paul Eggert.
7227
7228 2002-04-22 Akim Demaille <akim@epita.fr>
7229
7230 * src/reduce.c (dump_grammar): Move to...
7231 * src/gram.h, src/gram.c (grammar_dump): here.
7232 Be sure to separate long item numbers.
7233 Don't read the members of a rule's prec if its nil.
7234
7235 2002-04-22 Akim Demaille <akim@epita.fr>
7236
7237 * src/output.c (table_size, table_grow): New.
7238 (MAXTABLE): Remove, replace uses with table_size.
7239 (pack_vector): Instead of dying when the table is too big, grow it.
7240
7241 2002-04-22 Akim Demaille <akim@epita.fr>
7242
7243 * data/bison.simple (yyr1): Its type is that of a token number.
7244 * data/bison.c++ (r1_): Likewise.
7245 * tests/regression.at (Web2c Actions): Adjust.
7246
7247 2002-04-22 Akim Demaille <akim@epita.fr>
7248
7249 * src/reader.c (token_translations_init): 256 is now the default
7250 value for the error token, i.e., it will be assigned another
7251 number if the user assigned 256 to one of her tokens.
7252 (reader): Don't force 256 to error.
7253 * doc/bison.texinfo (Symbols): Adjust.
7254 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
7255 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
7256 etc. instead of 10, 20, 30 (which was used to `jump' over error
7257 (256) and undefined (2)).
7258
7259 2002-04-22 Akim Demaille <akim@epita.fr>
7260
7261 Propagate more token_number_t.
7262
7263 * src/gram.h (token_number_as_item_number)
7264 (item_number_as_token_number): New.
7265 * src/output.c (GENERATE_OUTPUT_TABLE): New.
7266 Use it to create output_item_number_table and
7267 output_token_number_table.
7268 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
7269 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
7270 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
7271 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
7272
7273 2002-04-22 Akim Demaille <akim@epita.fr>
7274
7275 * src/output.h, src/output.c (get_lines_number): Remove.
7276
7277 2002-04-19 Akim Demaille <akim@epita.fr>
7278
7279 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
7280 as Lex/Flex'.
7281 (Debugging): More details about enabling the debugging features.
7282 (Table of Symbols): Describe $$, $n, @$, and @n.
7283 Suggested by Tim Josling.
7284
7285 2002-04-19 Akim Demaille <akim@epita.fr>
7286
7287 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
7288
7289 2002-04-10 Akim Demaille <akim@epita.fr>
7290
7291 * src/system.h: Rely on HAVE_LIMITS_H.
7292 Suggested by Paul Eggert.
7293
7294 2002-04-09 Akim Demaille <akim@epita.fr>
7295
7296 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
7297 full stderr, and strip it according to the bison options, instead
7298 of composing the error message from different bits.
7299 This makes it easier to check for several error messages.
7300 Adjust all the invocations.
7301 Add an invocation exercising the error token.
7302 Add an invocation demonstrating a stupid error message.
7303 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
7304 Adjust the tests.
7305 Error message are for stderr, not stdout.
7306
7307 2002-04-09 Akim Demaille <akim@epita.fr>
7308
7309 * src/gram.h, src/gram.c (error_token_number): Remove, use
7310 errtoken->number.
7311 * src/reader.c (reader): Don't specify the user token number (2)
7312 for $undefined, as it uselessly prevents using it.
7313 * src/gram.h (token_number_t): Move to...
7314 * src/symtab.h: here.
7315 (state_t.number): Is a token_number_t.
7316 * src/print.c, src/reader.c: Use undeftoken->number instead of
7317 hard coded 2.
7318 (Even though this 2 is not the same as above: the number of the
7319 undeftoken remains being 2, it is its user token number which
7320 might not be 2).
7321 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
7322 `user_token_number_max'.
7323 Output `undef_token_number'.
7324 * data/bison.simple, data/bison.c++: Use them.
7325 Be sure to map invalid yylex return values to
7326 `undef_token_number'. This saves us from gratuitous SEGV.
7327
7328 * tests/conflicts.at (Solved SR Conflicts)
7329 (Unresolved SR Conflicts): Adjust.
7330 * tests/regression.at (Web2c Actions): Adjust.
7331
7332 2002-04-08 Akim Demaille <akim@epita.fr>
7333
7334 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
7335 Adding #line.
7336 Remove the duplicate `typedefs'.
7337 (RhsNumberType): Fix the declaration and various other typos.
7338 Use __ofile__.
7339 * data/bison.simple: Use __ofile__.
7340 * src/scan-skel.l: Handle __ofile__.
7341
7342 2002-04-08 Akim Demaille <akim@epita.fr>
7343
7344 * src/gram.h (item_number_t): New, the type of item numbers in
7345 RITEM. Note that it must be able to code symbol numbers as
7346 positive number, and the negation of rule numbers as negative
7347 numbers.
7348 Adjust all dependencies (pretty many).
7349 * src/reduce.c (rule): Remove this `short *' pointer: use
7350 item_number_t.
7351 * src/system.h (MINSHORT, MAXSHORT): Remove.
7352 Include `limits.h'.
7353 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
7354 (shortcpy): Remove.
7355 (MAXTABLE): Move to...
7356 * src/output.c (MAXTABLE): here.
7357 (prepare_rules): Use output_int_table to output rhs.
7358 * data/bison.simple, data/bison.c++: Adjust.
7359 * tests/torture.at (Big triangle): Move the limit from 254 to
7360 500.
7361 * tests/regression.at (Web2c Actions): Ajust.
7362
7363 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
7364 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
7365 passes, but produces negative #line number, once fixed, GCC is
7366 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
7367 C), it passes.
7368 * src/state.h (state_h): Code input lines on ints, not shorts.
7369
7370 2002-04-08 Akim Demaille <akim@epita.fr>
7371
7372 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
7373 and then the grammar.
7374
7375 2002-04-08 Akim Demaille <akim@epita.fr>
7376
7377 * src/system.h: No longer using strndup.
7378
7379 2002-04-07 Akim Demaille <akim@epita.fr>
7380
7381 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
7382 * src/output.c (output_table_data): Return the longest number.
7383 (prepare_tokens): Output `token_number_max').
7384 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
7385 New.
7386 Use them to define yy_token_number_type/TokenNumberType.
7387 Use this type for yytranslate.
7388 * tests/torture.at (Big triangle): Push the limit from 124 to
7389 253.
7390 * tests/regression.at (Web2c Actions): Adjust.
7391
7392 2002-04-07 Akim Demaille <akim@epita.fr>
7393
7394 * tests/torture.at (Big triangle): New.
7395 (GNU AWK Grammar, GNU Cim Grammar): Move to...
7396 * tests/existing.at: here.
7397
7398 2002-04-07 Akim Demaille <akim@epita.fr>
7399
7400 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
7401 nritems.
7402 Adjust dependencies.
7403
7404 2002-04-07 Akim Demaille <akim@epita.fr>
7405
7406 * src/reader.c: Normalize increments to prefix form.
7407
7408 2002-04-07 Akim Demaille <akim@epita.fr>
7409
7410 * src/reader.c, symtab.c: Remove debugging code.
7411
7412 2002-04-07 Akim Demaille <akim@epita.fr>
7413
7414 Rename all the `bucket's as `symbol_t'.
7415
7416 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
7417 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
7418 * src/symtab.c, src/symtab.h (bucket): Rename as...
7419 (symbol_t): this.
7420 (symbol_list_new, bucket_check_defined, bucket_make_alias)
7421 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
7422 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
7423 (buckets_new, buckets_free, buckets_do): Rename as...
7424 (symbol_list_new, symbol_check_defined, symbol_make_alias)
7425 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
7426 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
7427 (symbols_new, symbols_free, symbols_do): these.
7428
7429 2002-04-07 Akim Demaille <akim@epita.fr>
7430
7431 Use lib/hash for the symbol table.
7432
7433 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
7434 EOF.
7435 * src/lex.c (lex): Set the `number' member of new terminals.
7436 * src/reader.c (bucket_check_defined, bucket_make_alias)
7437 (bucket_check_alias_consistence, bucket_translation): New.
7438 (reader, grammar_free, readgram, token_translations_init)
7439 (packsymbols): Adjust.
7440 (reader): Number the predefined tokens.
7441 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
7442 for predefined tokens.
7443 * src/symtab.h (bucket): Remove all the hash table related
7444 members.
7445 * src/symtab.c (symtab): Replace by...
7446 (bucket_table): this.
7447 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
7448 (buckets_new, buckets_do): New.
7449
7450 2002-04-07 Akim Demaille <akim@epita.fr>
7451
7452 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
7453 (start_symbol, max_user_token_number, semantic_parser)
7454 (error_token_number): Initialize.
7455 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
7456 Initialize.
7457 (reader): Don't.
7458 (errtoken, eoftoken, undeftoken, axiom): Extern.
7459
7460 2002-04-07 Akim Demaille <akim@epita.fr>
7461
7462 * src/gram.h (rule_s): prec and precsym are now pointers
7463 to the bucket giving the priority/associativity.
7464 Member `associativity' removed: useless.
7465 * src/reduce.c, src/conflicts.c: Adjust.
7466
7467 2002-04-07 Akim Demaille <akim@epita.fr>
7468
7469 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
7470 Properly escape the symbols' TAG when outputting them.
7471
7472 2002-04-07 Akim Demaille <akim@epita.fr>
7473
7474 * src/lalr.h (LA): Is a bitsetv, not bitset*.
7475
7476 2002-04-07 Akim Demaille <akim@epita.fr>
7477
7478 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
7479 (LArule): this, which is an array to rule_t*.
7480 * src/print.c, src/conflicts.c: Adjust.
7481
7482 2002-04-07 Akim Demaille <akim@epita.fr>
7483
7484 * src/gram.h (rule_t): Rename `number' as `user_number'.
7485 `number' is a new member.
7486 Adjust dependencies.
7487 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
7488
7489 2002-04-07 Akim Demaille <akim@epita.fr>
7490
7491 As a result of the previous patch, it is no longer needed
7492 to reorder ritem itself.
7493
7494 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
7495
7496 2002-04-07 Akim Demaille <akim@epita.fr>
7497
7498 Be sure never to walk through RITEMS, but use only data related to
7499 the rules themselves. RITEMS should be banished.
7500
7501 * src/output.c (output_token_translations): Rename as...
7502 (prepare_tokens): this.
7503 In addition to `translate', prepare the muscles `tname' and
7504 `toknum', which were handled by...
7505 (output_rule_data): this.
7506 Remove, and move the remainder of its outputs into...
7507 (prepare_rules): this new routines, which also merges content from
7508 (output_gram): this.
7509 (prepare_rules): Be sure never to walk through RITEMS.
7510 (output_stos): Rename as...
7511 (prepare_stos): this.
7512 (output): Always invoke prepare_states, after all, just don't use it
7513 in the output if you don't need it.
7514
7515 2002-04-07 Akim Demaille <akim@epita.fr>
7516
7517 * src/LR0.c (new_state): Display `nstates' as the name of the
7518 newly created state.
7519 Adjust to initialize first_state and last_state if needed.
7520 Be sure to distinguish the initial from the final state.
7521 (new_states): Create the itemset of the initial state, and use
7522 new_state.
7523 * src/closure.c (closure): Now that the initial state has its
7524 items properly set, there is no need for a special case when
7525 creating `ruleset'.
7526
7527 As a result, now the rule 0, reducing to $axiom, is visible in the
7528 outputs. Adjust the test suite.
7529
7530 * tests/conflicts.at (Solved SR Conflicts)
7531 (Unresolved SR Conflicts): Adjust.
7532 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
7533 * tests/conflicts.at (S/R in initial): New.
7534
7535 2002-04-07 Akim Demaille <akim@epita.fr>
7536
7537 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
7538 the RHS of the rules.
7539 * src/output.c (output_gram): Likewise.
7540
7541 2002-04-07 Akim Demaille <akim@epita.fr>
7542
7543 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
7544 bucket.
7545 Adjust all dependencies.
7546 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
7547 `number' of the buckets too.
7548 * src/gram.h: Include `symtab.h'.
7549 (associativity): Move to...
7550 * src/symtab.h: here.
7551 No longer include `gram.h'.
7552
7553 2002-04-07 Akim Demaille <akim@epita.fr>
7554
7555 * src/gram.h, src/gram.c (rules_rhs_length): New.
7556 (ritem_longest_rhs): Use it.
7557 * src/gram.h (rule_t): `number' is a new member.
7558 * src/reader.c (packgram): Set it.
7559 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
7560 the end of `rules', and count them out of `nrules'.
7561 (reduce_output, dump_grammar): Adjust.
7562 * src/print.c (print_grammar): It is no longer needed to check for
7563 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
7564 * tests/reduce.at (Reduced Automaton): New test.
7565
7566 2002-04-07 Akim Demaille <akim@epita.fr>
7567
7568 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
7569 lacking `+ 1' to nrules, Bison reported as useless a token if it
7570 was used solely to set the precedence of the last rule...
7571
7572 2002-04-07 Akim Demaille <akim@epita.fr>
7573
7574 * data/bison.c++, data/bison.simple: Don't output the current file
7575 name in #line, to avoid useless diffs between two identical
7576 outputs under different names.
7577
7578 2002-04-07 Akim Demaille <akim@epita.fr>
7579
7580 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
7581 Normalize loops to using `< nrules + 1', not `<= nrules'.
7582
7583 2002-04-07 Akim Demaille <akim@epita.fr>
7584
7585 * TODO: Update.
7586
7587 2002-04-07 Akim Demaille <akim@epita.fr>
7588
7589 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
7590 bucket.value as bucket.number.
7591
7592 2002-04-07 Akim Demaille <akim@epita.fr>
7593
7594 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
7595 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
7596 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
7597 RHS, instead of being an index in RITEMS.
7598
7599 2002-04-04 Paul Eggert <eggert@twinsun.com>
7600
7601 * doc/bison.texinfo: Update copyright date.
7602 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
7603 (Symbols): Warn about running Bison in one character set,
7604 but compiling and/or running in an incompatible one.
7605 Warn about character code 256, too.
7606
7607 2002-04-03 Paul Eggert <eggert@twinsun.com>
7608
7609 * src/bison.data (YYSTACK_ALLOC): Depend on whether
7610 YYERROR_VERBOSE is nonzero, not whether it is defined.
7611
7612 Merge changes from bison-1_29-branch.
7613
7614 2002-03-20 Paul Eggert <eggert@twinsun.com>
7615
7616 Merge fixes from Debian bison_1.34-1.diff.
7617
7618 * configure.in (AC_PREREQ): 2.53.
7619
7620 2002-03-20 Akim Demaille <akim@epita.fr>
7621
7622 * src/conflicts.c (log_resolution): Argument `resolution' is const.
7623
7624 2002-03-19 Paul Eggert <eggert@twinsun.com>
7625
7626 * src/bison.simple (YYCOPY): New macro.
7627 (YYSTACK_RELOCATE): Use it.
7628 Remove Type arg; no longer needed. All callers changed.
7629 (yymemcpy): Remove; no longer needed.
7630
7631 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
7632 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
7633
7634 2002-03-19 Akim Demaille <akim@epita.fr>
7635
7636 Test and fix the #line outputs.
7637
7638 * tests/atlocal.at (GCC): New.
7639 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
7640 (Prologue synch line, ,%union synch line, Postprologue synch line)
7641 (Action synch line, Epilogue synch line): New tests.
7642 * src/reader.c (parse_union_decl): Define the muscle stype_line.
7643 * data/bison.simple, data/bison.c++: Use it.
7644
7645 2002-03-19 Akim Demaille <akim@epita.fr>
7646
7647 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
7648 (Solved SR Conflicts, %expect not enough, %expect right)
7649 (%expect too much): Move to...
7650 * tests/conflicts.at: this new file.
7651
7652 2002-03-19 Akim Demaille <akim@epita.fr>
7653
7654 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
7655 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
7656 that we can move to enums for instance.
7657 * src/output.c (token_definitions_output): Output a list of
7658 `token-name, token-number' instead of the #define.
7659 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
7660
7661 2002-03-14 Akim Demaille <akim@epita.fr>
7662
7663 Use Gettext 0.11.1.
7664
7665 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
7666
7667 * data/bison.c++: Make the user able to add members to the generated
7668 parser by subclassing.
7669
7670 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
7671
7672 * src/reader.c (read_additionnal_code): `c' should be an integer, not
7673 a character.
7674 Reported by Nicolas Tisserand and Nicolas Burrus.
7675
7676 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
7677
7678 * src/reader.c: Warn about lacking semi-colons, do not complain.
7679
7680 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
7681
7682 * data/bison.c++: Remove a debug line.
7683
7684 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
7685
7686 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
7687 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
7688 provide a default implementation.
7689
7690 2002-03-04 Akim Demaille <akim@epita.fr>
7691
7692 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
7693 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
7694 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
7695 * tests/semantic.at (Parsing Guards): Similarly.
7696 * src/reader.at (readgram): Complain if the last rule is not ended
7697 with a semi-colon.
7698
7699 2002-03-04 Akim Demaille <akim@epita.fr>
7700
7701 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
7702 * src/closure.c: here.
7703 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
7704 RTC.
7705 * src/warshall.h, src/warshall.c: Remove.
7706 * tests/sets.at (Broken Closure): Adjust.
7707
7708 2002-03-04 Akim Demaille <akim@epita.fr>
7709
7710 * src/output.c (output_skeleton): tempdir is const.
7711 bytes_read is unused.
7712
7713 2002-03-04 Akim Demaille <akim@epita.fr>
7714
7715 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
7716 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
7717 Update.
7718 From Michael Hayes.
7719
7720 2002-03-04 Akim Demaille <akim@epita.fr>
7721
7722 * src/closure.c (closure): `r' is unused.
7723
7724 2002-03-04 Akim Demaille <akim@epita.fr>
7725
7726 * tests/sets.at (Broken Closure): Add the ending `;'.
7727 * src/reader.at (readgram): Complain if a rule is not ended with a
7728 semi-colon.
7729
7730 2002-03-04 Akim Demaille <akim@epita.fr>
7731
7732 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
7733 (count_sr_conflicts): Use bitset_count.
7734 * src/reduce.c (inaccessable_symbols): Ditto.
7735 (bits_size): Remove.
7736 * src/warshall.h, src/warshall.c: Convert to bitsetv.
7737
7738 2002-03-04 Akim Demaille <akim@epita.fr>
7739
7740 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
7741 * src/reduce.c: Remove the `bitset_zero's following the
7742 `bitset_create's, as now it is performed by the latter.
7743
7744 2002-03-04 Akim Demaille <akim@epita.fr>
7745
7746 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
7747 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
7748 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
7749 latest sources from Michael.
7750
7751 2002-03-04 Akim Demaille <akim@epita.fr>
7752
7753 * src/output.c (output): Don't free the grammar.
7754 * src/reader.c (grammar_free): New.
7755 * src/main.c (main): Call it and don't free symtab here.
7756
7757 2002-03-04 Akim Demaille <akim@epita.fr>
7758
7759 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
7760 before returning.
7761 Reported by Benoit Perrot.
7762
7763 2002-03-04 Akim Demaille <akim@epita.fr>
7764
7765 Use bitset operations when possible, not loops over bits.
7766
7767 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
7768 bitset_or.
7769 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
7770 * src/reduce.c (useless_nonterminals): Formatting changes.
7771 * src/warshall.c (TC): Use bitset_or.
7772
7773 2002-03-04 Akim Demaille <akim@epita.fr>
7774
7775 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
7776 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
7777 Ditto.
7778
7779 2002-03-04 Akim Demaille <akim@epita.fr>
7780
7781 * src/lalr.c (F): Now a bitset*.
7782 Adjust all dependencies.
7783
7784 2002-03-04 Akim Demaille <akim@epita.fr>
7785
7786 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
7787 Adjust all dependencies.
7788
7789 2002-03-04 Akim Demaille <akim@epita.fr>
7790
7791 * src/L0.c, src/LR0.h (nstates): Be size_t.
7792 Adjust comparisons (signed vs unsigned).
7793 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
7794 bitset*.
7795 Adjust all dependencies.
7796
7797 2002-03-04 Akim Demaille <akim@epita.fr>
7798
7799 * src/closure.c (firsts): Now, also a bitset.
7800 Adjust all dependencies.
7801 (varsetsize): Remove, now unused.
7802 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
7803
7804 2002-03-04 Akim Demaille <akim@epita.fr>
7805
7806 * src/print.c: Convert to use bitset.h, not hand coded iterations
7807 over ints.
7808
7809 2002-03-04 Akim Demaille <akim@epita.fr>
7810
7811 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
7812
7813 2002-03-04 Akim Demaille <akim@epita.fr>
7814
7815 * src/closure.c (ruleset): Be a bitset.
7816 (rulesetsize): Remove.
7817
7818 2002-03-04 Akim Demaille <akim@epita.fr>
7819
7820 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
7821 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
7822 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
7823 * src/closure.c (fderives): Be an array of bitsets.
7824
7825 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
7826
7827 * data/bison.c++: Merge the two generated headers. Insert a copyright
7828 notice in each output file.
7829
7830 2002-02-28 Akim Demaille <akim@epita.fr>
7831
7832 * data/bison.c++: Copy the prologue of bison.simple to fetch
7833 useful M4 definitions, such as b4_header_guard.
7834
7835 2002-02-25 Akim Demaille <akim@epita.fr>
7836
7837 * src/getargs.c (version): Give the name of the authors, and use a
7838 translator friendly scheme for the bgr
7839 copyright notice.
7840
7841 2002-02-25 Akim Demaille <akim@epita.fr>
7842
7843 * src/output.c (header_output): Remove, now handled completely via
7844 M4.
7845
7846 2002-02-25 Akim Demaille <akim@epita.fr>
7847
7848 * m4/m4.m4: New, from CVS Autoconf.
7849 * configure.in: Invoke it.
7850 * src/output.c (output_skeleton): Use its result instead of the
7851 hard coded name.
7852
7853 2002-02-25 Akim Demaille <akim@epita.fr>
7854
7855 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
7856 Fileutils 4.1.5.
7857 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
7858 * src/output.c (output_skeleton): Use mkstemp to create a real
7859 temporary file.
7860 Move the filling of `skeleton' and its muscle to...
7861 (prepare): here.
7862 (output): Move the definition of the prologue muscle to...
7863 (prepare): here.
7864 * src/system.h (DEFAULT_TMPDIR): New.
7865
7866 2002-02-14 Paul Eggert <eggert@twinsun.com>
7867
7868 Remove the support for C++ namespace cleanliness; it was
7869 causing more problems than it was curing, since it didn't work
7870 properly on some nonstandard C++ compilers. This can wait
7871 for a proper C++ parser.
7872
7873 * NEWS: Document this.
7874 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
7875 of C++, as it's treated like C now.
7876 * src/bison.simple (YYSTD): Remove.
7877 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
7878 Treat C++ just like Standard C instead of trying to support
7879 namespace cleanliness.
7880
7881 2002-02-14 Akim Demaille <akim@epita.fr>
7882
7883 * tests/regression.at (else): Adjust to Andreas' change.
7884
7885 2002-02-14 Akim Demaille <akim@epita.fr>
7886
7887 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
7888
7889 2002-02-13 Andreas Schwab <schwab@suse.de>
7890
7891 * src/output.c (output_rule_data): Don't output NULL, it might
7892 not be defined yet.
7893
7894 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
7895
7896 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
7897 (Copyright notice): Update.
7898
7899 2002-02-11 Akim Demaille <akim@epita.fr>
7900
7901 * tests/regression.at (%nonassoc and eof): Don't include
7902 nonportable headers.
7903
7904 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
7905
7906 * data/bison.c++: Correct error recovery. Make the user able to
7907 initialize the starting location.
7908
7909 2002-02-07 Akim Demaille <akim@epita.fr>
7910
7911 * tests/input.at: New.
7912
7913 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
7914
7915 * data/bison.c++: Replace some direct m4 expansions by constants. Be
7916 more consistent when naming methods and variables. Put preprocessor
7917 directives around tables only needed for debugging.
7918
7919 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
7920
7921 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
7922 C++ parsers.
7923 (yy::b4_name::parse): Use print_.
7924
7925 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
7926
7927 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
7928
7929 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
7930
7931 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
7932 C++ parsers.
7933 (yy::b4_name::parse): Build verbose error messages, and use error_.
7934
7935 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
7936
7937 * data/bison.c++: Fix m4 quoting in comments.
7938
7939 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
7940
7941 * data/bison.c++: Adjust the parser code. Fix some muscles that were
7942 not expanded by m4.
7943
7944 2002-02-05 Akim Demaille <akim@epita.fr>
7945
7946 * data/bison.c++: Adjust to the M4 back end.
7947 More is certainly needed.
7948
7949 2002-02-05 Akim Demaille <akim@epita.fr>
7950
7951 Give a try to M4 as a back end.
7952
7953 * lib/readpipe.c: New, from wdiff.
7954 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
7955 BISON_HAIRY.
7956 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
7957 specific values. Now it is m4 that performs the lookup.
7958 * src/parse-skel.y: Remove.
7959 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
7960 * src/output.c (actions_output, guards_output)
7961 (token_definitions_output): No longer keeps track of the output
7962 line number, hence remove the second argument.
7963 (guards_output): Check against the guard member of a rule, not the
7964 action member.
7965 Adjust callers.
7966 (output_skeleton): Don't look for the skeleton location, let m4 do
7967 that.
7968 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
7969 file will be used.
7970 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
7971 (prepare): Given that for the time being changesyntax is not
7972 usable in M4, rename the muscles using `-' to `_'.
7973 Define `defines_flag', `output_parser_name' and `output_header_name'.
7974 * src/output.h (actions_output, guards_output)
7975 (token_definitions_output): Adjust prototypes.
7976 * src/scan-skel.l: Instead of scanning the skeletons, it now
7977 processes the output of m4: `__oline__' and `#output'.
7978 * data/bison.simple: Adjust to be used by M4(sugar).
7979 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
7980 to date.
7981 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
7982 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
7983 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
7984 shamelessly stolen from CVS Autoconf.
7985
7986 2002-02-05 Akim Demaille <akim@epita.fr>
7987
7988 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
7989 * configure.in: Check for the declarations of free and malloc.
7990 * src/muscle_tab.c: Adjust.
7991
7992 2002-02-05 Akim Demaille <akim@epita.fr>
7993
7994 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
7995 which have no values.
7996
7997 2002-02-05 Akim Demaille <akim@epita.fr>
7998
7999 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
8000 * data/: here.
8001
8002 2002-01-29 Paul Eggert <eggert@twinsun.com>
8003
8004 * src/bison.simple (YYSIZE_T): Do not define merely because
8005 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
8006 On some platforms, <alloca.h> does not declare YYSTD (size_t).
8007
8008 2002-01-27 Akim Demaille <akim@epita.fr>
8009
8010 Fix `%nonassoc and eof'.
8011
8012 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
8013 which were not properly copied! Replace
8014 memcpy (res->errs, src->errs, src->nerrs);
8015 with
8016 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
8017 !!!
8018 * tests/regression.at (%nonassoc and eof): Adjust to newest
8019 Autotest: `.' is not in the PATH.
8020
8021 2002-01-27 Akim Demaille <akim@epita.fr>
8022
8023 * tests/sets.at (AT_EXTRACT_SETS): New.
8024 (Nullable): Use it.
8025 (Firsts): New.
8026
8027 2002-01-26 Akim Demaille <akim@epita.fr>
8028
8029 * tests/actions.at, tests/calc.at, tests/headers.at,
8030 * tests/torture.at: Adjust to the newest Autotest which no longer
8031 forces `.' in the PATH.
8032
8033 2002-01-25 Akim Demaille <akim@epita.fr>
8034
8035 * tests/regression.at (%nonassoc and eof): New.
8036 Suggested by Robert Anisko.
8037
8038 2002-01-24 Akim Demaille <akim@epita.fr>
8039
8040 Bison dumps core when trying to complain about broken input files.
8041 Reported by Cris van Pelt.
8042
8043 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
8044 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
8045 into...
8046 (Invalid inputs): Strengthen: exercise parse_percent_token.
8047
8048 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
8049
8050 * src/Makefile.am: Add bison.c++.
8051 * src/bison.c++: New skeleton.
8052
8053 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
8054
8055 * po/it.po: New.
8056
8057 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
8058
8059 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
8060
8061 2002-01-20 Marc Autret <marc@gnu.org>
8062
8063 * src/files.c (compute_output_file_names): Fix
8064
8065 2002-01-20 Marc Autret <marc@gnu.org>
8066
8067 * tests/output.at: New test.
8068 * src/files.c (compute_base_names): Don't map extensions when
8069 the YACC flag is set, use defaults.
8070 Reported by Evgeny Stambulchik.
8071
8072 2002-01-20 Marc Autret <marc@gnu.org>
8073
8074 * src/system.h: Need to define __attribute__ away for non-GCC
8075 compilers as well (i.e. the vendor C compiler).
8076 Suggested by Albert Chin-A-Young.
8077
8078 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
8079
8080 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
8081 canonical definition.
8082 * src/system.h: Use the canonical definition for PARAMS (avoids
8083 a conflict with the macro from lib/hash.h).
8084
8085 2002-01-11 Akim Demaille <akim@epita.fr>
8086
8087 * configure.in: Use AC_FUNC_STRNLEN.
8088 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
8089
8090 2002-01-09 Akim Demaille <akim@epita.fr>
8091
8092 * src/files.c, src/files.h (output_infix): New.
8093 (tab_extension): Remove.
8094 (compute_base_names): Compute the former, drop the latter.
8095 * src/output.c (prepare): Insert the muscles `output-infix', and
8096 `output-suffix'.
8097 * src/parse-skel.y (string, string.1): New.
8098 (section.header): Use it.
8099 (section.yacc): Remove.
8100 (prefix): Remove too.
8101 * src/scan-skel.l: Adjust.
8102 * src/bison.simple, src/bison.hairy: Adjust.
8103
8104 2002-01-09 Akim Demaille <akim@epita.fr>
8105
8106 * configure.in (WERROR_CFLAGS): Compute it.
8107 * src/Makefile.am (CFLAGS): Pass it.
8108 * tests/atlocal.in (CFLAGS): Idem.
8109 * src/files.c: Fix a few warnings.
8110 (get_extension_index): Remove, unused.
8111
8112 2002-01-08 Akim Demaille <akim@epita.fr>
8113
8114 * src/getargs.c (AS_FILE_NAME): New.
8115 (getargs): Use it to convert DOSish file names.
8116 * src/files.c (base_name): Rename as full_base_name to avoid
8117 clashes with `base_name ()'.
8118 (filename_split): New.
8119 (compute_base_names): N-th rewrite, using filename_split.
8120
8121 2002-01-08 Akim Demaille <akim@epita.fr>
8122
8123 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
8124 New, stolen from the Fileutils 4.1.
8125 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
8126 * configure.in: Check for the presence of memrchr, and of its
8127 prototype.
8128
8129 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
8130
8131 * lib/hash.h (__P): Added definition for this macro.
8132 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
8133 BUILT_SOURCES, to ensure they are generated first.
8134 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
8135 %error-verbose to allow bootstrapping with bison 1.30x.
8136
8137 2002-01-06 Akim Demaille <akim@epita.fr>
8138
8139 * src/reader.c (parse_braces): Don't fetch the next char, the
8140 convention is to fetch on entry.
8141 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
8142 'switch' without a following semicolon.
8143 * tests/regression.at (braces parsing): New.
8144
8145 2002-01-06 Akim Demaille <akim@epita.fr>
8146
8147 Bison is dead wrong in its RR conflict reports.
8148
8149 * tests/torture.at (GNU Cim Grammar): New.
8150 * src/conflicts.c (count_rr_conflicts): Fix.
8151
8152 2002-01-06 Akim Demaille <akim@epita.fr>
8153
8154 Creating package.m4 from configure.ac causes too many problems.
8155
8156 * tests/Makefile.am (package.m4): Create it by hand,
8157 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
8158
8159 2002-01-06 Akim Demaille <akim@epita.fr>
8160
8161 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
8162 skeleton.h.
8163
8164 2002-01-04 Paul Eggert <eggert@twinsun.com>
8165
8166 * doc/bison.texinfo (Debugging):
8167 Remove YYSTDERR; it's no longer defined or used.
8168 Also, s/cstdio.h/cstdio/.
8169
8170 2002-01-03 Akim Demaille <akim@epita.fr>
8171
8172 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
8173
8174 2002-01-03 Akim Demaille <akim@epita.fr>
8175
8176 * src/parse-skel.y (process_skeleton): Don't bind the parser's
8177 tracing code to --trace, wait for a better --trace option, with
8178 args.
8179
8180 2002-01-03 Akim Demaille <akim@epita.fr>
8181
8182 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
8183 The ISO C++ standard is extremely clear about it: stderr is
8184 considered a macro, not a regular symbol (see table 94 `Header
8185 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
8186 Therefore std:: does not apply to it. It still does with fprintf.
8187 Also, s/cstdio.h/cstdio/.
8188
8189 2002-01-03 Akim Demaille <akim@epita.fr>
8190
8191 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
8192 for non system headers.
8193
8194 2002-01-02 Akim Demaille <akim@epita.fr>
8195
8196 Equip the skeleton chain with location tracking, runtime trace,
8197 pure parser and scanner.
8198
8199 * src/parse-skel.y: Request a pure parser, locations, and prefix
8200 renaming.
8201 (%union): Having several members with the same type does not help
8202 type mismatches, simplify.
8203 (YYPRINT, yyprint): New.
8204 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
8205 (skel_error): this.
8206 Handle locations.
8207 * src/scan-skel.l: Adjust to these changes.
8208 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
8209 (LOCATION_PRINT, skel_control_t): New.
8210
8211 2001-12-30 Akim Demaille <akim@epita.fr>
8212
8213 * src/parse-skel.y: Get rid of the shift/reduce conflict:
8214 replace `gb' with BLANKS.
8215 * src/scan-skel.l: Adjust.
8216
8217 2001-12-30 Akim Demaille <akim@epita.fr>
8218
8219 * src/system.h: We don't need nor want bcopy.
8220 Throw away MS-DOS crap: we don't need getpid.
8221 * configure.in: We don't need strndup. It was even causing
8222 problems: because Flex includes the headers *before* us,
8223 _GNU_SOURCE is not defined by config.h, and therefore strndup was
8224 not visible.
8225 * lib/xstrndup.c: New.
8226 * src/scan-skel.l: Use it.
8227 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
8228 * src/parse-skel.y: Use %directives instead of #defines.
8229
8230 2001-12-30 Akim Demaille <akim@epita.fr>
8231
8232 * src/skeleton.h: New.
8233 * src/output.c (output_parser, output_master_parser): Remove, dead
8234 code.
8235 * src/output.h (get_lines_number, actions_output, guards_output)
8236 (token_definitions_output): Prototype them.
8237 * src/parse-skel.y: Add the license notice.
8238 Include output.h and skeleton.h.
8239 (process_skeleton): Returns void, and takes a single parameter.
8240 * src/scan-skel.l: Add the license notice.
8241 Include skeleton.h.
8242 Don't use %option yylineno: it seems that then Flex imagines
8243 REJECT has been used, and therefore it won't reallocate its
8244 buffers (which makes no other sense to me than a bug). It results
8245 in warnings for `unused: yy_flex_realloc'.
8246
8247 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
8248
8249 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
8250 (MUSCLE_INSERT_PREFIX): ...to there.
8251 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
8252 (MUSCLE_INSERT_PREFIX): Move from here...
8253
8254 * src/bison.hairy: Add a section directive. Put braces around muscle
8255 names. This parser skeleton is still broken, but Bison should not
8256 choke on a bad muscle 'syntax'.
8257 * src/bison.simple: Add a section directive. Put braces around muscle
8258 names.
8259
8260 * src/files.h (strsuffix, stringappend): Add declarations.
8261 (tab_extension): Add declaration.
8262 (short_base_name): Add declaration.
8263
8264 * src/files.c (strsuffix, stringappend): No longer static. These
8265 functions are used in the skeleton parser.
8266 (tab_extension): New.
8267 (compute_base_names): Use the computations done in this function
8268 to guess if the generated parsers should have '.tab' in their
8269 names.
8270 (short_base_name): No longer static.
8271
8272 * src/output.c (output_skeleton): New.
8273 (output): Disable call to output_master_parser, and give a try to
8274 a new skeleton handling system.
8275 (guards_output, actions_output): No longer static.
8276 (token_definitions_output, get_lines_number): No longer static.
8277
8278 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
8279
8280 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
8281 parse-skel.y.
8282
8283 * src/parse-skel.y: New file.
8284 * src/scan-skel.l: New file.
8285
8286 2001-12-29 Akim Demaille <akim@epita.fr>
8287
8288 %name-prefix is broken.
8289
8290 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
8291 Adjust all dependencies.
8292 * tests/headers.at (export YYLTYPE): Strengthen this test: use
8293 %name-prefix.
8294
8295 Renaming yylval but not yylloc is not consistent. Now we do.
8296
8297 * src/bison.simple: Prefix yylloc if used.
8298 * doc/bison.texinfo (Decl Summary): Document that.
8299
8300 2001-12-29 Akim Demaille <akim@epita.fr>
8301
8302 * doc/bison.texinfo: Promote `%long-directive' over
8303 `%long_directive'.
8304 Remove all references to fixed-output-files, yacc is enough.
8305
8306 2001-12-29 Akim Demaille <akim@epita.fr>
8307
8308 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
8309 user prologue. These are defaults.
8310 * tests/actions.at (Mid-rule actions): Make sure the user can
8311 define YYDEBUG and YYERROR_VERBOSE.
8312
8313 2001-12-29 Akim Demaille <akim@epita.fr>
8314
8315 * src/output.c (header_output): Don't forget to export YYLTYPE and
8316 yylloc.
8317 * tests/headers.at (export YYLTYPE): New, make sure it does.
8318 * tests/regression.at (%union and --defines, Invalid CPP headers):
8319 Move to...
8320 * tests/headers.at: here.
8321
8322 2001-12-29 Akim Demaille <akim@epita.fr>
8323
8324 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
8325
8326 2001-12-29 Akim Demaille <akim@epita.fr>
8327
8328 * tests/actions.at (Mid-rule actions): Output on a single line
8329 instead of several.
8330
8331 2001-12-29 Akim Demaille <akim@epita.fr>
8332
8333 * doc/bison.texinfo: Formatting changes.
8334
8335 2001-12-29 Akim Demaille <akim@epita.fr>
8336
8337 Don't store the token defs in a muscle, just be ready to output it
8338 on command. Now possible via `symbols'. Fixes a memory leak.
8339
8340 * src/output.c (token_definitions_output): New.
8341 (output_parser, header_output): Use it.
8342 * src/reader.c (symbols_save): Remove.
8343
8344 2001-12-29 Akim Demaille <akim@epita.fr>
8345
8346 * src/bison.simple: Do not provide a default for YYSTYPE and
8347 YYLTYPE before the user's prologue. Otherwise it's hardly... a
8348 default.
8349
8350 2001-12-29 Akim Demaille <akim@epita.fr>
8351
8352 Mid-rule actions are simply... ignored!
8353
8354 * src/reader.c (readgram): Be sure to attach mid-rule actions to
8355 the empty-rule associated to the dummy symbol, not to the host
8356 rule.
8357 * tests/actions.at (Mid-rule actions): New.
8358
8359 2001-12-29 Akim Demaille <akim@epita.fr>
8360
8361 Memory leak.
8362
8363 * src/reader.c (reader): Free grammar.
8364
8365 2001-12-29 Akim Demaille <akim@epita.fr>
8366
8367 Memory leak.
8368
8369 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
8370 since it allocates it for each state, although only one is needed.
8371 (allocate_storage): Do it here.
8372
8373 2001-12-29 Akim Demaille <akim@epita.fr>
8374
8375 * src/options.h, src/options.c (create_long_option_table): Rename
8376 as...
8377 (long_option_table_new): this, with a clearer prototype.
8378 (percent_table): Remove, unused,
8379 * src/getargs.c (getargs): Adjust.
8380
8381 2001-12-29 Akim Demaille <akim@epita.fr>
8382
8383 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
8384 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
8385 as states.
8386
8387 2001-12-29 Akim Demaille <akim@epita.fr>
8388
8389 * src/lalr.c (build_relations): Rename `states' as `states1'.
8390 Sorry, I don't understand exactly what it is, no better name...
8391
8392 2001-12-29 Akim Demaille <akim@epita.fr>
8393
8394 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
8395 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
8396 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
8397 as rules.
8398
8399 2001-12-29 Akim Demaille <akim@epita.fr>
8400
8401 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
8402 ago.
8403
8404 2001-12-29 Akim Demaille <akim@epita.fr>
8405
8406 * src/reader.c, src/reader.h (user_toknums): Remove.
8407 Adjust all users to use symbols[i]->user_token_number.
8408
8409 2001-12-29 Akim Demaille <akim@epita.fr>
8410
8411 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
8412 Adjust all users to use symbols[i]->prec or ->assoc.
8413
8414 2001-12-29 Akim Demaille <akim@epita.fr>
8415
8416 * src/reader.c, src/reader.h (tags): Remove.
8417 Adjust all users to use symbols[i]->tag.
8418
8419 2001-12-29 Akim Demaille <akim@epita.fr>
8420
8421 * src/gram.h, src/gram.c (symbols): New, similar to state_table
8422 and rule_table.
8423 * src/reader.c (packsymbols): Fill this table.
8424 Drop sprec.
8425 * src/conflicts.c (resolve_sr_conflict): Adjust.
8426 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
8427 single table.
8428 Use symbols[i]->tag instead of tags[i].
8429
8430 2001-12-29 Akim Demaille <akim@epita.fr>
8431
8432 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
8433 In addition, put a comment in there, to replace...
8434 * tests/regression.at (%union and C comments): Remove.
8435
8436 2001-12-29 Akim Demaille <akim@epita.fr>
8437
8438 * tests/regression.at (Web2c Actions): Blindly move the actual
8439 output as expected output. The contents *seem* right to me, but I
8440 can't pretend reading perfectly parser tables... Nonetheless, all
8441 the other tests pass correctly, the table look OK, even though the
8442 presence of `$axiom' is to be noted: AFAICS it is useless (but
8443 harmless).
8444
8445 2001-12-29 Akim Demaille <akim@epita.fr>
8446
8447 * src/reader.c (readgram): Don't add the rule 0 if there were no
8448 rules read. In other words, add it _after_ having performed
8449 grammar sanity checks.
8450 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
8451
8452 2001-12-29 Akim Demaille <akim@epita.fr>
8453
8454 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
8455 visible, and some states have now a different number.
8456
8457 2001-12-29 Akim Demaille <akim@epita.fr>
8458
8459 * src/reader.c (readgram): Bind the initial rule's lineno to that
8460 of the first rule.
8461 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
8462 (Solved SR Conflicts): Adjust rule 0's line number.
8463
8464 2001-12-29 Akim Demaille <akim@epita.fr>
8465
8466 Fix the `GAWK Grammar' failure.
8467
8468 * src/LR0.c (final_state): Initialize to -1 so that we do compute
8469 the reductions of the first state which was mistakenly confused
8470 with the final state because precisely final_state was initialized
8471 to 0.
8472 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
8473 now noticed by Bison.
8474 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
8475 have a reduction on $default.
8476
8477 2001-12-29 Akim Demaille <akim@epita.fr>
8478
8479 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
8480 rule line numbers.
8481 * src/closure.c (print_closure): Likewise.
8482 * src/derives.c (print_derives): Likewise.
8483 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
8484 now.
8485
8486 2001-12-29 Akim Demaille <akim@epita.fr>
8487
8488 * src/lalr.c (lookaheads_print): New.
8489 (lalr): Call it when --trace-flag.
8490 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
8491 are dumped.
8492
8493 2001-12-29 Akim Demaille <akim@epita.fr>
8494
8495 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
8496 when walking through ritem, even via rule->rhs.
8497 * src/reduce.c (dump_grammar, useful_production, reduce_output)
8498 (useful_production, useless_nonterminals): Likewise.
8499 (reduce_grammar_tables): Likewise, plus update nritems.
8500 * src/nullable.c (set_nullable): Likewise.
8501 * src/lalr.c (build_relations): Likewise.
8502 * tests/sets.at (Nullable): Adjust.
8503 Fortunately, now, the $axiom is no longer nullable.
8504
8505 2001-12-29 Akim Demaille <akim@epita.fr>
8506
8507 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
8508 the 0-sentinel.
8509 * src/gram.c (ritem_longest_rhs): Likewise.
8510 * src/reduce.c (nonterminals_reduce): Likewise.
8511 * src/print_graph.c (print_graph): Likewise.
8512 * src/output.c (output_rule_data): Likewise.
8513 * src/nullable.c (set_nullable): Likewise.
8514
8515 2001-12-29 Akim Demaille <akim@epita.fr>
8516
8517 * src/output.c: Comment changes.
8518
8519 2001-12-27 Paul Eggert <eggert@twinsun.com>
8520
8521 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
8522 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
8523 Sparc, as they were causing more porting problems than the
8524 (minor) performance improvement was worth.
8525
8526 Also, catch up with 1.31's YYSTD.
8527
8528 2001-12-27 Akim Demaille <akim@epita.fr>
8529
8530 * src/output.c (output_gram): Rely on nritems, not the
8531 0-sentinel. See below.
8532 Use -1 as separator, not 0.
8533 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
8534 Rely on -1 as separator in yyrhs, instead of 0.
8535 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
8536 twice `Now at end of input', therefore there are two lines less to
8537 expect.
8538
8539 2001-12-27 Akim Demaille <akim@epita.fr>
8540
8541 * tests/regression.at (Unresolved SR Conflicts):
8542 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
8543 below.
8544
8545 2001-12-27 Akim Demaille <akim@epita.fr>
8546
8547 * src/LR0.c (new_state): Recognize the final state by the fact it
8548 is reached by eoftoken.
8549 (insert_start_shifting_state, insert_eof_shifting_state)
8550 (insert_accepting_state, augment_automaton): Remove, since now
8551 these states are automatically computed from the initial state.
8552 (generate_states): Adjust.
8553 * src/print.c: When reporting a rule number to the user, substract
8554 1, so that the axiom rule is rule 0, and the first user rule is 1.
8555 * src/reduce.c: Likewise.
8556 * src/print_graph.c (print_core): For the time being, just as for
8557 the report, depend upon --trace-flags to dump the full set of
8558 items.
8559 * src/reader.c (readgram): Once the grammar read, insert the rule
8560 0: `$axiom: START-SYMBOL $'.
8561 * tests/set.at: Adjust: rule 0 is now displayed, and since the
8562 number of the states has changed (the final state is no longer
8563 necessarily the last), catch up.
8564
8565 2001-12-27 Akim Demaille <akim@epita.fr>
8566
8567 Try to make the use of the eoftoken valid. Given that its value
8568 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
8569 is used instead of > 0 where appropriate, (ii), depend upon nritems
8570 instead of the 0-sentinel.
8571
8572 * src/gram.h, src/gram.c (nritems): New.
8573 Expected to be duplication of nitems, but for the time being...
8574 * src/reader.c (packgram): Assert nritems and nitems are equal.
8575 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
8576 * src/closure.c (print_closure, print_fderives): Likewise.
8577 * src/gram.c (ritem_print): Likewise.
8578 * src/print.c (print_core, print_grammar): Likewise.
8579 * src/print_graph.c: Likewise.
8580
8581 2001-12-27 Akim Demaille <akim@epita.fr>
8582
8583 * src/main.c (main): If there are complains after grammar
8584 reductions, then output the report anyway if requested, then die.
8585 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
8586 * src/reader.c (eoftoken): New.
8587 (parse_token_decl): If the token being defined has value `0', it
8588 is the eoftoken.
8589 (packsymbols): No longer hack `tags' to insert `$' by hand.
8590 Be sure to preserve the value of the eoftoken.
8591 (reader): Make sure eoftoken is defined.
8592 Initialize nsyms to 0: now eoftoken is created just like the others.
8593 * src/print.c (print_grammar): Don't special case the eof token.
8594 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
8595 lie anyway, albeit pleasant.
8596 * tests/calc.at: Exercise error messages with eoftoken.
8597 Change the grammar so that empty input is invalid.
8598 Adjust expectations.
8599 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
8600
8601 2001-12-27 Akim Demaille <akim@epita.fr>
8602
8603 * configure.in: Check the protos of strchr ans strspn.
8604 Replace strchr if needed.
8605 * src/system.h: Provide the protos of strchr, strspn and memchr if
8606 missing.
8607 * lib/strchr.c: New.
8608 * src/reader.c (symbols_save): Use strchr.
8609
8610 2001-12-27 Akim Demaille <akim@epita.fr>
8611
8612 * src/print.c, src/print_graph.c (escape): New.
8613 Use it to quote the TAGS outputs.
8614 * src/print_graph.c (print_state): Now errors are in red, and
8615 reductions in green.
8616 Prefer high to wide: output the state number on a line of its own.
8617
8618 2001-12-27 Akim Demaille <akim@epita.fr>
8619
8620 * src/state.h, src/state.c (reductions_new): New.
8621 * src/LR0.c (set_state_table): Let all the states have a
8622 `reductions', even if reduced to 0.
8623 (save_reductions): Adjust.
8624 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
8625 * src/print.c (print_reductions, print_actions): Adjust.
8626 * src/output.c (action_row): Adjust.
8627
8628 2001-12-27 Akim Demaille <akim@epita.fr>
8629
8630 * src/state.h, src/state.c (errs_new, errs_dup): New.
8631 * src/LR0.c (set_state_table): Let all the states have an errs,
8632 even if reduced to 0.
8633 * src/print.c (print_errs, print_reductions): Adjust.
8634 * src/output.c (output_actions, action_row): Adjust.
8635 * src/conflicts.c (resolve_sr_conflict): Adjust.
8636
8637 2001-12-27 Akim Demaille <akim@epita.fr>
8638
8639 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
8640
8641 2001-12-27 Akim Demaille <akim@epita.fr>
8642
8643 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
8644 * src/print.c: here.
8645 (lookaheadset, shiftset): New, used as additional storage by
8646 print_reductions.
8647 (print_results): Adjust.
8648 (print_shifts, print_gotos, print_errs): New, extracted from...
8649 (print_actions): here.
8650 * src/print_graph.c (print_actions): Remove dead code.
8651
8652 2001-12-27 Akim Demaille <akim@epita.fr>
8653
8654 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
8655 `$n' and `@n'.
8656
8657 2001-12-27 Akim Demaille <akim@epita.fr>
8658
8659 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
8660 (build_relations): Adjust.
8661
8662 2001-12-27 Akim Demaille <akim@epita.fr>
8663
8664 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
8665 duplication.
8666
8667 2001-12-27 Akim Demaille <akim@epita.fr>
8668
8669 * src/reader.c (packgram): Catch nitems overflows.
8670
8671 2001-12-27 Akim Demaille <akim@epita.fr>
8672
8673 * src/files.c, src/files.h (guard_obstack): Remove.
8674 * src/output.c (output): Adjust.
8675 * src/reader.c (parse_braces): New, factoring...
8676 (copy_action, copy_guard): these two which are renamed as...
8677 (parse_action, parse_guard): these.
8678 As a voluntary consequence, using braces around guards is now
8679 mandatory.
8680
8681 2001-12-27 Akim Demaille <akim@epita.fr>
8682
8683 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
8684 * src/reader.c (symbol_list): `guard' and `guard_line' are new
8685 members.
8686 (symbol_list_new): Adjust.
8687 (copy_action): action_line is the first line, not the last.
8688 (copy_guard): Just as for actions, store the `action' only, not
8689 the switch/case/break flesh.
8690 Don't parse the user action that might follow the guard, let...
8691 (readgram): do it, i.e., now, there can be an action after a
8692 guard.
8693 In other words the guard is just explicitly optional.
8694 (packgram): Adjust.
8695 * src/output.c (guards_output): New.
8696 (output_parser): Call it when needed.
8697 (output): Also free the guard and attrs obstacks.
8698 * src/files.c, src/files.h (obstack_save): Remove.
8699 (output_files): Remove.
8700 As a result, if one needs the former `.act' file, using an
8701 appropriate skeleton which requires actions and guards is now
8702 required.
8703 * src/main.c (main): Adjust.
8704 * tests/semantic.at: New.
8705 * tests/regression.at: Use `input.y' as input file name.
8706 Avoid 8+3 problems by requiring input.c when the test needs the
8707 parser.
8708
8709 2001-12-27 Akim Demaille <akim@epita.fr>
8710
8711 * src/reader.c (symbol_list_new): Be sure to initialize all the
8712 fields.
8713
8714 2001-12-27 Akim Demaille <akim@epita.fr>
8715
8716 All the hacks using a final pseudo state are now useless.
8717
8718 * src/LR0.c (set_state_table): state_table holds exactly nstates.
8719 * src/lalr.c (nLA): New.
8720 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
8721 instead of lookaheadsp from the pseudo state (nstate + 1).
8722
8723 2001-12-27 Akim Demaille <akim@epita.fr>
8724
8725 * src/output.c (action_row, token_actions): Use a state_t instead
8726 of a integer, and nlookaheads instead of the following state's
8727 lookaheadsp.
8728
8729 2001-12-27 Akim Demaille <akim@epita.fr>
8730
8731 * src/conflicts.c (log_resolution, flush_shift)
8732 (resolve_sr_conflict, set_conflicts, solve_conflicts)
8733 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
8734 (conflicts_print, print_reductions): Use a state_t instead of an
8735 integer when referring to a state.
8736 As much as possible, depend upon nlookaheads, instead of the
8737 `lookaheadsp' member of the following state (since lookaheads of
8738 successive states are successive, the difference between state n + 1
8739 and n served as the number of lookaheads for state n).
8740 * src/lalr.c (add_lookback_edge): Likewise.
8741 * src/print.c (print_core, print_actions, print_state)
8742 (print_results): Likewise.
8743 * src/print_graph.c (print_core, print_actions, print_state)
8744 (print_graph): Likewise.
8745 * src/conflicts.h: Adjust.
8746
8747 2001-12-27 Akim Demaille <akim@epita.fr>
8748
8749 * src/bison.hairy: Formatting/comment changes.
8750 ANSIfy.
8751 Remove `register' indications.
8752 Add plenty of `static'.
8753
8754 2001-12-27 Akim Demaille <akim@epita.fr>
8755
8756 * src/output.c (prepare): Drop the muscle `ntbase' which
8757 duplicates ntokens.
8758 * src/bison.simple: Formatting/comment changes.
8759 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
8760 is an undocumented synonym.
8761
8762 2001-12-22 Akim Demaille <akim@epita.fr>
8763
8764 * src/output.c (output_table_data): Change the prototype to use
8765 `int' for array ranges: some invocations do pass an int, not a
8766 short.
8767 Reported by Wayne Green.
8768
8769 2001-12-22 Akim Demaille <akim@epita.fr>
8770
8771 Some actions of web2c.y are improperly triggered.
8772 Reported by Mike Castle.
8773
8774 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
8775 * tests/regression.at (Web2c): Rename as...
8776 (Web2c Report): this.
8777 (Web2c Actions): New.
8778
8779 2001-12-22 Akim Demaille <akim@epita.fr>
8780
8781 Reductions in web2c.y are improperly reported.
8782 Reported by Mike Castle.
8783
8784 * src/conflicts.c (print_reductions): Fix.
8785 * tests/regression.at (Web2c): New.
8786
8787 2001-12-18 Akim Demaille <akim@epita.fr>
8788
8789 Some host fail on `assert (!"foo")', which expands to
8790 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
8791 Reported by Nelson Beebee.
8792
8793 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
8794 `#define it_succeeded 0' and `assert (it_succeeded)'.
8795
8796 2001-12-17 Marc Autret <autret_m@epita.fr>
8797
8798 * src/bison.simple: Don't hard code the skeleton line and filename.
8799 * src/output.c (output_parser): Rename 'line' as 'output_line'.
8800 New line counter 'skeleton_line' (skeleton-line muscle).
8801
8802 2001-12-17 Paul Eggert <eggert@twinsun.com>
8803
8804 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
8805 YYDEBUG must be defined to a nonzero value.
8806
8807 * src/bison.simple (yytname): Do not assume that the user defines
8808 YYDEBUG to a properly parenthesized expression.
8809
8810 2001-12-17 Akim Demaille <akim@epita.fr>
8811
8812 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
8813 nlookaheads is a new member.
8814 Adjust all users.
8815 * src/lalr.h (nlookaheads): Remove this orphan declaration.
8816 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
8817 state.
8818
8819 2001-12-17 Akim Demaille <akim@epita.fr>
8820
8821 * src/files.h, src/files.c (open_files, close_files): Remove.
8822 * src/main.c (main): Don't open/close files, nor invoke lex_free,
8823 let...
8824 * src/reader.c (reader): Do it.
8825
8826 2001-12-17 Akim Demaille <akim@epita.fr>
8827
8828 * src/conflicts.c (print_reductions): Formatting changes.
8829
8830 2001-12-17 Akim Demaille <akim@epita.fr>
8831
8832 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
8833 (flush_reduce): New.
8834 (resolve_sr_conflict): Adjust.
8835
8836 2001-12-17 Akim Demaille <akim@epita.fr>
8837
8838 * src/output.c (output_obstack): Be static and rename as...
8839 (format_obstack): this, to avoid any confusion with files.c's
8840 output_obstack.
8841 * src/reader.h (muscle_obstack): Move to...
8842 * src/output.h: here, since it's defined in output.c.
8843
8844 2001-12-17 Akim Demaille <akim@epita.fr>
8845
8846 * src/output.c (action_row, save_column, default_goto)
8847 (sort_actions, matching_state, pack_vector): Better variable
8848 locality.
8849
8850 2001-12-17 Akim Demaille <akim@epita.fr>
8851
8852 * src/output.c: Various formatting changes.
8853
8854 2001-12-17 Akim Demaille <akim@epita.fr>
8855
8856 * src/files.c (output_files): Free the output_obstack.
8857 * src/main.c (main): Call print and print_graph conditionally.
8858 * src/print.c (print): Work unconditionally.
8859 * src/print_graph.c (print_graph): Work unconditionally.
8860 * src/conflicts.c (log_resolution): Output only if verbose_flag.
8861
8862 2001-12-16 Marc Autret <autret_m@epita.fr>
8863
8864 * src/output.c (actions_output): Fix. When we use %no-lines,
8865 there is one less line per action.
8866
8867 2001-12-16 Marc Autret <autret_m@epita.fr>
8868
8869 * src/bison.simple: Remove a useless #line directive.
8870 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
8871 * src/output.c (get_lines_number): New.
8872 (output_parser): Adjust, now takes care about the lines of a
8873 output muscles.
8874 Fix line numbering.
8875 (actions_output): Computes the number of lines taken by actions.
8876 (output_master_parser): Insert new skeleton which is the name of
8877 the output parser file name.
8878
8879 2001-12-15 Marc Autret <autret_m@epita.fr>
8880
8881 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
8882
8883 2001-12-15 Marc Autret <autret_m@epita.fr>
8884
8885 * src/output.c (output_gram): Keep track of the hairy one.
8886
8887 2001-12-15 Akim Demaille <akim@epita.fr>
8888
8889 Make `make distcheck' work.
8890
8891 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
8892 system.h which uses libgettext.h.
8893
8894 2001-12-15 Akim Demaille <akim@epita.fr>
8895
8896 * src/nullable.c (set_nullable): Useless rules must be skipped,
8897 otherwise, since we range over their symbols, we might look at a
8898 nonterminal which no longer ``exists'', i.e., it is not counted in
8899 `nvars', hence we overflow our arrays.
8900
8901 2001-12-15 Akim Demaille <akim@epita.fr>
8902
8903 The header can also be produced directly, without any obstack!
8904 Yahoo!
8905
8906 * src/files.c, src/files.h (defines_obstack): Remove.
8907 (compute_header_macro): Global.
8908 (defines_obstack_save): Remove.
8909 * src/reader.c (parse_union_decl): No longer output to
8910 defines_obstack: its content can be found in the `stype' muscle
8911 anyway.
8912 (output_token_translations): Merge into...
8913 (symbols_output): this.
8914 Rename as...
8915 (symbols_save): this.
8916 (reader): Adjust.
8917 * src/output.c (header_output): New.
8918 (output): Call it.
8919
8920 2001-12-15 Akim Demaille <akim@epita.fr>
8921
8922 * src/reader.c (parse_union_decl): Instead of handling two obstack
8923 simultaneously, use one to define the `stype' muscle, and use the
8924 value of the latter to fill defines_obstack.
8925 (copy_comment): Remove.
8926 (copy_comment2): Work for a single obstack.
8927 Rename as...
8928 (copy_comment): this.
8929
8930 2001-12-15 Akim Demaille <akim@epita.fr>
8931
8932 * src/lex.c, src/lex.h (xgetc): No longer static.
8933 * src/reader.c (parse_union_decl): Revamp.
8934
8935 2001-12-15 Akim Demaille <akim@epita.fr>
8936
8937 Still making progress in separating Bison into (i) input, (ii)
8938 process, (iii) output: now we can directly output the parser file
8939 without using table_obstack at all.
8940
8941 * src/files.c, src/files.h (table_obstack): Bye bye.
8942 (parser_file_name): New.
8943 * src/files.c (compute_output_file_names): Compute it.
8944 * src/output.c (actions_output, output_parser)
8945 (output_master_parser): To a file instead of an obstack.
8946
8947 2001-12-15 Akim Demaille <akim@epita.fr>
8948
8949 Attach actions to rules, instead of pre-outputting them to
8950 actions_obstack.
8951
8952 * src/gram.h (rule_t): action and action_line are new members.
8953 * src/reader.c (symbol_list): Likewise.
8954 (copy_action): Save the actions within the rule.
8955 (packgram): Save them in rule_table.
8956 * src/output.c (actions_output): New.
8957 (output_parser): Use it on `%%actions'.
8958 (output_rule_data): Don't free rule_table.
8959 (output): Do it.
8960 (prepare): Don't save the `action' muscle.
8961 * src/bison.simple: s/%%action/%%actions/.
8962
8963 2001-12-15 Akim Demaille <akim@epita.fr>
8964
8965 * src/reader.c (copy_action): When --yacc, don't append a `;'
8966 to the user action: let it fail if lacking.
8967 Suggested by Arnold Robbins and Tom Tromey.
8968
8969 2001-12-14 Akim Demaille <akim@epita.fr>
8970
8971 * src/lex.c (literalchar): Simply return the char you decoded, non
8972 longer mess around with obstacks and int pointers.
8973 Adjust all callers.
8974
8975 2001-12-14 Akim Demaille <akim@epita.fr>
8976
8977 * src/lex.c (literalchar): Don't escape the special characters,
8978 just decode them, and keep them as char (before, eol was output as
8979 the 2 char string `\n' etc.).
8980 * src/output.c (output_rule_data): Use quotearg to output the
8981 token strings.
8982
8983 2001-12-13 Paul Eggert <eggert@twinsun.com>
8984
8985 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
8986 Do not infringe on the global user namespace when using C++.
8987 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
8988 All uses of `fprintf' and `stderr' changed.
8989
8990 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
8991
8992 2001-12-13 Akim Demaille <akim@epita.fr>
8993
8994 The computation of nullable is broken: it doesn't handle empty
8995 RHS's properly.
8996
8997 * tests/torture.at (GNU AWK Grammar): New.
8998 * tests/sets.at (Nullable): New.
8999 * src/nullable.c (set_nullable): Instead of blindly looping over
9000 `ritems', loop over the rules, and then over their rhs's.
9001
9002 Work around Autotest bugs.
9003
9004 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
9005 frame, because Autotest understand lines starting with a `+' as
9006 traces from the shell. Then, they are not processed properly.
9007 Admittedly an Autotest bug, but we don't have time to wait for
9008 Autotest to catch up.
9009 * tests/regression.at (Broken Closure): Adjust to the new table
9010 frames.
9011 Move to...
9012 * tests/sets.at: here.
9013
9014 2001-12-13 Akim Demaille <akim@epita.fr>
9015
9016 * src/closure.c (closure): Use nrules instead of playing tricks
9017 with BITS_PER_WORD.
9018
9019 2001-12-13 Akim Demaille <akim@epita.fr>
9020
9021 * src/print.c (print_actions): Output the handling of `$' as the
9022 traces do: shifting the token EOF. Before EOF was treated as a
9023 nonterminal.
9024 * tests/regression.at: Adjust some tests.
9025 * src/print_graph.c (print_core): Complete the set of items via
9026 closure. The next-to-final and final states are still unsatisfying,
9027 but that's to be addressed elsewhere.
9028 No longer output the rule numbers, but do output the state number.
9029 A single loop for the shifts + gotos is enough, but picked a
9030 distinct color for each.
9031 (print_graph): Initialize and finalize closure.
9032
9033 2001-12-13 Akim Demaille <akim@epita.fr>
9034
9035 * src/reader.c (readgram): Remove dead code, an strip useless
9036 braces.
9037 (get_type): Remove, unused.
9038
9039 2001-12-12 Akim Demaille <akim@epita.fr>
9040
9041 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
9042 on that of lib/error.c.
9043
9044 2001-12-12 Akim Demaille <akim@epita.fr>
9045
9046 Some hosts don't like `/' in includes.
9047
9048 * src/system.h: Include libgettext.h without qualifying the path.
9049 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
9050 $(top_srcdir).
9051
9052 2001-12-11 Marc Autret <autret_m@epita.fr>
9053
9054 * src/output.c (output_parser): Remove useless muscle.
9055
9056 2001-12-11 Marc Autret <autret_m@epita.fr>
9057
9058 * src/bison.simple: Remove #line just before %%epilogue. It
9059 is now handled in ...
9060 * src/reader.c (read_additionnal_code): Add the output of a
9061 #line for the epilogue.
9062
9063 2001-12-10 Marc Autret <autret_m@epita.fr>
9064
9065 * src/reader.c (copy_definition): Re-use CPP-outed code which
9066 replace precedent remove.
9067 * src/bison.simple: Remove #line before %%prologue because
9068 %%input-line is wrong at this time.
9069
9070 2001-12-10 Marc Autret <autret_m@epita.fr>
9071
9072 * src/reader.c (symbols_output): Clean up.
9073 * src/output.c (output_gram, output): Clean up.
9074
9075 2001-12-10 Akim Demaille <akim@epita.fr>
9076
9077 * src/lalr.c (initialize_lookaheads): New. Extracted from...
9078 * src/LR0.c (set_state_table): here.
9079 * src/lalr.c (lalr): Call it.
9080
9081 2001-12-10 Akim Demaille <akim@epita.fr>
9082
9083 * src/state.h (shifts): Remove the `number' member: shifts are
9084 attached to state, hence no longer need to be labelled with a
9085 state number.
9086
9087 2001-12-10 Akim Demaille <akim@epita.fr>
9088
9089 Now that states have a complete set of members, the linked list of
9090 shifts is useless: just fill directly the state's shifts member.
9091
9092 * src/state.h (shifts): Remove the `next' member.
9093 * src/LR0.c (first_state, last_state): Remove.
9094 Adjust the callers.
9095 (augment_automaton): Don't look for the shifts that must be added
9096 a shift on EOF: it is those of the state we looked for! But now,
9097 since shifts are attached, it is no longer needed to looking
9098 merely by its id: its number.
9099
9100 2001-12-10 Akim Demaille <akim@epita.fr>
9101
9102 * src/LR0.c (augment_automaton): Better variable locality.
9103 Remove an impossible branch: if there is a state corresponding to
9104 the start symbol being shifted, then there is shift for the start
9105 symbol from the initial state.
9106
9107 2001-12-10 Akim Demaille <akim@epita.fr>
9108
9109 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
9110 only when appropriate: when insert_start_shifting_state' is not
9111 invoked.
9112 * tests/regression.at (Rule Line Numbers): Adjust.
9113
9114 2001-12-10 Akim Demaille <akim@epita.fr>
9115
9116 * src/LR0.c (augment_automaton): Now that all states have shifts,
9117 merge the two cases addition shifts to the initial state.
9118
9119 2001-12-10 Akim Demaille <akim@epita.fr>
9120
9121 * src/lalr.c (set_state_table): Move to...
9122 * src/LR0.c: here.
9123 * src/lalr.c (lalr): Don't call it...
9124 * src/LR0.c (generate_states): do it.
9125 * src/LR0.h (first_state): Remove, only the table is used.
9126
9127 2001-12-10 Akim Demaille <akim@epita.fr>
9128
9129 * src/LR0.h (first_shift, first_reduction): Remove.
9130 * src/lalr.c: Don't use first_shift: find shifts through the
9131 states.
9132
9133 2001-12-10 Akim Demaille <akim@epita.fr>
9134
9135 * src/LR0.c: Attach shifts to states as soon as they are
9136 computed.
9137 * src/lalr.c (set_state_table): Instead of assigning shifts to
9138 state, just assert that the mapping was properly done.
9139
9140 2001-12-10 Akim Demaille <akim@epita.fr>
9141
9142 * src/LR0.c (insert_start_shift): Rename as...
9143 (insert_start_shifting_state): this.
9144 (insert_eof_shifting_state, insert_accepting_state): New.
9145 (augment_automaton): Adjust.
9146 Better locality of the variables.
9147 When looking if the start_symbol is shifted from the initial
9148 state, using `while (... symbol != start_symbol ...)' sounds
9149 better than `while (... symbol < start_symbol ...)': If fail
9150 to see how the order between symbols could be relevant!
9151
9152 2001-12-10 Akim Demaille <akim@epita.fr>
9153
9154 * src/getargs.h: Don't declare `spec_name_prefix' and
9155 `spec_file_prefix', declared by src/files.h.
9156 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
9157 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
9158 * src/output.c (prepare): Adjust.
9159 * src/reader.c (symbols_output): Likewise.
9160 * src/vmsgetargs.c: Vaguely adjust, but who cares?
9161
9162 2001-12-10 Akim Demaille <akim@epita.fr>
9163
9164 * src/muscle_tab.c (muscle_init): NULL is a better default than
9165 `"0"'.
9166
9167 2001-12-10 Akim Demaille <akim@epita.fr>
9168
9169 * src/reader.c (reader): Calling symbols_output once is enough.
9170
9171 2001-12-10 Akim Demaille <akim@epita.fr>
9172
9173 Now that states have a complete set of members, the linked list of
9174 reductions is useless: just fill directly the state's reductions
9175 member.
9176
9177 * src/state.h (struct reductions): Remove member `number' and
9178 `next'.
9179 * src/LR0.c (first_reduction, last_reduction): Remove.
9180 (save_reductions): Don't link the new reductions, store them in
9181 this_state.
9182 * src/lalr.c (set_state_table): No need to attach reductions to
9183 states, it's already done.
9184 * src/output.c (output_actions): No longer free the shifts, then
9185 the reductions, then the states: free all the states and their
9186 members.
9187
9188 2001-12-10 Akim Demaille <akim@epita.fr>
9189
9190 * src/options.c (OPTN, DRTV, BOTH): New.
9191 (option_table): Use them.
9192
9193 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
9194 the job of system.h.
9195 * src/options.c: Don't include stdio.h and xalloc.h for the same
9196 reasons.
9197
9198 2001-12-10 Akim Demaille <akim@epita.fr>
9199
9200 * src/output.c (output, prepare): Make sure the values of the
9201 muscles `action' and `prologue' are 0-terminated.
9202
9203 2001-12-10 Akim Demaille <akim@epita.fr>
9204
9205 Clean up GCC warnings.
9206
9207 * src/reader.c (copy_action): `buf' is not used.
9208 (parse_skel_decl): Be static.
9209 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
9210 * src/options.h (create_long_option_table): Have a real prototype.
9211 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
9212 (hash_delete_at): Return const void *.
9213 Adjust casts to preserve the const.
9214
9215 2001-12-10 Akim Demaille <akim@epita.fr>
9216
9217 * configure.in: Require 2.52g.
9218 M4 is not needed, but AUTOM4TE is.
9219 * m4/m4.m4: Remove.
9220 * tests/Makefile.am: Adjust.
9221
9222 2001-12-10 Akim Demaille <akim@epita.fr>
9223
9224 One structure for states is enough, even though theoretically
9225 there are LR(0) states and LALR(1) states.
9226
9227 * src/lalr.h (state_t): Remove.
9228 (state_table): Be state_t **, not state_t *.
9229 * src/state.h (core, CORE_ALLOC): Rename as...
9230 (state_t, STATE_ALLOC): this.
9231 Add the LALR(1) members: shifts, reductions, errs.
9232 * src/LR0.c (state_table): Rename as...
9233 (state_hash): this, to avoid name clashes with the global
9234 `state_table'.
9235 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
9236 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
9237
9238 2001-12-10 Akim Demaille <akim@epita.fr>
9239
9240 Bison dumps core on bash.y.
9241 Reported by Pascal Bart.
9242
9243 * src/warshall.c (bitmatrix_print): New.
9244 (TC): Use it.
9245 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
9246 j must be the outer loop.
9247 * tests/regression.at (Broken Closure): New.
9248
9249 2001-12-05 Akim Demaille <akim@epita.fr>
9250
9251 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
9252 its argument.
9253 Reported by Peter Hamorsky.
9254
9255 2001-12-05 Akim Demaille <akim@epita.fr>
9256
9257 * src/conflicts.c (err_table): Remove.
9258 (resolve_sr_conflict): Adjust.
9259 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
9260 Rename as...
9261 (state_t.reductions, state_t.shifts): this.
9262
9263 2001-12-05 Akim Demaille <akim@epita.fr>
9264
9265 * src/reduce.c (reduce_grammar_tables): No longer disable the
9266 removal of useless rules via CPP but via `if (0)', so that the
9267 compiler still check the code is valid.
9268 For instance, it should have noticed `rline' no longer exists: use
9269 the `line' member of rule_t.
9270 * src/gram.c (dummy, rline): Remove, unused.
9271
9272 2001-12-05 Akim Demaille <akim@epita.fr>
9273
9274 * src/output.c (pack_vector): Use assert, not berror.
9275 * src/main.c (berror): Remove, unused.
9276
9277 2001-12-05 Akim Demaille <akim@epita.fr>
9278
9279 New experimental feature: if --verbose --trace output all the
9280 items of a state, not only its kernel.
9281
9282 * src/print.c (print_core): If `trace_flag', then invoke closure
9283 before outputting the items of the state (print_core is no longer
9284 a correct name them).
9285 (print_results): Invoke new_closure/free_closure if needed.
9286
9287 2001-12-05 Akim Demaille <akim@epita.fr>
9288
9289 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
9290 * src/closure.c, src/closure.h (itemsetsize): Rename as...
9291 (nitemset): for consistency with the rest of the project.
9292
9293 2001-12-05 Akim Demaille <akim@epita.fr>
9294
9295 * src/closure.c (print_closure): Improve.
9296 (closure): Use it for printing input and output.
9297
9298 2001-12-05 Akim Demaille <akim@epita.fr>
9299
9300 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
9301 indexed by nonterminals.
9302
9303 2001-12-05 Akim Demaille <akim@epita.fr>
9304
9305 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
9306 what it was!).
9307 * src/warshall.h: Remove accidental duplication of the content.
9308
9309 2001-12-05 Akim Demaille <akim@epita.fr>
9310
9311 * src/closure.c (set_fderives): De-obfuscate.
9312
9313 2001-12-05 Akim Demaille <akim@epita.fr>
9314
9315 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
9316
9317 2001-12-05 Akim Demaille <akim@epita.fr>
9318
9319 * src/closure.c (set_firsts): De-obfuscate.
9320
9321 2001-12-05 Akim Demaille <akim@epita.fr>
9322
9323 * src/output.c (action_row): De-obfuscate
9324 using the good o' techniques: arrays not pointers, variable
9325 locality, BITISSET, RESETBIT etc.
9326
9327 2001-12-05 Akim Demaille <akim@epita.fr>
9328
9329 Pessimize the code to simplify it: from now on, all the states
9330 have a valid SHIFTS, which NSHIFTS is possibly 0.
9331
9332 * src/LR0.c (shifts_new): Be global and move to..
9333 * src/state.c, src/state.h: here.
9334 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
9335 * src/print_graph: Adjust.
9336
9337 2001-12-05 Akim Demaille <akim@epita.fr>
9338
9339 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
9340 * src/conflicts.c: Use it.
9341 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
9342 incorrectly ``simplified''.
9343
9344 2001-12-05 Akim Demaille <akim@epita.fr>
9345
9346 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
9347 using the good o' techniques: arrays not pointers, variable
9348 locality, BITISSET, RESETBIT etc.
9349
9350 2001-12-05 Akim Demaille <akim@epita.fr>
9351
9352 * src/state.h (SHIFT_SYMBOL): New.
9353 * src/conflicts.c: Use it to deobfuscate.
9354
9355 2001-12-05 Akim Demaille <akim@epita.fr>
9356
9357 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
9358 (print_reductions): De-obfuscate using the good o' techniques:
9359 arrays not pointers, variable locality, BITISSET.
9360
9361 2001-12-05 Akim Demaille <akim@epita.fr>
9362
9363 * src/conflicts.c (print_reductions): Arrays, not pointers.
9364 Use BITISSET.
9365
9366 2001-12-05 Akim Demaille <akim@epita.fr>
9367
9368 * src/conflicts.c (print_reductions): Pessimize, but clarify.
9369
9370 2001-12-05 Akim Demaille <akim@epita.fr>
9371
9372 * src/conflicts.c (print_reductions): Improve variable locality.
9373
9374 2001-12-05 Akim Demaille <akim@epita.fr>
9375
9376 * src/conflicts.c (print_reductions): Pessimize, but clarify.
9377
9378 2001-12-05 Akim Demaille <akim@epita.fr>
9379
9380 * src/conflicts.c (print_reductions): Improve variable locality.
9381
9382 2001-12-05 Akim Demaille <akim@epita.fr>
9383
9384 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
9385 * src/lalr.c: Use them.
9386
9387 2001-12-05 Akim Demaille <akim@epita.fr>
9388
9389 * src/LR0.c (augment_automaton): Formatting changes.
9390 Better variable locality.
9391
9392 2001-12-05 Akim Demaille <akim@epita.fr>
9393
9394 * src/lalr.c (matrix_print): New.
9395 (transpose): Use it.
9396 Use arrays instead of pointers.
9397
9398 2001-12-05 Akim Demaille <akim@epita.fr>
9399
9400 * src/lalr.c (maxrhs): Move to...
9401 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
9402 * src/lalr.c (build_relations): Adjust.
9403
9404 2001-12-05 Akim Demaille <akim@epita.fr>
9405
9406 * src/lalr.c (transpose): Free the memory allocated to the
9407 argument, as it is replaced by the results by the unique caller.
9408 (build_relations): Merely invoke transpose: it handles the memory
9409 deallocation.
9410 Improve variable locality.
9411 Avoid variables used as mere abbreviations.
9412 (compute_lookaheads): Use arrays instead of pointers.
9413
9414 2001-12-05 Akim Demaille <akim@epita.fr>
9415
9416 * src/lalr.c (initialize_F): Improve variable locality.
9417 Avoid variables used as mere abbreviations.
9418
9419 2001-12-05 Akim Demaille <akim@epita.fr>
9420
9421 * src/derives.c (print_derives): Display the ruleno.
9422 * src/lalr.c (initialize_F, transpose): Better variable locality
9423 to improve readability.
9424 Avoid variables used as mere abbreviations.
9425
9426 2001-12-05 Akim Demaille <akim@epita.fr>
9427
9428 * src/lalr.c (traverse): Use arrays instead of pointers.
9429
9430 2001-12-05 Akim Demaille <akim@epita.fr>
9431
9432 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
9433 the handling of squeue.
9434 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
9435
9436 2001-12-05 Akim Demaille <akim@epita.fr>
9437
9438 Because useless nonterminals are now kept alive (instead of being
9439 `destroyed'), we now sometimes examine them, and store information
9440 related to them. Hence we need to know their number, and adjust
9441 memory allocations.
9442
9443 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
9444 static.
9445 * src/LR0.c (allocate_itemsets): The memory allocated to
9446 `symbol_count' was used for two different purpose: once to count
9447 the number of occurrences of each symbol, and later reassigned to
9448 `shift_symbol', containing the symbol that can be shifted from a
9449 given state.
9450 Deobfuscate, i.e., allocate, use and free `symbol_count' here
9451 only, and...
9452 (new_itemsets): Allocate `shift_symbol' here.
9453 (allocate_itemsets): symbol_count includes useless nonterminals.
9454 Make room for them.
9455 (free_storage): Use `free', not `XFREE', for pointers that cannot
9456 be null.
9457
9458 2001-12-05 Akim Demaille <akim@epita.fr>
9459
9460 * src/nullable.c (set_nullable): Deobfuscate the handling of
9461 ritem.
9462 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
9463
9464 2001-12-05 Akim Demaille <akim@epita.fr>
9465
9466 * src/gram.c, src/gram.h (ritem_print): New.
9467 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
9468 (This useless function was defined only to work around VMS linkers
9469 that can't handle compilation units with variables only).
9470 * src/reduce.c (dump_grammar): Use it to trace the construction of
9471 ritem.
9472
9473 2001-12-04 Paul Eggert <eggert@twinsun.com>
9474
9475 * src/bison.simple (union yyalloc): Change member names
9476 to be the same as the stack names.
9477 (yyparse): yyptr is now union yyalloc *, not char *.
9478 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
9479 and may generate better code on some machines.
9480 (yystpcpy): Use prototype if __STDC__ is defined, not just
9481 if __cplusplus is defined.
9482
9483 2001-11-30 Akim Demaille <akim@epita.fr>
9484
9485 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
9486 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
9487 Gettext doesn't compile cleanly, and dies with -Werror.
9488 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
9489 Include WARNING_CFLAGS here.
9490 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
9491 before being defined.
9492
9493 2001-11-27 Paul Eggert <eggert@twinsun.com>
9494
9495 * lib/quotearg.h (quotearg_n, quotearg_n_style):
9496 First arg is int, not unsigned.
9497 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
9498 (SIZE_MAX, UINT_MAX): New macros.
9499 (quotearg_n_options): Abort if N is negative.
9500 Avoid overflow check on hosts where size_t is 64 bits and int
9501 is 32 bits, as overflow is impossible there.
9502 Fix off-by-one typo that caused unnecessary reallocation.
9503
9504 2001-11-29 Paul Eggert <eggert@twinsun.com>
9505
9506 Name space cleanup in generated parser.
9507
9508 * doc/bison.texinfo (Bison Parser): Discuss system headers
9509 and their effect on the user name space.
9510
9511 * src/bison.simple:
9512 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
9513 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
9514 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
9515
9516 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
9517 on user names when possible.
9518
9519 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
9520 Simplify test for whather <alloca.h> exists.
9521
9522 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
9523
9524 (<stdio.h>): Include if YYDEBUG.
9525
9526 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
9527 ! defined (yyoverflow) && ! defined (yymemcpy).
9528
9529 (yymemcpy, yyparse): Rename local variables as needed so that
9530 they all begin with 'yy'.
9531
9532 (yystrlen, yystpcpy): New functions.
9533
9534 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
9535 All uses changed.
9536
9537 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
9538 instead of relying on string.h functions. Use YYSTACK_ALLOC
9539 and YYSTACK_FREE instead of malloc and free.
9540
9541 2001-11-30 Akim Demaille <akim@epita.fr>
9542
9543 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
9544 before their first uses.
9545 (YYBISON, YYPURE): Move to the top of the output.
9546
9547 2001-11-30 Akim Demaille <akim@epita.fr>
9548
9549 * tests/reduce.at (Useless Nonterminals): Fix.
9550
9551 2001-11-30 Akim Demaille <akim@epita.fr>
9552
9553 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
9554 if body instead of `;' to pacify GCC's warnings.
9555
9556 2001-11-30 Akim Demaille <akim@epita.fr>
9557
9558 Instead of mapping the LHS of unused rules to -1, keep the LHS
9559 valid, but flag the rules as invalid.
9560
9561 * src/gram.h (rule_t): `useful' is a new member.
9562 * src/print.c (print_grammar): Adjust.
9563 * src/derives.c (set_derives): Likewise.
9564 * src/reader.c (packgram, reduce_output): Likewise.
9565 * src/reduce.c (reduce_grammar_tables): Likewise.
9566 * tests/reduce.at (Underivable Rules, Useless Rules): New.
9567
9568 2001-11-30 Akim Demaille <akim@epita.fr>
9569
9570 * src/reduce.c (reduce_output): Formatting changes.
9571 * src/print.c (print_results, print_grammar): Likewise.
9572 * tests/regression.at (Rule Line Numbers)
9573 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
9574
9575 2001-11-30 Akim Demaille <akim@epita.fr>
9576
9577 * src/reduce.c (nonterminals_reduce): Instead of throwing away
9578 useless nonterminals, move them at the end of the symbol arrays.
9579 (reduce_output): Adjust.
9580 * tests/reduce.at (Useless Nonterminals): Adjust.
9581
9582 2001-11-30 Akim Demaille <akim@epita.fr>
9583
9584 * src/reduce.c: Various comment/formatting changes.
9585 (nonterminals_reduce): New, extracted from...
9586 (reduce_grammar_tables): here.
9587 (reduce_grammar): Call nonterminals_reduce.
9588
9589 2001-11-29 Paul Eggert <eggert@twinsun.com>
9590
9591 * src/bison.simple (YYSTACK_REALLOC): Remove.
9592 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
9593 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
9594 New macros.
9595 (union yyalloc): New type.
9596 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
9597 an arbitrary restriction on hosts where size_t is wider than int.
9598
9599 (yyparse): Don't dump core if alloca or malloc fails; instead, report
9600 a parser stack overflow. Allocate just one block of memory for all
9601 three stacks, instead of allocating three blocks; this typically is
9602 faster and reduces fragmentation.
9603
9604 Do not limit the number of items in the stack to a value that fits
9605 in 'int', as this is an arbitrary limit on hosts with 64-bit
9606 size_t and 32-bit int.
9607
9608 2001-11-29 Marc Autret <autret_m@epita.fr>
9609
9610 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
9611 of defining YYERROR_VERBOSE.
9612 [AT_DATA]: $4 is now out of C declarations in the prologue.
9613
9614 2001-11-28 Marc Autret <autret_m@epita.fr>
9615
9616 * src/reader.c (parse_dquoted_param): New.
9617 (parse_skel_decl): Use it.
9618 * src/lex.h: Add its prototype.
9619 * src/lex.c (literalchar): Become not static.
9620
9621 2001-11-28 Marc Autret <autret_m@epita.fr>
9622
9623 * src/output.h: And put its extern declaration here.
9624 * src/output.c (error_verbose): Define here.
9625 (prepare): Echo name modification.
9626 * src/getargs.h: Clean its extern declaration.
9627 * src/getargs.c (error_verbose_flag): Remove.
9628 (getargs): Remove case 'e'.
9629 * src/options.c (option_table): 'error-verbose' is now seen as simple
9630 percent option.
9631 Include output.h.
9632
9633 * src/reader.c (read_declarations): Remove case tok_include.
9634 (parse_include_decl): Remove.
9635 * src/lex.h (token_t): Remove tok_include.
9636 * src/options.c (option_table): 'include' is now a simple command line
9637 option.
9638
9639 2001-11-28 Marc Autret <autret_m@epita.fr>
9640
9641 * src/bison.simple: Adjust muscle names.
9642 * src/muscle_tab.c (muscle_init): Also rename the muscles.
9643 * src/output.c (prepare): s/_/-/ for the muscles names.
9644 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
9645
9646 2001-11-28 Marc Autret <autret_m@epita.fr>
9647
9648 * src/bison.simple: Fix debug.
9649 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
9650
9651 2001-11-28 Akim Demaille <akim@epita.fr>
9652
9653 * src/LR0.c (shifts_new): New.
9654 (save_shifts, insert_start_shift, augment_automaton): Use it.
9655
9656 2001-11-28 Akim Demaille <akim@epita.fr>
9657
9658 * src/closure.c (closure): `b' and `ruleno' denote the same value:
9659 keep ruleno only.
9660
9661 2001-11-28 Akim Demaille <akim@epita.fr>
9662
9663 * src/closure.c (closure): Instead of looping over word in array
9664 then bits in words, loop over bits in array.
9665
9666 2001-11-28 Akim Demaille <akim@epita.fr>
9667
9668 * src/closure.c (closure): No longer optimize the special case
9669 where all the bits of `ruleset[r]' are set to 0, to make the code
9670 clearer.
9671
9672 2001-11-28 Akim Demaille <akim@epita.fr>
9673
9674 * src/closure.c (closure): `r' and `c' are new variables, used to
9675 de-obfuscate accesses to RULESET and CORE.
9676
9677 2001-11-28 Akim Demaille <akim@epita.fr>
9678
9679 * src/reduce.c (reduce_print): Use ngettext.
9680 (dump_grammar): Improve the trace accuracy.
9681
9682 2001-11-28 Akim Demaille <akim@epita.fr>
9683
9684 * src/reduce.c (dump_grammar): Don't translate trace messages.
9685
9686 2001-11-28 Akim Demaille <akim@epita.fr>
9687
9688 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
9689 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
9690 as all tags are free'ed afterwards.
9691 From Enrico Scholz.
9692
9693 2001-11-27 Paul Eggert <eggert@twinsun.com>
9694
9695 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
9696 use alloca when we didn't want to, and vice versa.
9697
9698 2001-11-27 Marc Autret <autret_m@epita.fr>
9699
9700 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
9701 initialization.
9702 * src/output.c (prepare): Remove its update.
9703
9704 2001-11-27 Marc Autret <autret_m@epita.fr>
9705
9706 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
9707 Use %error-verbose.
9708
9709 2001-11-27 Marc Autret <autret_m@epita.fr>
9710
9711 * src/bison.simple: Remove YYERROR_VERBOSE using.
9712 Use %%error_verbose.
9713 (yyparse): Likewise.
9714 * src/output.c (prepare): Give its final value.
9715 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
9716 * src/getargs.h: Add its extern declaration.
9717 * src/getargs.c (error_verbose_flag): New int.
9718 (getargs): Update to catch new case.
9719 * src/options.c (option_table): 'error-verbose' is a new option.
9720 (shortopts): Update.
9721
9722 2001-11-27 Akim Demaille <akim@epita.fr>
9723
9724 * src/system.h: Use intl/libgettext.h.
9725 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
9726
9727 2001-11-27 Akim Demaille <akim@epita.fr>
9728
9729 * tests/torture.at (Exploding the Stack Size with Malloc):
9730 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
9731
9732 2001-11-27 Akim Demaille <akim@epita.fr>
9733
9734 * src/files.c: Include error.h.
9735 Reported by Hans Aberg.
9736
9737 2001-11-26 Marc Autret <autret_m@epita.fr>
9738
9739 * src/reader.c (parse_include_decl): New, not yet implemented.
9740 (read_declarations): Add case tok_include.
9741 * src/getargs.h (include): Add its extern definition.
9742 * src/getargs.c (include): New const char *.
9743 (getargs): Add case '-I'.
9744 * src/options.c (option_table): Add include as command line and
9745 percent option.
9746 * src/lex.h (token_t): Add tok_include.
9747
9748 2001-11-26 Akim Demaille <akim@epita.fr>
9749
9750 * src/reader.c (readgram): Make sure rules for mid-rule actions
9751 have a lineno equal to that of their host rule.
9752 Reported by Hans Aberg.
9753 * tests/regression.at (Rule Line Numbers): New.
9754
9755 2001-11-26 Akim Demaille <akim@epita.fr>
9756
9757 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
9758 size_ts.
9759
9760 2001-11-26 Akim Demaille <akim@epita.fr>
9761
9762 * src/complain.c, src/complain.h (error): Remove, provided by
9763 lib/error.[ch].
9764
9765 2001-11-26 Akim Demaille <akim@epita.fr>
9766
9767 * src/reader.c (read_declarations): Don't abort on tok_illegal,
9768 issue an error message.
9769 * tests/regression.at (Invalid %directive): New.
9770 Reported by Hans Aberg.
9771
9772 2001-11-26 Akim Demaille <akim@epita.fr>
9773
9774 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
9775 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
9776
9777 2001-11-26 Akim Demaille <akim@epita.fr>
9778
9779 * src/conflicts.c (conflicts_print): Don't complain at all when
9780 there are no reduce/reduce conflicts, and as many shift/reduce
9781 conflicts as expected.
9782 * tests/regression.at (%expect right): Adjust.
9783
9784 2001-11-23 Akim Demaille <akim@epita.fr>
9785
9786 * lib/alloca.c: Update, from fileutils.
9787
9788 2001-11-23 Akim Demaille <akim@epita.fr>
9789
9790 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
9791
9792 2001-11-23 Akim Demaille <akim@epita.fr>
9793
9794 * src/system.h: Include alloca.h.
9795 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
9796
9797 2001-11-23 Akim Demaille <akim@epita.fr>
9798
9799 * src/print_graph.c (print_actions): Remove `rule', unused.
9800 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
9801 pacify GCC's signed < unsigned warnings.
9802 * src/closure.c (itemsetsize): Likewise.
9803 * src/reader.c (symbol_list_new): Static.
9804
9805 2001-11-23 Akim Demaille <akim@epita.fr>
9806
9807 Attaching lineno to buckets is stupid, since only one copy of each
9808 symbol is kept, only the line of the first occurrence is kept too.
9809
9810 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
9811 * src/reader.c (rline_allocated): Remove, unused.
9812 (symbol_list): Have a `line' member.
9813 (symbol_list_new): New.
9814 (readgram): Use it.
9815 * src/print.c (print_grammar): Output the rule line numbers.
9816 * tests/regression.at (Solved SR Conflicts)
9817 (Unresolved SR Conflicts): Adjust.
9818 Reported by Hans Aberg.
9819
9820 2001-11-22 Marc Autret <autret_m@epita.fr>
9821
9822 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
9823
9824 2001-11-22 Marc Autret <autret_m@epita.fr>
9825
9826 * src/muscle_tab.c (muscle_init): Remove initialization of
9827 skeleton muscle.
9828 * src/output.c (output_master_parser): Do it here.
9829
9830 2001-11-20 Akim Demaille <akim@epita.fr>
9831
9832 * po/sv.po: New.
9833 * configure.in (ALL_LINGUAS): Adjust.
9834 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
9835 longer contains strings to translate.
9836
9837 2001-11-19 Akim Demaille <akim@epita.fr>
9838
9839 * src/conflicts.c (conflicts_print): Add a missing \n.
9840
9841 2001-11-19 Akim Demaille <akim@epita.fr>
9842
9843 * src/nullable.c (nullable_print): New.
9844 (set_nullable): Call it when tracing.
9845 Better locality of variables.
9846
9847 2001-11-19 Akim Demaille <akim@epita.fr>
9848
9849 * src/print.c (print_actions): Better locality of variables.
9850
9851 2001-11-19 Akim Demaille <akim@epita.fr>
9852
9853 * src/derives.c (print_derives): Fix and enrich.
9854 * src/closure.c (print_fderives): Likewise.
9855
9856 2001-11-19 Akim Demaille <akim@epita.fr>
9857
9858 * src/closure.c (itemsetend): Remove, replaced with...
9859 (itemsetsize): new.
9860
9861 2001-11-19 Akim Demaille <akim@epita.fr>
9862
9863 * src/LR0.c (kernel_end): Remove, replaced with...
9864 (kernel_size): new.
9865
9866 2001-11-19 Akim Demaille <akim@epita.fr>
9867
9868 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
9869 to clarify.
9870
9871 2001-11-19 Akim Demaille <akim@epita.fr>
9872
9873 * src/closure.c (closure): Use arrays instead of pointers to clarify.
9874
9875 2001-11-19 Akim Demaille <akim@epita.fr>
9876
9877 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
9878 trace messages.
9879 * src/LR0.c: Likewise.
9880 (allocate_itemsets): Use arrays instead of pointers to clarify.
9881
9882 2001-11-19 Akim Demaille <akim@epita.fr>
9883
9884 * src/getargs.c (statistics_flag): Replace with...
9885 (trace_flag): New.
9886 (longopts): Accept --trace instead of --statistics.
9887 * src/getargs.h, src/options.c: Adjust.
9888 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
9889 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
9890
9891 2001-11-19 Akim Demaille <akim@epita.fr>
9892
9893 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
9894 pointers to clarify the code.
9895 (save_reductions, save_shifts): Factor common parts of alternatives.
9896
9897 2001-11-19 Akim Demaille <akim@epita.fr>
9898
9899 * src/LR0.c (new_state, get_state): Complete TRACE code.
9900 * src/closure.c: Include `reader.h' to get `tags', needed by the
9901 trace code.
9902 Rename the conditional DEBUG as TRACE.
9903 Output consistently TRACEs to stderr, not stdout.
9904 * src/derives.c: Likewise.
9905 * src/reduce.c: (inaccessable_symbols): Using if is better style
9906 than goto.
9907 Use `#if TRACE' instead of `#if 0' for tracing code.
9908
9909 2001-11-19 Akim Demaille <akim@epita.fr>
9910
9911 * src/system.h (LIST_FREE, shortcpy): New.
9912 * src/LR0.c: Use them.
9913 * src/output.c (free_itemsets, free_reductions, free_shifts):
9914 Remove, replaced by LIST_FREE.
9915
9916 2001-11-19 Akim Demaille <akim@epita.fr>
9917
9918 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
9919 (REDUCTIONS_ALLOC): New.
9920 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
9921 allocation.
9922
9923 2001-11-19 Akim Demaille <akim@epita.fr>
9924
9925 * src/LR0.c (new_state): Complete trace code.
9926 * src/nullable.c (set_nullable): Don't translate traces.
9927
9928 2001-11-19 Akim Demaille <akim@epita.fr>
9929
9930 * src/print_graph.c (print_core): Better locality of variables.
9931 * src/print.c (print_core): Likewise.
9932
9933 2001-11-19 Akim Demaille <akim@epita.fr>
9934
9935 * src/vcg.c: You do the output, so you are responsible of the
9936 handling of VCG syntax, in particular: use quotearg.
9937 * src/print_graph.c: Don't.
9938 (print_actions): Don't output the actions as part of the nodes,
9939 since that's the job of the edges.
9940 (print_state): Don't output by hand: fill the node description,
9941 and ask for its output.
9942
9943 2001-11-19 Akim Demaille <akim@epita.fr>
9944
9945 * src/bison.simple (yyparse): When verbosely reporting an error,
9946 no longer put additional quotes around token names.
9947 * tests/calc.at: Adjust.
9948
9949 2001-11-19 Akim Demaille <akim@epita.fr>
9950
9951 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
9952 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
9953 * src/output.c: Adjust.
9954
9955 2001-11-19 Akim Demaille <akim@epita.fr>
9956
9957 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
9958 (rule_t): this.
9959 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
9960
9961 2001-11-19 Akim Demaille <akim@epita.fr>
9962
9963 * src/gram.h (rule_t): New.
9964 (rule_table): New.
9965 (rrhs, rlhs): Remove, part of state_t.
9966 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
9967 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
9968 * src/reader.c, src/reduce.c: Adjust.
9969
9970 2001-11-19 Akim Demaille <akim@epita.fr>
9971
9972 * src/reader.c (symbols_output): New, extracted from...
9973 (packsymbols): Here.
9974 (reader): Call it.
9975
9976 2001-11-19 Akim Demaille <akim@epita.fr>
9977
9978 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
9979 (maxrhs): this new function.
9980
9981 2001-11-19 Akim Demaille <akim@epita.fr>
9982
9983 * src/lalr.c (F): New macro to access the variable F.
9984 Adjust.
9985
9986 2001-11-19 Akim Demaille <akim@epita.fr>
9987
9988 * src/lalr.h (LA): New macro to access the variable LA.
9989 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
9990 * src/lalr.c: Adjust.
9991
9992 2001-11-19 Akim Demaille <akim@epita.fr>
9993
9994 * src/lalr.c (initialize_LA): Only initialize LA. Let...
9995 (set_state_table): handle the `lookaheads' members.
9996
9997 2001-11-19 Akim Demaille <akim@epita.fr>
9998
9999 * src/lalr.h (lookaheads): Removed array, whose contents is now
10000 a member of...
10001 (state_t): this structure.
10002 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10003 Adjust.
10004
10005 2001-11-19 Akim Demaille <akim@epita.fr>
10006
10007 * src/lalr.h (consistent): Removed array, whose contents is now
10008 a member of...
10009 (state_t): this structure.
10010 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10011 Adjust.
10012
10013 2001-11-19 Akim Demaille <akim@epita.fr>
10014
10015 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
10016 contents are now members of...
10017 (state_t): this structure.
10018 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
10019 Adjust.
10020
10021 2001-11-19 Akim Demaille <akim@epita.fr>
10022
10023 * src/lalr.h (state_t): New.
10024 (state_table): Be a state_t * instead of a core **.
10025 (accessing_symbol): Remove, part of state_t.
10026 * src/lalr.c: Adjust.
10027 (set_accessing_symbol): Merge into...
10028 (set_state_table): this.
10029 * src/print_graph.c, src/conflicts.c: Adjust.
10030
10031 2001-11-14 Akim Demaille <akim@epita.fr>
10032
10033 * tests/calc.at, tests/output.at, tests/regression.at,
10034 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
10035 now the tests are run in private dirs, therefore AC_CLEANUP and
10036 family can be simplified to 0-ary.
10037 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
10038 use abs. path to find config.h.
10039 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
10040 stderr, there can be way too much random noise.
10041 Instead pass -Werror to GCC and rely on the exit status.
10042 Reported by Wolfram Wagner.
10043
10044 2001-11-14 Akim Demaille <akim@epita.fr>
10045
10046 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
10047 defined only if yyoverflow is defined, to avoid `warning: unused
10048 variable `yyvs1''.
10049 Reported by The Test Suite.
10050
10051 2001-11-14 Akim Demaille <akim@epita.fr>
10052
10053 * src/print.c: Include reduce.h.
10054 Reported by Hans Aberg.
10055
10056 2001-11-14 Akim Demaille <akim@epita.fr>
10057
10058 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
10059 Revert a previous patch: these are really const.
10060 * src/conflicts.c (conflict_report): Additional useless pair of
10061 braces to pacify GCC's warnings for `if () if () {} else {}'.
10062 * src/lex.c (parse_percent_token): Replace equal_offset with
10063 arg_offset.
10064 arg is const.
10065 Be sure to strdup `arg' when used, since there is no reason for
10066 token_buffer not to change.
10067
10068 2001-11-14 Akim Demaille <akim@epita.fr>
10069
10070 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
10071 definition.
10072 * src/main.c (main): Use them.
10073 Suggested by Hans Aberg.
10074
10075 2001-11-12 Akim Demaille <akim@epita.fr>
10076
10077 * src/system.h (ngettext): Now that we use ngettext, be sure to
10078 provide a default definition when NLS are not used.
10079
10080 2001-11-12 Akim Demaille <akim@epita.fr>
10081
10082 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
10083 Use @kbd to denote user input.
10084 (Language and Grammar): ANSIfy the example.
10085 Adjust its layout for info/notinfo.
10086 (Location Tracking Calc): Output error messages to stderr.
10087 Output locations in a more GNUtically correct way.
10088 Fix a couple of Englishos.
10089 Adjust @group/@end group pairs.
10090
10091 2001-11-12 Akim Demaille <akim@epita.fr>
10092
10093 %expect was not functioning at all.
10094
10095 * src/conflicts.c (expected_conflicts): Set to -1.
10096 (conflict_report): Use ngettext.
10097 (conflicts_print): Check %expect and make its violation an error.
10098 * doc/bison.texinfo (Expect Decl): Adjust.
10099 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
10100 * tests/regression.at (%expect not enough, %expect right)
10101 (%expect too much): New.
10102
10103 2001-11-12 Akim Demaille <akim@epita.fr>
10104
10105 * tests/regression.at (Conflicts): Rename as...
10106 (Unresolved SR Conflicts): this.
10107 (Solved SR Conflicts): New.
10108
10109 2001-11-12 Akim Demaille <akim@epita.fr>
10110
10111 * src/reduce.c (print_results): Rename as...
10112 (reduce_output): This.
10113 Output to OUT, passed as argument, instead of output_obstack.
10114 (dump_grammar): Likewise.
10115 (reduce_free): New.
10116 Also free V1.
10117 (reduce_grammar): No longer call reduce_output, since...
10118 * src/print.c (print_results): do it.
10119 * src/main.c (main): Call reduce_free;
10120
10121 2001-11-12 Akim Demaille <akim@epita.fr>
10122
10123 * src/conflicts.c (print_reductions): Accept OUT as argument.
10124 Output to it, not to output_obstack.
10125 * src/print.c (print_actions): Adjust.
10126
10127 2001-11-12 Akim Demaille <akim@epita.fr>
10128
10129 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
10130 the result instead of using...
10131 (src_total, rrc_total, src_count, rrc_count): Remove.
10132 (any_conflicts): Remove.
10133 (print_conflicts): Split into...
10134 (conflicts_print, conflicts_output): New.
10135 * src/conflicts.h: Adjust.
10136 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
10137 * src/print.c (print_grammar): Issue `\n' between two rules.
10138 * tests/regression.at (Conflicts): New.
10139 Reported by Tom Lane.
10140
10141 2001-11-12 Akim Demaille <akim@epita.fr>
10142
10143 * tests/regression.at (Invalid input): Remove, duplicate with
10144 ``Invalid input: 1''.
10145
10146 2001-11-12 Akim Demaille <akim@epita.fr>
10147
10148 * tests/torture.at (AT_DATA_STACK_TORTURE)
10149 (Exploding the Stack Size with Alloca)
10150 (Exploding the Stack Size with Malloc): New.
10151
10152 2001-11-12 Akim Demaille <akim@epita.fr>
10153
10154 * src/bison.simple (YYSTACK_REALLOC): New.
10155 (yyparse) [!yyoverflow]: Use it and free the old stack.
10156 Reported by Per Allansson.
10157
10158 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
10159
10160 * src/bison.simple: Define type yystype instead of YYSTYPE, and
10161 define CPP macro, which substitute YYSTYPE by yystype.
10162 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
10163 with yyltype/YYLTYPE. This allows inclusion of the generated
10164 header within the parser if the compiler, such as GGC, accepts
10165 multiple equivalent #defines.
10166 From Akim.
10167
10168 2001-11-05 Akim Demaille <akim@epita.fr>
10169
10170 * src/reader.c (symbols_output): New, extracted from...
10171 (packsymbols): here.
10172 (reader): Adjust.
10173
10174 2001-11-05 Akim Demaille <akim@epita.fr>
10175
10176 * src/lex.c (parse_percent_token): s/quotearg/quote/.
10177
10178 2001-11-05 Akim Demaille <akim@epita.fr>
10179
10180 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
10181 pattern.
10182
10183 2001-11-05 Akim Demaille <akim@epita.fr>
10184
10185 * src/options.h (struct option_table_struct): set_flags is void*.
10186 * src/options.c (longopts): Support `--output' and `%output'.
10187 (usage): Adjust.
10188 * src/lex.h (tok_setopt): Remove, replaced with...
10189 (tok_intopt, tok_stropt): these new guys.
10190 * src/lex.c (getopt.h): Not needed.
10191 (token_buffer, unlexed_token_buffer): Not const.
10192 (percent_table): Promote `-' over `_' in directive names.
10193 Active `%name-prefix', `file-prefix', and `output'.
10194 (parse_percent_token): Accept possible arguments to directives.
10195 Promote `-' over `_' in directive names.
10196
10197 2001-11-04 Akim Demaille <akim@epita.fr>
10198
10199 * doc/bison.texinfo (Decl Summary): Split the list into
10200 `directives for grammars' and `directives for bison'.
10201 Sort'em.
10202 Add description of `%name-prefix', `file-prefix', and `output'.
10203 Promote `-' over `_' in directive names.
10204 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
10205 Simplify the description of `--name-prefix'.
10206 Promote `-' over `_' in directive names.
10207 Promote `--output' over `--output-file'.
10208 Fix the description of `--defines'.
10209 * tests/output.at: Exercise %file-prefix and %output.
10210
10211 2001-11-02 Akim Demaille <akim@epita.fr>
10212
10213 * doc/refcard.tex: Update.
10214
10215 2001-11-02 Akim Demaille <akim@epita.fr>
10216
10217 * src/symtab.h (SUNDEF): New.
10218 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
10219 stand for `uninitialized', instead of 0.
10220 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
10221 * src/lex.c (lex): Adjust.
10222
10223 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
10224 Number it 0.
10225 Let yylex return it instead of a plain 0.
10226 Reported by Dick Streefland.
10227
10228 2001-11-02 Akim Demaille <akim@epita.fr>
10229
10230 * tests/regression.at (Mixing %token styles): New test.
10231
10232 2001-11-02 Akim Demaille <akim@epita.fr>
10233
10234 * src/reader.c (parse_thong_decl): Formatting changes.
10235 (token_translations_init): New, extracted from...
10236 (packsymbols): Here.
10237 Adjust.
10238
10239 2001-11-01 Akim Demaille <akim@epita.fr>
10240
10241 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
10242 Check that `9foo.y' produces correct cpp guards.
10243 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
10244 guards.
10245 Reported by Wwp.
10246
10247 2001-11-01 Akim Demaille <akim@epita.fr>
10248
10249 * tests/regression.at (Invalid input: 2): New.
10250 * src/lex.c (unlexed_token_buffer): New.
10251 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
10252 too.
10253 Reported by Wwp.
10254
10255 2001-11-01 Akim Demaille <akim@epita.fr>
10256
10257 * tests/calc.at: Catch up with 1.30.
10258 * configure.in: Bump to 1.49a.
10259 Adjust to newer Autotest.
10260
10261 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
10262
10263 * src/conflicts.c: Move global variables rrc_total and src_total ...
10264 (print_conflicts): here.
10265 * src/output.c (output): Free global variable user_toknums.
10266 * src/lex.c (token_obstack): Become static.
10267
10268 2001-10-18 Akim Demaille <akim@epita.fr>
10269
10270 * tests/atlocal.in (GCC): Add.
10271 * tests/calc.at: s/m4_match/m4_bmatch/.
10272 s/m4_patsubst/m4_bpatsubst/.
10273 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
10274 * configure.in: AC_SUBST(GCC).
10275
10276 2001-10-14 Marc Autret <autret_m@epita.fr>
10277
10278 * src/options.c (create_long_option_table): Fix.
10279
10280 2001-10-10 Akim Demaille <akim@epita.fr>
10281
10282 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
10283
10284 2001-10-04 Akim Demaille <akim@epita.fr>
10285
10286 * src/reader.c (parse_union_decl): Push the caracters in
10287 union_obstack, not attrs_obstack.
10288
10289 2001-10-04 Akim Demaille <akim@epita.fr>
10290
10291 Merge in the branch 1.29.
10292
10293 * src/reader.c (packsymbols): Use a temporary obstack for
10294 `%%tokendef', since output_stack is already used elsewhere.
10295
10296 2001-10-02 Akim Demaille <akim@epita.fr>
10297
10298 Bump 1.29d.
10299
10300 2001-10-02 Akim Demaille <akim@epita.fr>
10301
10302 Version 1.29c.
10303
10304 2001-10-02 Akim Demaille <akim@epita.fr>
10305
10306 * tests/regression.at (Invalid CPP headers): New.
10307 From Alexander Belopolsky.
10308 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
10309
10310 2001-10-02 Akim Demaille <akim@epita.fr>
10311
10312 * tests/regression.at (Invalid input): New.
10313 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
10314 Reported by Shura.
10315
10316 2001-10-02 Akim Demaille <akim@epita.fr>
10317
10318 * tests/calc.at: Now that --debug works, the tests must be adjusted.
10319
10320 2001-10-02 Akim Demaille <akim@epita.fr>
10321
10322 * src/output.c (output_parser): Assert `skeleton'.
10323 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
10324 systems.
10325 From Shura.
10326
10327 2001-10-01 Marc Autret <autret_m@epita.fr>
10328
10329 * src/lex.h: Echo modifications.
10330 * src/lex.c (unlex): Parameter is now token_t.
10331 From Hans Aberg.
10332
10333 2001-10-01 Marc Autret <autret_m@epita.fr>
10334
10335 * src/main.c: Include lex.h.
10336 From Hans Aberg.
10337
10338 2001-09-29 Akim Demaille <akim@epita.fr>
10339
10340 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
10341
10342 2001-09-28 Akim Demaille <akim@epita.fr>
10343
10344 * tests/testsuite.at: Update to newer Autotest.
10345 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
10346
10347 2001-09-27 Akim Demaille <akim@epita.fr>
10348
10349 Position independent wrapper.
10350
10351 * tests/bison: Remove.
10352 * tests/bison.in: New.
10353 * configure.in: Adjust.
10354
10355 2001-09-27 Paul Eggert <eggert@twinsun.com>
10356
10357 Port quotearg fixes from tar 1.13.24.
10358
10359 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
10360 tm to be declared.
10361 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
10362 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
10363
10364 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
10365 * m4/mbrtowc.m4: New file.
10366 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
10367 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
10368
10369 2001-09-27 Akim Demaille <akim@epita.fr>
10370
10371 Bump to 1.29c.
10372
10373 2001-09-27 Akim Demaille <akim@epita.fr>
10374
10375 Version 1.29b.
10376
10377 2001-09-25 Akim Demaille <akim@epita.fr>
10378
10379 * src/system.h: Include `xalloc.h'.
10380 Remove it from the C files.
10381 * src/files.c (output_files): Free the obstacks.
10382 * src/lex.c (init_lex): Rename as...
10383 (lex_init): this.
10384 (lex_free): New.
10385 * src/main.c (main): Use it.
10386
10387 2001-09-24 Marc Autret <autret_m@epita.fr>
10388
10389 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
10390 to output informations in fout (FILE*).
10391 (open_graph, close_graph): Likewise.
10392 (output_graph, output_edge, output_node): Likewise.
10393 * src/vcg.h: Update function prototypes.
10394 * src/print_graph.c (print_graph): Open output graph file.
10395 (print_actions): Adjust.
10396 * src/files.h: Remove extern declaration.
10397 * src/files.c: Remove graph_obstack declaration.
10398 (open_files): Remove graph_obstack initialization.
10399 (output_files): Remove graph_obstack saving.
10400
10401 2001-09-24 Marc Autret <autret_m@epita.fr>
10402
10403 * src/files.c (compute_output_file_names): Fix.
10404
10405 2001-09-24 Marc Autret <autret_m@epita.fr>,
10406 Akim Demaille <akim@epita.fr>
10407
10408 * src/reader.c (reader): Remove call to free_symtab ().
10409 * src/main.c (main): Call it here.
10410 Include symtab.h.
10411 * src/conflicts.c (initialize_conflicts): Rename as...
10412 (solve_conflicts): this.
10413 * src/print.c (print_core, print_actions, print_state)
10414 (print_grammar): Dump to a file instead a `output_obstack'.
10415 (print_results): Dump `output_obstack', and then proceed with the
10416 FILE *.
10417 * src/files.c (compute_output_file_names, close_files): New.
10418 (output_files): Adjust.
10419 * src/main.c (main): Adjust.
10420
10421 2001-09-23 Marc Autret <autret_m@epita.fr>
10422
10423 * src/files.c (compute_header_macro): Computes header macro name
10424 from spec_defines_file when given.
10425
10426 2001-09-23 Marc Autret <autret_m@epita.fr>
10427
10428 * src/files.c (output_files): Add default extensions.
10429
10430 2001-09-22 Akim Demaille <akim@epita.fr>
10431
10432 * src/conflicts.c (finalize_conflicts): Rename as...
10433 (free_conflicts): this.
10434
10435 2001-09-22 Akim Demaille <akim@epita.fr>
10436
10437 * src/gram.c (gram_free): Rename back as...
10438 (dummy): this.
10439 (output_token_translations): Free `token_translations'.
10440 * src/symtab.c (free_symtab): Free the tag field.
10441
10442 2001-09-22 Akim Demaille <akim@epita.fr>
10443
10444 Remove `translations' as it is always set to true.
10445
10446 * src/gram.h: Adjust.
10447 * src/reader.c (packsymbols, parse_token_decl): Adjust
10448 * src/print.c (print_grammar): Adjust.
10449 * src/output.c (output_token_translations): Adjust.
10450 * src/lex.c (lex): Adjust.
10451 * src/gram.c: Be sure the set pointers to NULL.
10452 (dummy): Rename as...
10453 (gram_free): this.
10454
10455 2001-09-22 Akim Demaille <akim@epita.fr>
10456
10457 * configure.in: Invoke AM_LIB_DMALLOC.
10458 * src/system.h: Use dmalloc.
10459 * src/LR0.c: Be sure to have pointers initialized to NULL.
10460 (allocate_itemsets): Allocate kernel_items only if needed.
10461
10462 2001-09-22 Akim Demaille <akim@epita.fr>
10463
10464 * configure.in: Bump to 1.29b.
10465 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
10466 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
10467 need xmalloc.c in calc.y.
10468 From Pascal Bart.
10469
10470 2001-09-21 Akim Demaille <akim@epita.fr>
10471
10472 Version 1.29a.
10473 * Makefile.maint, config/config.guess, config/config.sub,
10474 * config/missing: Update from masters.
10475 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
10476 upon package.m4.
10477 * configure.in (ALL_LINGUAS): Add `tr'.
10478
10479 2001-09-21 Akim Demaille <akim@epita.fr>
10480
10481 * tests/Makefile.am (package.m4): Move to...
10482 ($(srcdir)/$(TESTSUITE)): here.
10483
10484 2001-09-20 Akim Demaille <akim@epita.fr>
10485
10486 * src/complain.c: No longer try to be standalone: use system.h.
10487 Don't assume __STDC__ is defined to 1. Just test if it is defined.
10488 * src/complain.h: Likewise.
10489 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
10490 Remove the unused variable `n'.
10491 From Albert Chin-A-Young.
10492
10493 2001-09-18 Marc Autret <autret_m@epita.fr>
10494
10495 * doc/bison.1: Update.
10496 * doc/bison.texinfo (Bison Options): Update --defines and --graph
10497 descriptions.
10498 (Option Cross Key): Update.
10499 Add --graph.
10500
10501 2001-09-18 Marc Autret <autret_m@epita.fr>
10502
10503 * tests/regression.at: New test (comment in %union).
10504
10505 2001-09-18 Marc Autret <autret_m@epita.fr>
10506
10507 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
10508 do that.
10509 Reported by Keith Browne.
10510
10511 2001-09-18 Marc Autret <autret_m@epita.fr>
10512
10513 * tests/output.at: Add tests for --defines and --graph.
10514
10515 2001-09-18 Marc Autret <autret_m@epita.fr>
10516
10517 * tests/output.at: Removes tests of %{header,src}_extension features.
10518
10519 2001-09-18 Akim Demaille <akim@epita.fr>
10520
10521 * tests/Makefile.am (package.m4): New.
10522 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
10523 (_AT_CHECK_CALC_ERROR): Likewise.
10524 Factor the `, ' part of verbose error messages.
10525
10526 2001-09-18 Marc Autret <autret_m@epita.fr>
10527
10528 * src/getargs.c (longopts): Declare --defines and --graph as options
10529 with optional arguments.
10530 * src/files.h: Add extern declarations.
10531 * src/files.c (spec_graph_file, spec_defines_file): New.
10532 (output_files): Update.
10533 Remove CPP-outed code.
10534
10535 2001-09-18 Marc Autret <autret_m@epita.fr>
10536
10537 Turn off %{source,header}_extension feature.
10538
10539 * src/files.c (compute_exts_from_gf): Update.
10540 (compute_exts_from_src): Update.
10541 (output_files): CPP-out useless code.
10542 * src/files.h: Remove {header,source}_extension extern declarations.
10543 * src/reader.c (parse_dquoted_param): CPP-out.
10544 (parse_header_extension_decl): Remove.
10545 (parse_source_extension_decl): Remove.
10546 (read_declarations): Remove cases tok_{hdrext,srcext}.
10547 * src/lex.c (percent_table): Remove {header,source}_extension entries.
10548 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
10549
10550 2001-09-10 Akim Demaille <akim@epita.fr>
10551
10552 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
10553 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
10554 (AT_CHECK_OUTPUT): this.
10555 Merely check ls' exit status, its output is useless.
10556
10557 2001-09-10 Akim Demaille <akim@epita.fr>
10558
10559 * tests/calc.at: Use m4_match.
10560 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
10561
10562 2001-09-10 Marc Autret <autret_m@epita.fr>,
10563 Akim Demaille <akim@epita.fr>
10564
10565 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
10566 enum color_e.
10567 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
10568 to `normal'.
10569 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
10570 * src/lex.h: Adjust prototype.
10571 (token_t): Add `tok_undef'.
10572 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
10573 (parse_percent_token): Now returns token_t.
10574 Add default statement in switch.
10575 (lex): Separate `c' as an input variable, from the token_t result
10576 part.
10577 (unlexed): Is a token_t.
10578
10579 2001-09-10 Akim Demaille <akim@epita.fr>
10580
10581 * configure.in: Bump to 1.29a.
10582
10583 2001-09-07 Akim Demaille <akim@epita.fr>
10584
10585 Version 1.29.
10586
10587 2001-08-30 Akim Demaille <akim@epita.fr>
10588
10589 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
10590 * m4/atconfig.m4: Remove.
10591 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
10592 * tests/bison: New.
10593 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
10594 m4_if, m4_patsubst, and m4_regexp.
10595 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
10596 `input' file instead of echo.
10597
10598 2001-08-29 Akim Demaille <akim@epita.fr>
10599
10600 Bump to 1.28e.
10601
10602 2001-08-29 Akim Demaille <akim@epita.fr>
10603
10604 Version 1.28d.
10605
10606 2001-08-29 Paul Eggert <eggert@twinsun.com>
10607
10608 * src/bison.simple (yyparse): Don't take the address of an
10609 item before the start of an array, as that doesn't conform to
10610 the C Standard.
10611
10612 2001-08-29 Robert Anisko <anisko_r@epita.fr>
10613
10614 * doc/bison.texinfo (Location Tracking Calc): New node.
10615
10616 2001-08-29 Paul Eggert <eggert@twinsun.com>
10617
10618 * src/output.c (output): Do not define const, as this now
10619 causes more problems than it cures.
10620
10621 2001-08-29 Akim Demaille <akim@epita.fr>
10622
10623 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
10624 the nodes.
10625 Be sure to tag the `detailmenu'.
10626
10627 2001-08-29 Akim Demaille <akim@epita.fr>
10628
10629 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
10630 download in a tmp dir.
10631
10632 2001-08-28 Marc Autret <autret_m@epita.fr>
10633
10634 * config/depcomp: New file.
10635
10636 2001-08-28 Marc Autret <autret_m@epita.fr>
10637
10638 * doc/bison.1 (mandoc): Adjust.
10639 From Juan Manuel Guerrero.
10640
10641 2001-08-28 Marc Autret <autret_m@epita.fr>
10642
10643 * src/print_graph.c (print_state): Fix.
10644
10645 2001-08-27 Marc Autret <autret_m@epita.fr>
10646
10647 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
10648 char * members.
10649 Echo modifications to the functions prototypes.
10650 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
10651
10652 2001-08-27 Marc Autret <autret_m@epita.fr>
10653
10654 * src/vcg.c: Include `xalloc.h'.
10655 (add_colorentry): New.
10656 (add_classname): New.
10657 (add_infoname): New.
10658 * src/vcg.h: Add new prototypes.
10659
10660 2001-08-27 Akim Demaille <akim@epita.fr>
10661
10662 * Makefile.maint: Sync. again with CVS Autoconf.
10663
10664 2001-08-27 Akim Demaille <akim@epita.fr>
10665
10666 * Makefile.maint: Formatting changes.
10667 (po-update, cvs-update, update): New targets.
10668 (AMTAR): Remove.
10669
10670 2001-08-27 Akim Demaille <akim@epita.fr>
10671
10672 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
10673 * Makefile.maint: Sync. with CVS Autoconf.
10674
10675 2001-08-27 Marc Autret <autret_m@epita.fr>
10676
10677 * src/vcg.h (struct infoname_s): New.
10678 (struct colorentry_s): New.
10679 (graph_s): New fields {vertical,horizontal}_order in structure.
10680 Add `infoname' field.
10681 Add `colorentry' field;
10682 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
10683 (G_HORIZONTAL_ORDER): New.
10684 (G_INFONAME): New.
10685 (G_COLORENTRY): New.
10686 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
10687 Add output of `infoname'.
10688 Add output of `colorentry'.
10689
10690 2001-08-27 Marc Autret <autret_m@epita.fr>
10691
10692 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
10693 This one shadowed a global parameter.
10694
10695 2001-08-24 Marc Autret <autret_m@epita.fr>
10696
10697 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
10698 instead of `unsigned'.
10699 (print_state): Do not call obstack_object_size () in obstack_grow ()
10700 to avoid macro variables shadowing.
10701
10702 2001-08-23 Marc Autret <autret_m@epita.fr>
10703
10704 * src/lex.c (percent_table): Typo: s/naem/name/.
10705 Add graph option.
10706 Normalize new options declarations.
10707
10708 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
10709
10710 * tests/suite.at: Exercise %header_extension and %source_extension.
10711
10712 2001-08-16 Marc Autret <autret_m@epita.fr>
10713
10714 * src/reader.c (parse_dquoted_param): New.
10715 (parse_header_extension_decl): Use it.
10716 (parse_source_extension_decl): Likewise.
10717
10718 2001-08-16 Marc Autret <autret_m@epita.fr>
10719
10720 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
10721 (get_xxxx_str): Use assert () instead of complain ().
10722 Remove return invokations in default cases.
10723 (get_decision_str): Modify default behaviour. Remove second argument.
10724 Echo modifications on calls.
10725 (output_graph): Fix.
10726
10727 2001-08-16 Marc Autret <autret_m@epita.fr>
10728
10729 * src/getargs.c (usage): Update with ``-g, --graph''.
10730
10731 2001-08-16 Marc Autret <autret_m@epita.fr>
10732
10733 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
10734 (Option Cross Key): Likewise.
10735 * doc/bison.1: Update.
10736
10737 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
10738
10739 * src/output.c (output_master_parser): Don't finish action_obstack.
10740 (output_parser): Don't care about the muscle action, here.
10741 (prepare): Copy the action_obstack in the action muscle.
10742 (output): Free action_obstack.
10743
10744 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
10745
10746 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
10747 will contain `%union' declaration.
10748 (parse_union_decl): Delete #line directive output.
10749 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
10750 informations about %union.
10751 (parse_union_decl): Copy the union_obstack in the muscle stype.
10752 * src/bison.simple: Add new #line directive.
10753 Add typdef %%stype YYSTYPE.
10754
10755 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
10756
10757 * src/bison.simple: Add new `#line' directive.
10758
10759 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
10760
10761 * src/bison.simple: New `#line' directive.
10762 * src/output.c (output_parser): Support new dynamic muscle input_line.
10763
10764 2001-09-22 Marc Autret <autret_m@epita.fr>
10765
10766 * src/output.c (output_master_parser): New.
10767 (output_parser): Be more re-entrant.
10768
10769 2001-09-21 Marc Autret <autret_m@epita.fr>
10770
10771 * src/reader.c (copy_definition, parse_union_decl): Update and use
10772 `linef' muscle.
10773 (copy_action): Likewise.
10774 Use obstack_1grow ().
10775 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
10776
10777 2001-09-21 Marc Autret <autret_m@epita.fr>
10778
10779 * src/options.c (option_table): Adjust.
10780 * src/lex.c (parse_percent_token): Fix.
10781
10782 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
10783
10784 * src/options.c (symtab.h): Include it, need by lex.h.
10785
10786 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
10787
10788 * src/lex.c (parse_percent_token): Change type of variable `tx', which
10789 is now an option_table_struct*.
10790 (option_strcmp): New function option_strcmp.
10791 (parse_percent_token): Call option_strcmp.
10792 * src/getargs.c (xalloc.h, options.h): Include it.
10793 (getargs): Call create_long_option_table.
10794 (getargs): Free longopts at the end of the function.
10795 (shortopts): Move in options.c.
10796 * src/options.c (create_long_option_table): New function. Convert
10797 information from option_table to option structure.
10798 * src/reader.c (options.h): Include it.
10799
10800 * src/Makefile.am: Adjust.
10801 * src/options.c (option_table): Create from longopts and percent_table.
10802 * src/getargs.c (longopts): Delete.
10803 * src/lex.c (struct percent_table_struct): Delete.
10804 (percent_table): Delete.
10805 (options.h): Include it.
10806 * src/options.c: Create.
10807 * src/options.h: Create.
10808 Declare enum opt_access_e.
10809 Define struct option_table_struct.
10810
10811 2001-09-20 Marc Autret <autret_m@epita.fr>
10812
10813 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
10814 sections of Bison.
10815
10816 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
10817
10818 * src/bison.simple: s/%%filename/%%skeleton.
10819 * src/muscle_tab.c (getargs.h): Include it.
10820 (muscle_init): Insert new muscle skeleton.
10821
10822 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
10823
10824 * src/output.c (output_parser): Delete unused variable actions_dumped.
10825
10826 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
10827
10828 * src/output.c (output): Delete call to reader_output_yylsp.
10829 * src/reader.c (reader): Likewise.
10830 * src/reader.h: Delete declaration of reader_output_yylsp.
10831
10832 2001-09-02 Marc Autret <autret_m@epita.fr>
10833
10834 * src/reader.c: Include muscle_tab.h.
10835 (parse_union_decl): Update.
10836 (parse_macro_decl): Rename parse_muscle_decl.
10837 Update to use renamed functions and variable.
10838 (read_declarations, copy_action, read_additionnal_code, : Updated
10839 with correct variables and functions names.
10840 (packsymbols, reader): Likewise.
10841
10842 * src/reader.h (muscle_obstack): Extern declaration update.
10843
10844 * src/output.c: Include muscle_tab.h
10845 In all functions using macro_insert, change by using muscle_insert ().
10846 (macro_obstack): Rename muscle_obstack.
10847 Echo modifications in the whole file.
10848 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
10849 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
10850 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
10851
10852 * src/muscle_tab.h: Update double inclusion macros.
10853 (macro_entry_s): Rename muscle_entry_s.
10854 Update prototypes.
10855
10856 * src/muscle_tab.c: Include muscle_tab.h.
10857 Rename macro_tabble to muscle_table.
10858 (mhash1, mhash2, mcmp): Use muscle_entry.
10859 (macro_init): Rename muscle_init. Update.
10860 (macro_insert): Rename muscle_insert. Update.
10861 (macro_find): Rename muscle_find. Update.
10862
10863 * src/main.c: Include muscle_tab.h.
10864 (main): Call muscle_init ().
10865 * src/Makefile.am (bison_SOURCES): Echo modifications.
10866
10867 2001-09-02 Marc Autret <autret_m@epita.fr>
10868
10869 Now the files macro_tab.[ch] are named muscle_tab.[ch].
10870
10871 * src/muscle_tab.c, src/muscle_tab.h: Add files.
10872
10873 2001-09-02 Marc Autret <autret_m@epita.fr>
10874
10875 * src/macrotab.c, src/macrotab.h: Remove.
10876
10877 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
10878
10879 * src/reader.c (copy_guard): Use muscle to specify the `#line'
10880 filename.
10881
10882 2001-09-01 Marc Autret <autret_m@epita.fr>
10883
10884 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
10885 to an explicit value to activate the feature. We do it here.
10886
10887 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
10888
10889 * src/output.c (prepare): Delete the `filename' muscule insertion.
10890 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
10891 (parse_union_decl): Likewise.
10892 * src/macrotab.c (macro_init): Initialize filename by infile.
10893
10894 2001-08-31 Marc Autret <autret_m@epita.fr>
10895
10896 * src/bison.simple (YYLSP_NEEDED): New definition.
10897 * src/output.c (prepare): Add macro insertion of `locations_flag'
10898
10899 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
10900
10901 * src/output.c (prepare): Delete insertion of previous muscles,
10902 and insert the `prefix' muscles.
10903 * src/macrotab.c (macro_init): Likewise.
10904 (macro_init): Initialization prefix directive by `yy'.
10905 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
10906 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
10907 yylval, yydebug, yyerror, yynerrs and yyparse.
10908 New directive `#define' to substitute yydebug, ... with option
10909 name_prefix.
10910
10911 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
10912
10913 * src/main.c (main): Standardize.
10914 * src/output.c (output_table_data, output_parser): Likewise.
10915 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
10916
10917 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
10918
10919 * src/reader.c (read_additionnal_code): Rename %%user_code to
10920 %%epilogue.
10921 * src/output.c (output): Rename %%declarations to %%prologue.
10922 * src/bison.simple: Echo modifications.
10923
10924 2001-08-31 Marc Autret <autret_m@epita.fr>
10925
10926 * src/reader.c (readgram): CleanUp.
10927 (output_token_defines): Likewise.
10928 (packsymbols): Likewise.
10929 (reader): Likewise.
10930 * src/output.c (output): CPP-out useless code.
10931
10932 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
10933
10934 * src/reader.c (reader): Delete obsolete call to function
10935 output_trailers and output_headers.
10936 * src/output.h: Remove obsolete functions prototypes of output_headers
10937 and output_trailers.
10938
10939 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
10940
10941 * src/main.c: Include macrotab.h.
10942 * src/macrotab.h (macro_entry_s): Constify fields.
10943 Adjust functions prototypes.
10944 * src/macrotab.c (macro_insert): Constify key and value.
10945 (macro_find): Constify key.
10946 (macro_insert): Include 'xalloc.h'
10947 (macro_insert): Use XMALLOC.
10948 (macro_find): Constify return value.
10949 * src/output.c (output_table_data): Rename table to table_data.
10950 (output_parser): Constify macro_key, macro_value.
10951
10952 2001-08-30 Marc Autret <autret_m@epita.fr>
10953
10954 * src/reader.c (parse_skel_decl): New.
10955 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
10956 * src/lex.h (token_t): New token `tok_skel'.
10957 * src/lex.c (percent_table): Add skeleton option entry.
10958 Standardize.
10959
10960 2001-08-29 Marc Autret <autret_m@epita.fr>
10961
10962 * src/bison.simple: Add %%user_code directive at the end.
10963 * src/reader.c (read_additionnal_code): New.
10964 (reader): Use it.
10965 * src/output.c (output_program): Remove.
10966 (output): Update.
10967
10968 2001-08-28 Marc Autret <autret_m@epita.fr>
10969
10970 * src/output.c (output_actions): Clean up.
10971 (output_gram): CPP-out useless code.
10972 * src/reader.c (reader): Clean up, CPP-out useless code.
10973
10974 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
10975
10976 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
10977 directive.
10978 * src/bison.simple: Add `%%definitions'.
10979
10980 2001-08-28 Marc Autret <autret_m@epita.fr>
10981
10982 * config/depcomp: New file.
10983
10984 2001-08-27 Paul Eggert <eggert@twinsun.com>
10985
10986 * src/bison.simple (yyparse): Don't take the address of an
10987 item before the start of an array, as that doesn't conform to
10988 the C Standard.
10989
10990 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
10991
10992 * src/output.c (output): Remove the initialization of the macro
10993 obstack. It was done too late here.
10994
10995 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
10996 completely wrong.
10997 (reader): Initialize the macro obstack here, since we need it to grow
10998 '%define' directives.
10999
11000 * src/reader.h: Declare the macro obstack as extern.
11001
11002 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
11003
11004 * src/output.c (output_parser): Fix. Store single '%' characters in
11005 the output obstack instead of throwing them away.
11006
11007 2001-08-27 Akim Demaille <akim@epita.fr>
11008
11009 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
11010
11011 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11012
11013 * lib/Makefile.am: Adjust.
11014
11015 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11016
11017 * src/bison.simple: Update and add '%%' directives.
11018
11019 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11020
11021 * src/reader.c (reader): Remove calls to 'output_headers' and
11022 'output_trailers'. Remove some C output.
11023 (readgram): Disable a piece of code that was writing a default
11024 definition for 'YYSTYPE'.
11025 (reader_output_yylsp): Remove.
11026 (packsymbols): Output token defintions to a macro.
11027 (copy_definition): Disable C output.
11028
11029 * src/reader.c (parse_macro_decl): New function used to parse macro
11030 declarations.
11031 (copy_string2): Put the body of copy_string into this new function.
11032 Add a parameter to let the caller choose whether he wants to copy the
11033 string delimiters or not.
11034 (copy_string): Be a simple call to copy_string2 with the last argument
11035 bound to true.
11036 (read_declarations): Add case for macro definition.
11037 (copy_identifier): New.
11038 (parse_macro_decl): Read macro identifiers using copy_identifier
11039 rather than lex.
11040
11041 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11042
11043 * src/output.c (prepare): Add prefixed names.
11044 (output_parser): Output semantic actions.
11045 (output_parser): Fix bug on '%%line' directives.
11046
11047 * src/output.c (output_headers): Remove. The C code printed by this
11048 function should now be in the skeletons.
11049 (output_trailers): Remove.
11050 (output): Disable call to 'reader_output_yylsp'.
11051 (output_rule_data): Do not output tables to the table obstack.
11052
11053 * src/output.c: Remove some C dedicated output.
11054 Improve the use of macro and output obstacks.
11055 (output_defines): Remove.
11056
11057 * src/output.c (output_token_translations): Associate 'translate'
11058 table with a macro. No output to the table obstack.
11059 (output_gram): Same for 'rhs' and 'prhs'.
11060 (output_stos): Same for 'stos'.
11061 (output_rule_data): Same for 'r1' and 'r2'.
11062 (token_actions): Same for 'defact'.
11063 (goto_actions): Same for 'defgoto'.
11064 (output_base): Same for 'pact' and 'pgoto'.
11065 (output_table): Same for 'table'.
11066 (output_check): Same for 'check'.
11067
11068 * src/output.c (output_table_data): New function.
11069 (output_short_table): Remove.
11070 (output_short_or_char_table): Remove.
11071
11072 * src/output.c (output_parser): Replace most of the skeleton copy code
11073 with something new. Skeletons are now processed character by character
11074 rather than line by line, and Bison looks for '%%' macros. This is the
11075 first step in making Bison's output process (a lot) more flexible.
11076 (output_parser): Use the macro table.
11077
11078 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11079
11080 * src/main.c (main): Initialize the macro table.
11081
11082 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11083
11084 * src/lex.c (percent_table): Add tok_define.
11085 * src/lex.h: Add tok_define.
11086
11087 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11088
11089 * src/macrotab.c: New file.
11090 * src/macrotab.h: New file.
11091 * src/Makefile.am: Update.
11092
11093 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
11094
11095 * lib/hash.c: New file.
11096 * lib/hash.h: New file.
11097 * lib/Makefile.am: Update.
11098
11099 2001-08-15 Akim Demaille <akim@epita.fr>
11100
11101 Version 1.28c.
11102
11103 2001-08-15 Marc Autret <autret_m@epita.fr>
11104
11105 * src/reader.c (readgram): Indent output macro YYSTYPE.
11106 (packsymbols): Likewise.
11107 (output_token_defines): Likewise.
11108 * src/files.c: Standardize.
11109 (compute_header_macro): New.
11110 (defines_obstack_save): New. Use compute_header_macro.
11111 (output_files): Update. Use defines_obstack_save.
11112
11113 2001-08-15 Akim Demaille <akim@epita.fr>
11114
11115 * doc/bison.texinfo (Table of Symbols): Document
11116 YYSTACK_USE_ALLOCA.
11117
11118 2001-08-15 Akim Demaille <akim@epita.fr>
11119
11120 * missing: Update from CVS Automake.
11121 * config/config.guess, config/config.sub, config/texinfo.tex:
11122 Update from gnu.org.
11123
11124 2001-08-15 Akim Demaille <akim@epita.fr>
11125
11126 * Makefile.maint: Sync with CVS Autoconf.
11127
11128 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
11129
11130 * doc/bison.texinfo: Include GNU Free Documentation License from
11131 `fdl.texi'.
11132 * doc/fdl.texi: Add to package.
11133
11134 2001-08-14 Marc Autret <autret_m@epita.fr>
11135
11136 Turn on %{source,header}_extension features.
11137
11138 * src/lex.c (percent_table): Un-CPP out header_extension and
11139 source_extension.
11140 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
11141 (compute_exts_from_src): Remove conditions. It restores priorities
11142 between options.
11143
11144 2001-08-14 Marc Autret <autret_m@epita.fr>
11145
11146 * src/files.c (compute_base_names): Add extensions computing when
11147 `--file-prefix' used.
11148 Standardize function calls.
11149
11150 2001-08-13 Marc Autret <autret_m@epita.fr>
11151
11152 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
11153 defining it (defined but null disables alloca).
11154
11155 2001-08-13 Marc Autret <autret_m@epita.fr>
11156
11157 * src/bison.simple (_yy_memcpy): CPP reformat.
11158
11159 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
11160
11161 * tests/atconfig.in (CPPFLAGS): Fix.
11162
11163 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
11164
11165 * doc/bison.texinfo: Include GNU General Public License from
11166 `gpl.texi'.
11167 * doc/gpl.texi: Add to package.
11168
11169 2001-08-10 Marc Autret <autret_m@epita.fr>
11170
11171 * src/print_graph.h: Fix.
11172 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
11173
11174 2001-08-10 Akim Demaille <akim@epita.fr>
11175
11176 * src/system.h: Provide default declarations for stpcpy, strndup,
11177 and strnlen.
11178
11179 2001-08-10 Robert Anisko <anisko_r@epita.fr>
11180
11181 * doc/bison.texinfo (Locations): Update @$ stuff.
11182
11183 2001-08-09 Robert Anisko <anisko_r@epita.fr>
11184
11185 * src/bison.simple (YYLLOC_DEFAULT): Update.
11186 (yyparse): Adjust.
11187
11188 2001-08-08 Marc Autret <autret_m@epita.fr>
11189
11190 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
11191 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
11192 Reported by Fabrice Bauzac.
11193
11194 2001-08-08 Marc Autret <autret_m@epita.fr>
11195
11196 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
11197 * src/vcg.c (output_node): Fix.
11198 * src/vcg.h: Cleanup.
11199 * src/print_graph.c: Add comments.
11200 (node_output_size): New global variable. Simplify the formatting of
11201 the VCG graph output.
11202 (print_actions): Unused code is now used. It notifies the final state
11203 and no action states in the VCG graph. It also give the reduce actions.
11204 The `shift and goto' edges are red and the `go to state' edges are
11205 blue.
11206 Get the current node name and node_obstack by argument.
11207 (node_obstack): New variable.
11208 (print_state): Manage node_obstack.
11209 (print_core): Use node_obstack given by argument.
11210 A node is not only computed here but in print_actions also.
11211 (print_graph): CPP out useless code instead of commenting it.
11212
11213 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
11214
11215 * tests/atconfig.in (CPPFLAGS): Fix.
11216
11217 2001-08-07 Akim Demaille <akim@epita.fr>
11218
11219 * src/print_graph.c (quote): New.
11220 (print_core): Use it.
11221
11222 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
11223
11224 * src/vcg.c (complain.h): Include it.
11225 Unepitaize `return' invocations.
11226 [NDEBUG] (main): Remove.
11227 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
11228 * src/files.c (open_files): Initialize graph_obstack.
11229 * src/print_graph.c (print_actions): CPP out useless code.
11230 (print_core): Don't output the last `\n' in labels.
11231 Use `quote'.
11232 * src/files.c (output_files): Output the VCG file.
11233 * src/main.c (main): Invoke print_graph ();
11234
11235 2001-08-06 Marc Autret <autret_m@epita.fr>
11236
11237 Automaton VCG graph output.
11238 Using option ``-g'' or long option ``--graph'', you can generate
11239 a gram_filename.vcg file containing a VCG description of the LALR (1)
11240 automaton of your grammar.
11241
11242 * src/main.c: Call to print_graph() function.
11243 * src/getargs.h: Update.
11244 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
11245 (graph_flag): New flag.
11246 (longopts): Update.
11247 (getargs): Add case `g'.
11248 * src/files.c (graph_obstack): New obstack struct.
11249 (open_files): Initialize new obstack.
11250 (output_files): Saves graph_obstack if required.
11251 * src/files.h (graph_obstack): New extern declaration.
11252 * src/Makefile.am: Add new source files.
11253
11254 2001-08-06 Marc Autret <autret_m@epita.fr>
11255
11256 * src/print_graph.c, src/print_graph.h (graph): New.
11257 * src/vcg.h: New file.
11258 * src/vcg.c: New file, VCG graph handling.
11259
11260 2001-08-06 Marc Autret <autret_m@epita.fr>
11261
11262 Add of %source_extension and %header_extension which specify
11263 the source or/and the header output file extension.
11264
11265 * src/files.c (compute_base_names): Remove initialisation of
11266 src_extension and header_extension.
11267 (compute_exts_from_gf): Update.
11268 (compute_exts_from_src): Update.
11269 (output_files): Update.
11270 * src/reader.c (parse_header_extension_decl): New.
11271 (parse_source_extension_decl): New.
11272 (read_declarations): New case statements for the new tokens.
11273 * src/lex.c (percent_table): Add entries for %source_extension
11274 and %header_extension.
11275 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
11276
11277 2001-08-06 Marc Autret <autret_m@epita.fr>
11278
11279 * configure.in: Bump to 1.28c.
11280 * doc/bison.texinfo: Texinfo thingies.
11281
11282 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
11283
11284 * tests/atconfig.in (CPPFLAGS): Add.
11285 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
11286
11287 2001-08-03 Akim Demaille <akim@epita.fr>
11288
11289 Version 1.28b.
11290
11291 2001-08-03 Akim Demaille <akim@epita.fr>
11292
11293 * tests/Makefile.am (check-local): Ship testsuite.
11294 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
11295 Include `string.h'.
11296
11297 2001-08-03 Akim Demaille <akim@epita.fr>
11298
11299 * configure.in: Try using -Wformat when compiling.
11300
11301 2001-08-03 Akim Demaille <akim@epita.fr>
11302
11303 * configure.in: Bump to 1.28b.
11304
11305 2001-08-03 Akim Demaille <akim@epita.fr>
11306
11307 * src/complain.c: Adjust strerror_r portability issues.
11308
11309 2001-08-03 Akim Demaille <akim@epita.fr>
11310
11311 Version 1.28a.
11312
11313 2001-08-03 Akim Demaille <akim@epita.fr>
11314
11315 * src/getargs.c, src/getarg.h (skeleton)): Constify.
11316 * src/lex.c (literalchar): Avoid name clashes on `buf'.
11317 * src/getargs.c: Include complain.h.
11318 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
11319 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
11320
11321 2001-08-03 Akim Demaille <akim@epita.fr>
11322
11323 * src/reader.c (readgram): Display hidden chars in error messages.
11324
11325 2001-08-03 Akim Demaille <akim@epita.fr>
11326
11327 Update to gettext 0.10.39.
11328
11329 2001-08-03 Akim Demaille <akim@epita.fr>
11330
11331 * lib/strspn.c: New.
11332
11333 2001-08-01 Marc Autret <autret_m@epita.fr>
11334
11335 * doc/bison.texinfo: Update.
11336 * doc/bison.1 (mandoc): Update.
11337 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
11338 * src/files.c: Support output files extensions computing.
11339 (src_extension): New static variable.
11340 (header_extension): New static variable.
11341 (tr): New function.
11342 (get_extension_index): New function, gets the index of an extension
11343 filename in a string.
11344 (compute_exts_from_gf): New function, computes extensions from the
11345 grammar file extension.
11346 (compute_exts_from_src): New functions, computes extensions from the
11347 C source file extension, file given by ``-o'' option.
11348 (compute_base_names): Update.
11349 (output_files): Update.
11350
11351 2001-08-01 Robert Anisko <anisko_r@epita.fr>
11352
11353 * doc/bison.texi: Document @$.
11354 (Locations): New section.
11355
11356 2001-07-18 Akim Demaille <akim@epita.fr>
11357
11358 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
11359 * config/prev-version.txt, config/move-if-change: New.
11360 * Makefile.am: Adjust.
11361
11362 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
11363
11364 * src/bison.simple (yyparse): Suppress warning `comparaison
11365 between signed and unsigned'.
11366
11367 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
11368
11369 * src/getargs.h (raw_flag): Remove.
11370 * src/getargs.c: Die on `-r'/`--raw'.
11371 * src/lex.c (parse_percent_token): Die on `%raw'.
11372 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
11373 * tests/calc.at: Suppress test with option `--raw'.
11374
11375 2001-07-14 Akim Demaille <akim@epita.fr>
11376
11377 * config/: New.
11378 * configure.in: Require Autoconf 2.50.
11379 Update to gettext 0.10.38.
11380
11381 2001-03-16 Akim Demaille <akim@epita.fr>
11382
11383 * doc/bison.texinfo: ANSIfy the examples.
11384
11385 2001-03-16 Akim Demaille <akim@epita.fr>
11386
11387 * getargs.c (skeleton): New variable.
11388 (longopts): --skeleton is a new option.
11389 (shortopts, getargs): -S is a new option.
11390 * getargs.h: Declare skeleton.
11391 * output.c (output_parser): Use it.
11392
11393 2001-03-16 Akim Demaille <akim@epita.fr>
11394
11395 * m4/strerror_r.m4: New.
11396 * m4/error.m4: Run AC_FUNC_STRERROR_R.
11397 * lib/error.h, lib/error.c: Update.
11398
11399 2001-03-16 Akim Demaille <akim@epita.fr>
11400
11401 * src/getargs.c (longopts): Clean up.
11402
11403 2001-02-21 Akim Demaille <akim@epita.fr>
11404
11405 * src/reader.c (gensym): `gensym_count' is your own.
11406 Use a static buf to create the symbol name, as token_buffer is no
11407 longer a buffer.
11408
11409 2001-02-08 Akim Demaille <akim@epita.fr>
11410
11411 * src/conflicts.c (conflict_report): Be sure not to append to res
11412 between two calls, which could happen if both first sprintf were
11413 skipped, but not the first cp += strlen.
11414
11415 2001-02-08 Akim Demaille <akim@epita.fr>
11416
11417 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
11418 New, from fileutils 4.0.37.
11419 * configure.in: Require Autoconf 2.49c. I took some time before
11420 making this decision. This is the only way out for portability
11421 issues in Bison, it would mean way too much duplicate effort to
11422 import in Bison features implemented in 2.49c since 2.13.
11423 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
11424
11425 2001-02-02 Akim Demaille <akim@epita.fr>
11426
11427 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
11428 * lib/xalloc.h, lib/xmalloc.c: Update.
11429
11430 2001-01-19 Akim Demaille <akim@epita.fr>
11431
11432 Get rid of the ad hoc handling of token_buffer in the scanner: use
11433 the obstacks.
11434
11435 * src/lex.c (token_obstack): New.
11436 (init_lex): Initialize it. No longer call...
11437 (grow_token_buffer): this. Remove it.
11438 Adjust all the places which used it to use the obstack.
11439
11440 2001-01-19 Akim Demaille <akim@epita.fr>
11441
11442 * src/lex.h: Rename all the tokens:
11443 s/\bENDFILE\b/tok_eof/g;
11444 s/\bIDENTIFIER\b/tok_identifier/g;
11445 etc.
11446 Let them be enums, not #define, to ease debugging.
11447 Adjust all the code.
11448
11449 2001-01-18 Akim Demaille <akim@epita.fr>
11450
11451 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
11452 * src/lex.c (maxtoken, grow_token_buffer): Static.
11453
11454 2001-01-18 Akim Demaille <akim@epita.fr>
11455
11456 Since we now use obstacks, more % directives can be enabled.
11457
11458 * src/lex.c (percent_table): Also accept `%yacc',
11459 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
11460 `%debug'.
11461 Handle the actions for `%semantic_parser' and `%pure_parser' here,
11462 instead of returning a token.
11463 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
11464 * src/reader.c (read_declarations): Adjust.
11465 * src/files.c (open_files): Don't call `compute_base_names', don't
11466 compute `attrsfile' since they depend upon data which might be
11467 *in* the input file now.
11468 (output_files): Do it here.
11469 * src/output.c (output_headers): Document the fact that this patch
11470 introduces a guaranteed SEGV for semantic parsers.
11471 * doc/bison.texinfo: Document them.
11472 * tests/suite.at: Exercise these %options.
11473
11474 2000-12-20 Akim Demaille <akim@epita.fr>
11475
11476 Also handle the output file (--verbose) with obstacks.
11477
11478 * files.c (foutput): Remove.
11479 (output_obstack): New.
11480 Adjust all dependencies.
11481 * src/conflicts.c: Return a string.
11482 * src/system.h (obstack_grow_string): Rename as...
11483 (obstack_sgrow): this. Be ready to work with non literals.
11484 (obstack_fgrow4): New.
11485
11486 2000-12-20 Akim Demaille <akim@epita.fr>
11487
11488 * src/files.c (open_files): Fix the computation of short_base_name
11489 in the case of `-o foo.tab.c'.
11490
11491 2000-12-20 Akim Demaille <akim@epita.fr>
11492
11493 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
11494 (copy_dollar): Now that everything uses obstacks, get rid of the
11495 FILE * parameters.
11496
11497 2000-12-20 Akim Demaille <akim@epita.fr>
11498
11499 * src/files.c (open_files): Actually the `.output' file is based
11500 on the short_base_name, not base_name.
11501 * tests/suite.at (Checking output file names): Adjust.
11502
11503 2000-12-20 Akim Demaille <akim@epita.fr>
11504
11505 * src/bison.s1: Remove, we now use directly...
11506 * src/bison.simple: this.
11507 * src/Makefile.am: Use pkgdata instead of data.
11508
11509 2000-12-20 Akim Demaille <akim@epita.fr>
11510
11511 * src/files.c (guard_obstack): New.
11512 (open_files): Initialize it.
11513 (output_files): Dump it...
11514 * src/files.h: Export it.
11515 * src/reader.c (copy_guard): Use it.
11516
11517 2000-12-19 Akim Demaille <akim@epita.fr>
11518
11519 * src/files.c (outfile, defsfile, actfile): Removed as global
11520 vars.
11521 (open_files): Don't compute them.
11522 (output_files): Adjust.
11523 (base_name, short_base_name): Be global.
11524 Adjust dependencies.
11525
11526 2000-12-19 Akim Demaille <akim@epita.fr>
11527
11528 * src/files.c (strsuffix): New.
11529 (stringappend): Be just like strcat but allocate.
11530 (base_names): Eve out from open_files.
11531 Try to simplify the rather hairy computation of base_name and
11532 short_base_name.
11533 (open_files): Use it.
11534 * tests/suite.at (Checking output file names): New test.
11535
11536 2000-12-19 Akim Demaille <akim@epita.fr>
11537
11538 * src/system.h (obstack_grow_literal_string): Rename as...
11539 (obstack_grow_string): this.
11540 * src/output.c (output_parser): Recognize `%% actions' instead of
11541 `$'.
11542 * src/bison.s1: s/$/%% actions/.
11543 * src/bison.hairy: Likewise.
11544
11545 2000-12-19 Akim Demaille <akim@epita.fr>
11546
11547 * src/output.c (output_parser): Compute the `#line' lines when
11548 there are.
11549 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
11550 Suggested by Hans Aberg.
11551
11552 2000-12-19 Akim Demaille <akim@epita.fr>
11553
11554 Let the handling of the skeleton files be local to the procedures
11555 that use it.
11556
11557 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
11558 longer static.
11559 (fparser, open_extra_files): Remove.
11560 (open_files, output_files): Don't take care of fparser.
11561 * src/files.h: Adjust.
11562 * src/output.c (output_parser): Open and close the file to the
11563 skeleton.
11564 * src/reader.c (read_declarations): When %semantic_parser, open
11565 fguard.
11566
11567 2000-12-19 Akim Demaille <akim@epita.fr>
11568
11569 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
11570 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
11571
11572 2000-12-19 Akim Demaille <akim@epita.fr>
11573
11574 * src/files.c (open_files): Yipee! We no longer need all the code
11575 looking for `/tmp' since we have no tmp file.
11576
11577 2000-12-19 Akim Demaille <akim@epita.fr>
11578
11579 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
11580 New macros.
11581 * src/files.c (open_files): Less dependency on MSDOS etc.
11582
11583 2000-12-14 Akim Demaille <akim@epita.fr>
11584
11585 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
11586 Provide a default definition.
11587 Use it when executing the default @ action.
11588 * src/reader.c (reader_output_yylsp): No longer include
11589 `timestamp' and `text' in the default YYLTYPE.
11590
11591 2000-12-12 Akim Demaille <akim@epita.fr>
11592
11593 * src/reader.c (copy_definition, parse_union_decl, copy_action)
11594 (copy_guard): Quote the file names.
11595 Reported by Laurent Mascherpa.
11596
11597 2000-12-12 Akim Demaille <akim@epita.fr>
11598
11599 * src/output.c (output_headers, output_program, output): Be sure
11600 to escape special characters when outputting filenames.
11601 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
11602 (output_headers): Don't depend on them, Use ACTSTR.
11603
11604 2000-11-17 Akim Demaille <akim@epita.fr>
11605
11606 * lib/obstack.h: Formatting changes.
11607 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
11608 prevents type checking.
11609 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
11610 cast the value to (void *): assigning a `foo *' to a `void *'
11611 variable is valid.
11612 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
11613 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
11614 append characters.
11615
11616 2000-11-17 Akim Demaille <akim@epita.fr>
11617
11618 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
11619 as...
11620 (suite.m4, regression.m4, calc.m4): these.
11621 * tests/atgeneral.m4: Update from CVS Autoconf.
11622
11623 2000-11-17 Akim Demaille <akim@epita.fr>
11624
11625 * tests/regression.m4 (%union and --defines): New test,
11626 demonstrating a current bug in the obstack implementation.
11627
11628 2000-11-17 Akim Demaille <akim@epita.fr>
11629
11630 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
11631 macros.
11632 Use them to declare the variables which are global or local to
11633 `yyparse'.
11634
11635 2000-11-17 Akim Demaille <akim@epita.fr>
11636
11637 * acconfig.h: Remove, no longer used.
11638
11639 2000-11-07 Akim Demaille <akim@epita.fr>
11640
11641 * src: s/Copyright (C)/Copyright/g.
11642
11643 2000-11-07 Akim Demaille <akim@epita.fr>
11644
11645 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
11646 defining.
11647 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
11648
11649 2000-11-07 Akim Demaille <akim@epita.fr>
11650
11651 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
11652 Merge in a single CPP if/else.
11653
11654 2000-11-07 Akim Demaille <akim@epita.fr>
11655
11656 * src/output.c (output): Remove useless variables.
11657 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
11658 argument `data' for consistency with the prototypes.
11659 Qualify it `const'.
11660 (obstack_copy, obstack_copy0): Rename the second argument as
11661 `address' for consistency. Qualify it `const'.
11662 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
11663 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
11664 `const' their input argument (`data' or `address').
11665 Adjust the corresponding macros to include `const' in casts.
11666
11667 2000-11-03 Akim Demaille <akim@epita.fr>
11668
11669 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
11670 s/PFILE1/BISON_HAIRY/.
11671 Adjust dependencies.
11672
11673 2000-11-03 Akim Demaille <akim@epita.fr>
11674
11675 For some reason, this was not applied.
11676
11677 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
11678 `unlink': it's no longer used.
11679
11680 2000-11-03 Akim Demaille <akim@epita.fr>
11681
11682 * src/files.c (skeleton_find): New function, eved out of...
11683 (open_files, open_extra_files): here.
11684
11685 2000-11-03 Akim Demaille <akim@epita.fr>
11686
11687 Don't use `atexit'.
11688
11689 * src/files.c (obstack_save): New function.
11690 (done): Rename as...
11691 (output_files): this.
11692 Use `obstack_save'.
11693 * src/main.c (main): Don't use `atexit' to register `done', since
11694 it no longer has to remove tmp files, just call `output_files'
11695 when there are no errors.
11696
11697 2000-11-02 Akim Demaille <akim@epita.fr>
11698
11699 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
11700 `unlink': it's no longer used.
11701 * src/files.h: Formatting changes.
11702
11703 2000-11-02 Akim Demaille <akim@epita.fr>
11704
11705 Remove the last uses of mktemp and unlink/delete.
11706
11707 * src/files.c (fdefines, ftable): Removed.
11708 (defines_ostack, table_obstack): New.
11709 Adjust dependencies of the former into uses of the latter.
11710 * src/output.c (output_short_or_char_table, output_short_table):
11711 Convert to using obstacks.
11712 * src/reader.c (copy_comment2): Accept one FILE * and two
11713 obstacks.
11714 (output_token_defines, reader_output_yylsp): Use obstacks.
11715 * src/system.h (obstack_fgrow3): New.
11716 * po/POTFILES.in: Adjust.
11717
11718 2000-11-01 Akim Demaille <akim@epita.fr>
11719
11720 Change each use of `fattrs' into a use of `attrs_obstack'.
11721
11722 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
11723 * src/files.c (fattrs): Remove.
11724 (attrs_obstack): New.
11725 Adjust all dependencies.
11726 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
11727
11728 2000-11-01 Akim Demaille <akim@epita.fr>
11729
11730 Introduce obstacks.
11731 Change each use of `faction' into a use of `action_obstack'.
11732
11733 * lib/obstack.h, lib/obstack.c: New files.
11734 * src/files.c (faction): Remove.
11735 (action_obstack): New.
11736 Adjust all dependencies.
11737
11738 2000-10-20 Akim Demaille <akim@epita.fr>
11739
11740 * lib/quote.h (PARAMS): New macro. Use it.
11741
11742 2000-10-16 Akim Demaille <akim@epita.fr>
11743
11744 * src/output.c (output_short_or_char_table): New function.
11745 (output_short_table, output_token_translations): Use it.
11746 (goto_actions): Use output_short_table.
11747
11748 2000-10-16 Akim Demaille <akim@epita.fr>
11749
11750 * src/symtab.c (bucket_new): New function.
11751 (getsym): Use it.
11752
11753 * src/output.c (output_short_table): New argument to display the
11754 comment associated with the table.
11755 Adjust dependencies.
11756 (output_gram): Use it.
11757 (output_rule_data): Nicer output layout for YYTNAME.
11758
11759 2000-10-16 Akim Demaille <akim@epita.fr>
11760
11761 * src/lex.c (read_typename): New function.
11762 (lex): Use it.
11763 * src/reader.c (copy_dollar): Likewise.
11764
11765 2000-10-16 Akim Demaille <akim@epita.fr>
11766
11767 * src/reader.c (copy_comment2): Expect the input stream to be on
11768 the `/' which is suspected to open a comment, instead of being
11769 called after `//' or `/*' was read.
11770 (copy_comment, copy_definition, parse_union_decl, copy_action)
11771 (copy_guard): Adjust.
11772
11773 2000-10-16 Akim Demaille <akim@epita.fr>
11774
11775 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
11776 `read_signed_integer'.
11777
11778 2000-10-16 Akim Demaille <akim@epita.fr>
11779
11780 * src/reader.c (copy_dollar): New function.
11781 (copy_guard, copy_action): Use it.
11782
11783 2000-10-16 Akim Demaille <akim@epita.fr>
11784
11785 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
11786 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
11787 New files, from Fileutils 4.0.27.
11788 * src/main.c (printable_version): Remove.
11789 * src/lex.c, src/reader.c: Use `quote'.
11790
11791 2000-10-04 Akim Demaille <akim@epita.fr>
11792
11793 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
11794
11795 2000-10-04 Akim Demaille <akim@epita.fr>
11796
11797 * doc/bison.texinfo: Various typos spotted by Neil Booth.
11798
11799 2000-10-04 Akim Demaille <akim@epita.fr>
11800
11801 When a literal string is used to define two different tokens,
11802 `bison -v' segfaults.
11803 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
11804
11805 * tests/regression.m4: New file.
11806 Include the core of the sample provided by Piotr Gackiewicz.
11807 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
11808 properly.
11809
11810 2000-10-04 Akim Demaille <akim@epita.fr>
11811
11812 * src/reader.c (parse_expect_decl): Keep `count' within the size
11813 of `buffer'.
11814 From Neil Booth.
11815
11816 2000-10-02 Paul Eggert <eggert@twinsun.com>
11817
11818 * bison.s1 (yyparse): Assign the default value
11819 unconditionally, to avoid a GCC warning and make the parser a
11820 tad smaller.
11821
11822 2000-10-02 Akim Demaille <akim@epita.fr>
11823
11824 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
11825 options.
11826
11827 2000-10-02 Akim Demaille <akim@epita.fr>
11828
11829 * src/derives.c, src/print.c, src/reduce.c: To ease the
11830 translation, move some `\n' out of the translated strings.
11831
11832 2000-10-02 Akim Demaille <akim@epita.fr>
11833
11834 The location tracking mechanism is precious for parse error
11835 messages. Nevertheless, it is enabled only when `@n' is used in
11836 the grammar, which is a different issue (you can use it in error
11837 message, but not in the grammar per se). Therefore, there should
11838 be another means to enable it.
11839
11840 * src/getargs.c (getargs): Support `--locations'.
11841 (usage): Report it.
11842 * src/getargs.h (locationsflag): Export it.
11843 * src/lex.c (percent_table): Support `%locations'.
11844 * src/reader.c (yylsp_needed): Remove this variable, now replaced
11845 with `locationsflag'.
11846 * doc/bison.texinfo: Document `--locations' and `%locations'.
11847 Sort the options.
11848 * tests/calc.m4: Test it.
11849
11850 For regularity of the names, replace each
11851 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
11852 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
11853 In addition replace each `flag' with `_flag'.
11854
11855 2000-10-02 Akim Demaille <akim@epita.fr>
11856
11857 Also test parse error messages, including with YYERROR_VERBOSE.
11858
11859 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
11860 associative).
11861 Use it to check the computations.
11862 Use it to check `nonassoc' is honored.
11863 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
11864 `--yyerror-verbose'.
11865 (_AT_CHECK_CALC): Adjust to this option.
11866 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
11867
11868 2000-10-02 Akim Demaille <akim@epita.fr>
11869
11870 Test also `--verbose', `--defines' and `--name-prefix'. Testing
11871 the latter demonstrates a flaw in the handling of non debugging
11872 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
11873 was used in order to simplify:
11874
11875 #if YYDEBUG
11876 if (yydebug)
11877 {
11878 ...
11879 }
11880 #endif
11881
11882 into
11883
11884 if (yydebug)
11885 {
11886 ...
11887 }
11888
11889 unfortunately this leads to a CPP conflict when
11890 `--name-prefix=foo' is used since it produces `#define yydebug
11891 foodebug'.
11892
11893 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
11894 (YYDPRINTF): New macro.
11895 Spread its use.
11896 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
11897 the bison options.
11898 Also test `--verbose', `--defines' and `--name-prefix'.
11899
11900 2000-10-02 Akim Demaille <akim@epita.fr>
11901
11902 Improve the readability of the produced parsers.
11903
11904 * src/bison.s1: Formatting changes.
11905 Improve the comment related to the `$' mark.
11906 (yydefault): Don't fall through to `yyresume': `goto' there.
11907 * src/output.c (output_parser): When the `$' is met, skip the end
11908 of its line.
11909 New variable, `number_of_dollar_signs', to check there's exactly
11910 one `$' in the parser skeleton.
11911
11912 2000-10-02 Akim Demaille <akim@epita.fr>
11913
11914 * lib/xstrdup.c: New file, from the fileutils.
11915 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
11916 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
11917 instead of strlen + xmalloc + strcpy.
11918 * src/symtab.c (copys): Remove, use xstrdup instead.
11919
11920 2000-10-02 Akim Demaille <akim@epita.fr>
11921
11922 * src/gram.h (associativity): New enum type which replaces the
11923 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
11924 `right_assoc', `left_assoc' and `non_assoc'.
11925 Adjust all dependencies.
11926 * src/reader.c: Formatting changes.
11927 (LTYPESTR): Don't define it, use it as a literal in
11928 `reader_output_yylsp'.
11929 * src/symtab.h (symbol_class): New enum type which replaces the
11930 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
11931 `sunknown', `stoken and `snterm'.
11932
11933 2000-10-02 Akim Demaille <akim@epita.fr>
11934
11935 * src/getargs.c (fixed_outfiles): Rename as...
11936 (yaccflag): for consistency and accuracy.
11937 Adjust dependencies.
11938
11939 2000-10-02 Akim Demaille <akim@epita.fr>
11940
11941 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
11942 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
11943 difficult and introduced a lot of core dump. It turns out that
11944 Bison used an implementation of `xmalloc' based on `calloc', and
11945 at various places it does depend upon the initialization to 0. I
11946 have not tried to isolate the pertinent places, and all the former
11947 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
11948 someone should address this issue.
11949
11950 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
11951 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
11952 files.
11953 Adjust dependencies.
11954 * src/warshall.h: New file.
11955 Propagate.
11956
11957 2000-10-02 Akim Demaille <akim@epita.fr>
11958
11959 Various anti-`extern in *.c' changes.
11960
11961 * src/system.h: Include `assert.h'.
11962
11963 2000-10-02 Akim Demaille <akim@epita.fr>
11964
11965 * src/state.h (nstates, final_state, first_state, first_shift)
11966 (first_reduction): Move their exportation from here...
11967 * src/LR0.h: to here.
11968 Adjust dependencies.
11969 * src/getargs.c (statisticsflag): New variable.
11970 Add support for `--statistics'.
11971 Adjust dependencies.
11972
11973 Remove a lot of now useless `extern' statements in most files.
11974
11975 2000-10-02 Akim Demaille <akim@epita.fr>
11976
11977 * src/LR0.h: New file.
11978 Propagate its use.
11979
11980 2000-10-02 Akim Demaille <akim@epita.fr>
11981
11982 * src/print.h: New file.
11983 Propagate its use.
11984 * src/print.c: Formatting and ordering changes.
11985 (verbose, terse): Replace with...
11986 (print_results): this new function.
11987 Adjust dependencies.
11988
11989 2000-10-02 Akim Demaille <akim@epita.fr>
11990
11991 * src/conflicts.c (conflict_report): New function.
11992 (conflict_log, verbose_conflict_log): Replace with...
11993 (print_conflicts): this function.
11994 Adjust dependencies.
11995 * src/conflicts.h: New file.
11996 Propagate its inclusion.
11997
11998 2000-10-02 Akim Demaille <akim@epita.fr>
11999
12000 * src/nullable.h: New file.
12001 Propagate its inclusion.
12002 * src/nullable.c: Formatting changes.
12003
12004 2000-10-02 Akim Demaille <akim@epita.fr>
12005
12006 * src/reduce.h: New file.
12007 Propagate its inclusion.
12008 * src/reduce.c: Topological sort and other formatting changes.
12009 (bool, TRUE, FALSE): Move their definition to...
12010 * src/system.h: here.
12011
12012 2000-10-02 Akim Demaille <akim@epita.fr>
12013
12014 * src/files.c: Formatting changes.
12015 (tryopen, tryclose, openfiles): Rename as...
12016 (xfopen, xfclose, open_files): this.
12017 (stringappend): static.
12018 * src/files.h: Complete the list of exported symbols.
12019 Propagate its use.
12020
12021 2000-10-02 Akim Demaille <akim@epita.fr>
12022
12023 * src/reader.h: New file.
12024 Propagate its use instead of tedious list of `extern' and
12025 prototypes.
12026 * src/reader.c: Formatting changes, topological sort,
12027 s/register//.
12028
12029 2000-10-02 Akim Demaille <akim@epita.fr>
12030
12031 * src/lex.h: Prototype `lex.c' exported functions.
12032 * src/reader.c: Adjust.
12033 * src/lex.c: Formatting changes.
12034 (safegetc): Rename as...
12035 (xgetc): this.
12036
12037 2000-10-02 Akim Demaille <akim@epita.fr>
12038
12039 * src/lalr.h: New file.
12040 Propagate its inclusion instead of prototypes and `extern'.
12041 * src/lalr.c: Formatting changes, topological sorting etc.
12042
12043 2000-10-02 Akim Demaille <akim@epita.fr>
12044
12045 * src/output.c (token_actions): Introduce a temporary array,
12046 YYDEFACT, that makes it possible for this function to use
12047 output_short_table.
12048
12049 2000-10-02 Akim Demaille <akim@epita.fr>
12050
12051 `user_toknums' is output as a `short[]' in `output.c', while it is
12052 defined as a `int[]' in `reader.c'. For consistency with the
12053 other output tables, `user_toknums' is now defined as a table of
12054 shorts.
12055
12056 * src/reader.c (user_toknums): Be a short table instead of an int
12057 table.
12058 Adjust dependencies.
12059
12060 Factor the short table outputs.
12061
12062 * src/output.c (output_short_table): New function.
12063 * src/output.c (output_gram, output_stos, output_rule_data)
12064 (output_base, output_table, output_check): Use it.
12065
12066 2000-10-02 Akim Demaille <akim@epita.fr>
12067
12068 * src/output.c (output): Topological sort of the functions, in
12069 order to get rid of the `static' prototypes.
12070 No longer use `register'.
12071 * src/output.h: New file.
12072 Propagate its inclusion in files explicitly prototyping functions
12073 from output.c.
12074
12075 2000-09-21 Akim Demaille <akim@epita.fr>
12076
12077 * src/atgeneral.m4: Update from Autoconf.
12078
12079 2000-09-21 Akim Demaille <akim@epita.fr>
12080
12081 * src/closure.h: New file.
12082 * src/closure.c: Formatting changes, topological sort over the
12083 functions, use of closure.h.
12084 (initialize_closure, finalize_closure): Rename as...
12085 (new_closure, free_closure): these. Adjust dependencies.
12086 * src/LR0.c: Formatting changes, topological sort, use of
12087 cloture.h.
12088 (initialize_states): Rename as...
12089 (new_states): this.
12090 * src/Makefile.am (noinst_HEADERS): Adjust.
12091
12092 2000-09-20 Akim Demaille <akim@epita.fr>
12093
12094 * src/acconfig.h: Don't protect config.h against multiple
12095 inclusion.
12096 Don't define PARAMS.
12097 * src/system.h: Define PARAMS.
12098 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
12099 purpose of config.h. system.h must not try to fix wrong
12100 definitions in config.h.
12101
12102 2000-09-20 Akim Demaille <akim@epita.fr>
12103
12104 * src/derives.h: New file.
12105 * src/main.c, src/derives.h: Use it.
12106 Formatting changes.
12107 * src/Makefile.am (noinst_HEADERS): Adjust.
12108
12109 2000-09-20 Akim Demaille <akim@epita.fr>
12110
12111 * tests/atgeneral.m4: Update from Autoconf.
12112 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
12113 (AT_CHECK_CALC): New macros.
12114 Use these macros to test bison with options `', `--raw',
12115 `--debug', `--yacc', `--yacc --debug'.
12116
12117 2000-09-19 Akim Demaille <akim@epita.fr>
12118
12119 * src/output.c: Formatting changes.
12120 * src/machine.h: Remove, leaving its contents in...
12121 * src/system.h: here.
12122 Include stdio.h.
12123 Adjust all dependencies on stdio.h and machine.h.
12124 * src/getargs.h: New file.
12125 Let all `extern' declarations about getargs.c be replaced with
12126 inclusion of `getargs.h'.
12127 * src/Makefile.am (noinst_HEADERS): Adjust.
12128
12129 * tests/calc.m4 (yyin): Be initialized in main, not on the global
12130 scope.
12131 (yyerror): Returns void, not int.
12132 * doc/bison.texinfo: Formatting changes.
12133
12134 2000-09-19 Akim Demaille <akim@epita.fr>
12135
12136 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
12137 portable.
12138
12139 2000-09-18 Akim Demaille <akim@epita.fr>
12140
12141 * configure.in: Append WARNING_CFLAGS to CFLAGS.
12142 * src/Makefile.am (INCLUDES): Don't.
12143 Be ready to fetch headers in lib/.
12144
12145 2000-09-18 Akim Demaille <akim@epita.fr>
12146
12147 * doc/bison.texinfo: Update the copyright.
12148 ANSIfy and GNUify the examples.
12149 Remove the old menu.
12150
12151 2000-09-18 Akim Demaille <akim@epita.fr>
12152
12153 First set of tests: use the `calc' example from the documentation.
12154
12155 * src/bison.s1 (yyparse): Condition the code using `yytname' which
12156 is defined only when YYDEBUG is.
12157 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
12158 * src/files.c (tryopen, tryclose): Formatting changes.
12159 Move to the top and be static.
12160 * src/reader.c (read_signed_integer): Likewise.
12161 * tests/calc.m4: New file.
12162 * Makefile.am, suite.m4: Adjust.
12163 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
12164
12165 2000-09-18 Akim Demaille <akim@epita.fr>
12166
12167 Add support for an Autotest test suite for Bison.
12168
12169 * m4/m4.m4, m4/atconfig.m4: New files.
12170 * m4/Makefile.am (EXTRA_DIST): Adjust.
12171 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
12172 files.
12173 * src/getargs.c: Display a more standard --version message.
12174 * src/reader.c (reader): Formatting changes.
12175 No longer depend upon VERSION_STRING.
12176 * configure.in: No longer use `dnl'.
12177 Set up the test suite and the new directory `tests/.
12178 (VERSION_STRING): Remove.
12179
12180 2000-04-14 Akim Demaille <akim@epita.fr>
12181
12182 * src/reader.c (copy_comment2): New function, same as former
12183 `copy_comment', but outputs into two FILE *.
12184 (copy_comment): Use it.
12185 (parse_union_decl): Use it.
12186 (get_type, parse_start_decl): Use the same `invalid' message.
12187 (parse_start_decl, parse_union_decl): Use the same `multiple'
12188 message.
12189 (parse_union_decl, copy_guard, copy_action): Use the same
12190 `unmatched' message.
12191 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
12192
12193 2000-03-31 Akim Demaille <akim@epita.fr>
12194
12195 * src/files.c (tryopen, tryclose): Move to the top.
12196 Be static.
12197
12198 2000-03-31 Akim Demaille <akim@epita.fr>
12199
12200 * src/main.c (main): Don't call `done', exit does it.
12201
12202 2000-03-31 Akim Demaille <akim@epita.fr>
12203
12204 * allocate.c: s/return (foo)/return foo/.
12205 * lalr.c: Likewise.
12206 * LR0.c: Likewise.
12207 * output.c: Likewise.
12208 * reader.c: Likewise.
12209 * symtab.c: Likewise.
12210 * vmsgetargs.c: Likewise.
12211
12212 2000-03-31 Akim Demaille <akim@epita.fr>
12213
12214 Clean up the error reporting functions.
12215
12216 * src/report.c: New file.
12217 * src/report.h: Likewise.
12218 * src/Makefile.am: Adjust.
12219 * m4/error.m4: New file.
12220 * m4/Makefile.am: Adjust.
12221 * configure.in (jm_PREREQ_ERROR): Call it.
12222 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
12223 Remove.
12224 (fatal, fatals): Remove. All callers use complain.c::fatal.
12225 (warn, warni, warns, warnss, warnss): Remove. All callers use
12226 complain.c::complain.
12227 (toomany): Remove, use fatal instead.
12228 * src/files.c (done): No argument, use complain_message_count.
12229 * src/main.c (main): Register `done' to `atexit'.
12230
12231 * src/getargs.c (usage): More `fputs', less `fprintf'.
12232
12233 2000-03-28 Akim Demaille <akim@epita.fr>
12234
12235 * lib/: New directory.
12236 * Makefile.am (SUBDIRS): Adjust.
12237 * configure.in: Adjust.
12238 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
12239 useless.
12240 * src/alloca.c: Moved to lib/.
12241 * src/getopt.c: Likewise.
12242 * src/getopt1.c: Likewise.
12243 * src/getopt.h: Likewise.
12244 * src/ansi2knr.c: Likewise.
12245 * src/ansi2knr.1: Likewise.
12246 * src/Makefile.am: Adjust.
12247 * lib/Makefile.am: New file.
12248
12249 2000-03-28 Akim Demaille <akim@epita.fr>
12250
12251 * src/getargs.c (usage): Refresh the help message.
12252
12253 2000-03-17 Akim Demaille <akim@epita.fr>
12254
12255 * src/getopt1.c: Updated from textutils 2.0e
12256 * src/getopt.c: Likewise.
12257 * src/getopt.h: Likewise.
12258
12259 2000-03-17 Akim Demaille <akim@epita.fr>
12260
12261 * src/Makefile.am (bison.simple): Fix the awk program: quote only
12262 the file name, not the whole `#line LINE FILE'.
12263
12264 2000-03-17 Akim Demaille <akim@epita.fr>
12265
12266 On syntax errors, report the token on which we choked.
12267
12268 * src/bison.s1 (yyparse): In the label yyerrlab, when
12269 YYERROR_VERBOSE, add yychar in msg.
12270
12271 2000-03-17 Akim Demaille <akim@epita.fr>
12272
12273 * src/reader.c (copy_at): New function.
12274 (copy_guard): Use it.
12275 (copy_action): Use it.
12276
12277 2000-03-17 Akim Demaille <akim@epita.fr>
12278
12279 Be kind to translators, save some useless translations.
12280
12281 * src/main.c (banner): New function.
12282 (fatal_banner): Use it.
12283 (warn_banner): Use it.
12284
12285 2000-03-17 Akim Demaille <akim@epita.fr>
12286
12287 * src/reader.c (copy_definition): Use copy_string and
12288 copy_comment. Removed now unused `match', `ended',
12289 `cplus_comment'.
12290 (copy_comment, copy_string): Moved, to be visible from
12291 copy_definition.
12292
12293 2000-03-17 Akim Demaille <akim@epita.fr>
12294
12295 * src/reader.c (copy_string): Declare `static inline'. No
12296 problems with inline, since it is checked by configure.
12297 (copy_comment): Likewise.
12298
12299 2000-03-17 Akim Demaille <akim@epita.fr>
12300
12301 * src/reader.c (packsymbols): Formatting changes.
12302
12303 2000-03-17 Akim Demaille <akim@epita.fr>
12304
12305 * src/reader.c (copy_comment): New function, factored out from:
12306 (copy_action): Use it. Removed now unused `match', `ended',
12307 `cplus_comment'.
12308 (copy_guard): Likewise.
12309
12310 2000-03-17 Akim Demaille <akim@epita.fr>
12311
12312 * src/reader.c (copy_string): New function, factored out from:
12313 (copy_action): Use it.
12314 (copy_guard): Likewise.
12315
12316 2000-03-17 Akim Demaille <akim@epita.fr>
12317
12318 Change the handling of @s so that they behave exactly like $s.
12319 There is now a pseudo variable @$ (readble and writable), location
12320 of the lhs of the rule (by default ranging from the location of
12321 the first symbol of the rhs, to the location of the last symbol,
12322 or, if the rhs is empty, YYLLOC).
12323
12324 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
12325 yyval.
12326 (yyparse): When providing a default semantic action, provide a
12327 default location action.
12328 (after the $): No longer change `*YYLSP', just stack YYLOC the
12329 same way you stack YYVAL.
12330 * src/reader.c (read_declarations): Use warns.
12331 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
12332 (copy_action, case '@'): Likewise.
12333 Use a standard error message, to save useless work from
12334 translators.
12335
12336 2000-03-17 Akim Demaille <akim@epita.fr>
12337
12338 * src/bison.s1: Formatting and cosmetics changes.
12339 * src/reader.c: Likewise.
12340 Update the Copyright notice.
12341
12342 2000-03-17 Akim Demaille <akim@epita.fr>
12343
12344 * src/bison.s1 (#line): All set to `#line' only, since the
12345 Makefile now handles them.
12346
12347 2000-03-16 Akim Demaille <akim@epita.fr>
12348
12349 * src/output.c (output_rule_data): Output the documentation of
12350 some of the tables.
12351 (Copyright notice): Update.
12352 Formatting changes.
12353
12354 2000-03-16 Akim Demaille <akim@epita.fr>
12355
12356 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
12357 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
12358 One `#if YYDEBUG' remains, since it uses variables which are
12359 defined only if `YYDEBUG != 0'.
12360
12361 2000-03-16 Akim Demaille <akim@epita.fr>
12362
12363 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
12364 and related variables so that the similarities are highlighted.
12365
12366 2000-03-16 Akim Demaille <akim@epita.fr>
12367
12368 * src/bison.s1: Properly indent CPP directives.
12369
12370 2000-03-16 Akim Demaille <akim@epita.fr>
12371
12372 * src/bison.s1: Properly indent the `alloca' CPP section.
12373
12374 2000-03-16 Akim Demaille <akim@epita.fr>
12375
12376 Do not hard code values of directories in `configure.in'.
12377 Update the `configure' tool chain.
12378
12379 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
12380 src/makefile.am.
12381 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
12382 (AC_OUTPUT): Add m4/Makefile.
12383 Bump to bison 1.28a, 1.29 has never been released.
12384 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
12385 handled via src/Makefile.am.
12386 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
12387 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
12388 autoheader.
12389 * Makefile.am (SUBDIRS): Add m4.
12390 (ACLOCAL_AM_FLAGS): New variable.
12391 (AUTOMAKE_OPTIONS): Add check-news.
12392 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
12393 the proper line number and file name.
12394 (DEFS): Propagate the location of bison library files and of the
12395 locale files.
12396 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
12397 builddir.
12398 * acinclude.m4: Remove, replaced by the directory m4.
12399 * m4/Makefile.am (EXTRA_DIST): New variable.
12400 * m4/gettext.m4: New file, from the fileutils.
12401 * m4/lcmessage.m4: Likewise
12402 * m4/progtest.m4: Likewise.
12403 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
12404
12405 2000-03-10 Akim Demaille <akim@epita.fr>
12406
12407 * src/closure.c:
12408 Formatting changes of various comments.
12409 Respect the GNU coding standards at various places.
12410 Don't use `_()' when no translation is needed.
12411
12412 1999-12-13 Jesse Thilo <jthilo@gnu.org>
12413
12414 * src/files.c:
12415 OS/2 honors TMPDIR environment variable.
12416
12417 1999-12-13 Jesse Thilo <jthilo@gnu.org>
12418
12419 * doc/bison.texinfo: Tweaked spelling and grammar.
12420 Updated ISBN.
12421 Removed reference to price of printed copy.
12422 Mention BISON_SIMPLE and BISON_HAIRY.
12423
12424 1999-12-13 Jesse Thilo <jthilo@gnu.org>
12425
12426 * configure.in, NEWS:
12427 Bison 1.29 released.
12428
12429 1999-10-27 Jesse Thilo <jthilo@gnu.org>
12430
12431 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
12432 Added reference card.
12433
12434 1999-07-26 Jesse Thilo <jthilo@gnu.org>
12435
12436 * po/ru.po: Added Russian translation.
12437
12438 1999-07-26 Jesse Thilo <jthilo@gnu.org>
12439
12440 * configure.in: Added Russian translation.
12441
12442 1999-07-06 Jesse Thilo <jthilo@gnu.org>
12443
12444 * configure.in, NEWS, README:
12445 Released version 1.28.
12446
12447 1999-06-14 Jesse Thilo <jthilo@gnu.org>
12448
12449 * src/system.h:
12450 Squashed redefinition warning on some systems.
12451
12452 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
12453 Have configure build version string instead of relying on ANSI string
12454 concatentation.
12455
12456 1999-06-14 Jesse Thilo <jthilo@gnu.org>
12457
12458 * po/POTFILES.in: Got rid of version.c.
12459
12460 1999-06-14 Jesse Thilo <jthilo@gnu.org>
12461
12462 * acconfig.h, configure.in:
12463 Have configure build version string instead of relying on ANSI string
12464 concatentation.
12465
12466 1999-06-08 Jesse Thilo <jthilo@gnu.org>
12467
12468 * doc/bison.1:
12469 Dropped mention of `+' for long-named options.
12470
12471 1999-05-30 Jesse Thilo <jthilo@gnu.org>
12472
12473 * src/files.c: Added <unistd.h> for unlink().
12474
12475 * src/Makefile.am, src/system.h:
12476 I18n fixes.
12477
12478 1999-05-30 Jesse Thilo <jthilo@gnu.org>
12479
12480 * README: Added a FAQ list.
12481
12482 * configure.in, acconfig.h:
12483 I18n fixes.
12484
12485 1999-05-30 Jesse Thilo <jthilo@gnu.org>
12486
12487 * doc/FAQ, doc/Makefile.am:
12488 Added a FAQ list.
12489
12490 1999-05-19 Jesse Thilo <jthilo@gnu.org>
12491
12492 * src/alloc.h, src/symtab.h, src/version.c:
12493 Protected inclusion of "config.h" with HAVE_CONFIG_H.
12494
12495 1999-04-18 Jesse Thilo <jthilo@gnu.org>
12496
12497 * src/.cvsignore, src/Makefile.am:
12498 Reorganized: sources in `src', documentation in `doc'.
12499
12500 * src/lex.c (literalchar):
12501 fixed the code for escaping double quotes (thanks
12502 Jonathan Czisny.)
12503
12504 1999-04-18 Jesse Thilo <jthilo@gnu.org>
12505
12506 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
12507 Adjusted paths to reflect directory reorganization.
12508
12509 1999-04-18 Jesse Thilo <jthilo@gnu.org>
12510
12511 * doc/.cvsignore, doc/Makefile.am:
12512 Reorganized: sources in `src', documentation in `doc'.
12513
12514 1999-04-18 Jesse Thilo <jthilo@gnu.org>
12515
12516 * configure.in:
12517 Updated AC_INIT file to reflect directory reorganization.
12518
12519 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
12520 Reorganized: sources in `src', documentation in `doc'.
12521
12522 1999-04-13 Jesse Thilo <jthilo@gnu.org>
12523
12524 * src/allocate.c:
12525 Don't declare calloc() and realloc() if not necessary.
12526
12527 1999-04-13 Jesse Thilo <jthilo@gnu.org>
12528
12529 * configure.in, acconfig.h, acinclude.m4:
12530 Don't declare calloc() and realloc() if not necessary.
12531
12532 1999-03-23 Jesse Thilo <jthilo@gnu.org>
12533
12534 * po/.cvsignore: Added i18n support.
12535
12536 1999-03-23 Jesse Thilo <jthilo@gnu.org>
12537
12538 * acconfig.h, configure.in, Makefile.am:
12539 Added i18n support.
12540
12541 1999-03-22 Jesse Thilo <jthilo@gnu.org>
12542
12543 * src/bison.s1: Fixed #line numbers.
12544
12545 1999-03-15 Jesse Thilo <jthilo@gnu.org>
12546
12547 * po/es.po, po/fr.po, po/nl.po, po/de.po:
12548 Added PO files from Translation Project.
12549
12550 1999-03-03 Jesse Thilo <jthilo@gnu.org>
12551
12552 * Makefile.am:
12553 Added support for non-ANSI compilers (ansi2knr).
12554
12555 1999-02-16 Jesse Thilo <jthilo@gnu.org>
12556
12557 * configure.in: Bumped version number to 1.27.
12558
12559 * Makefile.am:
12560 Added `bison.simple' to list of files removed by `make distclean'.
12561
12562 1999-02-12 Jesse Thilo <jthilo@gnu.org>
12563
12564 * src/files.c, src/files.h:
12565 Defined locations of parser files in config.h instead of Makefile.
12566
12567 1999-02-12 Jesse Thilo <jthilo@gnu.org>
12568
12569 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
12570 Defined locations of parser files in config.h instead of Makefile.
12571
12572 1999-02-09 Jesse Thilo <jthilo@gnu.org>
12573
12574 * Makefile.am:
12575 Removed inappropriate use of $< macro.
12576
12577 1999-02-05 Jesse Thilo <jthilo@gnu.org>
12578
12579 * po/Makefile.in.in, po/POTFILES.in:
12580 Add `po' directory skeleton.
12581
12582 1999-01-27 Jesse Thilo <jthilo@gnu.org>
12583
12584 * README: Document help-bison list.
12585
12586 * configure.in: Add check for mkstemp().
12587
12588 1999-01-20 Jesse Thilo <jthilo@gnu.org>
12589
12590 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
12591 Hush a few compiler warnings.
12592
12593 * src/files.c:
12594 Add tryclose(), which verifies that fclose was successful.
12595 Hush a couple of compiler warnings.
12596
12597 1999-01-20 Jesse Thilo <jthilo@gnu.org>
12598
12599 * Makefile.am, OChangeLog:
12600 ChangeLog is now automatically generated. Include the old version as
12601 OChangeLog.
12602
12603 1999-01-14 Jesse Thilo <jthilo@gnu.org>
12604
12605 * 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:
12606 Update FSF address.
12607
12608 1999-01-14 Jesse Thilo <jthilo@gnu.org>
12609
12610 * doc/bison.texinfo: Fix formatting glitch.
12611
12612 * doc/bison.texinfo: Update FSF address.
12613
12614 1999-01-14 Jesse Thilo <jthilo@gnu.org>
12615
12616 * acconfig.h: Update FSF address.
12617
12618 1999-01-08 Jesse Thilo <jthilo@gnu.org>
12619
12620 * src/system.h:
12621 Don't define PACKAGE here, since config.h defines it.
12622
12623 1998-12-30 Jesse Thilo <jthilo@gnu.org>
12624
12625 * src/reader.c: Update copyright date.
12626
12627 * src/main.c:
12628 Ditch sprintf to statically-sized buffers in fatal/warn functions in
12629 favor of output directly to stderr (avoids buffer overruns).
12630
12631 * src/reader.c: Some checks for premature EOF.
12632
12633 * 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:
12634 Use prototypes if the compiler understands them.
12635
12636 * src/files.c: Honor TMPDIR on Unix hosts.
12637 Use prototypes if the compiler understands them.
12638
12639 * src/reader.c:
12640 Fix a couple of buffer overrun bugs.
12641 Use prototypes if the compiler understands them.
12642
12643 * src/system.h: Include unistd.h and ctype.h.
12644 Use #ifdef instead of #if for NLS symbols.
12645
12646 1998-12-30 Jesse Thilo <jthilo@gnu.org>
12647
12648 * doc/bison.texinfo:
12649 Delete comment "consider using @set for edition number, etc..." since
12650 we now are doing so.
12651
12652 1998-12-30 Jesse Thilo <jthilo@gnu.org>
12653
12654 * configure.in:
12655 Use prototypes if the compiler understands them.
12656
12657 * NEWS: Document 1.26 highlights.
12658
12659 * Makefile.am: Require Automake 1.3 or later.
12660
12661 * acconfig.h:
12662 Use prototypes if the compiler understands them.
12663
12664 1998-12-29 Jesse Thilo <jthilo@gnu.org>
12665
12666 * src/version.c:
12667 Use VERSION symbol from automake for version number.
12668
12669 1998-12-29 Jesse Thilo <jthilo@gnu.org>
12670
12671 * acconfig.h, configure.in, version.cin:
12672 Use VERSION symbol from automake for version number.
12673
12674 1998-11-28 Jesse Thilo <jthilo@gnu.org>
12675
12676 * Makefile.am:
12677 Distribute original version of simple parser (bison.s1), not built
12678 version (bison.simple).
12679
12680 1998-11-28 Jesse Thilo <jthilo@gnu.org>
12681
12682 * doc/bison.texinfo: Add info dir entry.
12683
12684 * doc/bison.texinfo:
12685 Let automake put version number into documentation.
12686
12687 1998-11-26 Jesse Thilo <jthilo@gnu.org>
12688
12689 * src/bison.cld, src/build.com, src/vmshlp.mar:
12690 Add non-RCS files from /gd/gnu/bison.
12691
12692 1998-11-26 Jesse Thilo <jthilo@gnu.org>
12693
12694 * doc/bison.1:
12695 Document the BISON_HAIRY and BISON_SIMPLE variables.
12696
12697 1998-11-25 Jesse Thilo <jthilo@gnu.org>
12698
12699 * src/version.c: Build version.c automatically.
12700
12701 * src/reader.c:
12702 Fix token numbering (used to start at 258, not 257).
12703
12704 * src/system.h: Include config.h.
12705
12706 * src/getargs.c: Update bug report address.
12707
12708 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
12709 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
12710
12711 1998-11-25 Jesse Thilo <jthilo@gnu.org>
12712
12713 * Makefile.am:
12714 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
12715
12716 * configure.in, version.cin:
12717 Build version.c automatically.
12718
12719 * AUTHORS: Add AUTHORS file.
12720
12721 * README: Update bug report address.
12722
12723 * bison.simple:
12724 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
12725
12726 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
12727 Add automake stuff.
12728
12729 1998-11-25 Jesse Thilo <jthilo@gnu.org>
12730
12731 * doc/bison.texinfo: Clean up some formatting.
12732
12733 1998-05-05 Richard Stallman <rms@gnu.org>
12734
12735 * doc/bison.texinfo:
12736 Explain better why to make a pure parser.
12737
12738 1998-01-05 Richard Stallman <rms@gnu.org>
12739
12740 * src/files.c (openfiles):
12741 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
12742 find a temporary directory, if possible. Do not unlink files while
12743 they are open.
12744
12745 1997-08-25 Richard Stallman <rms@gnu.org>
12746
12747 * src/reader.c (stack_offset;):
12748 Change some warni to warns.
12749
12750 * src/lex.c (literalchar): Use warns, not warni.
12751
12752 1997-06-28 Richard Stallman <rms@gnu.org>
12753
12754 * src/bison.s1: Add a Bison version comment.
12755
12756 * src/main.c (fatal, warn, berror):
12757 Use program_name.
12758
12759 1997-06-28 Richard Stallman <rms@gnu.org>
12760
12761 * Makefile.in (bison_version): New variable.
12762 (dist): Use that variable.
12763 (bison.s1): Substitute the Bison version into bison.simple.
12764
12765 * bison.simple: Add a Bison version comment.
12766
12767 1997-06-18 Richard Stallman <rms@gnu.org>
12768
12769 * src/main.c (fatal, warn, berror):
12770 Make error messages standard.
12771 (toomany): Improve error message text.
12772
12773 * 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:
12774 new.h renamed to alloc.h.
12775
12776 1997-06-18 Richard Stallman <rms@gnu.org>
12777
12778 * Makefile.in: new.h renamed to alloc.h.
12779
12780 1997-05-24 Richard Stallman <rms@gnu.org>
12781
12782 * src/lex.c (literalchar):
12783 Fix the code for escaping \, " and '.
12784
12785 (lex): Avoid trouble when there are many chars
12786 to discard in a char literal with just several chars in it.
12787
12788 1997-05-17 Richard Stallman <rms@gnu.org>
12789
12790 * src/bison.s1:
12791 Use malloc, if using alloca is troublesome.
12792 (YYSTACK_USE_ALLOCA): New flag macro.
12793 Define it for some systems and compilers.
12794 (YYSTACK_ALLOC): New macro.
12795 (yyparse): Use YYSTACK_ALLOC to allocate stack.
12796 If it was malloc'd, free it.
12797
12798 1997-05-17 Richard Stallman <rms@gnu.org>
12799
12800 * bison.simple:
12801 Use malloc, if using alloca is troublesome.
12802 (YYSTACK_USE_ALLOCA): New flag macro.
12803 Define it for some systems and compilers.
12804 (YYSTACK_ALLOC): New macro.
12805 (yyparse): Use YYSTACK_ALLOC to allocate stack.
12806 If it was malloc'd, free it.
12807
12808 1997-04-23 Richard Stallman <rms@gnu.org>
12809
12810 * src/bison.s1:
12811 (alloca) [__hpux]: Always define as __builtin_alloca.
12812
12813 1997-04-23 Richard Stallman <rms@gnu.org>
12814
12815 * bison.simple:
12816 (alloca) [__hpux]: Always define as __builtin_alloca.
12817
12818 1997-04-22 Richard Stallman <rms@gnu.org>
12819
12820 * src/bison.s1:
12821 [__hpux]: Include alloca.h (right for HPUX 10)
12822 instead of declaring alloca (right for HPUX 9).
12823
12824 * src/bison.s1 (__yy_memcpy):
12825 Declare arg `count' as unsigned int.
12826 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
12827
12828 1997-04-22 Richard Stallman <rms@gnu.org>
12829
12830 * bison.simple:
12831 [__hpux]: Include alloca.h (right for HPUX 10)
12832 instead of declaring alloca (right for HPUX 9).
12833
12834 * bison.simple (__yy_memcpy):
12835 Declare arg `count' as unsigned int.
12836 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
12837
12838 1997-01-03 Richard Stallman <rms@gnu.org>
12839
12840 * src/allocate.c: [__STDC__ or _MSC_VER]:
12841 Declare calloc and realloc to return void *.
12842
12843 1997-01-02 Richard Stallman <rms@gnu.org>
12844
12845 * src/system.h:
12846 [_MSC_VER]: Include stdlib.h and process.h.
12847 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
12848
12849 * src/main.c (main): Return FAILURE as a value.
12850 (printable_version): Declare arg as int, not char.
12851
12852 1997-01-02 Richard Stallman <rms@gnu.org>
12853
12854 * Makefile.in (dist):
12855 Explicitly check for symlinks, and copy them.
12856
12857 1996-12-19 Richard Stallman <rms@gnu.org>
12858
12859 * src/files.c:
12860 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
12861
12862 1996-12-18 Paul Eggert <eggert@gnu.org>
12863
12864 * src/bison.s1 (yyparse):
12865 If __GNUC__ and YYPARSE_PARAM are both defined,
12866 declare yyparse to have a void * argument.
12867
12868 1996-12-18 Paul Eggert <eggert@gnu.org>
12869
12870 * bison.simple (yyparse):
12871 If __GNUC__ and YYPARSE_PARAM are both defined,
12872 declare yyparse to have a void * argument.
12873
12874 1996-12-17 Richard Stallman <rms@gnu.org>
12875
12876 * src/reduce.c (nbits): Add some casts.
12877
12878 1996-08-12 Richard Stallman <rms@gnu.org>
12879
12880 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
12881
12882 1996-08-12 Richard Stallman <rms@gnu.org>
12883
12884 * bison.simple: Test _MSDOS as well as _MSDOS_.
12885
12886 1996-07-31 Richard Stallman <rms@gnu.org>
12887
12888 * src/bison.s1:
12889 [__sun && __i386]: Include alloca.h.
12890
12891 1996-07-31 Richard Stallman <rms@gnu.org>
12892
12893 * bison.simple:
12894 [__sun && __i386]: Include alloca.h.
12895
12896 1996-07-30 Richard Stallman <rms@gnu.org>
12897
12898 * src/bison.s1: Comment change.
12899
12900 * src/bison.s1: Test _MSDOS_, not MSDOS.
12901
12902 1996-07-30 Richard Stallman <rms@gnu.org>
12903
12904 * bison.simple: Comment change.
12905
12906 * bison.simple: Test _MSDOS_, not MSDOS.
12907
12908 1996-06-01 Richard Stallman <rms@gnu.org>
12909
12910 * 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:
12911 Insert `_' macro around many string constants.
12912
12913 * src/main.c:
12914 Insert `_' macro around many string constants.
12915
12916 (main): Call setlocale, bindtextdomain and textdomain.
12917
12918 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
12919 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
12920 [ENABLE_NLS]: Include libintl.h.
12921 [ENABLE_NLS] (gettext): Define.
12922 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
12923 (N_, PACKAGE, LOCALEDIR): New macros.
12924
12925 1996-06-01 Richard Stallman <rms@gnu.org>
12926
12927 * POTFILES.in: New file.
12928
12929 * Makefile.in (allocate.o):
12930 Define target explicitly.
12931
12932 * Makefile.in (CFLAGS): Set to @CFLAGS@.
12933 (LDFLAGS): Set to @LDFLAGS@.
12934 (configure): Run autoconf only if preceding `cd' succeeds.
12935 (bison.s1): Redirect output to temporary file then move the
12936 temporary to the target, rather than redirecting directly to bison.s1.
12937 (clean): Remove config.status and config.log.
12938 (distclean): Don't remove config.status here.
12939
12940 1996-05-12 Richard Stallman <rms@gnu.org>
12941
12942 * src/bison.s1:
12943 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
12944
12945 1996-05-12 Richard Stallman <rms@gnu.org>
12946
12947 * bison.simple:
12948 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
12949
12950 1996-05-11 Richard Stallman <rms@gnu.org>
12951
12952 * src/bison.s1 (__yy_memcpy):
12953 Really reorder the args, as was supposedly done on Feb 14 1995.
12954 (yyparse): Calls changed accordingly.
12955
12956 1996-05-11 Richard Stallman <rms@gnu.org>
12957
12958 * Makefile.in (dist): Don't use $(srcdir).
12959
12960 * bison.simple (__yy_memcpy):
12961 Really reorder the args, as was supposedly done on Feb 14 1995.
12962 (yyparse): Calls changed accordingly.
12963
12964 1996-01-27 Richard Stallman <rms@gnu.org>
12965
12966 * src/output.c (output_rule_data):
12967 Test YYERROR_VERBOSE in the conditional
12968 around the definition of ttyname.
12969
12970 1995-12-29 Richard Stallman <rms@gnu.org>
12971
12972 * src/bison.s1:
12973 Fix line numbers in #line commands.
12974
12975 1995-12-29 Richard Stallman <rms@gnu.org>
12976
12977 * bison.simple:
12978 Fix line numbers in #line commands.
12979
12980 1995-12-27 Richard Stallman <rms@gnu.org>
12981
12982 * src/bison.s1 (YYPARSE_PARAM_DECL):
12983 In C++, make it always null.
12984 (YYPARSE_PARAM_ARG): New macro.
12985 (yyparse): Use YYPARSE_PARAM_ARG.
12986
12987 1995-12-27 Richard Stallman <rms@gnu.org>
12988
12989 * bison.simple (YYPARSE_PARAM_DECL):
12990 In C++, make it always null.
12991 (YYPARSE_PARAM_ARG): New macro.
12992 (yyparse): Use YYPARSE_PARAM_ARG.
12993
12994 1995-11-29 Richard Stallman <rms@gnu.org>
12995
12996 * doc/bison.texinfo:
12997 Describe literal string tokens, %raw, %no_lines, %token_table.
12998
12999 1995-11-29 Daniel Hagerty <hag@gnu.org>
13000
13001 * doc/bison.texinfo: Fixed update date
13002
13003 1995-10-16 Richard Stallman <rms@gnu.org>
13004
13005 * src/version.c: Version 1.25.
13006
13007 1995-10-16 Richard Stallman <rms@gnu.org>
13008
13009 * NEWS: *** empty log message ***
13010
13011 1995-10-16 Richard Stallman <rms@gnu.org>
13012
13013 * doc/bison.1, doc/bison.rnh:
13014 Add new options.
13015
13016 1995-10-15 Richard Stallman <rms@gnu.org>
13017
13018 * src/vmsgetargs.c, src/getargs.c:
13019 Added -n, -k, and -raw switches.
13020 (noparserflag, toknumflag, rawtoknumflag): New variables.
13021
13022 * src/symtab.h (SALIAS):
13023 New #define for adding aliases to %token.
13024 (struct bucket): Added `alias' field.
13025
13026 * src/reduce.c (reduce_grammar):
13027 Revise error message.
13028 (print_notices): Remove final `.' from error message.
13029
13030 * src/reader.c (reader_output_yylsp):
13031 New function.
13032 (readgram): Use `#if 0' around code that accepted %command
13033 inside grammar rules: The documentation doesn't allow it,
13034 and it will fail since the %command processors scan for the next %.
13035 (parse_token_decl): Extended the %token
13036 declaration to allow a multi-character symbol as an alias.
13037 (parse_thong_decl): New function.
13038 (read_declarations): Added %thong declarations.
13039 (read_declarations): Handle NOOP to deal with allowing
13040 % declarations as another means to specify the flags.
13041 (readgram): Allow %prec prior to semantics embedded in a rule.
13042 (skip_to_char, read_declarations, copy_definition)
13043 (parse_token_decl, parse_start_decl, parse_type_decl)
13044 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
13045 (get_type_name, copy_guard, copy_action, readgram)
13046 (get_type, packsymbols): Revised most error messages.
13047 Changed `fatal' to `warnxxx' to avoid aborting for error.
13048 Revised and use multiple warnxxx functions to avoid using VARARGS1.
13049 (read_declarations): Improve the error message for
13050 an invalid character. Do not abort.
13051 (read_declarations, copy_guard, copy_action): Use
13052 printable_version to avoid unprintable characters in printed output.
13053 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
13054 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
13055 Allow the type of a non-terminal can be given
13056 more than once, as long as all specifications give the same type.
13057
13058 * src/output.c:
13059 (output_headers, output_trailers, output, output_gram)
13060 (output_rule_data): Implement noparserflag variable.
13061 Implement toknumflag variable.
13062 (output): Call reader_output_yylsp to output LTYPESTR.
13063
13064 * src/main.c (main):
13065 If reader sees an error, don't process the grammar.
13066 (fatals): Updated to not use VARARGS1.
13067 (printable_version, int_to_string, warn, warni, warns, warnss)
13068 (warnsss): New error reporting functions. Avoid abort for error.
13069
13070 * src/lex.h:
13071 Added THONG and NOOP for alias processing.
13072 Added SETOPT for the new code that allows setting options with %flags.
13073
13074 * src/lex.c:
13075 Include getopt.h. Add some extern decls.
13076 (safegetc): New function to deal with EOF gracefully.
13077 (literalchar); new function to deal with reading \ escapes.
13078 (lex): Use literalchar.
13079 (lex): Implemented "..." tokens.
13080 (literalchar, lex, parse_percent_token): Made tokenbuffer
13081 always contain the token. This includes growing the token
13082 buffer while reading an integer.
13083 (parse_percent_token): Replaced if-else statement with percent_table.
13084 (parse_percent_token): Added % declarations as another
13085 way to specify the flags -n, -l, and -r. Also added hooks for
13086 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
13087 major changes to files.c.
13088 (lex) Retain in the incoming stream a character following
13089 an incorrect '/'.
13090 (skip_white_space, lex): Revised most error messages
13091 and changed fatal to warn to avoid aborting.
13092 (percent_table): Added %thong declarations.
13093
13094 * src/gram.h: Comment changes.
13095
13096 * src/files.c (openfiles, open_extra_files, done):
13097 Add faction flag
13098 and actfile file. Handle noparserflag. Both for -n switch.
13099
13100 * src/conflicts.c (resolve_sr_conflict):
13101 Remove use of alloca.
13102
13103 1995-06-01 Jim Meyering <meyering@gnu.org>
13104
13105 * doc/bison.texinfo: *** empty log message ***
13106
13107 1995-05-06 Richard Stallman <rms@gnu.org>
13108
13109 * src/bison.s1: Comment change.
13110
13111 1995-05-06 Richard Stallman <rms@gnu.org>
13112
13113 * bison.simple: Comment change.
13114
13115 1995-05-03 Richard Stallman <rms@gnu.org>
13116
13117 * src/version.c: Version now 1.24.
13118
13119 * src/bison.s1: Change distribution terms.
13120
13121 * src/version.c: Version now 1.23.
13122
13123 1995-05-03 Richard Stallman <rms@gnu.org>
13124
13125 * doc/bison.texinfo:
13126 Rewrite "Conditions for Using Bison".
13127 Update version to 1.24.
13128
13129 1995-05-03 Richard Stallman <rms@gnu.org>
13130
13131 * bison.simple: Change distribution terms.
13132
13133 1995-02-23 Richard Stallman <rms@gnu.org>
13134
13135 * src/files.c: Test __VMS_POSIX as well as VMS.
13136
13137 1995-02-14 Jim Meyering <meyering@gnu.org>
13138
13139 * src/bison.s1 (__yy_memcpy):
13140 Renamed from __yy_bcopy to avoid
13141 confusion. Reverse FROM and TO arguments to be consistent with
13142 those of memcpy.
13143
13144 1995-02-14 Jim Meyering <meyering@gnu.org>
13145
13146 * bison.simple (__yy_memcpy):
13147 Renamed from __yy_bcopy to avoid
13148 confusion. Reverse FROM and TO arguments to be consistent with
13149 those of memcpy.
13150
13151 1994-11-10 David J. MacKenzie <djm@gnu.org>
13152
13153 * NEWS: reformat
13154
13155 * NEWS: New file.
13156
13157 * Makefile.in (DISTFILES): Include NEWS.
13158
13159 * Makefile.in (DISTFILES):
13160 Include install-sh, not install.sh.
13161
13162 * configure.in: Update to Autoconf v2 macro names.
13163
13164 1994-10-05 David J. MacKenzie <djm@gnu.org>
13165
13166 * Makefile.in: fix typo
13167
13168 * Makefile.in (prefix, exec_prefix):
13169 Let configure set them.
13170
13171 1994-09-28 David J. MacKenzie <djm@gnu.org>
13172
13173 * Makefile.in: Set datadir to $(prefix)/share.
13174
13175 1994-09-15 Richard Stallman <rms@gnu.org>
13176
13177 * src/bison.s1:
13178 Update copyright notice and GPL version.
13179
13180 1994-09-15 Richard Stallman <rms@gnu.org>
13181
13182 * bison.simple:
13183 Update copyright notice and GPL version.
13184
13185 1994-07-12 Richard Stallman <rms@gnu.org>
13186
13187 * src/reduce.c, src/reader.c:
13188 entered into RCS
13189
13190 1994-05-05 David J. MacKenzie <djm@gnu.org>
13191
13192 * Makefile.in: entered into RCS
13193
13194 1994-03-26 Richard Stallman <rms@gnu.org>
13195
13196 * src/bison.s1: entered into RCS
13197
13198 1994-03-26 Richard Stallman <rms@gnu.org>
13199
13200 * bison.simple: entered into RCS
13201
13202 1994-03-25 Richard Stallman <rms@gnu.org>
13203
13204 * src/main.c: entered into RCS
13205
13206 1994-03-24 Richard Stallman <rms@gnu.org>
13207
13208 * src/conflicts.c: entered into RCS
13209
13210 1994-01-02 Richard Stallman <rms@gnu.org>
13211
13212 * Makefile.in: *** empty log message ***
13213
13214 1993-11-21 Richard Stallman <rms@gnu.org>
13215
13216 * src/bison.s1: *** empty log message ***
13217
13218 1993-11-21 Richard Stallman <rms@gnu.org>
13219
13220 * doc/bison.texinfo: entered into RCS
13221
13222 * doc/bison.texinfo: *** empty log message ***
13223
13224 1993-11-21 Richard Stallman <rms@gnu.org>
13225
13226 * bison.simple: *** empty log message ***
13227
13228 1993-10-25 David J. MacKenzie <djm@gnu.org>
13229
13230 * doc/bison.texinfo: *** empty log message ***
13231
13232 1993-10-19 Richard Stallman <rms@gnu.org>
13233
13234 * src/bison.s1: *** empty log message ***
13235
13236 1993-10-19 Richard Stallman <rms@gnu.org>
13237
13238 * bison.simple: *** empty log message ***
13239
13240 1993-10-14 Richard Stallman <rms@gnu.org>
13241
13242 * src/bison.s1: *** empty log message ***
13243
13244 1993-10-14 Richard Stallman <rms@gnu.org>
13245
13246 * bison.simple: *** empty log message ***
13247
13248 1993-09-14 David J. MacKenzie <djm@gnu.org>
13249
13250 * doc/bison.texinfo: *** empty log message ***
13251
13252 1993-09-13 Noah Friedman <friedman@gnu.org>
13253
13254 * Makefile.in: *** empty log message ***
13255
13256 1993-09-10 Richard Stallman <rms@gnu.org>
13257
13258 * src/conflicts.c: *** empty log message ***
13259
13260 * src/system.h: entered into RCS
13261
13262 1993-09-10 Richard Stallman <rms@gnu.org>
13263
13264 * doc/bison.1: entered into RCS
13265
13266 1993-09-06 Noah Friedman <friedman@gnu.org>
13267
13268 * src/version.c: entered into RCS
13269
13270 1993-09-06 Noah Friedman <friedman@gnu.org>
13271
13272 * Makefile.in: *** empty log message ***
13273
13274 1993-07-30 David J. MacKenzie <djm@gnu.org>
13275
13276 * Makefile.in: *** empty log message ***
13277
13278 1993-07-24 Richard Stallman <rms@gnu.org>
13279
13280 * src/bison.s1: *** empty log message ***
13281
13282 1993-07-24 Richard Stallman <rms@gnu.org>
13283
13284 * bison.simple: *** empty log message ***
13285
13286 1993-07-08 David J. MacKenzie <djm@gnu.org>
13287
13288 * Makefile.in: *** empty log message ***
13289
13290 1993-07-04 Richard Stallman <rms@gnu.org>
13291
13292 * src/bison.s1: *** empty log message ***
13293
13294 1993-07-04 Richard Stallman <rms@gnu.org>
13295
13296 * bison.simple: *** empty log message ***
13297
13298 1993-06-26 David J. MacKenzie <djm@gnu.org>
13299
13300 * src/getargs.c: entered into RCS
13301
13302 1993-06-26 David J. MacKenzie <djm@gnu.org>
13303
13304 * doc/bison.texinfo: *** empty log message ***
13305
13306 * doc/bison.1: New file.
13307
13308 1993-06-25 Richard Stallman <rms@gnu.org>
13309
13310 * src/getargs.c: New file.
13311
13312 1993-06-16 Richard Stallman <rms@gnu.org>
13313
13314 * src/bison.s1: *** empty log message ***
13315
13316 1993-06-16 Richard Stallman <rms@gnu.org>
13317
13318 * bison.simple: *** empty log message ***
13319
13320 1993-06-03 Richard Stallman <rms@gnu.org>
13321
13322 * src/bison.s1: New file.
13323
13324 1993-06-03 Richard Stallman <rms@gnu.org>
13325
13326 * doc/bison.texinfo: *** empty log message ***
13327
13328 1993-06-03 Richard Stallman <rms@gnu.org>
13329
13330 * bison.simple: New file.
13331
13332 1993-05-19 Richard Stallman <rms@gnu.org>
13333
13334 * doc/bison.texinfo: New file.
13335
13336 1993-05-07 Noah Friedman <friedman@gnu.org>
13337
13338 * Makefile.in: *** empty log message ***
13339
13340 1993-04-28 Noah Friedman <friedman@gnu.org>
13341
13342 * src/reader.c: *** empty log message ***
13343
13344 1993-04-23 Noah Friedman <friedman@gnu.org>
13345
13346 * src/alloc.h: entered into RCS
13347
13348 1993-04-20 David J. MacKenzie <djm@gnu.org>
13349
13350 * src/version.c: *** empty log message ***
13351
13352 * src/files.c, src/allocate.c:
13353 entered into RCS
13354
13355 * src/reader.c: *** empty log message ***
13356
13357 * src/lex.c: entered into RCS
13358
13359 * src/conflicts.c: New file.
13360
13361 * src/symtab.c: entered into RCS
13362
13363 * src/alloc.h: New file.
13364
13365 * src/LR0.c: entered into RCS
13366
13367 1993-04-18 Noah Friedman <friedman@gnu.org>
13368
13369 * src/reader.c: New file.
13370
13371 * src/version.c: *** empty log message ***
13372
13373 1993-04-18 Noah Friedman <friedman@gnu.org>
13374
13375 * Makefile.in: *** empty log message ***
13376
13377 1993-04-17 Noah Friedman <friedman@gnu.org>
13378
13379 * Makefile.in: *** empty log message ***
13380
13381 1993-04-15 Richard Stallman <rms@gnu.org>
13382
13383 * src/main.c, src/files.c:
13384 New file.
13385
13386 1993-04-15 Noah Friedman <friedman@gnu.org>
13387
13388 * configure.in: entered into RCS
13389
13390 * configure.in: *** empty log message ***
13391
13392 * configure.in: New file.
13393
13394 1993-04-14 Richard Stallman <rms@gnu.org>
13395
13396 * Makefile.in: New file.
13397
13398 1993-04-13 Richard Stallman <rms@gnu.org>
13399
13400 * src/version.c: New file.
13401
13402 1993-03-25 Richard Stallman <rms@gnu.org>
13403
13404 * src/output.c: entered into RCS
13405
13406 1992-09-25 Richard Stallman <rms@gnu.org>
13407
13408 * configure.bat: entered into RCS
13409
13410 1992-06-22 Richard Stallman <rms@gnu.org>
13411
13412 * src/vmsgetargs.c: entered into RCS
13413
13414 1992-06-22 Richard Stallman <rms@gnu.org>
13415
13416 * doc/bison.rnh: entered into RCS
13417
13418 1992-04-20 David J. MacKenzie <djm@gnu.org>
13419
13420 * README: entered into RCS
13421
13422 1992-01-22 Richard Stallman <rms@gnu.org>
13423
13424 * src/machine.h: entered into RCS
13425
13426 1991-12-21 Richard Stallman <rms@gnu.org>
13427
13428 * src/lalr.c, src/closure.c:
13429 entered into RCS
13430
13431 1991-12-20 Richard Stallman <rms@gnu.org>
13432
13433 * src/state.h: entered into RCS
13434
13435 1991-12-18 Richard Stallman <rms@gnu.org>
13436
13437 * src/print.c, src/nullable.c, src/derives.c:
13438 entered into RCS
13439
13440 1991-11-03 David J. MacKenzie <djm@gnu.org>
13441
13442 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
13443 entered into RCS
13444
13445 1988-09-09 Richard Stallman <rms@gnu.org>
13446
13447 * src/bison.hairy: entered into RCS
13448
13449 1987-12-16 Richard Stallman <rms@gnu.org>
13450
13451 * REFERENCES: entered into RCS
13452
13453 -----
13454
13455 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
13456 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
13457
13458 This file is part of Bison, the GNU Compiler Compiler.
13459
13460 Bison is free software; you can redistribute it and/or modify
13461 it under the terms of the GNU General Public License as published by
13462 the Free Software Foundation; either version 2, or (at your option)
13463 any later version.
13464
13465 Bison is distributed in the hope that it will be useful,
13466 but WITHOUT ANY WARRANTY; without even the implied warranty of
13467 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13468 GNU General Public License for more details.
13469
13470 You should have received a copy of the GNU General Public License
13471 along with Bison; see the file COPYING. If not, write to
13472 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
13473 Boston, MA 02110-1301, USA.