]> git.saurik.com Git - bison.git/blob - ChangeLog
(Simple LALR Calculator): Adopt new convention for %parse-param
[bison.git] / ChangeLog
1 2002-11-27 Paul Eggert <eggert@twinsun.com>
2
3 Rename identifiers to avoid real and potential collisions.
4
5 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
6 to avoid collision with lex macro described by Bruce Lilly in
7 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001929.html>.
8 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
9 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
10 * src/parse-gram.y (print_token_value): Renamed from yyprint.
11 All uses changed.
12 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13 The name "yycontrol" violates the name space rules, and this stuff
14 wasn't being used anyway.
15 (input): Remove action; this stuff wasn't being used.
16 (gram_error): Rename local variable yylloc -> loc.
17 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
18 (YY_DECL): Don't use "yy" at start of local variables.
19 All uses changed, e.g., yylloc -> loc.
20 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
21 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
22 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
23 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
24
25 * src/parse-gram.y (gram_error): loc is now const *.
26 * src/reader.h (gram_error): Likewise.
27
28 2002-11-24 Paul Eggert <eggert@twinsun.com>
29
30 Version 1.75c.
31
32 * tests/actions.at (Actions after errors): Use an output format
33 more similar to that of the Printers and Destructors test.
34 Test the position of the ';' token too.
35 (Printers and Destructors): Likewise.
36 (Printers and Destructors: %glr-parser): Remove for now, to avoid
37 unnecessarily alarming people when the test fails.
38
39 * data/yacc.c (yyerrlab1): Move this label down, so that the
40 parser does not discard the lookahead token if the user code
41 invokes YYERROR. This change is required for POSIX conformance.
42
43 * lib/error.c: Sync with gnulib.
44
45 2002-11-22 Paul Eggert <eggert@twinsun.com>
46
47 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
48 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
49 * lib/xmalloc.c: Likewise.
50
51 2002-11-20 Paul Eggert <eggert@twinsun.com>
52
53 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
54
55 2002-11-20 Paul Eggert <eggert@twinsun.com>
56
57 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
58 should use `if (! x) abort ();' rather than `assert (x);', and
59 anyway it's one less thing to worry about configuring.
60
61 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
62 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
63 and replace all instances of assert with abort.
64 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
65 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
66
67 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
68 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
69 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
70 hash_find_entry, hash_rehash, hash_insert): Likewise.
71 * src/conflicts.c (resolve_sr_conflict): Likewise.
72 * src/lalr.c (set_goto_map, map_goto): Likewise.
73 * src/nullable.c (nullable_compute): Likewise.
74 * src/output.c (prepare_rules, token_definitions_output): Likewise.
75 * src/reader.c (packgram, reader): Likewise.
76 * src/state.c (state_new, state_free, state_transitions_set,
77 state_reduction_find): Likewise.
78 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
79 symbol_pack): Likewise.
80 * src/tables.c (conflict_row, pack_vector): Likewise.
81 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
82 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
83 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
84 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
85
86 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
87 (ARGMATCH_CONSTRAINT): New macro.
88 (ARGMATCH_ASSERT): Use it.
89
90 * src/system.h (verify): New macro.
91 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
92 rather than assert.
93 * src/tables.c (tables_generate): Likewise.
94
95 * src/struniq.c (struniq_assert): Now returns void, and aborts
96 if the assertion is false.
97 (struniq_assert_p): Remove.
98 * src/struniq.h: Likewise.
99
100 2002-11-18 Paul Eggert <eggert@twinsun.com>
101
102 * data/glr.c (yygetLRActions): Replace `yyindex' with
103 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
104 This fixes the regression with Sun ONE Studio 7 cc that I reported in
105 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001892.html>.
106
107 2002-11-18 Akim Demaille <akim@epita.fr>
108
109 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
110 space.
111 From Tim Van Holder.
112
113 2002-11-17 Paul Eggert <eggert@twinsun.com>
114
115 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
116 to "SyntaxError" for consistency with my 2002-11-15 change.
117
118 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
119 not define to {}, since this breaks the common use of `YYDPRINTF
120 ((...));' if a single statement is desired (e.g. before `else').
121 Work around GCC warnings by surrounding corresponding calls with
122 {} if needed.
123 (yyhasResolvedValue): Remove unused function.
124 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
125 loop body.
126 (yyreportSyntaxError): Renamed from yyreportParseError.
127 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
128 All uses changed.
129 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
130 extern when possible. Remove unused initializations.
131
132 2002-11-16 Akim Demaille <akim@epita.fr>
133
134 Augment the similarity between GLR and LALR traces.
135
136 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
137 (YY_REDUCE_PRINT): New.
138 (yyparse): Use them.
139 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
140 YYDPRINT here.
141 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
142 state reached after the reduction/recovery, since...
143 (yyparse, yyprocessOneStack): Report the state we are entering in.
144
145 2002-11-16 Akim Demaille <akim@epita.fr>
146
147 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
148 Add support for --trace=skeleton.
149 * src/scan-skel.l: %option debug.
150 Scan strings of non-@ or \n instead of character by character.
151 (scan_skel): Handle trace_skeleton.
152 (QPUTS): New.
153 (@output_parser_name@, @output_header_name@): ``Restore'' their
154 support (used to be M4 macros).
155 * data/yacc.c: Quote larger chunks, a la glr.c.
156 * data/lalr1.cc: Likewise.
157 The header guards are no longer available, so use some other
158 string than `YYLSP_NEEDED'.
159
160 2002-11-16 Akim Demaille <akim@epita.fr>
161
162 Make the ``Printers and Destructors'' test more verbose, taking
163 `yacc.c''s behavior as (possibly wrong) reference.
164
165 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
166 instead of fprint on stdout.
167 Set and report the last_line of the symbols.
168 Consistently display values and locations.
169
170 2002-11-16 Paul Eggert <eggert@twinsun.com>
171
172 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
173
174 2002-11-15 Paul Eggert <eggert@twinsun.com>
175
176 * tests/actions.at (Actions after errors): New test case.
177
178 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
179 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
180 tests/action.at, tests/calc.at, tests/conflicts.at,
181 tests/cxx-type.at, tests/regression.at:
182 "parse error" -> "syntax error" for POSIX compatibility.
183 "parsing stack overflow..." -> "parser stack overflow" so
184 that code matches Bison documentation.
185
186 2002-11-15 Akim Demaille <akim@epita.fr>
187
188 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
189 take two BRACED_CODE, not two string_content.
190 Free the scanner's obstack when we are done.
191 (code_content): New.
192 * tests/calc.at: Adjust.
193 * doc/bison.texinfo: Adjust.
194 Also, make sure to include the `,' for these declarations.
195
196 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
197
198 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
199 definition; avoids potential autoreconf problems.
200
201 2002-11-15 Akim Demaille <akim@epita.fr>
202
203 Always check the value returned by yyparse.
204
205 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
206 returned by yyparse.
207 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
208 Adjust calls.
209 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
210 returned by yyparse.
211
212 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
213
214 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
215 on input.at test.
216
217 2002-11-14 Paul Eggert <eggert@twinsun.com>
218
219 * src/output.c (output_skeleton): Call xfopen instead of
220 duplicating xfopen's body.
221
222 Fix bugs reported by Nelson H. F. Beebe in
223 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001893.html>.
224
225 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
226 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
227 Group compiler. Instead, use "$CC -E bar.c". Include the .h
228 file twice in the grammar, as an extra check.
229
230 * tests/input.at (Torturing the Scanner): Surround the
231 backslash-newline tests with "#if 0", to make it less likely that
232 we'll run into compiler bugs. Bring back solitary \ inside
233 comment, but add a closing comment to work around HP C bug. Don't
234 test backslash-newline in C character constant. This should fix
235 the input.at bug reported by Nelson H. F. Beebe in
236 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001893.html>.
237
238 2002-11-14 Akim Demaille <akim@epita.fr>
239
240 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
241 status of the compiler.
242 Calling `exit 1' is no longer needed.
243 Reported by Nelson H. F. Beebe.
244
245 2002-11-14 Akim Demaille <akim@epita.fr>
246
247 * tests/atlocal.in (CPPFLAGS): We have config.h.
248 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
249 New.
250 * tests/actions.at, tests/calc.at, tests/conflicts.at,
251 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
252 * tests/regression.at, tests/torture.at: Use them for all the
253 grammars that are to be compiled.
254 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
255 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
256 * doc/bison.texinfo (GLR Parsers): Document `inline'.
257
258 2002-11-14 Akim Demaille <akim@epita.fr>
259
260 * doc/bison.texinfo: Various formatting changes (alignments in
261 samples, additional @group/@end group, GCS in samples.
262 Use @deffn instead of simple @table to define the directives,
263 macros, variables etc.
264
265 2002-11-13 Paul Eggert <eggert@twinsun.com>
266
267 Fix some bugs reported by Albert Chin-A-Young in
268 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001881.html>.
269
270 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
271 -o c"; the HP C compiler chatters during compilation.
272 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
273 * tests/headers.at (export YYLTYPE): Likewise.
274
275 * tests/input.at (Torturing the Scanner): Remove lines containing
276 solitary backslashes, as they tickle a bug in the HP C compiler.
277
278 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
279 comments, since they're not portable. Use GNU coding style.
280
281 2002-11-13 Akim Demaille <akim@epita.fr>
282
283 * data/yacc.c: Leave bigger chunks of quoted text.
284 (YYDSYMPRINTF): New.
285 Use it to report symbol activities.
286 * data/glr.c (YYDSYMPRINTF): New.
287 Use it.
288
289 2002-11-12 Paul Eggert <eggert@twinsun.com>
290
291 Version 1.75b.
292
293 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
294 (yyglrReduce): Return yyok, not 0.
295 This should avoid the enumerated-type warnings reported
296 by Nelson H.F. Beebe in
297 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001872.html>.
298
299 * lib/bbitset.h (BITSET_INLINE): Remove.
300 * lib/bitset.h [! BITSET_INLINE]: Remove.
301 (bitset_set, bitset_reset, bitset_test): Rename local vars
302 to avoid shadowing warnings by GCC.
303
304 * data/glr.c (inline): Remove #define. It's the user's
305 responsibility to #define it away, just like 'const'.
306 This fixes one of the bugs reported by Nelson H.F. Beebe in
307 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001873.html>.
308
309 * Makefile.maint (po-check): Scan .l and .y files instead of the
310 .c and the .h files that they generate. This fixes the bug
311 reported by Tim Van Holder in:
312 <http://mail.gnu.org/pipermail/bison-patches/2002-November/001352.html>
313 Look for N_ as well as for _. Try to avoid matching #define for
314 N_ and _.
315 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
316 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
317 * src/scan-gram.l: Revamp regular expressions so that " and '
318 do not confuse xgettext.
319
320 * src/struniq.h (struniq_new): Do not declare the return type
321 to be 'const'; this violates the C standard.
322 * src/struniq.c (struniq_new): Likewise.
323
324 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
325
326 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
327 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
328 linker.
329
330 2002-11-12 Akim Demaille <akim@epita.fr>
331
332 * Makefile.maint: Sync with Autoconf:
333 (local_updates): New.
334
335 2002-11-12 Akim Demaille <akim@epita.fr>
336
337 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
338
339 2002-11-12 Akim Demaille <akim@epita.fr>
340
341 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
342 locations.
343
344 2002-11-12 Akim Demaille <akim@epita.fr>
345
346 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
347 not yyvalue.
348
349 2002-11-12 Akim Demaille <akim@epita.fr>
350
351 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
352 Use it to test the GLR parser.
353
354 2002-11-12 Akim Demaille <akim@epita.fr>
355
356 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
357 defines it.
358 * data/glr.c (yystos): New.
359 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
360 (YYDSYMPRINT): New.
361 (yyval): Don't define it, it is handled via M4.
362 (yyrecoverParseError): Free verbosely the discarded symbols.
363 * data/yacc.c (yysymprint): Remove, rather...
364 (b4_yysymprint_generate): invoke.
365 * data/c.m4 (b4_yysymprint_generate): New.
366 Accept pointers as arguments, as opposed to the version from
367 yacc.c.
368 (b4_yydestruct_generate): Likewise.
369 * tests/cations.at (Printers and Destructors): Use Bison directives
370 instead of CPP macros.
371 Don't rely on internal details.
372
373 2002-11-12 Akim Demaille <akim@epita.fr>
374
375 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
376 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
377 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
378 it against YYEMPTY and so forth), work on yytoken (i.e., set
379 it to YYEMPTY etc.).
380 (yydestruct): Replace with a b4_yydestruct_generate invocation.
381 (b4_symbol_actions): Remove.
382 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
383 for 0, end-of-input.
384
385 2002-11-12 Akim Demaille <akim@epita.fr>
386
387 * doc/bison.texinfo (Destructor Decl): New.
388
389 2002-11-12 Akim Demaille <akim@epita.fr>
390
391 * src/tables.c (tables_generate): Use free for pointers that
392 cannot be NULL, not XFREE.
393 (pack_vector): Use assert, not fatal, for bound violations.
394 * src/state.c (state_new): Likewise.
395 * src/reader.c (reader): Likewise.
396 * src/lalr.c (set_goto_map): Likewise.
397 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
398 the file name.
399
400 2002-11-12 Akim Demaille <akim@epita.fr>
401
402 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
403 Restore.
404 * src/scan-gram.l (last_string): Is global to the file, not to
405 yylex.
406 * src/parse-gram.y (input): Don't append the epilogue here,
407 (epilogue.opt): do it here, and free the scanner's obstack.
408 * src/reader.c (epilogue_set): Rename as...
409 (epilogue_augment): this.
410 * data/c.m4 (b4_epilogue): Defaults to empty.
411
412 2002-11-12 Akim Demaille <akim@epita.fr>
413
414 * src/getargs.c (long_options): Remove duplicates.
415 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
416 Remove.
417 * doc/bison.rnh: Remove.
418 * doc/bison.texinfo (VMS Invocation): Remove.
419
420 2002-11-12 Akim Demaille <akim@epita.fr>
421
422 * src/struniq.h, src/struniq.c (struniq_t): Is const.
423 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
424
425 Use struniq for symbols.
426
427 * src/symtab.h (symbol_t): The tag member is a struniq.
428 (symbol_type_set): Adjust.
429 * src/symtab.c (symbol_new): Takes a struniq.
430 (symbol_free): Don't free the tag member.
431 (hash_compare_symbol_t, hash_symbol_t): Rename as...
432 (hash_compare_symbol, hash_symbol): these.
433 Use the fact that tags as struniqs.
434 (symbol_get): Use struniq_new.
435 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
436 Returns a strniq.
437 * src/reader.h (merger_list, grammar_currentmerge_set): The name
438 and type members are struniqs.
439 * src/reader.c (get_merge_function)
440 (grammar_current_rule_merge_set): Adjust.
441 (TYPE, current_type): Are struniq.
442
443 Use struniq for file names.
444
445 * src/files.h, src/files.c (infile): Split into...
446 (grammar_file, current_file): these.
447 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
448 * src/reduce.c (reduce_print): Likewise.
449 * src/getargs.c (getargs): Likewise.
450 * src/complain.h, src/complain.c: Likewise.
451 * src/main.c (main): Call struniqs_new early enough to use it for
452 file names.
453 Don't free the input file name.
454
455 2002-11-12 Akim Demaille <akim@epita.fr>
456
457 * src/symtab.c (symbol_free): Remove dead deactivated code:
458 type_name are properly removed.
459 Don't use XFREE to free items that cannot be NULL.
460 * src/struniq.h, src/struniq.c: New.
461 * src/main.c (main): Initialize/free struniqs.
462 * src/parse-gram.y (%union): Add astruniq member.
463 (yyprint): Adjust.
464 * src/scan-gram.l (<{tag}>): Return a struniq.
465 Free the obstack bit that used to store it.
466 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
467
468 2002-11-11 Paul Eggert <eggert@twinsun.com>
469
470 Revamp to fix many (but not all) of the C- and M4-related quoting
471 problems. Among other things, this fixes the Bison bug reported
472 by Jan Hubicka when processing the Bash grammar; see:
473 <http://mail.gnu.org/pipermail/bison-patches/2002-November/001329.html>
474
475 Use new @ escapes consistently. Represent brackets with @{ and @}
476 rather than @<:@ and @:>@, since this works a bit better with dumb
477 editors like vi. Represent @ with @@, since @ is now consistently
478 an escape. Use @oline@ and @ofile@ rather than __oline__ and
479 __ofile__, to avoid unexpected expansions. Similarly, use @output
480 rather than #output.
481
482 * data/c.m4 (b4_copyright): Omit file name from comment, since
483 the file name could contain "*/".
484 (b4_synclines_flag): Don't quote the 2nd argument; it should already
485 be quoted. All uses changed.
486
487 * data/glr.c: Use new @ escapes consistently.
488 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
489 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
490 Remove, since they couldn't handle arbitrary characters in file
491 names.
492 * data/lalr1.cc: Likewise.
493 * data/yacc.c: Likewise.
494
495 * src/files.c (output_infix): Remove; all uses removed.
496 * src/files.h: Likewise.
497
498 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
499 mishandled funny characters in file names, and anyway it isn't
500 needed any more.
501 * data/yacc.c: Likewise.
502 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
503
504 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
505 * data/yacc.c: Likewise.
506
507 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
508 strings now.
509 (muscle_init): Quote filename as a C string.
510 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
511 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
512 * src/output.c (escaped_file_name_output): New function.
513 (prepare_symbols): Quote tokens for M4.
514 (prepare): Don't insert output_infix, output_prefix,
515 output_parser_name, output_header_name; this is now down by scan-skel.
516 Insert skeleton as a C string.
517
518 * src/output.c (user_actions_output, symbol_destructors_output,
519 symbol_printers_output): Quote filenames for C and M4.
520 * src/reader.c (prologue_augment, epilogue_set): Likewise.
521
522 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
523 escapes other than \\ and \'; this simplifies the code.
524 (<SC_STRING>): Likewise, for \\ and \".
525 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
526 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
527 Use new escapes @{ and @} for [ and ].
528
529 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
530 them with auto vars.
531 Switch to new escape scheme, where @ is the escape character uniformly.
532 Abort if a stray escape character is found. Avoid unbounded input
533 buffer when parsing non-escaped text.
534
535 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
536 __oline__, #output, $@, and @{ do not have unintended meanings.
537
538 2002-11-09 Paul Eggert <eggert@twinsun.com>
539
540 Fix the test failure due to GCC warnings described in
541 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001815.html>.
542 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
543 evaluate to 0 if it's impossible for NINF to be in the respective
544 table.
545 (yygetLRActions, yyrecoverParseError): Use them.
546
547 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
548 counted in the token inserted at end of file. Now takes
549 location_t *, not location_t, so that the location can be
550 adjusted. All uses changed.
551
552 * tests/regression.at (Invalid inputs): Adjust wording in
553 diagnostic to match the new behavior.
554
555 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
556 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
557 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
558 abort ();'. This reduces the runtime of the "Many lookaheads"
559 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
560 GCC 3.2.
561
562 2002-11-07 Paul Eggert <eggert@twinsun.com>
563
564 * src/parse-gram.y (CHARACTER): Remove unused token.
565 All uses removed.
566
567 * src/scan-gram.l: Remove stack option. We no longer use the
568 stack, since the stack was never deeper than 1; instead, use the
569 new auto var c_context to record the stacked value.
570
571 Remove nounput option. At an unexpected end of file, we now unput
572 the minimal input necessary to end cleanly; this simplifies the
573 code.
574
575 Avoid unbounded token sizes where this is easy.
576
577 (unexpected_end_of_file): New function.
578 Use it to systematize the error message on unexpected EOF.
579 (last-string): Now auto, not static.
580 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
581 (scanner_last_string_free): Remove; not used.
582 (percent_percent_count): Move decl to just before use.
583 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
584 not the (never otherwised-used) CHARACTER.
585
586 2002-11-07 Akim Demaille <akim@epita.fr>
587
588 Let yyerror always receive the msg as last argument, so that
589 yyerror can be variadic.
590
591 * data/yacc.c (b4_yyerror_args): New.
592 Use it when calling yyerror.
593 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
594 Use it when calling yyerror.
595 * doc/bison.texinfo (Error Reporting): Adjust.
596 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
597 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
598
599 2002-11-06 Akim Demaille <akim@epita.fr>
600
601 #line should have quoted strings.
602 Ideally, this should be done by m4_quotearg.
603
604 * src/scan-skel.l: Include quotearg.h.
605 Quote __ofile__.
606 * src/output.c (symbol_printers_output)
607 (symbol_destructors_output): Quote the file name.
608
609 2002-11-06 Akim Demaille <akim@epita.fr>
610
611 * tests/regression.at (Invalid inputs): Adjust to the recent
612 messages.
613
614 2002-11-06 Akim Demaille <akim@epita.fr>
615
616 Restore --no-lines.
617 Reported by Jim Kent.
618
619 * data/c.m4 (b4_syncline): New.
620 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
621 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
622 * src/output.c (user_actions_output): Likewise.
623 (prepare): Define 'b4_synclines_flag'.
624 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
625
626 2002-11-06 Akim Demaille <akim@epita.fr>
627
628 * src/main.c (main): Free `infile'.
629 * src/scan-gram.l (handle_syncline): New.
630 Recognize `#line'.
631 * src/output.c (user_actions_output, symbol_destructors_output)
632 (symbol_printers_output): Use the location's file name, not
633 infile.
634 * src/reader.c (prologue_augment, epilogue_set): Likewise.
635
636 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
637
638 * src/tables.c (matching_state): Don't allow states to match if
639 either has GLR conflict entries.
640
641 2002-11-05 Paul Eggert <eggert@twinsun.com>
642
643 * src/scan-gram.l: Use more accurate diagnostics, e.g.
644 "integer out of range" rather than "invalid value".
645 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
646 accordingly.
647
648 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
649 Also, remove one static variable in the scanner.
650
651 * src/scan-gram.l (braces_level): Now auto, not static.
652 Initialize to zero if the compiler is being picky.
653 (INITIAL): Clear braces_level instead of incrementing it.
654 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
655 as POSIX 1003.1-2001 requires.
656 * src/system.h (IF_LINT): New macro, taken from coreutils.
657 * configure.ac: Define "lint" if --enable-gcc-warnings.
658
659 2002-11-05 Akim Demaille <akim@epita.fr>
660
661 * src/scan-gram.l: When it starts with `%', complain about the
662 whole directive, not just that `invalid character: %'.
663
664 2002-11-04 Akim Demaille <akim@epita.fr>
665
666 * Makefile.maint: Update from Autoconf.
667 (update, cvs-update, po-update, do-po-update): New.
668
669 2002-11-04 Akim Demaille <akim@epita.fr>
670
671 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
672 and yyerror.
673 Have yyerror `use' its arguments.
674 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
675 returns true when location & yacc & pure & parse-param.
676 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
677
678 2002-11-04 Akim Demaille <akim@epita.fr>
679
680 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
681 clashes.
682 * src/scan-gram.l: Use [\'] instead of ['] to pacify
683 font-lock-mode.
684 Use complain_at.
685 Use quote, not quote_n since LOCATION_PRINT no longer uses the
686 slot 0.
687
688 2002-11-03 Paul Eggert <eggert@twinsun.com>
689
690 * src/reader.c (get_merge_function, grammar_current_rule_check):
691 Use consistent diagnostics for reporting type name clashes.
692 Quote the types with <>, for consistency with Yacc.
693 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
694
695 2002-11-03 Akim Demaille <akim@epita.fr>
696
697 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
698 New.
699 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
700 (b4_parse_param): Remove.
701 Use b4_identification.
702 Propagate b4_pure_args where needed to pass them to yyerror.
703 * data/glr.m4 (b4_parse_param): Remove.
704 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
705 (b4_lpure_formals): New.
706 Use b4_identification.
707 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
708 b4_user_formals and b4_user_args.
709 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
710 (yyreportAmbiguity): When using a pure parser, also need
711 the location, and the parse-params.
712 Adjust callers.
713 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
714 When using a pure parser, also need the parse-params.
715 Adjust callers.
716 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
717 (%pure-parser + %parse-param) LALR and GLR parsers.
718 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
719 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
720 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
721 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
722 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
723 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
724 * doc/bison.texinfo: Untabify the whole file.
725 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
726 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
727 (Error Reporting): Adjust to these new directives.
728 Document %error-verbose, deprecate YYERROR_VERBOSE.
729
730 2002-11-03 Akim Demaille <akim@epita.fr>
731
732 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
733 AT_CHECK_CALC_GLR invocations to use % directives, instead of
734 command line options.
735 * tests/cxx-type.at: Formatting changes.
736
737 2002-11-03 Paul Eggert <eggert@twinsun.com>
738
739 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
740 to count columns correctly, and to check for invalid inputs.
741
742 Use mbsnwidth to count columns correctly. Account for tabs, too.
743 Include mbswidth.h.
744 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
745 (extend_location): New function.
746 (YY_LINES): Remove.
747
748 Handle CRLF in C code rather than in Lex code.
749 (YY_INPUT): New macro.
750 (no_cr_read): New function.
751
752 Scan UCNs, even though we don't fully handle them yet.
753 (convert_ucn_to_byte): New function.
754
755 Handle backslash-newline correctly in C code.
756 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
757 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
758 all uses changed.
759 (tag, splice): New EREs. Do not allow NUL or newline in tags.
760 Use {splice} wherever C allows backslash-newline.
761 YY_STEP after space, newline, vertical-tab.
762 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
763
764 (letter, id): Don't assume ASCII; e.g., spell out a-z.
765
766 ({int}, handle_action_dollar, handle_action_at): Check for integer
767 overflow.
768
769 (YY_STEP): Omit trailing semicolon, so that it's more like C.
770
771 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
772 as well as \000. Check for UCHAR_MAX, not 255.
773 Allow \x with an arbitrary positive number of digits, as in C.
774 Check for overflow here.
775 Allow \? and UCNs, for compatibility with C.
776
777 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
778 with quote slot used by complain_at.
779
780 * tests/input.at: Add tests for backslash-newline, m4 quotes
781 in symbols, long literals, and funny escapes in strings.
782
783 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
784 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
785 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
786 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
787 * m4/mbswidth.m4: New file, from GNU coreutils.
788
789 * doc/bison.texinfo (Grammar Outline): Document // comments.
790 (Symbols): Document that trigraphs have no special meaning in Bison,
791 nor is backslash-newline allowed.
792 (Actions): Document that trigraphs have no special meaning.
793
794 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
795 no longer used.
796
797 2002-11-02 Paul Eggert <eggert@twinsun.com>
798
799 * src/reader.c: Don't include quote.h; not needed.
800 (get_merge_function): Reword warning to be consistent with
801 type clash diagnostic in grammar_current_rule_check.
802
803 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
804 bug in trigraph handling.
805
806 * src/output.c (prepare_symbols): When printing token names,
807 escape "[" as "@<:@" and likewise for "]".
808
809 * src/system.h (errno): Remove declaration, as we are now
810 assuming C89 or better, and C89 guarantees errno.
811
812 2002-10-30 Paul Eggert <eggert@twinsun.com>
813
814 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
815 Check for close failures.
816 * src/files.h (xfclose): Return void, not int, since it always
817 returned zero.
818 * src/files.c (xfclose): Likewise. Report I/O error if ferror
819 indicates one.
820 * src/output.c (output_skeleton): Use xfclose rather than fclose
821 and ferror. xfclose now checks ferror.
822
823 * data/glr.c (YYLEFTMOST_STATE): Remove.
824 (yyreportTree): Use a stack-based leftmost state. This avoids
825 our continuing battles with bogus warnings about initializers.
826
827 2002-10-30 Akim Demaille <akim@epita.fr>
828
829 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
830 #if.
831
832 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
833
834 * tests/glr-regr1.at: New test for reported regressions.
835 * tests/testsuite.at: Add glr-regr1.at test.
836 * tests/Makefile.am: Add glr-regr1.at test.
837
838 2002-10-24 Paul Eggert <eggert@twinsun.com>
839
840 Version 1.75a.
841
842 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
843 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
844 we use malloc. Don't assume 'A' through 'Z' are contiguous.
845 Don't assume strdup exists; POSIX says its an XSI extension.
846 Check for buffer overflow on input.
847
848 2002-10-24 Akim Demaille <akim@epita.fr>
849
850 * src/output.c (output_skeleton): Don't disable M4sugar comments
851 too soon: it results in comments being expanded.
852 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
853 first output.
854
855 2002-10-24 Akim Demaille <akim@epita.fr>
856
857 * data/yacc.c (m4_int_type): New.
858 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
859 char' as only yacc.c wants K&R portability.
860 * data/glr.c (yysigned_char): Remove.
861 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
862 Reported by Quoc Peyrot.
863
864 2002-10-23 Paul Eggert <eggert@twinsun.com>
865
866 * src/main.c (main): With --trace=time, report times even if a
867 non-fatal error occurs. Formerly, the times were reported in some
868 such cases but not in others.
869 * src/reader.c (reader): Just return if a complaint has been issued,
870 instead of exiting, so that 'main' can report times.
871
872 2002-10-22 Akim Demaille <akim@epita.fr>
873
874 * src/system.h: Include sys/types.
875 Reported by Bert Deknuydt.
876
877 2002-10-23 Paul Eggert <eggert@twinsun.com>
878
879 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
880 Suggested by Art Haas.
881
882 2002-10-22 Paul Eggert <eggert@twinsun.com>
883
884 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
885 decl; not needed any more.
886 * src/main.c (main): Use return to exit, undoing yesterday's change.
887 The last OS that we could find where this wouldn't work is
888 SunOS 3.5, and that's too old to worry about now.
889
890 * data/glr.c (struct yyltype): Define members even when not
891 doing locations. This is more consistent with yacc.c, and it
892 works around the following bug reports:
893 http://mail.gnu.org/pipermail/bug-bison/2002-October/001764.html
894 http://mail.gnu.org/pipermail/bug-bison/2002-October/001769.html
895 and I hope it also fixes this bug report:
896 http://mail.gnu.org/pipermail/bug-bison/2002-October/001748.html
897
898 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
899 @acronym consistently. Standardize on "Yacc" instead of "YACC",
900 "Algol" instead of "ALGOL". Give a bit more history about BNF.
901
902 2002-10-22 Akim Demaille <akim@epita.fr>
903
904 * data/README: New.
905
906 2002-10-21 Paul Eggert <eggert@twinsun.com>
907
908 Be consistent about 'bool'; the old code used an enum in one
909 module and an int in another, and this violates the C standard.
910 * m4/stdbool.m4: New file, from coreutils 4.5.3.
911 * configure.ac (AC_HEADER_STDBOOL): Add.
912 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
913 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
914 * src/symtab.c (hash_compare_symbol_t): Likewise.
915 * src/system.h (bool, false, true): Use a definition consistent
916 with ../lib/hash.c. All uses changed.
917
918 * src/complain.c (warning_issued): Renamed from warn_message_count,
919 so that we needn't worry about integer overflow (!).
920 Now of type bool. All uses changed.
921 (complaint_issued): Renamed from complain_message_count; likewise.
922
923 * src/main.c (main): Use exit to exit with failure.
924
925 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
926 rather than 1 and 0.
927 * src/main.c (main): Likewise.
928 * src/getargs.c (getargs): Likewise.
929 * src/reader.c (reader): Likewise.
930
931 * src/getarg.c (getargs): Remove duplicate code for
932 "Try `bison --help'".
933
934 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
935 What was that "2" for?
936
937 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
938 * src/getargs.c (usage): Likewise.
939
940 * src/getargs.c (getargs): When there are too few operands, report
941 the last one. When there are too many, report the first extra
942 one. This is how diffutils does it.
943
944 2002-10-20 Paul Eggert <eggert@twinsun.com>
945
946 Remove K&R vestiges.
947 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
948 * src/complain.c (VA_START): Remove. Assume prototypes.
949 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
950 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
951 fatal): Assume prototypes.
952 * src/complain.h: Assume prototypes.
953 * src/system.h (PARAMS): Remove.
954 Include <limits.h> unconditionally, since it's guaranteeed even
955 for a freestanding C89 compiler.
956 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
957 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
958
959 2002-10-20 Akim Demaille <akim@epita.fr>
960
961 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
962 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
963 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
964 (yyresolveStates, yyresolveAction, yyresolveStack)
965 (yyprocessOneStack): Use them.
966 (yy_reduce_print): New.
967 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
968
969 2002-10-20 Akim Demaille <akim@epita.fr>
970
971 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
972 arguments and output `void'.
973 (b4_c_function): Rename as...
974 (b4_c_function_def): this.
975 (b4_c_function_decl, b4_c_ansi_function_def)
976 (b4_c_ansi_function_decl): New.
977 Change the interpretation of the arguments: before `int, foo', now
978 `int foo, foo'.
979 * data/yacc.c (yyparse): Prototype and define thanks to these.
980 Adjust b4_c_function_def uses.
981 * data/glr.c (yyparse): Likewise, but ANSI only.
982
983 2002-10-20 Akim Demaille <akim@epita.fr>
984
985 * src/output.c (prepare): Move the definition of `tokens_number',
986 `nterms_number', `undef_token_number', `user_token_number_max'
987 to...
988 (prepare_tokens): Here.
989 (prepare_tokens): Rename as...
990 (prepare_symbols): this.
991 (prepare): Move the definition of `rules_number' to...
992 (prepare_rules): here.
993 (prepare): Move the definition of `last', `final_state_number',
994 `states_number' to...
995 (prepare_states): here.
996 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
997
998 2002-10-20 Akim Demaille <akim@epita.fr>
999
1000 * src/tables.h, src/tables.c, src/output.c: Comment changes.
1001
1002 2002-10-20 Akim Demaille <akim@epita.fr>
1003
1004 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
1005 * data/c.m4: here.
1006
1007 2002-10-20 Akim Demaille <akim@epita.fr>
1008
1009 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
1010 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
1011 `pair'.
1012 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
1013 `name' to...
1014 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
1015 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
1016 These.
1017
1018 2002-10-19 Paul Eggert <eggert@twinsun.com>
1019
1020 Do not create a temporary file, as that involves security and
1021 cleanup headaches. Instead, use a pair of pipes.
1022 Derived from a suggestion by Florian Krohm.
1023 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
1024 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
1025 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
1026 (BISON_PREREQ_SUBPIPE): Add.
1027 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
1028 Add subpipe.h, subpipe.c.
1029 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
1030 * po/POTFILES.in: Add lib/subpipe.c.
1031 * src/output.c: Include "subpipe.h".
1032 (m4_invoke): Remove decl.
1033 (scan_skel): New decl.
1034 (output_skeleton): Use pipe rather than temporary file for m4 input.
1035 Check that m4sugar.m4 is readable, to avoid deadlock.
1036 Check for pipe I/O error.
1037 * src/scan-skel.l (readpipe): Remove decl.
1038 (scan_skel): New function, to be used in place of m4_invoke.
1039 Read from stream rather than file.
1040
1041 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
1042 float, as this generates a warning on Solaris 8 + GCC 3.2 with
1043 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
1044 this generates a more-accurate value anyway.
1045
1046 * lib/timevar.c (timervar_accumulate): Rename locals to
1047 avoid confusion with similarly-named more-global.
1048 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
1049
1050 * src/output.c (prepare): Use xstrdup to convert char const *
1051 to char *, to avoid GCC warning.
1052
1053 2002-10-19 Akim Demaille <akim@epita.fr>
1054
1055 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
1056 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
1057 Use them to have `calc.y' ready for %pure-parser.
1058 * data/yacc.c (YYLEX): Pass a yylex return type to
1059 b4_c_function_call.
1060
1061 2002-10-19 Akim Demaille <akim@epita.fr>
1062
1063 Prototype support of %lex-param and %parse-param.
1064
1065 * src/parse-gram.y: Add the definition of the %lex-param and
1066 %parse-param tokens, plus their rules.
1067 Drop the `_' version of %glr-parser.
1068 Add the "," token.
1069 * src/scan-gram.l (INITIAL): Scan them.
1070 * src/muscle_tab.c: Comment changes.
1071 (muscle_insert, muscle_find): Rename `pair' as `probe'.
1072 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
1073 (muscle_entry_s): The `value' member is no longer const.
1074 Adjust all dependencies.
1075 * src/muscle_tab.c (muscle_init): Adjust: use
1076 MUSCLE_INSERT_STRING.
1077 Initialize the obstack earlier.
1078 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
1079 (muscle_pair_list_grow): New.
1080 * data/c.m4 (b4_c_function_call, b4_c_args): New.
1081 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
1082 * tests/calc.at: Use %locations, not --locations.
1083 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
1084
1085 2002-10-19 Akim Demaille <akim@epita.fr>
1086
1087 * src/getargs.c (usage): Take status as argument and exit
1088 accordingly.
1089 Report the traditional `Try ... --help' message when status != 0.
1090 (usage, version): Don't take a FILE * as arg, it is pointless.
1091 (getargs): When there is an incorrect number of arguments, make it
1092 an error, and report it GNUlically thanks to `usage ()'.
1093
1094 2002-10-18 Paul Eggert <eggert@twinsun.com>
1095
1096 * data/glr.c (yyreportParseError): Don't assume that sprintf
1097 yields the length of the printed string, as this is not true
1098 on SunOS 4.1.4. Reported by Peter Klein.
1099
1100 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
1101 * tests/conflicts.at (%nonassoc and eof): Likewise.
1102 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
1103
1104 2002-10-17 Akim Demaille <akim@epita.fr>
1105
1106 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
1107 * src/getargs.c (trace_types, trace_args): Adjust.
1108 * src/reader.c (grammar_current_rule_prec_set)
1109 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
1110 Standardize error messages.
1111 And s/@prec/%prec/!
1112 (reader): Use trace_flag to enable scanner/parser debugging,
1113 instead of an adhoc scheme.
1114 * src/scan-gram.l: Remove trailing debugging code.
1115
1116 2002-10-16 Paul Eggert <eggert@twinsun.com>
1117
1118 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
1119 MUSCLE_TAB_H.
1120
1121 * NEWS: Officially drop support for building Bison with K&R C,
1122 since it didn't work anyway and it's not worth worrying about.
1123 * Makefile.maint (wget_files): Remove ansi2knr.c.
1124 (ansi2knr.c-url_prefix): Remove.
1125 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
1126 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1127 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
1128
1129 2002-10-15 Paul Eggert <eggert@twinsun.com>
1130
1131 Stop using the "enum_" trick for K&R-style function definitions;
1132 it confused me, and I was the author! Instead, assume that people
1133 who want to use K&R C compilers (when using these modules in GCC,
1134 perhaps?) will run ansi2knr.
1135
1136 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
1137 All uses of "enum_" changed to "enum ".
1138 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
1139 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
1140
1141 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
1142 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
1143 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
1144 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
1145 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
1146 abitset_not, abitset_ones, abitset_or, abitset_or_and,
1147 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
1148 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
1149 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
1150 Use function prototypes; this removes the need for declaring
1151 static functions simply to provide their prototypes.
1152 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
1153 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
1154 bitset_count_, bitset_create, bitset_dump, bitset_first,
1155 bitset_free, bitset_init, bitset_last, bitset_next,
1156 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
1157 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
1158 bitset_print, bitset_release_memory, bitset_toggle_,
1159 bitset_type_choose, bitset_type_get, bitset_type_name_get,
1160 debug_bitset): Likewise.
1161 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
1162 * lib/bitset_stats.c (bitset_log_histogram_print,
1163 bitset_percent_histogram_print, bitset_stats_and,
1164 bitset_stats_and_cmp, bitset_stats_and_or,
1165 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
1166 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
1167 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
1168 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
1169 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
1170 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
1171 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
1172 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
1173 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
1174 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
1175 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
1176 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
1177 bitset_stats_zero): Likewise.
1178 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
1179 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
1180 bitsetv_dump, debug_bitsetv): Likewise.
1181 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
1182 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
1183 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
1184 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
1185 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
1186 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
1187 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
1188 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
1189 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
1190 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
1191 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
1192 Likewise.
1193 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
1194 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
1195 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
1196 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
1197 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
1198 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
1199 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
1200 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
1201 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
1202 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
1203 lbitset_xor_cmp, lbitset_zero): Likewise.
1204
1205 2002-10-14 Akim Demaille <akim@epita.fr>
1206
1207 Version 1.75.
1208
1209 2002-10-14 Akim Demaille <akim@epita.fr>
1210
1211 * tests/Makefile.am (maintainer-check-posix): New.
1212
1213 2002-10-14 Akim Demaille <akim@epita.fr>
1214
1215 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
1216 member.
1217
1218 2002-10-14 Akim Demaille <akim@epita.fr>
1219
1220 * src/tables.c (table_ninf_remap): base -> tab.
1221 Reported by Matt Rosing.
1222
1223 2002-10-14 Paul Eggert <eggert@twinsun.com>
1224
1225 * tests/action.at, tests/calc.at, tests/conflicts.at,
1226 tests/cxx-type.at, tests/headers.at, tests/input.at,
1227 tests/regression.at, tests/synclines.at, tests/torture.at:
1228 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
1229 so that the tests still work even if POSIXLY_CORRECT is set.
1230 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
1231
1232 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
1233 for portability to K&R hosts. Fix typo: signed char is guaranteed
1234 only to 127, not to 128.
1235 * data/glr.c (yysigned_char): New type.
1236 * data/yacc.c (yysigned_char): Likewise.
1237 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
1238
1239 2002-10-13 Paul Eggert <eggert@twinsun.com>
1240
1241 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
1242 true due to limited range of data type" warning from GCC.
1243
1244 * data/c.m4 (b4_token_defines): Protect against double-inclusion
1245 by wrapping enum yytokentype's definition inside #ifndef
1246 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
1247
1248 2002-10-13 Akim Demaille <akim@epita.fr>
1249
1250 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
1251 Un yy- yyrhs to avoid the name clash with the global YYRHS.
1252
1253 2002-10-13 Akim Demaille <akim@epita.fr>
1254
1255 * Makefile.maint: Update from Autoconf 2.54.
1256 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
1257
1258 2002-10-13 Akim Demaille <akim@epita.fr>
1259
1260 * src/print.c (print_state): Separate the list of solved conflicts
1261 from the other items.
1262 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
1263
1264 2002-10-13 Akim Demaille <akim@epita.fr>
1265
1266 Let nondeterministic skeletons be usable with deterministic
1267 tables.
1268
1269 With the patch, GAWK compiled by GCC without -O2 passes its test
1270 suite using a GLR parser driven by LALR tables. It fails with -O2
1271 because `struct stat' gives two different answers on my machine:
1272 88 (definition of an auto var) and later 96 (memset on this var).
1273 Hence the stack is badly corrumpted. The headers inclusion is to
1274 blame: if I move the awk.h inclusion before GLR's system header
1275 inclusion, the two struct stat have the same size.
1276
1277 * src/tables.c (pack_table): Always create conflict_table.
1278 (token_actions): Always create conflict_list.
1279 * data/glr.c (YYFLAG): Remove, unused.
1280
1281 2002-10-13 Akim Demaille <akim@epita.fr>
1282
1283 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
1284 (O0FLAGS): New.
1285 (VALGRIND, GXX): New.
1286 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
1287 * tests/bison.in: Run $PREBISON a pre-command.
1288 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
1289 (maintainer-check-g++): New.
1290 * Makefile.am (maintainer-check): New.
1291
1292 2002-10-13 Akim Demaille <akim@epita.fr>
1293
1294 * data/glr.c: Formatting changes.
1295 Tweak some trace messages to match yacc.c's.
1296
1297 2002-10-13 Akim Demaille <akim@epita.fr>
1298
1299 GLR parsers sometimes raise parse errors instead of performing the
1300 default reduction.
1301 Reported by Charles-Henry de Boysson.
1302
1303 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
1304 check the length of the traces when %glr.
1305 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
1306 GLR's traces.
1307 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
1308 Test GLR parsers.
1309 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
1310 (yyltype): Remove the yy prefix from the member names.
1311 (yytable): Complete its comment.
1312 (yygetLRActions): Map error action number from YYTABLE from
1313 YYTABLE_NINF to 0.
1314 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
1315 (which was a bug: it should have been YYTABEL_NINF, and yet it was
1316 not satisfying as we could compare an YYACTION computed from
1317 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
1318 only value for error actions.
1319 (yyreportParseError): In verbose parse error messages, don't issue
1320 `error' in the list of expected tokens.
1321 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
1322 next action to perform to match glr.c's decoding.
1323 (yytable): Complete its comment.
1324
1325 2002-10-13 Paul Eggert <eggert@twinsun.com>
1326
1327 Fix problem reported by Henrik Grubbstroem in
1328 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001670.html>:
1329 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
1330 because the Bison parser reads the second action before reducing
1331 the first one.
1332 * src/scan-gram.l (rule_length): New static var.
1333 Use it to keep track of the rule length in the scanner, since
1334 we can't expect the parser to be in lock-step sync with the scanner.
1335 (handle_action_dollar, handle_action_at): Use this var.
1336 * tests/actions.at (Exotic Dollars): Test for the problem.
1337
1338 2002-10-12 Paul Eggert <eggert@twinsun.com>
1339
1340 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
1341 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
1342 Include <sys/time.h> when checking for clock_t and struct tms.
1343 Use same include order as source.
1344 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
1345 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001674.html>.
1346
1347 * lib/timevar.c: Update copyright date and clarify comments.
1348 (get_time) [IN_GCC]: Keep the GCC version for reference.
1349
1350 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
1351 GCC version as of today, then merge Bison's changes.
1352 Change "GCC" to "Bison" in copyright notice. timevar.def's
1353 author is Akim, so change that too.
1354
1355 * src/reader.c (grammar_current_rule_check):
1356 Don't worry about the default action if $$ is untyped.
1357 Prevents bogus warnings reported by Jim Gifford in
1358 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001673.html>.
1359
1360 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
1361 * data/glr.c, data/lalr1.cc, data/yacc.c:
1362 Output token definitions before the first part of user declarations.
1363 Fixes compatibility problem reported by Jim Gifford for kbd in
1364 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001672.html>.
1365
1366 2002-10-11 Paul Eggert <eggert@twinsun.com>
1367
1368 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
1369 (yyparse): here. This undoes some of the 2002-07-25 change.
1370 Compatibility problem reported by Ralf S. Engelschall with
1371 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
1372
1373 2002-10-11 Akim Demaille <akim@epita.fr>
1374
1375 * tests/regression.at Characters Escapes): New.
1376 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
1377 characters.
1378 Reported by Jan Nieuwenhuizen.
1379
1380 2002-10-11 Akim Demaille <akim@epita.fr>
1381
1382 * po/id.po: New.
1383
1384 2002-10-10 Paul Eggert <eggert@twinsun.com>
1385
1386 Portability fixes for bitsets; this also avoids several GCC
1387 warnings.
1388
1389 * lib/abitset.c: Include <stddef.h>, for offsetof.
1390 * lib/lbitset.c: Likewise.
1391
1392 * lib/abitset.c (abitset_bytes): Return a size that is aligned
1393 properly for vectors of objects. Do not assume that adding a
1394 header size to a multiple of a word size yields a value that is
1395 properly aligned for the whole union.
1396 * lib/bitsetv.c (bitsetv_alloc): Likewise.
1397
1398 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
1399 unique names for structures.
1400 * lib/ebitset.c (ebitset_bytes): Likewise.
1401 * lib/lbitset.c (lbitset_bytes): Likewise.
1402
1403 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
1404 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
1405 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
1406 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
1407 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
1408 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
1409 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
1410 to improve the type-checking that GCC can do.
1411 * lib/bitset.c (bitset_op4_cmp): Likewise.
1412 * lib/bitset_stats.c (bitset_stats_count,
1413 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
1414 bitset_stats_copy, bitset_stats_disjoint_p,
1415 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
1416 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
1417 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
1418 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
1419 bitset_stats_and_or_cmp, bitset_stats_andn_or,
1420 bitset_stats_andn_or_cmp, bitset_stats_or_and,
1421 bitset_stats_or_and_cmp): Likewise.
1422 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
1423 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
1424 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
1425 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
1426
1427 * lib/abitset.h: Include bitset.h, not bbitset.h.
1428 * lib/ebitset.h: Likewise.
1429 * lib/lbitset.h: Likewise.
1430
1431 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
1432 All instances of parameters of type enum bitset_opts are now of
1433 type enum_bitset_opts, to conform to the C Standard, and similarly
1434 for enum_bitset_type.
1435 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
1436 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
1437
1438 Do not use "struct bitset_struct" to mean different things in
1439 different modules. Not only is this confusing, it violates
1440 the C Standard, which requires that structure types in different
1441 modules must be compatible if one is to be passed to the other.
1442 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
1443 All instances of "struct bitset_struct *" replaced with "bitset".
1444 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
1445 (union bitset_union, struct abitset_struct, struct ebitset_struct,
1446 struct lbitset_struct, struct bitset_stats_struct): New types.
1447 All uses of struct bitset_struct changed to union bitset_union,
1448 etc.
1449 * lib/abitset.c (struct abitset_struct, abitset,
1450 struct bitset_struct): Remove.
1451 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
1452 struct bitset_struct): Remove.
1453 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
1454 bitset_struct): Remove.
1455 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
1456 Likewise.
1457
1458 Do not call a function of type T using a call that assumes the
1459 function is of a different type U. Standard C requires that a
1460 function must be called with a type that is compatible with its
1461 definition.
1462 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
1463 New decls.
1464 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
1465 New functions.
1466 * lib/ebitset.c (PFV): Remove.
1467 * lib/lbitset.c (PFV): Likewise.
1468 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
1469 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
1470 decls.
1471 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
1472 (ebitset_vtable): Use them.
1473 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
1474 lbitset_xor): New functions.
1475 (lbitset_vtable): Use them.
1476
1477 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
1478 Declare.
1479
1480 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
1481 GCC warning.
1482 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
1483 Use offsetof, for simplicity.
1484
1485 2002-10-06 Paul Eggert <eggert@twinsun.com>
1486
1487 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
1488 the same width as int. This reapplies a hunk of the 2002-08-12 patch
1489 <http://mail.gnu.org/pipermail/bison-patches/2002-August/001111.html>,
1490 which was inadvertently undone by the 2002-09-30 patch.
1491 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
1492 the same width as int.
1493
1494 2002-10-04 Paul Eggert <eggert@twinsun.com>
1495
1496 Version 1.50.
1497
1498 * configure.ac (AC_INIT), NEWS: Increment version number.
1499
1500 * doc/bison.texinfo: Minor spelling, grammar, and white space
1501 fixes.
1502 (Symbols): Mention that any negative value returned from yylex
1503 signifies end-of-input. Warn about negative chars. Mention
1504 the portable Standard C character set.
1505
1506 The GNU coding standard says CFLAGS and YFLAGS are reserved
1507 for the installer to set.
1508 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
1509 * src/Makefile.am (AM_CFLAGS): Likewise.
1510 (AM_YFLAGS): Renamed from YFLAGS.
1511
1512 Fix some MAX and MIN problems.
1513 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
1514 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
1515 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
1516 * src/reader.c (reader): Use it.
1517
1518 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
1519 POSIX 1003.1-2001 has removed fgrep.
1520
1521 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
1522
1523 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
1524 interpreted as signed.
1525 * lib/ebitset.c (ebitset_list): Fix bug.
1526
1527 2002-10-01 Paul Eggert <eggert@twinsun.com>
1528
1529 More fixes for 64-bit hosts and large bitsets.
1530
1531 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
1532 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
1533 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
1534 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
1535 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
1536 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
1537 bitset_count_): Likewise.
1538 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
1539 bitset_first, bitset_last): Likewise.
1540 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
1541 bitset_stats_list_reverse, bitset_stats_size,
1542 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
1543 Likewise.
1544 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
1545 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
1546 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
1547 bitsetv_reflexive_transitive_closure): Likewise.
1548 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
1549 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
1550 Likewise.
1551 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
1552 Likewise.
1553
1554 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
1555 Use size_t, not unsigned int, to count bytes.
1556 * lib/abitset.h (abitset_bytes): Likewise.
1557 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
1558 Likewise.
1559 * lib/bitset.h (bitset_bytes): Likewise.
1560 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
1561 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
1562 * lib/bitsetv.c (bitsetv_alloc): Likewise.
1563 * lib/ebitset.c (ebitset_bytes): Likewise.
1564 * lib/ebitset.h (ebitset_bytes): Likewise.
1565 * lib/lbitset.c (lbitset_bytes): Likewise.
1566 * lib/lbitset.h (lbitset_bytes): Likewise.
1567
1568 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
1569 abitset_subset_p, abitset_disjoint_p, abitset_and,
1570 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
1571 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
1572 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
1573 abitset_or_and, abitset_or_and_cmp):
1574 Use bitset_windex instead of unsigned int.
1575 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
1576 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
1577 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
1578 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
1579 Likewise.
1580 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
1581
1582 * lib/bitset.c (bitset_print):
1583 Use proper printf formats for widths of integer types.
1584 * lib/bitset_stats.c (bitset_percent_histogram_print,
1585 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
1586 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
1587 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
1588 * lib/lbitset.c (lbitset_bytes): Likewise.
1589
1590 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
1591 BITSET_SIZE_MAX): New macros.
1592 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
1593 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
1594 to BITSET_WINDEX_MAX.
1595
1596 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
1597 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
1598 since we now return the bitset_bindex type (not int).
1599
1600 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
1601 when computing sizes.
1602 * lib/ebitset.c (ebitset_elts_grow): Likewise.
1603
1604 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
1605 and avoid cast to unsigned.
1606
1607 2002-09-30 Akim Demaille <akim@epita.fr>
1608
1609 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
1610 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
1611 Updates from Michael Hayes.
1612
1613 2002-09-30 Art Haas <ahaas@neosoft.com>
1614
1615 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
1616 invocations.
1617 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
1618 defined.
1619
1620 2002-09-27 Akim Demaille <akim@epita.fr>
1621
1622 Version 1.49c.
1623
1624 2002-09-27 Akim Demaille <akim@epita.fr>
1625
1626 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
1627 (Because of AC_LIBSOURCE).
1628
1629 2002-09-27 Akim Demaille <akim@epita.fr>
1630
1631 Playing with Autoscan.
1632
1633 * configure.ac: Remove the old LIBOBJ tweaks.
1634 (AC_REPLACE_FUNCS): Add strrchr and strtol.
1635 * lib/strrchr.c: New.
1636 * lib/strtol.c: New, from the Coreutils 4.5.1.
1637
1638 2002-09-27 Akim Demaille <akim@epita.fr>
1639
1640 Playing with Autoscan.
1641
1642 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
1643 * lib/Makefile.am (libbison_a_SOURCES): No longer include
1644 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
1645 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
1646 Coreutils 4.5.1.
1647
1648 2002-09-24 Akim Demaille <akim@epita.fr>
1649
1650 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
1651 (Frequently Asked Questions, Parser Stack Overflow): New.
1652
1653 2002-09-13 Akim Demaille <akim@epita.fr>
1654
1655 Playing with autoscan.
1656
1657 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
1658 * src/files.c (skeleton_find): Remove, unused.
1659 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
1660 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
1661
1662 2002-09-13 Akim Demaille <akim@epita.fr>
1663
1664 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
1665 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
1666
1667 2002-09-13 Akim Demaille <akim@epita.fr>
1668
1669 * configure.ac: Require 2.54.
1670 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
1671 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
1672 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
1673 Remove, provided by Autoconf macros.
1674
1675 2002-09-12 Akim Demaille <akim@epita.fr>
1676
1677 * m4/prereq.m4: Update, from Coreutils 4.5.1.
1678
1679 2002-09-12 Akim Demaille <akim@epita.fr>
1680
1681 * m4/prereq.m4: Update, from Fileutils 4.1.5.
1682 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
1683 Reported by Martin Mokrejs.
1684
1685 2002-09-10 Akim Demaille <akim@epita.fr>
1686
1687 * src/parse-gram.y: Associate a human readable string to each
1688 token type.
1689 * tests/regression.at (Invalid inputs): Adjust.
1690
1691 2002-09-10 Gary V. Vaughan <gary@gnu.org>
1692
1693 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
1694 with an Autoconf-2.5x style configure.ac.
1695
1696 2002-09-06 Paul Eggert <eggert@twinsun.com>
1697
1698 * doc/bison.texinfo (Conditions): Make explicit that the GPL
1699 exception applies only to yacc.c. This is a modification of a
1700 patch originally suggested by Akim Demaille.
1701
1702 2002-09-06 Akim Demaille <akim@epita.fr>
1703
1704 * data/c.m4 (b4_copyright): Move the GPL exception comment from
1705 here to...
1706 * data/yacc.c: here.
1707
1708 * data/lalr1.cc (struct yyltype): Don't define it, since we use
1709 LocationType.
1710 (b4_ltype): Default to yy::Location from location.hh.
1711
1712 2002-09-04 Jim Meyering <jim@meyering.net>
1713
1714 * data/yacc.c: Guard the declaration of yytoknum also with
1715 `#ifdef YYPRINT', so it is declared only when used.
1716
1717 2002-09-04 Akim Demaille <akim@epita.fr>
1718
1719 * configure.in: Rename as...
1720 * configure.ac: this.
1721 Bump to 1.49c.
1722
1723 2002-09-04 Akim Demaille <akim@epita.fr>
1724
1725 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
1726 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
1727 translate maintainer only messages.
1728
1729 2002-08-12 Paul Eggert <eggert@twinsun.com>
1730
1731 Version 1.49b.
1732
1733 * Makefile.am (SUBDIRS): Remove intl.
1734 (DISTCLEANFILES): Remove.
1735 * NEWS: Mention that GNU M4 is now required. Clarify what is
1736 meant by "larger grammars". Mention the pt_BR translation.
1737 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
1738 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
1739 Bump version from 0.11.2 to 0.11.5.
1740 (BISON_PREREQ_STAGE): Remove.
1741 (AM_GNU_GETTEXT): Use external gettext.
1742 (AC_OUTPUT): Remove intl/Makefile.
1743
1744 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
1745
1746 * data/glr.c: Include string.h, for strlen.
1747 (yyreportParseError): Use size_t for yysize.
1748 (yy_yypstack): No longer nested inside yypstates, as nested
1749 functions are not portable. Do not assume size_t is the
1750 same width as int.
1751 (yypstates): Do not assume that ptrdiff_t is the same width
1752 as int, and similarly for yyposn and YYINDEX.
1753
1754 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
1755
1756 * lib/Makefile.am (INCLUDES): Do not include from the intl
1757 directory, which has been removed.
1758 * src/Makefile.am (INCLUDES): Likewise.
1759
1760 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
1761 (bitsets_sources, additional_bitsets_sources, timevars_sources):
1762 New vars.
1763
1764 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
1765 * tests/Makefile.am (EXTRA_DIST): Likewise.
1766
1767 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
1768 Do not assume that bitset_windex is the same width as unsigned.
1769
1770 * lib/abitset.c (abitset_unused_clear): Do not assume that
1771 bitset_word is the same width as int.
1772 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
1773 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
1774 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
1775 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
1776 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
1777
1778 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
1779 portability to one's complement hosts!).
1780 * lib/ebitset.c (ebitset_op1): Likewise.
1781 * lib/lbitset.c (lbitset_op1): Likewise.
1782
1783 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
1784 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
1785 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
1786 Sync with fileutils.
1787 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
1788 lib/gettext.h: Sync with diffutils.
1789
1790 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
1791 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
1792
1793 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
1794 PROTOTYPES to check for prototypes, and "defined __STDC__" to
1795 check for void *.
1796
1797 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
1798 size_t; the old version tried to do this but casted improperly.
1799 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
1800 (bitset_test): Now returns int, not unsigned long.
1801
1802 * lib/bitset_stats.c: Include "gettext.h".
1803 (_): New macro.
1804 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
1805 name locals "index", as it generates unnecessary warnings on some
1806 hosts that have an "index" function.
1807
1808 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
1809 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
1810 they need translation.
1811 * src/LR0.c (state_list_append, new_itemsets, get_state,
1812 append_states, generate_states): Likewise.
1813 * src/assoc.c (assoc_to_string): Likewise.
1814 * src/closure.c (print_closure, set_firsts, closure): Likewise.
1815 * src/gram.c (grammar_dump): Likewise.
1816 * src/injections.c (injections_compute): Likewise.
1817 * src/lalr.c (lookaheads_print): Likewise.
1818 * src/relation.c (relation_transpose): Likewise.
1819 * src/scan-gram.l: Likewise.
1820 * src/tables.c (table_grow, pack_vector): Likewise.
1821
1822 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
1823 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
1824 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
1825 * m4/mbstate_t.m4: Sync with fileutils.
1826 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
1827
1828 * po/LINGUAS: Add pt_BR.
1829 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
1830 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
1831 lib/timevar.c.
1832 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
1833 manual recommends.
1834 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
1835
1836 * src/complain.c (strerror_r): Remove decl; not needed.
1837 (strerror): Use same pattern as ../lib/error.c.
1838
1839 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
1840
1841 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
1842
1843 * src/main.c (main): Cast result of bindtextdomain and textdomain
1844 to void, to avoid a GCC warning when --disable-nls is in effect.
1845
1846 * src/scan-gram.l: Use strings rather than escapes when possible,
1847 to minimize the number of warnings from xgettext.
1848 (handle_action_dollar, handle_action_at): Don't use isdigit,
1849 as it mishandles negative chars and it may not work as expected
1850 outside the C locale.
1851
1852 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
1853 this is a GCC extension and is not portable to other compilers.
1854
1855 * src/system.h (alloca): Use same pattern as ../lib/error.c.
1856 Do not include <ctype.h>; no longer needed.
1857 Do not include <malloc.h>; no longer needed (and generates
1858 warnings on OpenBSD 3.0).
1859
1860 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
1861 it's not portable.
1862
1863 * tests/regression.at: Do not use 'cc -c input.c -o input';
1864 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
1865
1866 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
1867 exit status as failure, not just exit status 1. Sun C exits
1868 with status 2 sometimes.
1869
1870 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
1871 Use it for the two large tests.
1872
1873 2002-08-02 Akim Demaille <akim@epita.fr>
1874
1875 * src/conflicts.c (conflicts_output): Don't output rules never
1876 reduced here, since anyway that computation doesn't work.
1877 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
1878 (rule_useless_p, rule_never_reduced_p): New.
1879 (grammar_rules_partial_print): Use a filter instead of a range.
1880 Display the title only if needed.
1881 (grammar_rules_print): Adjust.
1882 (grammar_rules_never_reduced_report): New.
1883 * src/tables.c (action_row): Move the computation of rules never
1884 reduced to...
1885 (token_actions): here.
1886 * src/main.c (main): Make the parser before making the report, so
1887 that rules never reduced are computed.
1888 Call grammar_rules_never_reduced_report.
1889 * src/print.c (print_results): Report rules never reduced.
1890 * tests/conflicts.at, tests/reduce.at: Adjust.
1891
1892 2002-08-01 Akim Demaille <akim@epita.fr>
1893
1894 Instead of attaching lookaheads and duplicating the rules being
1895 reduced by a state, attach the lookaheads to the reductions.
1896
1897 * src/state.h (state_t): Remove the `lookaheads',
1898 `lookaheads_rule' member.
1899 (reductions_t): Add a `lookaheads' member.
1900 Use a regular array for the `rules'.
1901 * src/state.c (reductions_new): Initialize the lookaheads member
1902 to 0.
1903 (state_rule_lookaheads_print): Adjust.
1904 * src/state.h, src/state.c (state_reductions_find): New.
1905 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
1906 (count_rr_conflicts): Adjust.
1907 * src/lalr.c (LArule): Remove.
1908 (add_lookback_edge): Adjust.
1909 (state_lookaheads_count): New.
1910 (states_lookaheads_initialize): Merge into...
1911 (initialize_LA): this.
1912 (lalr_free): Adjust.
1913 * src/main.c (main): Don't free nullable and derives too early: it
1914 is used by --verbose.
1915 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
1916
1917 2002-08-01 Akim Demaille <akim@epita.fr>
1918
1919 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
1920 `rule_number_t**'.
1921 (set_derives, free_derives): Rename as...
1922 (derives_compute, derives_free): this.
1923 Adjust all dependencies.
1924 * src/nullable.c (set_nullable, free_nullable): Rename as...
1925 (nullable_compute, nullable_free): these.
1926 (rule_list_t): Store rule_t *, not rule_number_t.
1927 * src/state.c (state_rule_lookaheads_print): Directly compare rule
1928 pointers, instead of their numbers.
1929 * src/main.c (main): Call nullable_free, and derives_free earlier,
1930 as they were lo longer used.
1931
1932 2002-08-01 Akim Demaille <akim@epita.fr>
1933
1934 * lib/timevar.c (get_time): Include children time.
1935 * src/lalr.h (LA, LArule): Don't export them: used with the
1936 state_t.
1937 * src/lalr.c (LA, LArule): Static.
1938 * src/lalr.h, src/lalr.c (lalr_free): New.
1939 * src/main.c (main): Call it.
1940 * src/tables.c (pack_vector): Check whether loc is >= to the
1941 table_size, not >.
1942 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
1943 (tables_generate): do it, since that's also it which allocates
1944 them.
1945 Don't free LA and LArule, main does.
1946
1947 2002-07-31 Akim Demaille <akim@epita.fr>
1948
1949 Separate parser tables computation and output.
1950
1951 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
1952 (conflict_list, conflict_list_cnt, table, check, table_ninf)
1953 (yydefgoto, yydefact, high): Move to...
1954 * src/tables.h, src/tables.c: here.
1955 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
1956 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
1957 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
1958 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
1959 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
1960 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
1961 (action_row, save_row, token_actions, save_column, default_goto)
1962 (goto_actions, sort_actions, matching_state, pack_vector)
1963 (table_ninf_remap, pack_table, prepare_actions): Move to...
1964 * src/tables.c: here.
1965 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
1966 * src/output.c (token_actions, output_base, output_conflicts)
1967 (output_check): Merge into...
1968 (prepare_actions): this.
1969 (actions_output): Rename as...
1970 (user_actions_output): this.
1971 * src/main.c (main): Call tables_generate and tables_free.
1972
1973 2002-07-31 Akim Demaille <akim@epita.fr>
1974
1975 Steal GCC's --time-report support.
1976
1977 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
1978 stolen/adjusted from GCC.
1979 * m4/stage.m4: Remove time related checks.
1980 * m4/timevar.m4: New.
1981 * configure.in: Adjust.
1982 * src/system.h: Adjust to using timevar.h.
1983 * src/getargs.h, src/getargs.c: Support trace_time for
1984 --trace=time.
1985 * src/main.c (stage): Remove.
1986 (main): Replace `stage' invocations with timevar calls.
1987 * src/output.c: Insert pertinent timevar calls.
1988
1989 2002-07-31 Akim Demaille <akim@epita.fr>
1990
1991 Let --trace have arguments.
1992
1993 * src/getargs.h (enum trace_e): New.
1994 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
1995 (long_options, short_options): --trace/-T takes an optional
1996 argument.
1997 Change all the uses of trace_flag to reflect the new flags.
1998 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
1999
2000 Strengthen `stage' portability.
2001
2002 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
2003 * configure.in: Use it.
2004 Don't check for malloc.h and sys/times.h.
2005 * src/system.h: Include them when appropriate.
2006 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
2007 times and struct tms are available.
2008
2009 2002-07-30 Akim Demaille <akim@epita.fr>
2010
2011 In verbose parse error message, don't report `error' as an
2012 expected token.
2013 * tests/actions.at (Printers and Destructors): Adjust.
2014 * tests/calc.at (Calculator $1): Adjust.
2015 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
2016 error message, do not report the parser accepts the error token in
2017 that state.
2018
2019 2002-07-30 Akim Demaille <akim@epita.fr>
2020
2021 Normalize conflict related messages.
2022
2023 * src/complain.h, src/complain.c (warn, complain): New.
2024 * src/conflicts.c (conflicts_print): Use them.
2025 (conflict_report_yacc): New, extracted from...
2026 (conflicts_print): here.
2027 * tests/conflicts.at, tests/existing.at: Adjust.
2028
2029 2002-07-30 Akim Demaille <akim@epita.fr>
2030
2031 Report rules which are never reduced by the parser: those hidden
2032 by conflicts.
2033
2034 * src/LR0.c (save_reductions): Don't make the final state too
2035 different: save its reduction (accept) instead of having a state
2036 without any action (no shift or goto, no reduce).
2037 Note: the final state is now a ``regular'' state, i.e., the
2038 parsers now contain `reduce 0' as default reduction.
2039 Nevertheless, since they decide to `accept' when yystate =
2040 final_state, they still will not reduce rule 0.
2041 * src/print.c (print_actions, print_reduction): Adjust.
2042 * src/output.c (action_row): Track reduced rules.
2043 (token_actions): Report rules never reduced.
2044 * tests/conflicts.at, tests/regression.at: Adjust.
2045
2046 2002-07-30 Akim Demaille <akim@epita.fr>
2047
2048 `stage' was accidently included in a previous patch.
2049 Initiate its autoconfiscation.
2050
2051 * configure.in: Look for malloc.h and sys/times.h.
2052 * src/main.c (stage): Adjust.
2053 Report only when trace_flag.
2054
2055 2002-07-29 Akim Demaille <akim@epita.fr>
2056
2057 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
2058 state_number_t.
2059 (errs_t): symbol_t*, not symbol_number_t.
2060 (reductions_t): rule_t*, not rule_number_t.
2061 (FOR_EACH_SHIFT): New.
2062 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
2063 * src/print.c, src/print_graph.c: Adjust.
2064
2065 2002-07-29 Akim Demaille <akim@epita.fr>
2066
2067 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
2068
2069 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
2070 (endtoken, accept): these.
2071 * src/reader.c (reader): Set endtoken's default tag to "$end".
2072 Set undeftoken's tag to "$undefined" instead of "$undefined.".
2073 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
2074 Adjust.
2075
2076 2002-07-29 Akim Demaille <akim@epita.fr>
2077
2078 * src/reduce.c (reduce_grammar): When the language is empty,
2079 complain about the start symbol, not the axiom.
2080 Use its location.
2081 * tests/reduce.at (Empty Language): New.
2082
2083 2002-07-26 Akim Demaille <akim@epita.fr>
2084
2085 * src/reader.h, src/reader.c (gram_error): ... can't get
2086 yycontrol without making too strong assumptions on the parser
2087 itself.
2088 * src/output.c (prepare_tokens): Use the real 0th value of
2089 token_translations instead of `0'.
2090 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
2091 visible here.
2092 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
2093 for the time being: %locations ought to provide it to yyerror.
2094
2095 2002-07-25 Akim Demaille <akim@epita.fr>
2096
2097 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
2098 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
2099 * tests/regression.at (Web2c Actions): Adjust.
2100
2101 2002-07-25 Akim Demaille <akim@epita.fr>
2102
2103 Stop storing rules from 1 to nrules + 1.
2104
2105 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
2106 * src/nullable.c, src/output.c, src/print.c, src/reader.c
2107 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
2108 Iterate from 0 to nrules.
2109 Use rule_number_as_item_number and item_number_as_rule_number.
2110 Adjust to `derive' now containing possibly 0.
2111 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
2112 Handle the `- 1' part in rule numbers from/to item numbers.
2113 * src/conflicts.c (log_resolution): Fix the message which reversed
2114 shift and reduce.
2115 * src/output.c (action_row): Initialize default_rule to -1.
2116 (token_actions): Adjust.
2117 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
2118 expected output.
2119 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
2120
2121 2002-07-25 Akim Demaille <akim@epita.fr>
2122
2123 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
2124 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
2125 (b4_c_knr_arg_decl): New.
2126 * data/yacc.c: Use it to define yysymprint, yydestruct, and
2127 yyreport_parse_error.
2128
2129 2002-07-25 Akim Demaille <akim@epita.fr>
2130
2131 * data/yacc.c (yyreport_parse_error): New, extracted from...
2132 (yyparse): here.
2133 (yydestruct, yysymprint): Move above yyparse.
2134 Be K&R compliant.
2135
2136 2002-07-25 Akim Demaille <akim@epita.fr>
2137
2138 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
2139 replace...
2140 (b4_sint_type, b4_uint_type): these.
2141 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
2142 * tests/regression.at (Web2c Actions): Adjust.
2143
2144 2002-07-25 Akim Demaille <akim@epita.fr>
2145
2146 * src/gram.h (TIEM_NUMBER_MAX): New.
2147 (item_number_of_rule_number, rule_number_of_item_number): Rename
2148 as...
2149 (rule_number_as_item_number, item_number_as_rule_number): these.
2150 Adjust dependencies.
2151 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
2152 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
2153 (symbol_number_to_vector_number): New.
2154 (order): Of vector_number_t* type.
2155 (base_t, BASE_MAX, BASE_MIN): New.
2156 (froms, tos, width, pos, check): Of base_t type.
2157 (action_number_t, ACTION_MIN, ACTION_MAX): New.
2158 (actrow): Of action_number_t type.
2159 (conflrow): Of unsigned int type.
2160 (table_ninf, base_ninf): New.
2161 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
2162 (muscle_insert_int_table, muscle_insert_base_table)
2163 (muscle_insert_rule_number_table): New.
2164 (prepare_tokens): Output `toknum' as int_table.
2165 (action_row): Returns a rule_number_t.
2166 Use ACTION_MIN, not SHRT_MIN.
2167 (token_actions): yydefact is rule_number_t*.
2168 (table_ninf_remap): New.
2169 (pack_table): Use it for `base' and `table'.
2170 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
2171 replaced with...
2172 (YYPACT_NINF, YYTABLE_NINF): these.
2173 (yypact, yytable): Compute their types instead of hard-coded
2174 `short'.
2175 * tests/regression.at (Web2c Actions): Adjust.
2176
2177 2002-07-19 Akim Demaille <akim@epita.fr>
2178
2179 * src/scan-gram.l (id): Can start with an underscore.
2180
2181 2002-07-16 Akim Demaille <akim@epita.fr>
2182
2183 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
2184 Adjust all former `associativity' dependencies.
2185 * src/symtab.c (symbol_new): Default associativity is `undef', not
2186 `right'.
2187 (symbol_check_alias_consistence): Adjust.
2188
2189 2002-07-09 Akim Demaille <akim@epita.fr>
2190
2191 * doc/bison.texinfo: Properly set the ``header'' part.
2192 Use @dircategory ``GNU programming tools'' as per Texinfo's
2193 documentation.
2194 Use @copying.
2195
2196 2002-07-09 Akim Demaille <akim@epita.fr>
2197
2198 * lib/quotearg.h: Protect against multiple inclusions.
2199 * src/location.h (location_t): Add a `file' member.
2200 (LOCATION_RESET, LOCATION_PRINT): Adjust.
2201 * src/complain.c (warn_at, complain_at, fatal_at): Drop
2202 `error_one_per_line' support.
2203
2204 2002-07-09 Akim Demaille <akim@epita.fr>
2205
2206 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
2207 * src/reader.c (lineno): Remove.
2208 Adjust all dependencies.
2209 (get_merge_function): Take a location and use complain_at.
2210 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
2211 * tests/regression.at (Invalid inputs, Mixing %token styles):
2212 Adjust.
2213
2214 2002-07-09 Akim Demaille <akim@epita.fr>
2215
2216 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
2217 recovery rule, and forbid extensions when --yacc.
2218 (gram_error): Use complain_at.
2219 * src/reader.c (reader): Exit if there were parse errors.
2220
2221 2002-07-09 Akim Demaille <akim@epita.fr>
2222
2223 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
2224 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
2225 Reported by R Blake <blakers@mac.com>.
2226
2227 2002-07-09 Akim Demaille <akim@epita.fr>
2228
2229 * data/yacc.c: Output the copyright notive in the header.
2230
2231 2002-07-03 Akim Demaille <akim@epita.fr>
2232
2233 * src/output.c (froms, tos): Are state_number_t.
2234 (save_column): sp, sp1, and sp2 are state_number_t.
2235 (prepare): Rename `final' as `final_state_number', `nnts' as
2236 `nterms_number', `nrules' as `rules_number', `nstates' as
2237 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
2238 unused.
2239 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
2240 * data/lalr1.cc (nsym_): Remove, unused.
2241
2242 2002-07-03 Akim Demaille <akim@epita.fr>
2243
2244 * src/lalr.h, src/lalr.c (goto_number_t): New.
2245 * src/lalr.c (goto_list_t): New.
2246 Propagate them.
2247 * src/nullable.c (rule_list_t): New.
2248 Propagate.
2249 * src/types.h: Remove.
2250
2251 2002-07-03 Akim Demaille <akim@epita.fr>
2252
2253 * src/closure.c (print_fderives): Use rule_rhs_print.
2254 * src/derives.c (print_derives): Use rule_rhs_print.
2255 (rule_list_t): New, replaces `shorts'.
2256 (set_derives): Add comments.
2257 * tests/sets.at (Nullable, Firsts): Adjust.
2258
2259 2002-07-03 Akim Demaille <akim@epita.fr>
2260
2261 * src/output.c (prepare_actions): Free `tally' and `width'.
2262 (prepare_actions): Allocate and free `order'.
2263 * src/symtab.c (symbols_free): Free `symbols'.
2264 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
2265 * src/output.c (m4_invoke): Move to...
2266 * src/scan-skel.l: here.
2267 (<<EOF>>): Close yyout, and free its name.
2268
2269 2002-07-03 Akim Demaille <akim@epita.fr>
2270
2271 Fix some memory leaks, and fix a bug: state 0 was examined twice.
2272
2273 * src/LR0.c (new_state): Merge into...
2274 (state_list_append): this.
2275 (new_states): Merge into...
2276 (generate_states): here.
2277 (set_states): Don't ensure a proper `errs' state member here, do it...
2278 * src/conflicts.c (conflicts_solve): here.
2279 * src/state.h, src/state.c: Comment changes.
2280 (state_t): Rename member `shifts' as `transitions'.
2281 Adjust all dependencies.
2282 (errs_new): For consistency, also take the values as argument.
2283 (errs_dup): Remove.
2284 (state_errs_set): New.
2285 (state_reductions_set, state_transitions_set): Assert that no
2286 previous value was assigned.
2287 (state_free): New.
2288 (states_free): Use it.
2289 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
2290 temporary storage: use `errs' and `nerrs' as elsewhere.
2291 (set_conflicts): Allocate and free this `errs'.
2292
2293 2002-07-02 Akim Demaille <akim@epita.fr>
2294
2295 * lib/libiberty.h: New.
2296 * lib: Update the bitset implementation from upstream.
2297 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
2298 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
2299 * src/main.c: Adjust bitset stats calls.
2300
2301 2002-07-01 Paul Eggert <eggert@twinsun.com>
2302
2303 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
2304 char, so that negative chars don't collide with $.
2305
2306 2002-06-30 Akim Demaille <akim@epita.fr>
2307
2308 Have the GLR tests be `warning' checked, and fix the warnings.
2309
2310 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
2311 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
2312 (yyremoveDeletes): `yyi' and `yyj' are size_t.
2313 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
2314 (yyaddDeferredAction): static.
2315 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
2316 (yyreportParseError): yyprefix is const.
2317 yytokenp is used only when verbose.
2318 (yy__GNUC__): Replace with __GNUC__.
2319 (yypdumpstack): yyi is size_t.
2320 (yypreference): Un-yy local variables and arguments, to avoid
2321 clashes with `yyr1'. Anyway, we are not in the user name space.
2322 (yytname_size): be an int, as is compared with ints.
2323 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
2324 Use them.
2325 * tests/cxx-gram.at: Use quotation to protect $1.
2326 Use AT_COMPILE to enable warnings hunts.
2327 Prototype yylex and yyerror.
2328 `Use' argc.
2329 Include `string.h', not `strings.h'.
2330 Produce and prototype stmtMerge only when used.
2331 yylex takes a location.
2332
2333 2002-06-30 Akim Demaille <akim@epita.fr>
2334
2335 We spend a lot of time in quotearg, in particular when --verbose.
2336
2337 * src/symtab.c (symbol_get): Store a quoted version of the key.
2338 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
2339 Adjust all callers.
2340
2341 2002-06-30 Akim Demaille <akim@epita.fr>
2342
2343 * src/state.h (reductions_t): Rename member `nreds' as num.
2344 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
2345 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
2346
2347 2002-06-30 Akim Demaille <akim@epita.fr>
2348
2349 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
2350 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
2351 (shifts_to): Rename as...
2352 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
2353 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
2354 (TRANSITION_IS_DISABLED, transitions_to): these.
2355
2356 2002-06-30 Akim Demaille <akim@epita.fr>
2357
2358 * src/print.c (print_shifts, print_gotos): Merge into...
2359 (print_transitions): this.
2360 (print_transitions, print_errs, print_reductions): Align the
2361 lookaheads columns.
2362 (print_core, print_transitions, print_errs, print_state,
2363 print_grammar): Output empty lines separator before, not after.
2364 (state_default_rule_compute): Rename as...
2365 (state_default_rule): this.
2366 * tests/conflicts.at (Defaulted Conflicted Reduction),
2367 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
2368 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
2369
2370 2002-06-30 Akim Demaille <akim@epita.fr>
2371
2372 Display items as we display rules.
2373
2374 * src/gram.h, src/gram.c (rule_lhs_print): New.
2375 * src/gram.c (grammar_rules_partial_print): Use it.
2376 * src/print.c (print_core): Likewise.
2377 * tests/conflicts.at (Defaulted Conflicted Reduction),
2378 (Unresolved SR Conflicts): Adjust.
2379 (Unresolved SR Conflicts): Adjust and rename as...
2380 (Resolved SR Conflicts): this, as was meant.
2381 * tests/regression.at (Web2c Report): Adjust.
2382
2383 2002-06-30 Akim Demaille <akim@epita.fr>
2384
2385 * src/print.c (state_default_rule_compute): New, extracted from...
2386 (print_reductions): here.
2387 Pessimize, but clarify the code.
2388 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
2389
2390 2002-06-30 Akim Demaille <akim@epita.fr>
2391
2392 * src/output.c (action_row): Let default_rule be always a rule
2393 number.
2394
2395 2002-06-30 Akim Demaille <akim@epita.fr>
2396
2397 * src/closure.c (print_firsts, print_fderives, closure):
2398 Use BITSET_EXECUTE.
2399 * src/lalr.c (lookaheads_print): Likewise.
2400 * src/state.c (state_rule_lookaheads_print): Likewise.
2401 * src/print_graph.c (print_core): Likewise.
2402 * src/print.c (print_reductions): Likewise.
2403 * src/output.c (action_row): Likewise.
2404 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
2405
2406 2002-06-30 Akim Demaille <akim@epita.fr>
2407
2408 * src/print_graph.c: Use report_flag.
2409
2410 2002-06-30 Akim Demaille <akim@epita.fr>
2411
2412 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
2413 to...
2414 * src/relation.h, src/relation.c (traverse, relation_digraph)
2415 (relation_print, relation_transpose): New.
2416
2417 2002-06-30 Akim Demaille <akim@epita.fr>
2418
2419 * src/state.h, src/state.c (shifts_to): New.
2420 * src/lalr.c (build_relations): Use it.
2421
2422 2002-06-30 Akim Demaille <akim@epita.fr>
2423
2424 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
2425 (item_number_of_rule_number, rule_number_of_item_number): New.
2426 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
2427 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
2428 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
2429 Propagate their use.
2430 Much remains to be done, in particular wrt `shorts' from types.h.
2431
2432 2002-06-30 Akim Demaille <akim@epita.fr>
2433
2434 * src/symtab.c (symbol_new): Initialize the `printer' member.
2435
2436 2002-06-30 Akim Demaille <akim@epita.fr>
2437
2438 * src/LR0.c (save_reductions): Remove, replaced by...
2439 * src/state.h, src/state.c (state_reductions_set): New.
2440 (reductions, errs): Rename as...
2441 (reductions_t, errs_t): these.
2442 Adjust all dependencies.
2443
2444 2002-06-30 Akim Demaille <akim@epita.fr>
2445
2446 * src/LR0.c (state_list_t, state_list_append): New.
2447 (first_state, last_state): Now symbol_list_t.
2448 (this_state): Remove.
2449 (new_itemsets, append_states, save_reductions): Take a state_t as
2450 argument.
2451 (set_states, generate_states): Adjust.
2452 (save_shifts): Remove, replaced by...
2453 * src/state.h, src/state.c (state_shifts_set): New.
2454 (shifts): Rename as...
2455 (shifts_t): this.
2456 Adjust all dependencies.
2457 * src/state.h (state_t): Remove the `next' member.
2458
2459 2002-06-30 Akim Demaille <akim@epita.fr>
2460
2461 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
2462 escaped in slot 0.
2463
2464 2002-06-30 Akim Demaille <akim@epita.fr>
2465
2466 Use hash.h for the state hash table.
2467
2468 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
2469 (allocate_storage): Use state_hash_new.
2470 (free_storage): Use state_hash_free.
2471 (new_state, get_state): Adjust.
2472 * src/lalr.h, src/lalr.c (states): Move to...
2473 * src/states.h (state_t): Remove the `link' member, no longer
2474 used.
2475 * src/states.h, src/states.c: here.
2476 (state_hash_new, state_hash_free, state_hash_lookup)
2477 (state_hash_insert, states_free): New.
2478 * src/states.c (state_table, state_compare, state_hash): New.
2479 * src/output.c (output_actions): Do not free states now, since we
2480 still need to know the final_state number in `prepare', called
2481 afterwards. Do it...
2482 * src/main.c (main): here: call states_free after `output'.
2483
2484 2002-06-30 Akim Demaille <akim@epita.fr>
2485
2486 * src/state.h, src/state.c (state_new): New, extracted from...
2487 * src/LR0.c (new_state): here.
2488 * src/state.h (STATE_ALLOC): Move to...
2489 * src/state.c: here.
2490 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
2491 * src/state.h, src/state.c: here.
2492
2493 2002-06-30 Akim Demaille <akim@epita.fr>
2494
2495 * src/reader.c (gensym): Rename as...
2496 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
2497 (getsym): Rename as...
2498 (symbol_get): this.
2499
2500 2002-06-30 Akim Demaille <akim@epita.fr>
2501
2502 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
2503 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
2504 * src/output.c, src/print.c, src/print_graph.c: Propagate.
2505 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
2506
2507 2002-06-30 Akim Demaille <akim@epita.fr>
2508
2509 Make the test suite pass with warnings checked.
2510
2511 * tests/actions.at (Printers and Destructors): Improve.
2512 Avoid unsigned vs. signed issues.
2513 * tests/calc.at: Don't exercise the scanner here, do it...
2514 * tests/input.at (Torturing the Scanner): here.
2515
2516 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2517
2518 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
2519 reorganize first lines parallel to yacc.c.
2520
2521 2002-06-28 Akim Demaille <akim@epita.fr>
2522
2523 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
2524 (b4_token_enum, b4_token_defines): New, factored from...
2525 * data/lalr1.cc, data/yacc.c, glr.c: here.
2526
2527 2002-06-28 Akim Demaille <akim@epita.fr>
2528
2529 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
2530 unused variables.
2531 * src/output.c (merger_output): static.
2532
2533 2002-06-28 Akim Demaille <akim@epita.fr>
2534
2535 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
2536 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
2537 pacify GCC.
2538 * src/output.c (save_row): Initialize all the variables to pacify GCC.
2539
2540 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2541
2542 Accumulated changelog for new GLR parsing features.
2543
2544 * src/conflicts.c (count_total_conflicts): Change name to
2545 conflicts_total_count.
2546 * src/conflicts.h: Ditto.
2547 * src/output.c (token_actions): Use the new name.
2548 (output_conflicts): Change conflp => conflict_list_heads, and
2549 confl => conflict_list for better readability.
2550 * data/glr.c: Use the new names.
2551 * NEWS: Add self to GLR announcement.
2552
2553 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
2554
2555 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
2556 Akim Demaille.
2557
2558 * data/bison.glr: Change name to glr.c
2559 * data/glr.c: Renamed from bison.glr.
2560 * data/Makefile.am: Add glr.c
2561
2562 * src/getargs.c:
2563
2564 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
2565 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
2566
2567 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2568
2569 * data/bison.glr: Be sure to restore the
2570 current #line when returning to the skeleton contents after having
2571 exposed the input file's #line.
2572
2573 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2574
2575 * data/bison.glr: Bring up to date with changes to bison.simple.
2576
2577 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2578
2579 * data/bison.glr: Correct definitions that use b4_prefix.
2580 Various reformatting.
2581 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
2582 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
2583 yytokenp argument; now part of stack.
2584 (yychar): Define to behave as documented.
2585 (yyclearin): Ditto.
2586
2587 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2588
2589 * src/reader.h: Add declaration for free_merger_functions.
2590
2591 * src/reader.c (merge_functions): New variable.
2592 (get_merge_function): New function.
2593 (free_merger_functions): New function.
2594 (readgram): Check for %prec that is not followed by a symbol.
2595 Handle %dprec and %merge declarations.
2596 (packgram): Initialize dprec and merger fields in rules array.
2597
2598 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
2599 conflict_list_cnt, conflict_list_free): New variables.
2600 (table_grow): Also grow conflict_table.
2601 (prepare_rules): Output dprec and merger tables.
2602 (conflict_row): New function.
2603 (action_row): Output conflict lists for GLR parser. Don't use
2604 default reduction in conflicted states for GLR parser so that there
2605 are spaces for the conflict lists.
2606 (save_row): Also save conflict information.
2607 (token_actions): Allocate conflict list.
2608 (merger_output): New function.
2609 (pack_vector): Pack conflict table, too.
2610 (output_conflicts): New function to output yyconflp and yyconfl.
2611 (output_check): Allocate conflict_tos.
2612 (output_actions): Output conflict tables, also.
2613 (output_skeleton): Output b4_mergers definition.
2614 (prepare): Output b4_max_rhs_length definition.
2615 Use 'bison.glr' as default skeleton for GLR parsers.
2616
2617 * src/gram.c (glr_parser): New flag.
2618 (grammar_free): Call free_merger_functions.
2619
2620 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
2621 all pairs of conflicting reductions, rather than just all tokens
2622 causing conflicts. Needed to size conflict tables.
2623 (conflicts_output): Modify call to count_rr_conflicts for new
2624 interface.
2625 (conflicts_print): Ditto.
2626 (count_total_conflicts): New function.
2627
2628 * src/reader.h (merger_list): New type.
2629 (merge_functions): New variable.
2630
2631 * src/lex.h (tok_dprec, tok_merge): New token types.
2632
2633 * src/gram.h (rule_s): Add dprec and merger fields.
2634 (glr_parser): New flag.
2635
2636 * src/conflicts.h (count_total_conflicts): New function.
2637
2638 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
2639
2640 * doc/bison.texinfo (Generalized LR Parsing): New section.
2641 (GLR Parsers): New section.
2642 (Language and Grammar): Mention GLR parsing.
2643 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
2644 Correct typo ("tge" -> "the").
2645
2646 * data/bison.glr: New skeleton for GLR parsing.
2647
2648 * tests/cxx-gram.at: New tests for GLR parsing.
2649
2650 * tests/testsuite.at: Include cxx-gram.at.
2651
2652 * tests/Makefile.am: Add cxx-gram.at.
2653
2654 * src/parse-gram.y:
2655
2656 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
2657
2658 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
2659
2660 2002-06-27 Akim Demaille <akim@epita.fr>
2661
2662 * src/options.h, src/options.c: Remove.
2663 * src/getargs.c (short_options, long_options): New.
2664
2665 2002-06-27 Akim Demaille <akim@epita.fr>
2666
2667 * data/bison.simple, data/bison.c++: Rename as...
2668 * data/yacc.c, data/lalr1.cc: these.
2669 * doc/bison.texinfo (Environment Variables): Remove.
2670
2671 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
2672
2673 * src/getargs.c (report_argmatch): Initialize strtok().
2674
2675 2002-06-20 Akim Demaille <akim@epita.fr>
2676
2677 * data/bison.simple (b4_symbol_actions): New, replaces...
2678 (b4_symbol_destructor, b4_symbol_printer): these.
2679 (yysymprint): Be sure to call YYPRINT only for tokens, and using
2680 user token numbers.
2681
2682 2002-06-20 Akim Demaille <akim@epita.fr>
2683
2684 * data/bison.simple (yydestructor): Rename as...
2685 (yydestruct): this.
2686
2687 2002-06-20 Akim Demaille <akim@epita.fr>
2688
2689 * src/symtab.h, src/symtab.c (symbol_type_set)
2690 (symbol_destructor_set, symbol_precedence_set): The location is
2691 the last argument.
2692 Adjust all callers.
2693
2694 2002-06-20 Akim Demaille <akim@epita.fr>
2695
2696 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
2697 internals.
2698 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
2699 Takes a location.
2700 * src/symtab.h, src/symtab.c (symbol_class_set)
2701 (symbol_user_token_number_set): Likewise.
2702 Adjust all callers.
2703 Promote complain_at.
2704 * tests/input.at (Type Clashes): Adjust.
2705
2706 2002-06-20 Akim Demaille <akim@epita.fr>
2707
2708 * data/bison.simple (YYLEX): Fix the declaration when
2709 %pure-parser.
2710
2711 2002-06-20 Akim Demaille <akim@epita.fr>
2712
2713 * data/bison.simple (yysymprint): Don't print the token number,
2714 just its name.
2715 * tests/actions.at (Destructors): Rename as...
2716 (Printers and Destructors): this.
2717 Also exercise %printer.
2718
2719 2002-06-20 Akim Demaille <akim@epita.fr>
2720
2721 * data/bison.simple (YYDSYMPRINT): New.
2722 Use it to remove many of the #if YYDEBUG/if (yydebug).
2723
2724 2002-06-20 Akim Demaille <akim@epita.fr>
2725
2726 * src/symtab.h, src/symtab.c (symbol_t): printer and
2727 printer_location are new members.
2728 (symbol_printer_set): New.
2729 * src/parse-gram.y (PERCENT_PRINTER): New token.
2730 Handle its associated rule.
2731 * src/scan-gram.l: Adjust.
2732 (handle_destructor_at, handle_destructor_dollar): Rename as...
2733 (handle_symbol_code_at, handle_symbol_code_dollar): these.
2734 * src/output.c (symbol_printers_output): New.
2735 (output_skeleton): Call it.
2736 * data/bison.simple (yysymprint): New. Cannot be named yyprint
2737 since there are already many grammar files with a user `yyprint'.
2738 Replace the calls to YYPRINT to calls to yysymprint.
2739 * tests/calc.at: Adjust.
2740 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
2741 taking advantage of parser very internal details (stack size!).
2742
2743 2002-06-20 Akim Demaille <akim@epita.fr>
2744
2745 * src/scan-gram.l: Complete the scanner with the missing patterns
2746 to pacify Flex.
2747 Use `quote' and `symbol_tag_get' where appropriate.
2748
2749 2002-06-19 Akim Demaille <akim@epita.fr>
2750
2751 * tests/actions.at (Destructors): Augment to test locations.
2752 * data/bison.simple (yydestructor): Pass it the current location
2753 if locations are enabled.
2754 Prototype only when __STDC__ or C++.
2755 Change the argument names to move into the yy name space: there is
2756 user code here.
2757
2758 2002-06-19 Akim Demaille <akim@epita.fr>
2759
2760 * data/bison.simple (b4_pure_if): New.
2761 Use it instead of #ifdef YYPURE.
2762
2763 2002-06-19 Akim Demaille <akim@epita.fr>
2764
2765 * data/bison.simple (b4_location_if): New.
2766 Use it instead of #ifdef YYLSP_NEEDED.
2767
2768 2002-06-19 Akim Demaille <akim@epita.fr>
2769
2770 Prepare @$ in %destructor, but currently don't bind it in the
2771 skeleton, as %location use is not cleaned up yet.
2772
2773 * src/scan-gram.l (handle_dollar, handle_destructor_at)
2774 (handle_action_at): New.
2775 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
2776 a braced_code_t and a location as additional arguments.
2777 (handle_destructor_dollar): Instead of requiring `b4_eval', just
2778 unquote one when outputting `b4_dollar_dollar'.
2779 Adjust callers.
2780 * data/bison.simple (b4_eval): Remove.
2781 (b4_symbol_destructor): Adjust.
2782 * tests/input.at (Invalid @n): Adjust.
2783
2784 2002-06-19 Zack Weinberg <zack@codesourcery.com>
2785
2786 * doc/bison.texinfo: Document ability to have multiple
2787 prologue sections.
2788
2789 2002-06-18 Akim Demaille <akim@epita.fr>
2790
2791 * src/files.c (compute_base_names): When computing the output file
2792 names from the input file name, strip the directory part.
2793
2794 2002-06-18 Akim Demaille <akim@epita.fr>
2795
2796 * data/bison.simple.new: Comment changes.
2797 Reported by Andreas Schwab.
2798
2799 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
2800
2801 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
2802 there are no `label `yyoverflowlab' defined but not used' warnings
2803 when yyoverflow is defined.
2804
2805 2002-06-18 Akim Demaille <akim@epita.fr>
2806
2807 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
2808 new member.
2809 (symbol_destructor_set): Adjust.
2810 * src/output.c (symbol_destructors_output): Output the destructor
2811 locations.
2812 Output the symbol name.
2813 * data/bison.simple (b4_symbol_destructor): Adjust.
2814
2815 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
2816 and Akim Demaille <akim@epita.fr>
2817
2818 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
2819 what's left on the stack when the error recovery hits EOF.
2820 * tests/actions.at (Destructors): Complete to exercise this case.
2821
2822 2002-06-17 Akim Demaille <akim@epita.fr>
2823
2824 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
2825 arguments is really empty, not only equal to `[]'.
2826 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
2827 member.
2828 (symbol_destructor_set): New.
2829 * src/output.c (symbol_destructors_output): New.
2830 * src/reader.h (brace_code_t, current_braced_code): New.
2831 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
2832 (handle_dollar): Rename as...
2833 (handle_action_dollar): this.
2834 (handle_destructor_dollar): New.
2835 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
2836 (grammar_declaration): Use it.
2837 * data/bison.simple (yystos): Is always defined.
2838 (yydestructor): New.
2839 * tests/actions.at (Destructors): New.
2840 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
2841
2842 2002-06-17 Akim Demaille <akim@epita.fr>
2843
2844 * src/symlist.h, src/symlist.c (symbol_list_length): New.
2845 * src/scan-gram.l (handle_dollar, handle_at): Compute the
2846 rule_length only when needed.
2847 * src/output.c (actions_output, token_definitions_output): Output
2848 the full M4 block.
2849 * src/symtab.c: Don't access directly to the symbol tag, use
2850 symbol_tag_get.
2851 * src/parse-gram.y: Use symbol_list_free.
2852
2853 2002-06-17 Akim Demaille <akim@epita.fr>
2854
2855 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
2856 (symbol_list_prepend, get_type_name): Move to...
2857 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
2858 (symbol_list_prepend, symbol_list_n_type_name_get): here.
2859 Adjust all callers.
2860 (symbol_list_free): New.
2861 * src/scan-gram.l (handle_dollar): Takes a location.
2862 * tests/input.at (Invalid $n): Adjust.
2863
2864 2002-06-17 Akim Demaille <akim@epita.fr>
2865
2866 * src/reader.h, src/reader.c (symbol_list_new): Export it.
2867 (symbol_list_prepend): New.
2868 * src/parse-gram.y (%union): `list' is a new member.
2869 (symbols.1): New, replaces...
2870 (terms_to_prec.1, nterms_to_type.1): these.
2871 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
2872 Take a location as additional argument.
2873 Adjust all callers.
2874
2875 2002-06-15 Akim Demaille <akim@epita.fr>
2876
2877 * src/parse-gram.y: Move %token in the declaration section so that
2878 we don't depend upon CVS Bison.
2879
2880 2002-06-15 Akim Demaille <akim@epita.fr>
2881
2882 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
2883 * src/print.c (print_core): Use it.
2884
2885 2002-06-15 Akim Demaille <akim@epita.fr>
2886
2887 * src/conflicts.c (log_resolution): Accept the rule involved in
2888 the sr conflicts instead of the lookahead number that points to
2889 that rule.
2890 (flush_reduce): Accept the current lookahead vector as argument,
2891 instead of the index in LA.
2892 (resolve_sr_conflict): Accept the current number of lookahead
2893 bitset to consider for the STATE, instead of the index in LA.
2894 (set_conflicts): Adjust.
2895 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
2896
2897 2002-06-15 Akim Demaille <akim@epita.fr>
2898
2899 * src/state.h (state_t): Replace the `lookaheadsp' member, a
2900 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
2901 Adjust all dependencies.
2902 * src/lalr.c (initialize_lookaheads): Split into...
2903 (states_lookaheads_count, states_lookaheads_initialize): these.
2904 (lalr): Adjust.
2905
2906 2002-06-15 Akim Demaille <akim@epita.fr>
2907
2908 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
2909 out of...
2910 (grammar_rules_print): here.
2911 * src/reduce.c (reduce_output): Use it.
2912 * tests/reduce.at (Useless Rules, Reduced Automaton)
2913 (Underivable Rules): Adjust.
2914
2915 2002-06-15 Akim Demaille <akim@epita.fr>
2916
2917 Copy BYacc's nice way to report the grammar.
2918
2919 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
2920 New.
2921 Don't print the rules' location, it is confusing and useless.
2922 (rule_print): Use grammar_rhs_print.
2923 * src/print.c (print_grammar): Use grammar_rules_print.
2924
2925 2002-06-15 Akim Demaille <akim@epita.fr>
2926
2927 Complete and rationalize `useless thing' warnings.
2928
2929 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
2930 (symbol_tag_print): New.
2931 Use them everywhere in place of accessing directly the tag member.
2932 * src/gram.h, src/gram.c (rule_print): New.
2933 Use it where a rule used to be printed `by hand'.
2934 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
2935 (reduce_grammar_tables): Report the useless rules.
2936 (reduce_print): Useless things are a warning, not an error.
2937 Report it as such.
2938 * tests/reduce.at (Useless Nonterminals, Useless Rules):
2939 (Reduced Automaton, Underivable Rules): Adjust.
2940 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
2941 * tests/conflicts.at (Unresolved SR Conflicts)
2942 (Solved SR Conflicts): Adjust.
2943
2944 2002-06-15 Akim Demaille <akim@epita.fr>
2945
2946 Let symbols have a location.
2947
2948 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
2949 (getsym): Adjust.
2950 Adjust all callers.
2951 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
2952 Use location_t, not int.
2953 * src/symtab.c (symbol_check_defined): Take advantage of the
2954 location.
2955 * tests/regression.at (Invalid inputs): Adjust.
2956
2957 2002-06-15 Akim Demaille <akim@epita.fr>
2958
2959 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
2960 (input): Don't try to initialize yylloc here, do it in the
2961 scanner.
2962 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
2963 * src/gram.h (rule_t): Change line and action_line into location
2964 and action_location, of location_t type.
2965 Adjust all dependencies.
2966 * src/location.h, src/location.c (empty_location): New.
2967 * src/reader.h, src/reader.c (grammar_start_symbol_set)
2968 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
2969 (grammar_current_rule_symbol_append)
2970 (grammar_current_rule_action_append): Expect a location as argument.
2971 * src/reader.c (grammar_midrule_action): Adjust to attach an
2972 action's location as dummy symbol location.
2973 * src/symtab.h, src/symtab.c (startsymbol_location): New.
2974 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
2975 the line numbers.
2976
2977 2002-06-14 Akim Demaille <akim@epita.fr>
2978
2979 Grammar declarations may be found in the grammar section.
2980
2981 * src/parse-gram.y (rules_or_grammar_declaration): New.
2982 (declarations): Each declaration may end with a semicolon, not
2983 just...
2984 (grammar_declaration): `"%union"'.
2985 (grammar): Branch to rules_or_grammar_declaration.
2986
2987 2002-06-14 Akim Demaille <akim@epita.fr>
2988
2989 * src/main.c (main): Invoke scanner_free.
2990
2991 2002-06-14 Akim Demaille <akim@epita.fr>
2992
2993 * src/output.c (m4_invoke): Extracted from...
2994 (output_skeleton): here.
2995 Free tempfile.
2996
2997 2002-06-14 Akim Demaille <akim@epita.fr>
2998
2999 * src/parse-gram.y (directives, directive, gram)
3000 (grammar_directives, precedence_directives, precedence_directive):
3001 Rename as...
3002 (declarations, declaration, grammar, grammar_declaration)
3003 (precedence_declaration, precedence_declarator): these.
3004 (symbol_declaration): New.
3005
3006 2002-06-14 Akim Demaille <akim@epita.fr>
3007
3008 * src/files.c (action_obstack): Remove, unused.
3009 (output_obstack): Remove it, and all its dependencies, as it is no
3010 longer needed.
3011 * src/reader.c (epilogue_set): Build the epilogue in the
3012 muscle_obstack.
3013 * src/output.h, src/output.c (muscle_obstack): Move to...
3014 * src/muscle_tab.h, src/muscle_tab.h: here.
3015 (muscle_init): Initialize muscle_obstack.
3016 (muscle_free): New.
3017 * src/main.c (main): Call it.
3018
3019 2002-06-14 Akim Demaille <akim@epita.fr>
3020
3021 * src/location.h: New, extracted from...
3022 * src/reader.h: here.
3023 * src/Makefile.am (noinst_HEADERS): Merge into
3024 (bison_SOURCES): this.
3025 Add location.h.
3026 * src/parse-gram.y: Use location_t instead of Bison's.
3027 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
3028 Use location_t instead of ints.
3029
3030 2002-06-14 Akim Demaille <akim@epita.fr>
3031
3032 * data/bison.simple, data/bison.c++: Be sure to restore the
3033 current #line when returning to the skeleton contents after having
3034 exposed the input file's #line.
3035
3036 2002-06-12 Akim Demaille <akim@epita.fr>
3037
3038 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
3039 eager.
3040 * tests/actions.at (Exotic Dollars): New.
3041
3042 2002-06-12 Akim Demaille <akim@epita.fr>
3043
3044 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
3045 ['"/] too eagerly.
3046 * tests/input.at (Torturing the Scanner): New.
3047
3048 2002-06-11 Akim Demaille <akim@epita.fr>
3049
3050 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
3051 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
3052 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
3053 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
3054 * src/reader.c (reader): Use it.
3055
3056 2002-06-11 Akim Demaille <akim@epita.fr>
3057
3058 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
3059 Adjust all callers.
3060 (scanner_last_string_free): New.
3061
3062 2002-06-11 Akim Demaille <akim@epita.fr>
3063
3064 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
3065 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
3066 (last_string, YY_OBS_FREE): New.
3067 Use them when returning an ID.
3068
3069 2002-06-11 Akim Demaille <akim@epita.fr>
3070
3071 Have Bison grammars parsed by a Bison grammar.
3072
3073 * src/reader.c, src/reader.h (prologue_augment): New.
3074 * src/reader.c (copy_definition): Remove.
3075
3076 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
3077 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
3078 (grammar_current_rule_prec_set, grammar_current_rule_check)
3079 (grammar_current_rule_symbol_append)
3080 (grammar_current_rule_action_append): Export.
3081 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
3082 (symbol_list_action_append): Remove.
3083 Hook the routines from reader.
3084 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
3085 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
3086
3087 * src/reader.c (read_declarations): Remove, unused.
3088
3089 * src/parse-gram.y: Handle the epilogue.
3090 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
3091 (grammar_start_symbol_set): this.
3092 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
3093 * src/reader.c (readgram): Remove, unused.
3094 (reader): Adjust to insert eoftoken and axiom where appropriate.
3095
3096 * src/reader.c (copy_dollar): Replace with...
3097 * src/scan-gram.h (handle_dollar): this.
3098 * src/parse-gram.y: Remove `%thong'.
3099
3100 * src/reader.c (copy_at): Replace with...
3101 * src/scan-gram.h (handle_at): this.
3102
3103 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
3104 New.
3105
3106 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
3107 time being.
3108
3109 * src/reader.h, src/reader.c (grammar_rule_end): New.
3110
3111 * src/parse.y (current_type, current_class): New.
3112 Implement `%nterm', `%token' support.
3113 Merge `%term' into `%token'.
3114 (string_as_id): New.
3115 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
3116 type name.
3117
3118 * src/parse-gram.y: Be sure to handle properly the beginning of
3119 rules.
3120
3121 * src/parse-gram.y: Handle %type.
3122 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
3123
3124 * src/parse-gram.y: More directives support.
3125 * src/options.c: No longer handle source directives.
3126
3127 * src/parse-gram.y: Fix %output.
3128
3129 * src/parse-gram.y: Handle %union.
3130 Use the prologue locations.
3131 * src/reader.c (parse_union_decl): Remove.
3132
3133 * src/reader.h, src/reader.c (epilogue_set): New.
3134 * src/parse-gram.y: Use it.
3135
3136 * data/bison.simple, data/bison.c++: b4_stype is now either not
3137 defined, then default to int, or to the contents of %union,
3138 without `union' itself.
3139 Adjust.
3140 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
3141
3142 * src/output.c (actions_output): Don't output braces, as they are
3143 already handled by the scanner.
3144
3145 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
3146 characters to themselves.
3147
3148 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
3149 that the epilogue has a proper #line.
3150
3151 * src/parse-gram.y: Handle precedence/associativity.
3152
3153 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
3154 a terminal.
3155 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
3156 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
3157 at all to define terminals that cannot be emitted.
3158
3159 * src/scan-gram.l: Escape M4 characters.
3160
3161 * src/scan-gram.l: Working properly with escapes in user
3162 strings/characters.
3163
3164 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
3165 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
3166 grammar.
3167 Use more modest sizes, as for the time being the parser does not
3168 release memory, and therefore the process swallows a huge amount
3169 of memory.
3170
3171 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
3172 stricter %token grammar.
3173
3174 * src/symtab.h (associativity): Add `undef_assoc'.
3175 (symbol_precedence_set): Do nothing when passed an undef_assoc.
3176 * src/symtab.c (symbol_check_alias_consistence): Adjust.
3177
3178 * tests/regression.at (Invalid %directive): Remove, as it is now
3179 meaningless.
3180 (Invalid inputs): Adjust to the new error messages.
3181 (Token definitions): The new grammar doesn't allow too many
3182 eccentricities.
3183
3184 * src/lex.h, src/lex.c: Remove.
3185 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
3186 (copy_character, copy_string2, copy_string, copy_identifier)
3187 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
3188 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
3189 (parse_action): Remove.
3190 * po/POTFILES.in: Adjust.
3191
3192 2002-06-11 Akim Demaille <akim@epita.fr>
3193
3194 * src/reader.c (parse_action): Don't store directly into the
3195 rule's action member: return the action as a string.
3196 Don't require `rule_length' as an argument: compute it.
3197 (grammar_current_rule_symbol_append)
3198 (grammar_current_rule_action_append): New, eved out from
3199 (readgram): here.
3200 Remove `action_flag', `rulelength', unused now.
3201
3202 2002-06-11 Akim Demaille <akim@epita.fr>
3203
3204 * src/reader.c (grammar_current_rule_prec_set).
3205 (grammar_current_rule_check): New, eved out from...
3206 (readgram): here.
3207 Remove `xaction', `first_rhs': useless.
3208 * tests/input.at (Type clashes): New.
3209 * tests/existing.at (GNU Cim Grammar): Adjust.
3210
3211 2002-06-11 Akim Demaille <akim@epita.fr>
3212
3213 * src/reader.c (grammar_midrule_action): New, Eved out from
3214 (readgram): here.
3215
3216 2002-06-11 Akim Demaille <akim@epita.fr>
3217
3218 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
3219 New.
3220 (readgram): Use them as replacement of inlined code, crule and
3221 crule1.
3222
3223 2002-06-11 Akim Demaille <akim@epita.fr>
3224
3225 * src/reader.c (grammar_end, grammar_symbol_append): New.
3226 (readgram): Use them.
3227 Make the use of `p' as local as possible.
3228
3229 2002-06-10 Akim Demaille <akim@epita.fr>
3230
3231 GCJ's parser requires the tokens to be defined before the prologue.
3232
3233 * data/bison.simple: Output the token definition before the user's
3234 prologue.
3235 * tests/regression.at (Braces parsing, Duplicate string)
3236 (Mixing %token styles): Check the output from bison.
3237 (Early token definitions): New.
3238
3239 2002-06-10 Akim Demaille <akim@epita.fr>
3240
3241 * src/symtab.c (symbol_user_token_number_set): Don't complain when
3242 assigning twice the same user number to a token, so that we can
3243 use it in...
3244 * src/lex.c (lex): here.
3245 Also use `symbol_class_set' instead of hand written code.
3246 * src/reader.c (parse_assoc_decl): Likewise.
3247
3248 2002-06-10 Akim Demaille <akim@epita.fr>
3249
3250 * src/symtab.c, src/symtab.c (symbol_class_set)
3251 (symbol_user_token_number_set): New.
3252 * src/reader.c (parse_token_decl): Use them.
3253 Use a switch instead of ifs.
3254 Use a single argument.
3255
3256 2002-06-10 Akim Demaille <akim@epita.fr>
3257
3258 Remove `%thong' support as it is undocumented, unused, duplicates
3259 `%token's job, and creates useless e-mail traffic with people who
3260 want to know what it is, why it is undocumented, unused, and
3261 duplicates `%token's job.
3262
3263 * src/reader.c (parse_thong_decl): Remove.
3264 * src/options.c (option_table): Remove "thong".
3265 * src/lex.h (tok_thong): Remove.
3266
3267 2002-06-10 Akim Demaille <akim@epita.fr>
3268
3269 * src/symtab.c, src/symtab.c (symbol_type_set)
3270 (symbol_precedence_set): New.
3271 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
3272 (value_components_used): Remove, unused.
3273
3274 2002-06-09 Akim Demaille <akim@epita.fr>
3275
3276 Move symbols handling code out of the reader.
3277
3278 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
3279 (axiom): Move to...
3280 * src/symtab.h, src/symtab.c: here.
3281
3282 * src/gram.c (start_symbol): Remove: use startsymbol->number.
3283 * src/reader.c (startval): Rename as...
3284 * src/symtab.h, src/symtab.c (startsymbol): this.
3285 * src/reader.c: Adjust.
3286
3287 * src/reader.c (symbol_check_defined, symbol_make_alias)
3288 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
3289 (token_translations_init)
3290 Move to...
3291 * src/symtab.c: here.
3292 * src/reader.c (packsymbols): Move to...
3293 * src/symtab.h, src/symtab.c (symbols_pack): here.
3294 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
3295 argument.
3296
3297 2002-06-03 Akim Demaille <akim@epita.fr>
3298
3299 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
3300 then statements.
3301
3302 2002-06-03 Akim Demaille <akim@epita.fr>
3303
3304 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
3305 structs with non literals.
3306 * src/scan-skel.l: never-interactive.
3307 * src/conflicts.c (enum conflict_resolution_e): No trailing
3308 comma.
3309 * src/getargs.c (usage): Split long literal strings.
3310 Reported by Hans Aberg.
3311
3312 2002-05-28 Akim Demaille <akim@epita.fr>
3313
3314 * data/bison.c++: Use C++ ostreams.
3315 (cdebug_): New member.
3316
3317 2002-05-28 Akim Demaille <akim@epita.fr>
3318
3319 * src/output.c (output_skeleton): Be sure to allocate enough room
3320 for `/' _and_ for `\0' in full_skeleton.
3321
3322 2002-05-28 Akim Demaille <akim@epita.fr>
3323
3324 * data/bison.c++: Catch up with bison.simple:
3325 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3326 and Paul Eggert <eggert@twinsun.com>: `error' handing.
3327 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
3328 and popping traces.
3329
3330 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3331
3332 * src/output.c (output_skeleton): Put an explicit path in front of
3333 the skeleton file name, rather than relying on the -I directory,
3334 to partially alleviate effects of having a skeleton file lying around
3335 in the current directory.
3336
3337 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3338
3339 * src/conflicts.c (log_resolution): Correct typo:
3340 obstack_printf should be obstack_fgrow1.
3341
3342 2002-05-26 Akim Demaille <akim@epita.fr>
3343
3344 * src/state.h (state_t): `solved_conflicts' is a new member.
3345 * src/LR0.c (new_state): Set it to 0.
3346 * src/conflicts.h, src/conflicts.c (print_conflicts)
3347 (free_conflicts, solve_conflicts): Rename as...
3348 (conflicts_print, conflicts_free, conflicts_solve): these.
3349 Adjust callers.
3350 * src/conflicts.c (enum conflict_resolution_e)
3351 (solved_conflicts_obstack): New, used by...
3352 (log_resolution): this.
3353 Adjust to attach the conflict resolution to each state.
3354 Complete the description with the precedence/associativity
3355 information.
3356 (resolve_sr_conflict): Adjust.
3357 * src/print.c (print_state): Output its solved_conflicts.
3358 * tests/conflicts.at (Unresolved SR Conflicts)
3359 (Solved SR Conflicts): Exercise --report=all.
3360
3361 2002-05-26 Akim Demaille <akim@epita.fr>
3362
3363 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
3364 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
3365 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
3366 (token_number_t, item_number_as_token_number)
3367 (token_number_as_item_number, muscle_insert_token_number_table):
3368 Rename as...
3369 (symbol_number_t, item_number_as_symbol_number)
3370 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
3371 these, since it is more appropriate.
3372
3373 2002-05-26 Akim Demaille <akim@epita.fr>
3374
3375 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
3376 `Error:' lines.
3377 * data/bison.simple (yystos) [YYDEBUG]: New.
3378 (yyparse) [YYDEBUG]: Display the symbols which are popped during
3379 error recovery.
3380 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
3381
3382 2002-05-25 Akim Demaille <akim@epita.fr>
3383
3384 * doc/bison.texinfo (Debugging): Split into...
3385 (Tracing): this new section, its former contents, and...
3386 (Understanding): this new section.
3387 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
3388 by...
3389 (report_flag): this.
3390 Adjust all dependencies.
3391 (report_args, report_types, report_argmatch): New.
3392 (usage, getargs): Report/support -r, --report.
3393 * src/options.h
3394 (struct option_table_struct): Rename as..,
3395 (struct option_table_s): this.
3396 Rename the `set_flag' member to `flag' to match with getopt_long's
3397 struct.
3398 * src/options.c (option_table): Split verbose into an entry for
3399 %verbose, and another for --verbose.
3400 Support --report/-r, so remove -r from the obsolete --raw.
3401 * src/print.c: Attach full item sets and lookaheads reports to
3402 report_flag instead of trace_flag.
3403 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
3404
3405 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3406 and Paul Eggert <eggert@twinsun.com>
3407
3408 * data/bison.simple (yyparse): Correct error handling to conform to
3409 POSIX and yacc. Specifically, after syntax error is discovered,
3410 do not reduce further before shifting the error token.
3411 Clean up the code a bit by removing the labels yyerrdefault,
3412 yyerrhandle, yyerrpop.
3413 * NEWS: Document the above.
3414
3415 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3416
3417 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
3418 type; it isn't always big enough, since it doesn't necessarily
3419 include non-terminals.
3420 (yytranslate): Expand definition of yy_token_number_type, so that
3421 the latter can be removed.
3422 (yy_token_number_type): Remove, only one use.
3423 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
3424 don't use TokenNumberType as element type.
3425
3426 * tests/regression.at: Modify expected output to agree with change
3427 to yyr1 and yytranslate.
3428
3429 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
3430
3431 * src/reader.c (parse_action): Use copy_character instead of
3432 obstack_1grow.
3433
3434 2002-05-13 Akim Demaille <akim@epita.fr>
3435
3436 * tests/regression.at (Token definitions): Prototype yylex and
3437 yyerror.
3438
3439 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3440
3441 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
3442 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
3443 32-bit arithmetic.
3444 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
3445
3446 2002-05-07 Akim Demaille <akim@epita.fr>
3447
3448 * tests/synclines.at: Be sure to prototype yylex and yyerror to
3449 avoid GCC warnings.
3450
3451 2002-05-07 Akim Demaille <akim@epita.fr>
3452
3453 Kill GCC warnings.
3454
3455 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
3456 over the RHS of each rule.
3457 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
3458 * src/state.h (state_t): Member `nitems' is unsigned short.
3459 * src/LR0.c (get_state): Adjust.
3460 * src/reader.c (packgram): Likewise.
3461 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
3462 `Type'.
3463 (muscle_insert_int_table): Remove, unused.
3464 (prepare_rules): Remove `max'.
3465
3466 2002-05-06 Akim Demaille <akim@epita.fr>
3467
3468 * src/closure.c (print_firsts): Display of the symbol tags.
3469 (bitmatrix_print): Move to...
3470 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
3471 here.
3472 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
3473
3474 2002-05-06 Akim Demaille <akim@epita.fr>
3475
3476 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
3477 hash_do_for_each.
3478
3479 2002-05-06 Akim Demaille <akim@epita.fr>
3480
3481 * src/LR0.c (new_state, get_state): Instead of using the global
3482 `kernel_size' and `kernel_base', have two new arguments:
3483 `core_size' and `core'.
3484 Adjust callers.
3485
3486 2002-05-06 Akim Demaille <akim@epita.fr>
3487
3488 * src/reader.c (packgram): No longer end `ritem' with a 0
3489 sentinel: it is not used.
3490
3491 2002-05-05 Akim Demaille <akim@epita.fr>
3492
3493 New experimental feature: display the lookaheads in the report and
3494 graph.
3495
3496 * src/print (print_core): When --trace-flag, display the rules
3497 lookaheads.
3498 * src/print_graph.c (print_core): Likewise.
3499 Swap the arguments.
3500 Adjust caller.
3501
3502 2002-05-05 Akim Demaille <akim@epita.fr>
3503
3504 * tests/torture.at (Many lookaheads): New test.
3505
3506 2002-05-05 Akim Demaille <akim@epita.fr>
3507
3508 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
3509 (GENERATE_MUSCLE_INSERT_TABLE): this.
3510 (output_int_table, output_unsigned_int_table, output_short_table)
3511 (output_token_number_table, output_item_number_table): Replace with...
3512 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
3513 (muscle_insert_short_table, muscle_insert_token_number_table)
3514 (muscle_insert_item_number_table): these.
3515 Adjust all callers.
3516 (prepare_tokens): Don't free `translations', since...
3517 * src/reader.h, src/reader.c (grammar_free): do it.
3518 Move to...
3519 * src/gram.h, src/gram.c (grammar_free): here.
3520 * data/bison.simple, data/bison.c++: b4_token_number_max is now
3521 b4_translate_max.
3522
3523 2002-05-05 Akim Demaille <akim@epita.fr>
3524
3525 * src/output.c (output_unsigned_int_table): New.
3526 (prepare_rules): `i' is unsigned.
3527 `prhs', `rline', `r2' are unsigned int.
3528 Rename muscle `rhs_number_max' as `rhs_max'.
3529 Output muscles `prhs_max', `rline_max', and `r2_max'.
3530 Free rline and r1.
3531 * data/bison.simple, data/bison.c++: Adjust to use these muscles
3532 to compute types instead of constant types.
3533 * tests/regression.at (Web2c Actions): Adjust.
3534
3535 2002-05-04 Akim Demaille <akim@epita.fr>
3536
3537 * src/symtab.h (SALIAS, SUNDEF): Rename as...
3538 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
3539 Adjust dependencies.
3540 * src/output.c (token_definitions_output): Be sure not to output a
3541 `#define 'a'' when fed with `%token 'a' "a"'.
3542 * tests/regression.at (Token definitions): New.
3543
3544 2002-05-03 Paul Eggert <eggert@twinsun.com>
3545
3546 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
3547 for K&R C.
3548
3549 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
3550
3551 * Makefile.am (SUBDIRS): Remove intl.
3552 (EXTRA_DIST): Add config/config.rpath.
3553
3554 2002-05-03 Akim Demaille <akim@epita.fr>
3555
3556 * data/bison.simple (m4_if): Don't output empty enums.
3557 And actually, output valid enum definitions :(.
3558
3559 2002-05-03 Akim Demaille <akim@epita.fr>
3560
3561 * configure.bat: Remove, completely obsolete.
3562 * Makefile.am (EXTRA_DIST): Adjust.
3563 Don't distribute config.rpath...
3564 * config/Makefile.am (EXTRA_DIST): Do it.
3565
3566 2002-05-03 Akim Demaille <akim@epita.fr>
3567
3568 * configure.in (GETTEXT_VERSION): New.
3569 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
3570
3571 2002-05-03 Akim Demaille <akim@epita.fr>
3572
3573 * data/bison.simple (b4_token_enum): New.
3574 (b4_token_defines): Use it to output tokens both as #define and
3575 enums.
3576 Suggested by Paul Eggert.
3577 * src/output.c (token_definitions_output): Don't output spurious
3578 white spaces.
3579
3580 2002-05-03 Akim Demaille <akim@epita.fr>
3581
3582 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
3583
3584 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
3585
3586 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
3587 Update the stack class, give a try to deque as the default container.
3588
3589 2002-05-02 Akim Demaille <akim@epita.fr>
3590
3591 * data/bison.simple (yyparse): Do not implement @$ = @1.
3592 (YYLLOC_DEFAULT): Adjust to do it.
3593 * doc/bison.texinfo (Location Default Action): Fix.
3594
3595 2002-05-02 Akim Demaille <akim@epita.fr>
3596
3597 * src/reader.c (parse_braces): Merge into...
3598 (parse_action): this.
3599
3600 2002-05-02 Akim Demaille <akim@epita.fr>
3601
3602 * configure.in (ALL_LINGUAS): Remove.
3603 * po/LINGUAS, hr.po: New.
3604
3605 2002-05-02 Akim Demaille <akim@epita.fr>
3606
3607 Remove the so called hairy (semantic) parsers.
3608
3609 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
3610 * src/gram.h, src/gram.c (semantic_parser): Remove.
3611 (rule_t): Remove the guard and guard_line members.
3612 * src/lex.h (token_t): remove tok_guard.
3613 * src/options.c (option_table): Remove %guard and %semantic_parser
3614 support.
3615 * src/output.c, src/output.h (guards_output): Remove.
3616 (prepare): Adjust.
3617 (token_definitions_output): Don't output the `T'
3618 tokens (???).
3619 (output_skeleton): Don't output the guards.
3620 * src/files.c, src/files.c (attrsfile): Remove.
3621 * src/reader.c (symbol_list): Remove the guard and guard_line
3622 members.
3623 Adjust dependencies.
3624 (parse_guard): Remove.
3625 * data/bison.hairy: Remove.
3626 * doc/bison.texinfo (Environment Variables): Remove occurrences of
3627 BISON_HAIRY.
3628
3629 2002-05-02 Akim Demaille <akim@epita.fr>
3630
3631 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
3632 (parse_guard): Rename the formal argument `stack_offset' as
3633 `rule_length', which is more readable.
3634 Adjust callers.
3635 (copy_at, copy_dollar): Instead of outputting the hard coded
3636 values of $$, $n and so forth, output invocation to b4_lhs_value,
3637 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
3638 Note: this patch partially drops `semantic-parser' support: it
3639 always does `rule_length - n', where semantic parsers ought to
3640 always use `-n'.
3641 * data/bison.simple, data/bison.c++ (b4_lhs_value)
3642 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
3643
3644 2002-05-02 Akim Demaille <akim@epita.fr>
3645
3646 * configure.in (AC_INIT): Bump to 1.49b.
3647 (AM_INIT_AUTOMAKE): Short invocation.
3648
3649 2002-05-02 Akim Demaille <akim@epita.fr>
3650
3651 Version 1.49a.
3652
3653 2002-05-01 Akim Demaille <akim@epita.fr>
3654
3655 * src/skeleton.h: Remove.
3656
3657 2002-05-01 Akim Demaille <akim@epita.fr>
3658
3659 * src/skeleton.h: Fix the #endif.
3660 Reported by Magnus Fromreide.
3661
3662 2002-04-26 Paul Eggert <eggert@twinsun.com>
3663
3664 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
3665 Define if we define YYSTYPE and YYLTYPE, respectively.
3666 (YYCOPY): Fix [] quoting problem in the non-GCC case.
3667
3668 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
3669
3670 * src/scan-skel.l: Postprocess quadrigraphs.
3671
3672 * src/reader.c (copy_character): New function, used to output
3673 single characters while replacing `[' and `]' with quadrigraphs, to
3674 avoid troubles with M4 quotes.
3675 (copy_comment): Output characters with copy_character.
3676 (read_additionnal_code): Likewise.
3677 (copy_string2): Likewise.
3678 (copy_definition): Likewise.
3679
3680 * tests/calc.at: Exercise M4 quoting.
3681
3682 2002-04-25 Akim Demaille <akim@epita.fr>
3683
3684 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
3685 between `!' and the command.
3686 Reported by Paul Eggert.
3687
3688 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
3689
3690 * tests/calc.at: Exercise prologue splitting.
3691
3692 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
3693 `b4_post_prologue' instead of `b4_prologue'.
3694
3695 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
3696 muscles.
3697 (output): Free pre_prologue_obstack and post_prologue_obstack.
3698 * src/files.h, src/files.c (attrs_obstack): Remove.
3699 (pre_prologue_obstack, post_prologue_obstack): New.
3700 * src/reader.c (copy_definition): Add a parameter to specify the
3701 obstack to fill, instead of using attrs_obstack unconditionally.
3702 (read_declarations): Pass pre_prologue_obstack to copy_definition if
3703 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
3704
3705 2002-04-23 Paul Eggert <eggert@twinsun.com>
3706
3707 * data/bison.simple: Remove unnecessary commentary and white
3708 space differences from 1_29-branch.
3709 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
3710
3711 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
3712 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
3713 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
3714 constructors or destructors.
3715
3716 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
3717
3718 2002-04-23 Akim Demaille <akim@epita.fr>
3719
3720 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
3721 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
3722 location with columns.
3723 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
3724 All reported by Paul Eggert.
3725
3726 2002-04-22 Akim Demaille <akim@epita.fr>
3727
3728 * src/reduce.c (dump_grammar): Move to...
3729 * src/gram.h, src/gram.c (grammar_dump): here.
3730 Be sure to separate long item numbers.
3731 Don't read the members of a rule's prec if its nil.
3732
3733 2002-04-22 Akim Demaille <akim@epita.fr>
3734
3735 * src/output.c (table_size, table_grow): New.
3736 (MAXTABLE): Remove, replace uses with table_size.
3737 (pack_vector): Instead of dying when the table is too big, grow it.
3738
3739 2002-04-22 Akim Demaille <akim@epita.fr>
3740
3741 * data/bison.simple (yyr1): Its type is that of a token number.
3742 * data/bison.c++ (r1_): Likewise.
3743 * tests/regression.at (Web2c Actions): Adjust.
3744
3745 2002-04-22 Akim Demaille <akim@epita.fr>
3746
3747 * src/reader.c (token_translations_init): 256 is now the default
3748 value for the error token, i.e., it will be assigned another
3749 number if the user assigned 256 to one of her tokens.
3750 (reader): Don't force 256 to error.
3751 * doc/bison.texinfo (Symbols): Adjust.
3752 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
3753 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
3754 etc. instead of 10, 20, 30 (which was used to `jump' over error
3755 (256) and undefined (2)).
3756
3757 2002-04-22 Akim Demaille <akim@epita.fr>
3758
3759 Propagate more token_number_t.
3760
3761 * src/gram.h (token_number_as_item_number)
3762 (item_number_as_token_number): New.
3763 * src/output.c (GENERATE_OUTPUT_TABLE): New.
3764 Use it to create output_item_number_table and
3765 output_token_number_table.
3766 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
3767 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
3768 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
3769 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
3770
3771 2002-04-22 Akim Demaille <akim@epita.fr>
3772
3773 * src/output.h, src/output.c (get_lines_number): Remove.
3774
3775 2002-04-19 Akim Demaille <akim@epita.fr>
3776
3777 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
3778 as Lex/Flex'.
3779 (Debugging): More details about enabling the debugging features.
3780 (Table of Symbols): Describe $$, $n, @$, and @n.
3781 Suggested by Tim Josling.
3782
3783 2002-04-19 Akim Demaille <akim@epita.fr>
3784
3785 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
3786
3787 2002-04-10 Akim Demaille <akim@epita.fr>
3788
3789 * src/system.h: Rely on HAVE_LIMITS_H.
3790 Suggested by Paul Eggert.
3791
3792 2002-04-09 Akim Demaille <akim@epita.fr>
3793
3794 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
3795 full stderr, and strip it according to the bison options, instead
3796 of composing the error message from different bits.
3797 This makes it easier to check for several error messages.
3798 Adjust all the invocations.
3799 Add an invocation exercising the error token.
3800 Add an invocation demonstrating a stupid error message.
3801 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
3802 Adjust the tests.
3803 Error message are for stderr, not stdout.
3804
3805 2002-04-09 Akim Demaille <akim@epita.fr>
3806
3807 * src/gram.h, src/gram.c (error_token_number): Remove, use
3808 errtoken->number.
3809 * src/reader.c (reader): Don't specify the user token number (2)
3810 for $undefined, as it uselessly prevents using it.
3811 * src/gram.h (token_number_t): Move to...
3812 * src/symtab.h: here.
3813 (state_t.number): Is a token_number_t.
3814 * src/print.c, src/reader.c: Use undeftoken->number instead of
3815 hard coded 2.
3816 (Even though this 2 is not the same as above: the number of the
3817 undeftoken remains being 2, it is its user token number which
3818 might not be 2).
3819 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
3820 `user_token_number_max'.
3821 Output `undef_token_number'.
3822 * data/bison.simple, data/bison.c++: Use them.
3823 Be sure to map invalid yylex return values to
3824 `undef_token_number'. This saves us from gratuitous SEGV.
3825
3826 * tests/conflicts.at (Solved SR Conflicts)
3827 (Unresolved SR Conflicts): Adjust.
3828 * tests/regression.at (Web2c Actions): Adjust.
3829
3830 2002-04-08 Akim Demaille <akim@epita.fr>
3831
3832 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
3833 Adding #line.
3834 Remove the duplicate `typedefs'.
3835 (RhsNumberType): Fix the declaration and various other typos.
3836 Use __ofile__.
3837 * data/bison.simple: Use __ofile__.
3838 * src/scan-skel.l: Handle __ofile__.
3839
3840 2002-04-08 Akim Demaille <akim@epita.fr>
3841
3842 * src/gram.h (item_number_t): New, the type of item numbers in
3843 RITEM. Note that it must be able to code symbol numbers as
3844 positive number, and the negation of rule numbers as negative
3845 numbers.
3846 Adjust all dependencies (pretty many).
3847 * src/reduce.c (rule): Remove this `short *' pointer: use
3848 item_number_t.
3849 * src/system.h (MINSHORT, MAXSHORT): Remove.
3850 Include `limits.h'.
3851 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
3852 (shortcpy): Remove.
3853 (MAXTABLE): Move to...
3854 * src/output.c (MAXTABLE): here.
3855 (prepare_rules): Use output_int_table to output rhs.
3856 * data/bison.simple, data/bison.c++: Adjust.
3857 * tests/torture.at (Big triangle): Move the limit from 254 to
3858 500.
3859 * tests/regression.at (Web2c Actions): Ajust.
3860
3861 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
3862 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
3863 passes, but produces negative #line number, once fixed, GCC is
3864 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
3865 C), it passes.
3866 * src/state.h (state_h): Code input lines on ints, not shorts.
3867
3868 2002-04-08 Akim Demaille <akim@epita.fr>
3869
3870 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
3871 and then the grammar.
3872
3873 2002-04-08 Akim Demaille <akim@epita.fr>
3874
3875 * src/system.h: No longer using strndup.
3876
3877 2002-04-07 Akim Demaille <akim@epita.fr>
3878
3879 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
3880 * src/output.c (output_table_data): Return the longest number.
3881 (prepare_tokens): Output `token_number_max').
3882 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
3883 New.
3884 Use them to define yy_token_number_type/TokenNumberType.
3885 Use this type for yytranslate.
3886 * tests/torture.at (Big triangle): Push the limit from 124 to
3887 253.
3888 * tests/regression.at (Web2c Actions): Adjust.
3889
3890 2002-04-07 Akim Demaille <akim@epita.fr>
3891
3892 * tests/torture.at (Big triangle): New.
3893 (GNU AWK Grammar, GNU Cim Grammar): Move to...
3894 * tests/existing.at: here.
3895
3896 2002-04-07 Akim Demaille <akim@epita.fr>
3897
3898 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
3899 nritems.
3900 Adjust dependencies.
3901
3902 2002-04-07 Akim Demaille <akim@epita.fr>
3903
3904 * src/reader.c: Normalize increments to prefix form.
3905
3906 2002-04-07 Akim Demaille <akim@epita.fr>
3907
3908 * src/reader.c, symtab.c: Remove debugging code.
3909
3910 2002-04-07 Akim Demaille <akim@epita.fr>
3911
3912 Rename all the `bucket's as `symbol_t'.
3913
3914 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
3915 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
3916 * src/symtab.c, src/symtab.h (bucket): Rename as...
3917 (symbol_t): this.
3918 (symbol_list_new, bucket_check_defined, bucket_make_alias)
3919 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
3920 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
3921 (buckets_new, buckets_free, buckets_do): Rename as...
3922 (symbol_list_new, symbol_check_defined, symbol_make_alias)
3923 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
3924 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
3925 (symbols_new, symbols_free, symbols_do): these.
3926
3927 2002-04-07 Akim Demaille <akim@epita.fr>
3928
3929 Use lib/hash for the symbol table.
3930
3931 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
3932 EOF.
3933 * src/lex.c (lex): Set the `number' member of new terminals.
3934 * src/reader.c (bucket_check_defined, bucket_make_alias)
3935 (bucket_check_alias_consistence, bucket_translation): New.
3936 (reader, grammar_free, readgram, token_translations_init)
3937 (packsymbols): Adjust.
3938 (reader): Number the predefined tokens.
3939 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
3940 for predefined tokens.
3941 * src/symtab.h (bucket): Remove all the hash table related
3942 members.
3943 * src/symtab.c (symtab): Replace by...
3944 (bucket_table): this.
3945 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
3946 (buckets_new, buckets_do): New.
3947
3948 2002-04-07 Akim Demaille <akim@epita.fr>
3949
3950 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
3951 (start_symbol, max_user_token_number, semantic_parser)
3952 (error_token_number): Initialize.
3953 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
3954 Initialize.
3955 (reader): Don't.
3956 (errtoken, eoftoken, undeftoken, axiom): Extern.
3957
3958 2002-04-07 Akim Demaille <akim@epita.fr>
3959
3960 * src/gram.h (rule_s): prec and precsym are now pointers
3961 to the bucket giving the priority/associativity.
3962 Member `associativity' removed: useless.
3963 * src/reduce.c, src/conflicts.c: Adjust.
3964
3965 2002-04-07 Akim Demaille <akim@epita.fr>
3966
3967 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
3968 Properly escape the symbols' TAG when outputting them.
3969
3970 2002-04-07 Akim Demaille <akim@epita.fr>
3971
3972 * src/lalr.h (LA): Is a bitsetv, not bitset*.
3973
3974 2002-04-07 Akim Demaille <akim@epita.fr>
3975
3976 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
3977 (LArule): this, which is an array to rule_t*.
3978 * src/print.c, src/conflicts.c: Adjust.
3979
3980 2002-04-07 Akim Demaille <akim@epita.fr>
3981
3982 * src/gram.h (rule_t): Rename `number' as `user_number'.
3983 `number' is a new member.
3984 Adjust dependencies.
3985 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
3986
3987 2002-04-07 Akim Demaille <akim@epita.fr>
3988
3989 As a result of the previous patch, it is no longer needed
3990 to reorder ritem itself.
3991
3992 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
3993
3994 2002-04-07 Akim Demaille <akim@epita.fr>
3995
3996 Be sure never to walk through RITEMS, but use only data related to
3997 the rules themselves. RITEMS should be banished.
3998
3999 * src/output.c (output_token_translations): Rename as...
4000 (prepare_tokens): this.
4001 In addition to `translate', prepare the muscles `tname' and
4002 `toknum', which were handled by...
4003 (output_rule_data): this.
4004 Remove, and move the remainder of its outputs into...
4005 (prepare_rules): this new routines, which also merges content from
4006 (output_gram): this.
4007 (prepare_rules): Be sure never to walk through RITEMS.
4008 (output_stos): Rename as...
4009 (prepare_stos): this.
4010 (output): Always invoke prepare_states, after all, just don't use it
4011 in the output if you don't need it.
4012
4013 2002-04-07 Akim Demaille <akim@epita.fr>
4014
4015 * src/LR0.c (new_state): Display `nstates' as the name of the
4016 newly created state.
4017 Adjust to initialize first_state and last_state if needed.
4018 Be sure to distinguish the initial from the final state.
4019 (new_states): Create the itemset of the initial state, and use
4020 new_state.
4021 * src/closure.c (closure): Now that the initial state has its
4022 items properly set, there is no need for a special case when
4023 creating `ruleset'.
4024
4025 As a result, now the rule 0, reducing to $axiom, is visible in the
4026 outputs. Adjust the test suite.
4027
4028 * tests/conflicts.at (Solved SR Conflicts)
4029 (Unresolved SR Conflicts): Adjust.
4030 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
4031 * tests/conflicts.at (S/R in initial): New.
4032
4033 2002-04-07 Akim Demaille <akim@epita.fr>
4034
4035 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
4036 the RHS of the rules.
4037 * src/output.c (output_gram): Likewise.
4038
4039 2002-04-07 Akim Demaille <akim@epita.fr>
4040
4041 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
4042 bucket.
4043 Adjust all dependencies.
4044 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
4045 `number' of the buckets too.
4046 * src/gram.h: Include `symtab.h'.
4047 (associativity): Move to...
4048 * src/symtab.h: here.
4049 No longer include `gram.h'.
4050
4051 2002-04-07 Akim Demaille <akim@epita.fr>
4052
4053 * src/gram.h, src/gram.c (rules_rhs_length): New.
4054 (ritem_longest_rhs): Use it.
4055 * src/gram.h (rule_t): `number' is a new member.
4056 * src/reader.c (packgram): Set it.
4057 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
4058 the end of `rules', and count them out of `nrules'.
4059 (reduce_output, dump_grammar): Adjust.
4060 * src/print.c (print_grammar): It is no longer needed to check for
4061 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
4062 * tests/reduce.at (Reduced Automaton): New test.
4063
4064 2002-04-07 Akim Demaille <akim@epita.fr>
4065
4066 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
4067 lacking `+ 1' to nrules, Bison reported as useless a token if it
4068 was used solely to set the precedence of the last rule...
4069
4070 2002-04-07 Akim Demaille <akim@epita.fr>
4071
4072 * data/bison.c++, data/bison.simple: Don't output the current file
4073 name in #line, to avoid useless diffs between two identical
4074 outputs under different names.
4075
4076 2002-04-07 Akim Demaille <akim@epita.fr>
4077
4078 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
4079 Normalize loops to using `< nrules + 1', not `<= nrules'.
4080
4081 2002-04-07 Akim Demaille <akim@epita.fr>
4082
4083 * TODO: Update.
4084
4085 2002-04-07 Akim Demaille <akim@epita.fr>
4086
4087 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
4088 bucket.value as bucket.number.
4089
4090 2002-04-07 Akim Demaille <akim@epita.fr>
4091
4092 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
4093 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
4094 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
4095 RHS, instead of being an index in RITEMS.
4096
4097 2002-04-04 Paul Eggert <eggert@twinsun.com>
4098
4099 * doc/bison.texinfo: Update copyright date.
4100 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
4101 (Symbols): Warn about running Bison in one character set,
4102 but compiling and/or running in an incompatible one.
4103 Warn about character code 256, too.
4104
4105 2002-04-03 Paul Eggert <eggert@twinsun.com>
4106
4107 * src/bison.data (YYSTACK_ALLOC): Depend on whether
4108 YYERROR_VERBOSE is nonzero, not whether it is defined.
4109
4110 Merge changes from bison-1_29-branch.
4111
4112 2002-03-20 Paul Eggert <eggert@twinsun.com>
4113
4114 Merge fixes from Debian bison_1.34-1.diff.
4115
4116 * configure.in (AC_PREREQ): 2.53.
4117
4118 2002-03-20 Akim Demaille <akim@epita.fr>
4119
4120 * src/conflicts.c (log_resolution): Argument `resolution' is const.
4121
4122 2002-03-19 Paul Eggert <eggert@twinsun.com>
4123
4124 * src/bison.simple (YYCOPY): New macro.
4125 (YYSTACK_RELOCATE): Use it.
4126 Remove Type arg; no longer needed. All callers changed.
4127 (yymemcpy): Remove; no longer needed.
4128
4129 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
4130 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
4131
4132 2002-03-19 Akim Demaille <akim@epita.fr>
4133
4134 Test and fix the #line outputs.
4135
4136 * tests/atlocal.at (GCC): New.
4137 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
4138 (Prologue synch line, ,%union synch line, Postprologue synch line)
4139 (Action synch line, Epilogue synch line): New tests.
4140 * src/reader.c (parse_union_decl): Define the muscle stype_line.
4141 * data/bison.simple, data/bison.c++: Use it.
4142
4143 2002-03-19 Akim Demaille <akim@epita.fr>
4144
4145 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
4146 (Solved SR Conflicts, %expect not enough, %expect right)
4147 (%expect too much): Move to...
4148 * tests/conflicts.at: this new file.
4149
4150 2002-03-19 Akim Demaille <akim@epita.fr>
4151
4152 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
4153 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
4154 that we can move to enums for instance.
4155 * src/output.c (token_definitions_output): Output a list of
4156 `token-name, token-number' instead of the #define.
4157 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
4158
4159 2002-03-14 Akim Demaille <akim@epita.fr>
4160
4161 Use Gettext 0.11.1.
4162
4163 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
4164
4165 * data/bison.c++: Make the user able to add members to the generated
4166 parser by subclassing.
4167
4168 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
4169
4170 * src/reader.c (read_additionnal_code): `c' should be an integer, not
4171 a character.
4172 Reported by Nicolas Tisserand and Nicolas Burrus.
4173
4174 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
4175
4176 * src/reader.c: Warn about lacking semi-colons, do not complain.
4177
4178 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
4179
4180 * data/bison.c++: Remove a debug line.
4181
4182 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
4183
4184 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
4185 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
4186 provide a default implementation.
4187
4188 2002-03-04 Akim Demaille <akim@epita.fr>
4189
4190 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
4191 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
4192 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
4193 * tests/semantic.at (Parsing Guards): Similarly.
4194 * src/reader.at (readgram): Complain if the last rule is not ended
4195 with a semi-colon.
4196
4197 2002-03-04 Akim Demaille <akim@epita.fr>
4198
4199 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
4200 * src/closure.c: here.
4201 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
4202 RTC.
4203 * src/warshall.h, src/warshall.c: Remove.
4204 * tests/sets.at (Broken Closure): Adjust.
4205
4206 2002-03-04 Akim Demaille <akim@epita.fr>
4207
4208 * src/output.c (output_skeleton): tempdir is const.
4209 bytes_read is unused.
4210
4211 2002-03-04 Akim Demaille <akim@epita.fr>
4212
4213 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
4214 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
4215 Update.
4216 From Michael Hayes.
4217
4218 2002-03-04 Akim Demaille <akim@epita.fr>
4219
4220 * src/closure.c (closure): `r' is unused.
4221
4222 2002-03-04 Akim Demaille <akim@epita.fr>
4223
4224 * tests/sets.at (Broken Closure): Add the ending `;'.
4225 * src/reader.at (readgram): Complain if a rule is not ended with a
4226 semi-colon.
4227
4228 2002-03-04 Akim Demaille <akim@epita.fr>
4229
4230 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
4231 (count_sr_conflicts): Use bitset_count.
4232 * src/reduce.c (inaccessable_symbols): Ditto.
4233 (bits_size): Remove.
4234 * src/warshall.h, src/warshall.c: Convert to bitsetv.
4235
4236 2002-03-04 Akim Demaille <akim@epita.fr>
4237
4238 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
4239 * src/reduce.c: Remove the `bitset_zero's following the
4240 `bitset_create's, as now it is performed by the latter.
4241
4242 2002-03-04 Akim Demaille <akim@epita.fr>
4243
4244 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
4245 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
4246 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
4247 latest sources from Michael.
4248
4249 2002-03-04 Akim Demaille <akim@epita.fr>
4250
4251 * src/output.c (output): Don't free the grammar.
4252 * src/reader.c (grammar_free): New.
4253 * src/main.c (main): Call it and don't free symtab here.
4254
4255 2002-03-04 Akim Demaille <akim@epita.fr>
4256
4257 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
4258 before returning.
4259 Reported by Benoit Perrot.
4260
4261 2002-03-04 Akim Demaille <akim@epita.fr>
4262
4263 Use bitset operations when possible, not loops over bits.
4264
4265 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
4266 bitset_or.
4267 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
4268 * src/reduce.c (useless_nonterminals): Formatting changes.
4269 * src/warshall.c (TC): Use bitset_or.
4270
4271 2002-03-04 Akim Demaille <akim@epita.fr>
4272
4273 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
4274 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
4275 Ditto.
4276
4277 2002-03-04 Akim Demaille <akim@epita.fr>
4278
4279 * src/lalr.c (F): Now a bitset*.
4280 Adjust all dependencies.
4281
4282 2002-03-04 Akim Demaille <akim@epita.fr>
4283
4284 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
4285 Adjust all dependencies.
4286
4287 2002-03-04 Akim Demaille <akim@epita.fr>
4288
4289 * src/L0.c, src/LR0.h (nstates): Be size_t.
4290 Adjust comparisons (signed vs unsigned).
4291 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
4292 bitset*.
4293 Adjust all dependencies.
4294
4295 2002-03-04 Akim Demaille <akim@epita.fr>
4296
4297 * src/closure.c (firsts): Now, also a bitset.
4298 Adjust all dependencies.
4299 (varsetsize): Remove, now unused.
4300 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
4301
4302 2002-03-04 Akim Demaille <akim@epita.fr>
4303
4304 * src/print.c: Convert to use bitset.h, not hand coded iterations
4305 over ints.
4306
4307 2002-03-04 Akim Demaille <akim@epita.fr>
4308
4309 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
4310
4311 2002-03-04 Akim Demaille <akim@epita.fr>
4312
4313 * src/closure.c (ruleset): Be a bitset.
4314 (rulesetsize): Remove.
4315
4316 2002-03-04 Akim Demaille <akim@epita.fr>
4317
4318 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
4319 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
4320 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
4321 * src/closure.c (fderives): Be an array of bitsets.
4322
4323 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
4324
4325 * data/bison.c++: Merge the two generated headers. Insert a copyright
4326 notice in each output file.
4327
4328 2002-02-28 Akim Demaille <akim@epita.fr>
4329
4330 * data/bison.c++: Copy the prologue of bison.simple to fetch
4331 useful M4 definitions, such as b4_header_guard.
4332
4333 2002-02-25 Akim Demaille <akim@epita.fr>
4334
4335 * src/getargs.c (version): Give the name of the authors, and use a
4336 translator friendly scheme for the bgr
4337 copyright notice.
4338
4339 2002-02-25 Akim Demaille <akim@epita.fr>
4340
4341 * src/output.c (header_output): Remove, now handled completely via
4342 M4.
4343
4344 2002-02-25 Akim Demaille <akim@epita.fr>
4345
4346 * m4/m4.m4: New, from CVS Autoconf.
4347 * configure.in: Invoke it.
4348 * src/output.c (output_skeleton): Use its result instead of the
4349 hard coded name.
4350
4351 2002-02-25 Akim Demaille <akim@epita.fr>
4352
4353 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
4354 Fileutils 4.1.5.
4355 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
4356 * src/output.c (output_skeleton): Use mkstemp to create a real
4357 temporary file.
4358 Move the filling of `skeleton' and its muscle to...
4359 (prepare): here.
4360 (output): Move the definition of the prologue muscle to...
4361 (prepare): here.
4362 * src/system.h (DEFAULT_TMPDIR): New.
4363
4364 2002-02-14 Paul Eggert <eggert@twinsun.com>
4365
4366 Remove the support for C++ namespace cleanliness; it was
4367 causing more problems than it was curing, since it didn't work
4368 properly on some nonstandard C++ compilers. This can wait
4369 for a proper C++ parser.
4370
4371 * NEWS: Document this.
4372 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
4373 of C++, as it's treated like C now.
4374 * src/bison.simple (YYSTD): Remove.
4375 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
4376 Treat C++ just like Standard C instead of trying to support
4377 namespace cleanliness.
4378
4379 2002-02-14 Akim Demaille <akim@epita.fr>
4380
4381 * tests/regression.at (else): Adjust to Andreas' change.
4382
4383 2002-02-14 Akim Demaille <akim@epita.fr>
4384
4385 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
4386
4387 2002-02-13 Andreas Schwab <schwab@suse.de>
4388
4389 * src/output.c (output_rule_data): Don't output NULL, it might
4390 not be defined yet.
4391
4392 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
4393
4394 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
4395 (Copyright notice): Update.
4396
4397 2002-02-11 Akim Demaille <akim@epita.fr>
4398
4399 * tests/regression.at (%nonassoc and eof): Don't include
4400 nonportable headers.
4401
4402 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
4403
4404 * data/bison.c++: Correct error recovery. Make the user able to
4405 initialize the starting location.
4406
4407 2002-02-07 Akim Demaille <akim@epita.fr>
4408
4409 * tests/input.at: New.
4410
4411 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
4412
4413 * data/bison.c++: Replace some direct m4 expansions by constants. Be
4414 more consistent when naming methods and variables. Put preprocessor
4415 directives around tables only needed for debugging.
4416
4417 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
4418
4419 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
4420 C++ parsers.
4421 (yy::b4_name::parse): Use print_.
4422
4423 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
4424
4425 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
4426
4427 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
4428
4429 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
4430 C++ parsers.
4431 (yy::b4_name::parse): Build verbose error messages, and use error_.
4432
4433 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
4434
4435 * data/bison.c++: Fix m4 quoting in comments.
4436
4437 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
4438
4439 * data/bison.c++: Adjust the parser code. Fix some muscles that were
4440 not expanded by m4.
4441
4442 2002-02-05 Akim Demaille <akim@epita.fr>
4443
4444 * data/bison.c++: Adjust to the M4 back end.
4445 More is certainly needed.
4446
4447 2002-02-05 Akim Demaille <akim@epita.fr>
4448
4449 Give a try to M4 as a back end.
4450
4451 * lib/readpipe.c: New, from wdiff.
4452 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
4453 BISON_HAIRY.
4454 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
4455 specific values. Now it is m4 that performs the lookup.
4456 * src/parse-skel.y: Remove.
4457 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
4458 * src/output.c (actions_output, guards_output)
4459 (token_definitions_output): No longer keeps track of the output
4460 line number, hence remove the second argument.
4461 (guards_output): Check against the guard member of a rule, not the
4462 action member.
4463 Adjust callers.
4464 (output_skeleton): Don't look for the skeleton location, let m4 do
4465 that.
4466 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
4467 file will be used.
4468 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
4469 (prepare): Given that for the time being changesyntax is not
4470 usable in M4, rename the muscles using `-' to `_'.
4471 Define `defines_flag', `output_parser_name' and `output_header_name'.
4472 * src/output.h (actions_output, guards_output)
4473 (token_definitions_output): Adjust prototypes.
4474 * src/scan-skel.l: Instead of scanning the skeletons, it now
4475 processes the output of m4: `__oline__' and `#output'.
4476 * data/bison.simple: Adjust to be used by M4(sugar).
4477 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
4478 to date.
4479 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
4480 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
4481 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
4482 shamelessly stolen from CVS Autoconf.
4483
4484 2002-02-05 Akim Demaille <akim@epita.fr>
4485
4486 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
4487 * configure.in: Check for the declarations of free and malloc.
4488 * src/muscle_tab.c: Adjust.
4489
4490 2002-02-05 Akim Demaille <akim@epita.fr>
4491
4492 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
4493 which have no values.
4494
4495 2002-02-05 Akim Demaille <akim@epita.fr>
4496
4497 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
4498 * data/: here.
4499
4500 2002-01-29 Paul Eggert <eggert@twinsun.com>
4501
4502 * src/bison.simple (YYSIZE_T): Do not define merely because
4503 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
4504 On some platforms, <alloca.h> does not declare YYSTD (size_t).
4505
4506 2002-01-27 Akim Demaille <akim@epita.fr>
4507
4508 Fix `%nonassoc and eof'.
4509
4510 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
4511 which were not properly copied! Replace
4512 memcpy (res->errs, src->errs, src->nerrs);
4513 with
4514 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
4515 !!!
4516 * tests/regression.at (%nonassoc and eof): Adjust to newest
4517 Autotest: `.' is not in the PATH.
4518
4519 2002-01-27 Akim Demaille <akim@epita.fr>
4520
4521 * tests/sets.at (AT_EXTRACT_SETS): New.
4522 (Nullable): Use it.
4523 (Firsts): New.
4524
4525 2002-01-26 Akim Demaille <akim@epita.fr>
4526
4527 * tests/actions.at, tests/calc.at, tests/headers.at,
4528 * tests/torture.at: Adjust to the newest Autotest which no longer
4529 forces `.' in the PATH.
4530
4531 2002-01-25 Akim Demaille <akim@epita.fr>
4532
4533 * tests/regression.at (%nonassoc and eof): New.
4534 Suggested by Robert Anisko.
4535
4536 2002-01-24 Akim Demaille <akim@epita.fr>
4537
4538 Bison dumps core when trying to complain about broken input files.
4539 Reported by Cris van Pelt.
4540
4541 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
4542 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
4543 into...
4544 (Invalid inputs): Strengthen: exercise parse_percent_token.
4545
4546 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
4547
4548 * src/Makefile.am: Add bison.c++.
4549 * src/bison.c++: New skeleton.
4550
4551 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
4552
4553 * po/it.po: New.
4554
4555 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
4556
4557 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
4558
4559 2002-01-20 Marc Autret <marc@gnu.org>
4560
4561 * src/files.c (compute_output_file_names): Fix
4562
4563 2002-01-20 Marc Autret <marc@gnu.org>
4564
4565 * tests/output.at: New test.
4566 * src/files.c (compute_base_names): Don't map extensions when
4567 the YACC flag is set, use defaults.
4568 Reported by Evgeny Stambulchik.
4569
4570 2002-01-20 Marc Autret <marc@gnu.org>
4571
4572 * src/system.h: Need to define __attribute__ away for non-GCC
4573 compilers as well (i.e. the vendor C compiler).
4574 Suggested by Albert Chin-A-Young.
4575
4576 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
4577
4578 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
4579 canonical definition.
4580 * src/system.h: Use the canonical definition for PARAMS (avoids
4581 a conflict with the macro from lib/hash.h).
4582
4583 2002-01-11 Akim Demaille <akim@epita.fr>
4584
4585 * configure.in: Use AC_FUNC_STRNLEN.
4586 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
4587
4588 2002-01-09 Akim Demaille <akim@epita.fr>
4589
4590 * src/files.c, src/files.h (output_infix): New.
4591 (tab_extension): Remove.
4592 (compute_base_names): Compute the former, drop the latter.
4593 * src/output.c (prepare): Insert the muscles `output-infix', and
4594 `output-suffix'.
4595 * src/parse-skel.y (string, string.1): New.
4596 (section.header): Use it.
4597 (section.yacc): Remove.
4598 (prefix): Remove too.
4599 * src/scan-skel.l: Adjust.
4600 * src/bison.simple, src/bison.hairy: Adjust.
4601
4602 2002-01-09 Akim Demaille <akim@epita.fr>
4603
4604 * configure.in (WERROR_CFLAGS): Compute it.
4605 * src/Makefile.am (CFLAGS): Pass it.
4606 * tests/atlocal.in (CFLAGS): Idem.
4607 * src/files.c: Fix a few warnings.
4608 (get_extension_index): Remove, unused.
4609
4610 2002-01-08 Akim Demaille <akim@epita.fr>
4611
4612 * src/getargs.c (AS_FILE_NAME): New.
4613 (getargs): Use it to convert DOSish file names.
4614 * src/files.c (base_name): Rename as full_base_name to avoid
4615 clashes with `base_name ()'.
4616 (filename_split): New.
4617 (compute_base_names): N-th rewrite, using filename_split.
4618
4619 2002-01-08 Akim Demaille <akim@epita.fr>
4620
4621 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
4622 New, stolen from the Fileutils 4.1.
4623 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
4624 * configure.in: Check for the presence of memrchr, and of its
4625 prototype.
4626
4627 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
4628
4629 * lib/hash.h (__P): Added definition for this macro.
4630 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
4631 BUILT_SOURCES, to ensure they are generated first.
4632 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
4633 %error-verbose to allow bootstrapping with bison 1.30x.
4634
4635 2002-01-06 Akim Demaille <akim@epita.fr>
4636
4637 * src/reader.c (parse_braces): Don't fetch the next char, the
4638 convention is to fetch on entry.
4639 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
4640 'switch' without a following semicolon.
4641 * tests/regression.at (braces parsing): New.
4642
4643 2002-01-06 Akim Demaille <akim@epita.fr>
4644
4645 Bison is dead wrong in its RR conflict reports.
4646
4647 * tests/torture.at (GNU Cim Grammar): New.
4648 * src/conflicts.c (count_rr_conflicts): Fix.
4649
4650 2002-01-06 Akim Demaille <akim@epita.fr>
4651
4652 Creating package.m4 from configure.ac causes too many problems.
4653
4654 * tests/Makefile.am (package.m4): Create it by hand,
4655 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
4656
4657 2002-01-06 Akim Demaille <akim@epita.fr>
4658
4659 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
4660 skeleton.h.
4661
4662 2002-01-04 Paul Eggert <eggert@twinsun.com>
4663
4664 * doc/bison.texinfo (Debugging):
4665 Remove YYSTDERR; it's no longer defined or used.
4666 Also, s/cstdio.h/cstdio/.
4667
4668 2002-01-03 Akim Demaille <akim@epita.fr>
4669
4670 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
4671
4672 2002-01-03 Akim Demaille <akim@epita.fr>
4673
4674 * src/parse-skel.y (process_skeleton): Don't bind the parser's
4675 tracing code to --trace, wait for a better --trace option, with
4676 args.
4677
4678 2002-01-03 Akim Demaille <akim@epita.fr>
4679
4680 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
4681 The ISO C++ standard is extremely clear about it: stderr is
4682 considered a macro, not a regular symbol (see table 94 `Header
4683 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
4684 Therefore std:: does not apply to it. It still does with fprintf.
4685 Also, s/cstdio.h/cstdio/.
4686
4687 2002-01-03 Akim Demaille <akim@epita.fr>
4688
4689 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
4690 for non system headers.
4691
4692 2002-01-02 Akim Demaille <akim@epita.fr>
4693
4694 Equip the skeleton chain with location tracking, runtime trace,
4695 pure parser and scanner.
4696
4697 * src/parse-skel.y: Request a pure parser, locations, and prefix
4698 renaming.
4699 (%union): Having several members with the same type does not help
4700 type mismatches, simplify.
4701 (YYPRINT, yyprint): New.
4702 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
4703 (skel_error): this.
4704 Handle locations.
4705 * src/scan-skel.l: Adjust to these changes.
4706 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
4707 (LOCATION_PRINT, skel_control_t): New.
4708
4709 2001-12-30 Akim Demaille <akim@epita.fr>
4710
4711 * src/parse-skel.y: Get rid of the shift/reduce conflict:
4712 replace `gb' with BLANKS.
4713 * src/scan-skel.l: Adjust.
4714
4715 2001-12-30 Akim Demaille <akim@epita.fr>
4716
4717 * src/system.h: We don't need nor want bcopy.
4718 Throw away MS-DOS crap: we don't need getpid.
4719 * configure.in: We don't need strndup. It was even causing
4720 problems: because Flex includes the headers *before* us,
4721 _GNU_SOURCE is not defined by config.h, and therefore strndup was
4722 not visible.
4723 * lib/xstrndup.c: New.
4724 * src/scan-skel.l: Use it.
4725 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
4726 * src/parse-skel.y: Use %directives instead of #defines.
4727
4728 2001-12-30 Akim Demaille <akim@epita.fr>
4729
4730 * src/skeleton.h: New.
4731 * src/output.c (output_parser, output_master_parser): Remove, dead
4732 code.
4733 * src/output.h (get_lines_number, actions_output, guards_output)
4734 (token_definitions_output): Prototype them.
4735 * src/parse-skel.y: Add the license notice.
4736 Include output.h and skeleton.h.
4737 (process_skeleton): Returns void, and takes a single parameter.
4738 * src/scan-skel.l: Add the license notice.
4739 Include skeleton.h.
4740 Don't use %option yylineno: it seems that then Flex imagines
4741 REJECT has been used, and therefore it won't reallocate its
4742 buffers (which makes no other sense to me than a bug). It results
4743 in warnings for `unused: yy_flex_realloc'.
4744
4745 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
4746
4747 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
4748 (MUSCLE_INSERT_PREFIX): ...to there.
4749 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
4750 (MUSCLE_INSERT_PREFIX): Move from here...
4751
4752 * src/bison.hairy: Add a section directive. Put braces around muscle
4753 names. This parser skeleton is still broken, but Bison should not
4754 choke on a bad muscle 'syntax'.
4755 * src/bison.simple: Add a section directive. Put braces around muscle
4756 names.
4757
4758 * src/files.h (strsuffix, stringappend): Add declarations.
4759 (tab_extension): Add declaration.
4760 (short_base_name): Add declaration.
4761
4762 * src/files.c (strsuffix, stringappend): No longer static. These
4763 functions are used in the skeleton parser.
4764 (tab_extension): New.
4765 (compute_base_names): Use the computations done in this function
4766 to guess if the generated parsers should have '.tab' in their
4767 names.
4768 (short_base_name): No longer static.
4769
4770 * src/output.c (output_skeleton): New.
4771 (output): Disable call to output_master_parser, and give a try to
4772 a new skeleton handling system.
4773 (guards_output, actions_output): No longer static.
4774 (token_definitions_output, get_lines_number): No longer static.
4775
4776 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
4777
4778 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
4779 parse-skel.y.
4780
4781 * src/parse-skel.y: New file.
4782 * src/scan-skel.l: New file.
4783
4784 2001-12-29 Akim Demaille <akim@epita.fr>
4785
4786 %name-prefix is broken.
4787
4788 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
4789 Adjust all dependencies.
4790 * tests/headers.at (export YYLTYPE): Strengthen this test: use
4791 %name-prefix.
4792
4793 Renaming yylval but not yylloc is not consistent. Now we do.
4794
4795 * src/bison.simple: Prefix yylloc if used.
4796 * doc/bison.texinfo (Decl Summary): Document that.
4797
4798 2001-12-29 Akim Demaille <akim@epita.fr>
4799
4800 * doc/bison.texinfo: Promote `%long-directive' over
4801 `%long_directive'.
4802 Remove all references to fixed-output-files, yacc is enough.
4803
4804 2001-12-29 Akim Demaille <akim@epita.fr>
4805
4806 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
4807 user prologue. These are defaults.
4808 * tests/actions.at (Mid-rule actions): Make sure the user can
4809 define YYDEBUG and YYERROR_VERBOSE.
4810
4811 2001-12-29 Akim Demaille <akim@epita.fr>
4812
4813 * src/output.c (header_output): Don't forget to export YYLTYPE and
4814 yylloc.
4815 * tests/headers.at (export YYLTYPE): New, make sure it does.
4816 * tests/regression.at (%union and --defines, Invalid CPP headers):
4817 Move to...
4818 * tests/headers.at: here.
4819
4820 2001-12-29 Akim Demaille <akim@epita.fr>
4821
4822 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
4823
4824 2001-12-29 Akim Demaille <akim@epita.fr>
4825
4826 * tests/actions.at (Mid-rule actions): Output on a single line
4827 instead of several.
4828
4829 2001-12-29 Akim Demaille <akim@epita.fr>
4830
4831 * doc/bison.texinfo: Formatting changes.
4832
4833 2001-12-29 Akim Demaille <akim@epita.fr>
4834
4835 Don't store the token defs in a muscle, just be ready to output it
4836 on command. Now possible via `symbols'. Fixes a memory leak.
4837
4838 * src/output.c (token_definitions_output): New.
4839 (output_parser, header_output): Use it.
4840 * src/reader.c (symbols_save): Remove.
4841
4842 2001-12-29 Akim Demaille <akim@epita.fr>
4843
4844 * src/bison.simple: Do not provide a default for YYSTYPE and
4845 YYLTYPE before the user's prologue. Otherwise it's hardly... a
4846 default.
4847
4848 2001-12-29 Akim Demaille <akim@epita.fr>
4849
4850 Mid-rule actions are simply... ignored!
4851
4852 * src/reader.c (readgram): Be sure to attach mid-rule actions to
4853 the empty-rule associated to the dummy symbol, not to the host
4854 rule.
4855 * tests/actions.at (Mid-rule actions): New.
4856
4857 2001-12-29 Akim Demaille <akim@epita.fr>
4858
4859 Memory leak.
4860
4861 * src/reader.c (reader): Free grammar.
4862
4863 2001-12-29 Akim Demaille <akim@epita.fr>
4864
4865 Memory leak.
4866
4867 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
4868 since it allocates it for each state, although only one is needed.
4869 (allocate_storage): Do it here.
4870
4871 2001-12-29 Akim Demaille <akim@epita.fr>
4872
4873 * src/options.h, src/options.c (create_long_option_table): Rename
4874 as...
4875 (long_option_table_new): this, with a clearer prototype.
4876 (percent_table): Remove, unused,
4877 * src/getargs.c (getargs): Adjust.
4878
4879 2001-12-29 Akim Demaille <akim@epita.fr>
4880
4881 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
4882 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
4883 as states.
4884
4885 2001-12-29 Akim Demaille <akim@epita.fr>
4886
4887 * src/lalr.c (build_relations): Rename `states' as `states1'.
4888 Sorry, I don't understand exactly what it is, no better name...
4889
4890 2001-12-29 Akim Demaille <akim@epita.fr>
4891
4892 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
4893 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
4894 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
4895 as rules.
4896
4897 2001-12-29 Akim Demaille <akim@epita.fr>
4898
4899 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
4900 ago.
4901
4902 2001-12-29 Akim Demaille <akim@epita.fr>
4903
4904 * src/reader.c, src/reader.h (user_toknums): Remove.
4905 Adjust all users to use symbols[i]->user_token_number.
4906
4907 2001-12-29 Akim Demaille <akim@epita.fr>
4908
4909 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
4910 Adjust all users to use symbols[i]->prec or ->assoc.
4911
4912 2001-12-29 Akim Demaille <akim@epita.fr>
4913
4914 * src/reader.c, src/reader.h (tags): Remove.
4915 Adjust all users to use symbols[i]->tag.
4916
4917 2001-12-29 Akim Demaille <akim@epita.fr>
4918
4919 * src/gram.h, src/gram.c (symbols): New, similar to state_table
4920 and rule_table.
4921 * src/reader.c (packsymbols): Fill this table.
4922 Drop sprec.
4923 * src/conflicts.c (resolve_sr_conflict): Adjust.
4924 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
4925 single table.
4926 Use symbols[i]->tag instead of tags[i].
4927
4928 2001-12-29 Akim Demaille <akim@epita.fr>
4929
4930 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
4931 In addition, put a comment in there, to replace...
4932 * tests/regression.at (%union and C comments): Remove.
4933
4934 2001-12-29 Akim Demaille <akim@epita.fr>
4935
4936 * tests/regression.at (Web2c Actions): Blindly move the actual
4937 output as expected output. The contents *seem* right to me, but I
4938 can't pretend reading perfectly parser tables... Nonetheless, all
4939 the other tests pass correctly, the table look OK, even though the
4940 presence of `$axiom' is to be noted: AFAICS it is useless (but
4941 harmless).
4942
4943 2001-12-29 Akim Demaille <akim@epita.fr>
4944
4945 * src/reader.c (readgram): Don't add the rule 0 if there were no
4946 rules read. In other words, add it _after_ having performed
4947 grammar sanity checks.
4948 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
4949
4950 2001-12-29 Akim Demaille <akim@epita.fr>
4951
4952 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
4953 visible, and some states have now a different number.
4954
4955 2001-12-29 Akim Demaille <akim@epita.fr>
4956
4957 * src/reader.c (readgram): Bind the initial rule's lineno to that
4958 of the first rule.
4959 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
4960 (Solved SR Conflicts): Adjust rule 0's line number.
4961
4962 2001-12-29 Akim Demaille <akim@epita.fr>
4963
4964 Fix the `GAWK Grammar' failure.
4965
4966 * src/LR0.c (final_state): Initialize to -1 so that we do compute
4967 the reductions of the first state which was mistakenly confused
4968 with the final state because precisely final_state was initialized
4969 to 0.
4970 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
4971 now noticed by Bison.
4972 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
4973 have a reduction on $default.
4974
4975 2001-12-29 Akim Demaille <akim@epita.fr>
4976
4977 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
4978 rule line numbers.
4979 * src/closure.c (print_closure): Likewise.
4980 * src/derives.c (print_derives): Likewise.
4981 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
4982 now.
4983
4984 2001-12-29 Akim Demaille <akim@epita.fr>
4985
4986 * src/lalr.c (lookaheads_print): New.
4987 (lalr): Call it when --trace-flag.
4988 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
4989 are dumped.
4990
4991 2001-12-29 Akim Demaille <akim@epita.fr>
4992
4993 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
4994 when walking through ritem, even via rule->rhs.
4995 * src/reduce.c (dump_grammar, useful_production, reduce_output)
4996 (useful_production, useless_nonterminals): Likewise.
4997 (reduce_grammar_tables): Likewise, plus update nritems.
4998 * src/nullable.c (set_nullable): Likewise.
4999 * src/lalr.c (build_relations): Likewise.
5000 * tests/sets.at (Nullable): Adjust.
5001 Fortunately, now, the $axiom is no longer nullable.
5002
5003 2001-12-29 Akim Demaille <akim@epita.fr>
5004
5005 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
5006 the 0-sentinel.
5007 * src/gram.c (ritem_longest_rhs): Likewise.
5008 * src/reduce.c (nonterminals_reduce): Likewise.
5009 * src/print_graph.c (print_graph): Likewise.
5010 * src/output.c (output_rule_data): Likewise.
5011 * src/nullable.c (set_nullable): Likewise.
5012
5013 2001-12-29 Akim Demaille <akim@epita.fr>
5014
5015 * src/output.c: Comment changes.
5016
5017 2001-12-27 Paul Eggert <eggert@twinsun.com>
5018
5019 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
5020 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
5021 Sparc, as they were causing more porting problems than the
5022 (minor) performance improvement was worth.
5023
5024 Also, catch up with 1.31's YYSTD.
5025
5026 2001-12-27 Akim Demaille <akim@epita.fr>
5027
5028 * src/output.c (output_gram): Rely on nritems, not the
5029 0-sentinel. See below.
5030 Use -1 as separator, not 0.
5031 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
5032 Rely on -1 as separator in yyrhs, instead of 0.
5033 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
5034 twice `Now at end of input', therefore there are two lines less to
5035 expect.
5036
5037 2001-12-27 Akim Demaille <akim@epita.fr>
5038
5039 * tests/regression.at (Unresolved SR Conflicts):
5040 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
5041 below.
5042
5043 2001-12-27 Akim Demaille <akim@epita.fr>
5044
5045 * src/LR0.c (new_state): Recognize the final state by the fact it
5046 is reached by eoftoken.
5047 (insert_start_shifting_state, insert_eof_shifting_state)
5048 (insert_accepting_state, augment_automaton): Remove, since now
5049 these states are automatically computed from the initial state.
5050 (generate_states): Adjust.
5051 * src/print.c: When reporting a rule number to the user, substract
5052 1, so that the axiom rule is rule 0, and the first user rule is 1.
5053 * src/reduce.c: Likewise.
5054 * src/print_graph.c (print_core): For the time being, just as for
5055 the report, depend upon --trace-flags to dump the full set of
5056 items.
5057 * src/reader.c (readgram): Once the grammar read, insert the rule
5058 0: `$axiom: START-SYMBOL $'.
5059 * tests/set.at: Adjust: rule 0 is now displayed, and since the
5060 number of the states has changed (the final state is no longer
5061 necessarily the last), catch up.
5062
5063 2001-12-27 Akim Demaille <akim@epita.fr>
5064
5065 Try to make the use of the eoftoken valid. Given that its value
5066 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
5067 is used instead of > 0 where appropriate, (ii), depend upon nritems
5068 instead of the 0-sentinel.
5069
5070 * src/gram.h, src/gram.c (nritems): New.
5071 Expected to be duplication of nitems, but for the time being...
5072 * src/reader.c (packgram): Assert nritems and nitems are equal.
5073 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
5074 * src/closure.c (print_closure, print_fderives): Likewise.
5075 * src/gram.c (ritem_print): Likewise.
5076 * src/print.c (print_core, print_grammar): Likewise.
5077 * src/print_graph.c: Likewise.
5078
5079 2001-12-27 Akim Demaille <akim@epita.fr>
5080
5081 * src/main.c (main): If there are complains after grammar
5082 reductions, then output the report anyway if requested, then die.
5083 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
5084 * src/reader.c (eoftoken): New.
5085 (parse_token_decl): If the token being defined has value `0', it
5086 is the eoftoken.
5087 (packsymbols): No longer hack `tags' to insert `$' by hand.
5088 Be sure to preserve the value of the eoftoken.
5089 (reader): Make sure eoftoken is defined.
5090 Initialize nsyms to 0: now eoftoken is created just like the others.
5091 * src/print.c (print_grammar): Don't special case the eof token.
5092 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
5093 lie anyway, albeit pleasant.
5094 * tests/calc.at: Exercise error messages with eoftoken.
5095 Change the grammar so that empty input is invalid.
5096 Adjust expectations.
5097 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
5098
5099 2001-12-27 Akim Demaille <akim@epita.fr>
5100
5101 * configure.in: Check the protos of strchr ans strspn.
5102 Replace strchr if needed.
5103 * src/system.h: Provide the protos of strchr, strspn and memchr if
5104 missing.
5105 * lib/strchr.c: New.
5106 * src/reader.c (symbols_save): Use strchr.
5107
5108 2001-12-27 Akim Demaille <akim@epita.fr>
5109
5110 * src/print.c, src/print_graph.c (escape): New.
5111 Use it to quote the TAGS outputs.
5112 * src/print_graph.c (print_state): Now errors are in red, and
5113 reductions in green.
5114 Prefer high to wide: output the state number on a line of its own.
5115
5116 2001-12-27 Akim Demaille <akim@epita.fr>
5117
5118 * src/state.h, src/state.c (reductions_new): New.
5119 * src/LR0.c (set_state_table): Let all the states have a
5120 `reductions', even if reduced to 0.
5121 (save_reductions): Adjust.
5122 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
5123 * src/print.c (print_reductions, print_actions): Adjust.
5124 * src/output.c (action_row): Adjust.
5125
5126 2001-12-27 Akim Demaille <akim@epita.fr>
5127
5128 * src/state.h, src/state.c (errs_new, errs_dup): New.
5129 * src/LR0.c (set_state_table): Let all the states have an errs,
5130 even if reduced to 0.
5131 * src/print.c (print_errs, print_reductions): Adjust.
5132 * src/output.c (output_actions, action_row): Adjust.
5133 * src/conflicts.c (resolve_sr_conflict): Adjust.
5134
5135 2001-12-27 Akim Demaille <akim@epita.fr>
5136
5137 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
5138
5139 2001-12-27 Akim Demaille <akim@epita.fr>
5140
5141 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
5142 * src/print.c: here.
5143 (lookaheadset, shiftset): New, used as additional storage by
5144 print_reductions.
5145 (print_results): Adjust.
5146 (print_shifts, print_gotos, print_errs): New, extracted from...
5147 (print_actions): here.
5148 * src/print_graph.c (print_actions): Remove dead code.
5149
5150 2001-12-27 Akim Demaille <akim@epita.fr>
5151
5152 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
5153 `$n' and `@n'.
5154
5155 2001-12-27 Akim Demaille <akim@epita.fr>
5156
5157 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
5158 (build_relations): Adjust.
5159
5160 2001-12-27 Akim Demaille <akim@epita.fr>
5161
5162 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
5163 duplication.
5164
5165 2001-12-27 Akim Demaille <akim@epita.fr>
5166
5167 * src/reader.c (packgram): Catch nitems overflows.
5168
5169 2001-12-27 Akim Demaille <akim@epita.fr>
5170
5171 * src/files.c, src/files.h (guard_obstack): Remove.
5172 * src/output.c (output): Adjust.
5173 * src/reader.c (parse_braces): New, factoring...
5174 (copy_action, copy_guard): these two which are renamed as...
5175 (parse_action, parse_guard): these.
5176 As a voluntary consequence, using braces around guards is now
5177 mandatory.
5178
5179 2001-12-27 Akim Demaille <akim@epita.fr>
5180
5181 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
5182 * src/reader.c (symbol_list): `guard' and `guard_line' are new
5183 members.
5184 (symbol_list_new): Adjust.
5185 (copy_action): action_line is the first line, not the last.
5186 (copy_guard): Just as for actions, store the `action' only, not
5187 the switch/case/break flesh.
5188 Don't parse the user action that might follow the guard, let...
5189 (readgram): do it, i.e., now, there can be an action after a
5190 guard.
5191 In other words the guard is just explicitly optional.
5192 (packgram): Adjust.
5193 * src/output.c (guards_output): New.
5194 (output_parser): Call it when needed.
5195 (output): Also free the guard and attrs obstacks.
5196 * src/files.c, src/files.h (obstack_save): Remove.
5197 (output_files): Remove.
5198 As a result, if one needs the former `.act' file, using an
5199 appropriate skeleton which requires actions and guards is now
5200 required.
5201 * src/main.c (main): Adjust.
5202 * tests/semantic.at: New.
5203 * tests/regression.at: Use `input.y' as input file name.
5204 Avoid 8+3 problems by requiring input.c when the test needs the
5205 parser.
5206
5207 2001-12-27 Akim Demaille <akim@epita.fr>
5208
5209 * src/reader.c (symbol_list_new): Be sure to initialize all the
5210 fields.
5211
5212 2001-12-27 Akim Demaille <akim@epita.fr>
5213
5214 All the hacks using a final pseudo state are now useless.
5215
5216 * src/LR0.c (set_state_table): state_table holds exactly nstates.
5217 * src/lalr.c (nLA): New.
5218 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
5219 instead of lookaheadsp from the pseudo state (nstate + 1).
5220
5221 2001-12-27 Akim Demaille <akim@epita.fr>
5222
5223 * src/output.c (action_row, token_actions): Use a state_t instead
5224 of a integer, and nlookaheads instead of the following state's
5225 lookaheadsp.
5226
5227 2001-12-27 Akim Demaille <akim@epita.fr>
5228
5229 * src/conflicts.c (log_resolution, flush_shift)
5230 (resolve_sr_conflict, set_conflicts, solve_conflicts)
5231 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
5232 (conflicts_print, print_reductions): Use a state_t instead of an
5233 integer when referring to a state.
5234 As much as possible, depend upon nlookaheads, instead of the
5235 `lookaheadsp' member of the following state (since lookaheads of
5236 successive states are successive, the difference between state n + 1
5237 and n served as the number of lookaheads for state n).
5238 * src/lalr.c (add_lookback_edge): Likewise.
5239 * src/print.c (print_core, print_actions, print_state)
5240 (print_results): Likewise.
5241 * src/print_graph.c (print_core, print_actions, print_state)
5242 (print_graph): Likewise.
5243 * src/conflicts.h: Adjust.
5244
5245 2001-12-27 Akim Demaille <akim@epita.fr>
5246
5247 * src/bison.hairy: Formatting/comment changes.
5248 ANSIfy.
5249 Remove `register' indications.
5250 Add plenty of `static'.
5251
5252 2001-12-27 Akim Demaille <akim@epita.fr>
5253
5254 * src/output.c (prepare): Drop the muscle `ntbase' which
5255 duplicates ntokens.
5256 * src/bison.simple: Formatting/comment changes.
5257 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
5258 is an undocumented synonym.
5259
5260 2001-12-22 Akim Demaille <akim@epita.fr>
5261
5262 * src/output.c (output_table_data): Change the prototype to use
5263 `int' for array ranges: some invocations do pass an int, not a
5264 short.
5265 Reported by Wayne Green.
5266
5267 2001-12-22 Akim Demaille <akim@epita.fr>
5268
5269 Some actions of web2c.y are improperly triggered.
5270 Reported by Mike Castle.
5271
5272 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
5273 * tests/regression.at (Web2c): Rename as...
5274 (Web2c Report): this.
5275 (Web2c Actions): New.
5276
5277 2001-12-22 Akim Demaille <akim@epita.fr>
5278
5279 Reductions in web2c.y are improperly reported.
5280 Reported by Mike Castle.
5281
5282 * src/conflicts.c (print_reductions): Fix.
5283 * tests/regression.at (Web2c): New.
5284
5285 2001-12-18 Akim Demaille <akim@epita.fr>
5286
5287 Some host fail on `assert (!"foo")', which expands to
5288 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
5289 Reported by Nelson Beebee.
5290
5291 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
5292 `#define it_succeeded 0' and `assert (it_succeeded)'.
5293
5294 2001-12-17 Marc Autret <autret_m@epita.fr>
5295
5296 * src/bison.simple: Don't hard code the skeleton line and filename.
5297 * src/output.c (output_parser): Rename 'line' as 'output_line'.
5298 New line counter 'skeleton_line' (skeleton-line muscle).
5299
5300 2001-12-17 Paul Eggert <eggert@twinsun.com>
5301
5302 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
5303 YYDEBUG must be defined to a nonzero value.
5304
5305 * src/bison.simple (yytname): Do not assume that the user defines
5306 YYDEBUG to a properly parenthesized expression.
5307
5308 2001-12-17 Akim Demaille <akim@epita.fr>
5309
5310 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
5311 nlookaheads is a new member.
5312 Adjust all users.
5313 * src/lalr.h (nlookaheads): Remove this orphan declaration.
5314 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
5315 state.
5316
5317 2001-12-17 Akim Demaille <akim@epita.fr>
5318
5319 * src/files.h, src/files.c (open_files, close_files): Remove.
5320 * src/main.c (main): Don't open/close files, nor invoke lex_free,
5321 let...
5322 * src/reader.c (reader): Do it.
5323
5324 2001-12-17 Akim Demaille <akim@epita.fr>
5325
5326 * src/conflicts.c (print_reductions): Formatting changes.
5327
5328 2001-12-17 Akim Demaille <akim@epita.fr>
5329
5330 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
5331 (flush_reduce): New.
5332 (resolve_sr_conflict): Adjust.
5333
5334 2001-12-17 Akim Demaille <akim@epita.fr>
5335
5336 * src/output.c (output_obstack): Be static and rename as...
5337 (format_obstack): this, to avoid any confusion with files.c's
5338 output_obstack.
5339 * src/reader.h (muscle_obstack): Move to...
5340 * src/output.h: here, since it's defined in output.c.
5341
5342 2001-12-17 Akim Demaille <akim@epita.fr>
5343
5344 * src/output.c (action_row, save_column, default_goto)
5345 (sort_actions, matching_state, pack_vector): Better variable
5346 locality.
5347
5348 2001-12-17 Akim Demaille <akim@epita.fr>
5349
5350 * src/output.c: Various formatting changes.
5351
5352 2001-12-17 Akim Demaille <akim@epita.fr>
5353
5354 * src/files.c (output_files): Free the output_obstack.
5355 * src/main.c (main): Call print and print_graph conditionally.
5356 * src/print.c (print): Work unconditionally.
5357 * src/print_graph.c (print_graph): Work unconditionally.
5358 * src/conflicts.c (log_resolution): Output only if verbose_flag.
5359
5360 2001-12-16 Marc Autret <autret_m@epita.fr>
5361
5362 * src/output.c (actions_output): Fix. When we use %no-lines,
5363 there is one less line per action.
5364
5365 2001-12-16 Marc Autret <autret_m@epita.fr>
5366
5367 * src/bison.simple: Remove a useless #line directive.
5368 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
5369 * src/output.c (get_lines_number): New.
5370 (output_parser): Adjust, now takes care about the lines of a
5371 output muscles.
5372 Fix line numbering.
5373 (actions_output): Computes the number of lines taken by actions.
5374 (output_master_parser): Insert new skeleton which is the name of
5375 the output parser file name.
5376
5377 2001-12-15 Marc Autret <autret_m@epita.fr>
5378
5379 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
5380
5381 2001-12-15 Marc Autret <autret_m@epita.fr>
5382
5383 * src/output.c (output_gram): Keep track of the hairy one.
5384
5385 2001-12-15 Akim Demaille <akim@epita.fr>
5386
5387 Make `make distcheck' work.
5388
5389 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
5390 system.h which uses libgettext.h.
5391
5392 2001-12-15 Akim Demaille <akim@epita.fr>
5393
5394 * src/nullable.c (set_nullable): Useless rules must be skipped,
5395 otherwise, since we range over their symbols, we might look at a
5396 nonterminal which no longer ``exists'', i.e., it is not counted in
5397 `nvars', hence we overflow our arrays.
5398
5399 2001-12-15 Akim Demaille <akim@epita.fr>
5400
5401 The header can also be produced directly, without any obstack!
5402 Yahoo!
5403
5404 * src/files.c, src/files.h (defines_obstack): Remove.
5405 (compute_header_macro): Global.
5406 (defines_obstack_save): Remove.
5407 * src/reader.c (parse_union_decl): No longer output to
5408 defines_obstack: its content can be found in the `stype' muscle
5409 anyway.
5410 (output_token_translations): Merge into...
5411 (symbols_output): this.
5412 Rename as...
5413 (symbols_save): this.
5414 (reader): Adjust.
5415 * src/output.c (header_output): New.
5416 (output): Call it.
5417
5418 2001-12-15 Akim Demaille <akim@epita.fr>
5419
5420 * src/reader.c (parse_union_decl): Instead of handling two obstack
5421 simultaneously, use one to define the `stype' muscle, and use the
5422 value of the latter to fill defines_obstack.
5423 (copy_comment): Remove.
5424 (copy_comment2): Work for a single obstack.
5425 Rename as...
5426 (copy_comment): this.
5427
5428 2001-12-15 Akim Demaille <akim@epita.fr>
5429
5430 * src/lex.c, src/lex.h (xgetc): No longer static.
5431 * src/reader.c (parse_union_decl): Revamp.
5432
5433 2001-12-15 Akim Demaille <akim@epita.fr>
5434
5435 Still making progress in separating Bison into (i) input, (ii)
5436 process, (iii) output: now we can directly output the parser file
5437 without using table_obstack at all.
5438
5439 * src/files.c, src/files.h (table_obstack): Bye bye.
5440 (parser_file_name): New.
5441 * src/files.c (compute_output_file_names): Compute it.
5442 * src/output.c (actions_output, output_parser)
5443 (output_master_parser): To a file instead of an obstack.
5444
5445 2001-12-15 Akim Demaille <akim@epita.fr>
5446
5447 Attach actions to rules, instead of pre-outputting them to
5448 actions_obstack.
5449
5450 * src/gram.h (rule_t): action and action_line are new members.
5451 * src/reader.c (symbol_list): Likewise.
5452 (copy_action): Save the actions within the rule.
5453 (packgram): Save them in rule_table.
5454 * src/output.c (actions_output): New.
5455 (output_parser): Use it on `%%actions'.
5456 (output_rule_data): Don't free rule_table.
5457 (output): Do it.
5458 (prepare): Don't save the `action' muscle.
5459 * src/bison.simple: s/%%action/%%actions/.
5460
5461 2001-12-15 Akim Demaille <akim@epita.fr>
5462
5463 * src/reader.c (copy_action): When --yacc, don't append a `;'
5464 to the user action: let it fail if lacking.
5465 Suggested by Arnold Robbins and Tom Tromey.
5466
5467 2001-12-14 Akim Demaille <akim@epita.fr>
5468
5469 * src/lex.c (literalchar): Simply return the char you decoded, non
5470 longer mess around with obstacks and int pointers.
5471 Adjust all callers.
5472
5473 2001-12-14 Akim Demaille <akim@epita.fr>
5474
5475 * src/lex.c (literalchar): Don't escape the special characters,
5476 just decode them, and keep them as char (before, eol was output as
5477 the 2 char string `\n' etc.).
5478 * src/output.c (output_rule_data): Use quotearg to output the
5479 token strings.
5480
5481 2001-12-13 Paul Eggert <eggert@twinsun.com>
5482
5483 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
5484 Do not infringe on the global user namespace when using C++.
5485 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
5486 All uses of `fprintf' and `stderr' changed.
5487
5488 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
5489
5490 2001-12-13 Akim Demaille <akim@epita.fr>
5491
5492 The computation of nullable is broken: it doesn't handle empty
5493 RHS's properly.
5494
5495 * tests/torture.at (GNU AWK Grammar): New.
5496 * tests/sets.at (Nullable): New.
5497 * src/nullable.c (set_nullable): Instead of blindly looping over
5498 `ritems', loop over the rules, and then over their rhs's.
5499
5500 Work around Autotest bugs.
5501
5502 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
5503 frame, because Autotest understand lines starting with a `+' as
5504 traces from the shell. Then, they are not processed properly.
5505 Admittedly an Autotest bug, but we don't have time to wait for
5506 Autotest to catch up.
5507 * tests/regression.at (Broken Closure): Adjust to the new table
5508 frames.
5509 Move to...
5510 * tests/sets.at: here.
5511
5512 2001-12-13 Akim Demaille <akim@epita.fr>
5513
5514 * src/closure.c (closure): Use nrules instead of playing tricks
5515 with BITS_PER_WORD.
5516
5517 2001-12-13 Akim Demaille <akim@epita.fr>
5518
5519 * src/print.c (print_actions): Output the handling of `$' as the
5520 traces do: shifting the token EOF. Before EOF was treated as a
5521 nonterminal.
5522 * tests/regression.at: Adjust some tests.
5523 * src/print_graph.c (print_core): Complete the set of items via
5524 closure. The next-to-final and final states are still unsatisfying,
5525 but that's to be addressed elsewhere.
5526 No longer output the rule numbers, but do output the state number.
5527 A single loop for the shifts + gotos is enough, but picked a
5528 distinct color for each.
5529 (print_graph): Initialize and finalize closure.
5530
5531 2001-12-13 Akim Demaille <akim@epita.fr>
5532
5533 * src/reader.c (readgram): Remove dead code, an strip useless
5534 braces.
5535 (get_type): Remove, unused.
5536
5537 2001-12-12 Akim Demaille <akim@epita.fr>
5538
5539 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
5540 on that of lib/error.c.
5541
5542 2001-12-12 Akim Demaille <akim@epita.fr>
5543
5544 Some hosts don't like `/' in includes.
5545
5546 * src/system.h: Include libgettext.h without qualifying the path.
5547 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
5548 $(top_srcdir).
5549
5550 2001-12-11 Marc Autret <autret_m@epita.fr>
5551
5552 * src/output.c (output_parser): Remove useless muscle.
5553
5554 2001-12-11 Marc Autret <autret_m@epita.fr>
5555
5556 * src/bison.simple: Remove #line just before %%epilogue. It
5557 is now handled in ...
5558 * src/reader.c (read_additionnal_code): Add the output of a
5559 #line for the epilogue.
5560
5561 2001-12-10 Marc Autret <autret_m@epita.fr>
5562
5563 * src/reader.c (copy_definition): Re-use CPP-outed code which
5564 replace precedent remove.
5565 * src/bison.simple: Remove #line before %%prologue because
5566 %%input-line is wrong at this time.
5567
5568 2001-12-10 Marc Autret <autret_m@epita.fr>
5569
5570 * src/reader.c (symbols_output): Clean up.
5571 * src/output.c (output_gram, output): Clean up.
5572
5573 2001-12-10 Akim Demaille <akim@epita.fr>
5574
5575 * src/lalr.c (initialize_lookaheads): New. Extracted from...
5576 * src/LR0.c (set_state_table): here.
5577 * src/lalr.c (lalr): Call it.
5578
5579 2001-12-10 Akim Demaille <akim@epita.fr>
5580
5581 * src/state.h (shifts): Remove the `number' member: shifts are
5582 attached to state, hence no longer need to be labelled with a
5583 state number.
5584
5585 2001-12-10 Akim Demaille <akim@epita.fr>
5586
5587 Now that states have a complete set of members, the linked list of
5588 shifts is useless: just fill directly the state's shifts member.
5589
5590 * src/state.h (shifts): Remove the `next' member.
5591 * src/LR0.c (first_state, last_state): Remove.
5592 Adjust the callers.
5593 (augment_automaton): Don't look for the shifts that must be added
5594 a shift on EOF: it is those of the state we looked for! But now,
5595 since shifts are attached, it is no longer needed to looking
5596 merely by its id: its number.
5597
5598 2001-12-10 Akim Demaille <akim@epita.fr>
5599
5600 * src/LR0.c (augment_automaton): Better variable locality.
5601 Remove an impossible branch: if there is a state corresponding to
5602 the start symbol being shifted, then there is shift for the start
5603 symbol from the initial state.
5604
5605 2001-12-10 Akim Demaille <akim@epita.fr>
5606
5607 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
5608 only when appropriate: when insert_start_shifting_state' is not
5609 invoked.
5610 * tests/regression.at (Rule Line Numbers): Adjust.
5611
5612 2001-12-10 Akim Demaille <akim@epita.fr>
5613
5614 * src/LR0.c (augment_automaton): Now that all states have shifts,
5615 merge the two cases addition shifts to the initial state.
5616
5617 2001-12-10 Akim Demaille <akim@epita.fr>
5618
5619 * src/lalr.c (set_state_table): Move to...
5620 * src/LR0.c: here.
5621 * src/lalr.c (lalr): Don't call it...
5622 * src/LR0.c (generate_states): do it.
5623 * src/LR0.h (first_state): Remove, only the table is used.
5624
5625 2001-12-10 Akim Demaille <akim@epita.fr>
5626
5627 * src/LR0.h (first_shift, first_reduction): Remove.
5628 * src/lalr.c: Don't use first_shift: find shifts through the
5629 states.
5630
5631 2001-12-10 Akim Demaille <akim@epita.fr>
5632
5633 * src/LR0.c: Attach shifts to states as soon as they are
5634 computed.
5635 * src/lalr.c (set_state_table): Instead of assigning shifts to
5636 state, just assert that the mapping was properly done.
5637
5638 2001-12-10 Akim Demaille <akim@epita.fr>
5639
5640 * src/LR0.c (insert_start_shift): Rename as...
5641 (insert_start_shifting_state): this.
5642 (insert_eof_shifting_state, insert_accepting_state): New.
5643 (augment_automaton): Adjust.
5644 Better locality of the variables.
5645 When looking if the start_symbol is shifted from the initial
5646 state, using `while (... symbol != start_symbol ...)' sounds
5647 better than `while (... symbol < start_symbol ...)': If fail
5648 to see how the order between symbols could be relevant!
5649
5650 2001-12-10 Akim Demaille <akim@epita.fr>
5651
5652 * src/getargs.h: Don't declare `spec_name_prefix' and
5653 `spec_file_prefix', declared by src/files.h.
5654 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
5655 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
5656 * src/output.c (prepare): Adjust.
5657 * src/reader.c (symbols_output): Likewise.
5658 * src/vmsgetargs.c: Vaguely adjust, but who cares?
5659
5660 2001-12-10 Akim Demaille <akim@epita.fr>
5661
5662 * src/muscle_tab.c (muscle_init): NULL is a better default than
5663 `"0"'.
5664
5665 2001-12-10 Akim Demaille <akim@epita.fr>
5666
5667 * src/reader.c (reader): Calling symbols_output once is enough.
5668
5669 2001-12-10 Akim Demaille <akim@epita.fr>
5670
5671 Now that states have a complete set of members, the linked list of
5672 reductions is useless: just fill directly the state's reductions
5673 member.
5674
5675 * src/state.h (struct reductions): Remove member `number' and
5676 `next'.
5677 * src/LR0.c (first_reduction, last_reduction): Remove.
5678 (save_reductions): Don't link the new reductions, store them in
5679 this_state.
5680 * src/lalr.c (set_state_table): No need to attach reductions to
5681 states, it's already done.
5682 * src/output.c (output_actions): No longer free the shifts, then
5683 the reductions, then the states: free all the states and their
5684 members.
5685
5686 2001-12-10 Akim Demaille <akim@epita.fr>
5687
5688 * src/options.c (OPTN, DRTV, BOTH): New.
5689 (option_table): Use them.
5690
5691 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
5692 the job of system.h.
5693 * src/options.c: Don't include stdio.h and xalloc.h for the same
5694 reasons.
5695
5696 2001-12-10 Akim Demaille <akim@epita.fr>
5697
5698 * src/output.c (output, prepare): Make sure the values of the
5699 muscles `action' and `prologue' are 0-terminated.
5700
5701 2001-12-10 Akim Demaille <akim@epita.fr>
5702
5703 Clean up GCC warnings.
5704
5705 * src/reader.c (copy_action): `buf' is not used.
5706 (parse_skel_decl): Be static.
5707 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
5708 * src/options.h (create_long_option_table): Have a real prototype.
5709 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
5710 (hash_delete_at): Return const void *.
5711 Adjust casts to preserve the const.
5712
5713 2001-12-10 Akim Demaille <akim@epita.fr>
5714
5715 * configure.in: Require 2.52g.
5716 M4 is not needed, but AUTOM4TE is.
5717 * m4/m4.m4: Remove.
5718 * tests/Makefile.am: Adjust.
5719
5720 2001-12-10 Akim Demaille <akim@epita.fr>
5721
5722 One structure for states is enough, even though theoretically
5723 there are LR(0) states and LALR(1) states.
5724
5725 * src/lalr.h (state_t): Remove.
5726 (state_table): Be state_t **, not state_t *.
5727 * src/state.h (core, CORE_ALLOC): Rename as...
5728 (state_t, STATE_ALLOC): this.
5729 Add the LALR(1) members: shifts, reductions, errs.
5730 * src/LR0.c (state_table): Rename as...
5731 (state_hash): this, to avoid name clashes with the global
5732 `state_table'.
5733 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
5734 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
5735
5736 2001-12-10 Akim Demaille <akim@epita.fr>
5737
5738 Bison dumps core on bash.y.
5739 Reported by Pascal Bart.
5740
5741 * src/warshall.c (bitmatrix_print): New.
5742 (TC): Use it.
5743 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
5744 j must be the outer loop.
5745 * tests/regression.at (Broken Closure): New.
5746
5747 2001-12-05 Akim Demaille <akim@epita.fr>
5748
5749 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
5750 its argument.
5751 Reported by Peter Hámorský.
5752
5753 2001-12-05 Akim Demaille <akim@epita.fr>
5754
5755 * src/conflicts.c (err_table): Remove.
5756 (resolve_sr_conflict): Adjust.
5757 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
5758 Rename as...
5759 (state_t.reductions, state_t.shifts): this.
5760
5761 2001-12-05 Akim Demaille <akim@epita.fr>
5762
5763 * src/reduce.c (reduce_grammar_tables): No longer disable the
5764 removal of useless rules via CPP but via `if (0)', so that the
5765 compiler still check the code is valid.
5766 For instance, it should have noticed `rline' no longer exists: use
5767 the `line' member of rule_t.
5768 * src/gram.c (dummy, rline): Remove, unused.
5769
5770 2001-12-05 Akim Demaille <akim@epita.fr>
5771
5772 * src/output.c (pack_vector): Use assert, not berror.
5773 * src/main.c (berror): Remove, unused.
5774
5775 2001-12-05 Akim Demaille <akim@epita.fr>
5776
5777 New experimental feature: if --verbose --trace output all the
5778 items of a state, not only its kernel.
5779
5780 * src/print.c (print_core): If `trace_flag', then invoke closure
5781 before outputting the items of the state (print_core is no longer
5782 a correct name them).
5783 (print_results): Invoke new_closure/free_closure if needed.
5784
5785 2001-12-05 Akim Demaille <akim@epita.fr>
5786
5787 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
5788 * src/closure.c, src/closure.h (itemsetsize): Rename as...
5789 (nitemset): for consistency with the rest of the project.
5790
5791 2001-12-05 Akim Demaille <akim@epita.fr>
5792
5793 * src/closure.c (print_closure): Improve.
5794 (closure): Use it for printing input and output.
5795
5796 2001-12-05 Akim Demaille <akim@epita.fr>
5797
5798 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
5799 indexed by nonterminals.
5800
5801 2001-12-05 Akim Demaille <akim@epita.fr>
5802
5803 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
5804 what it was!).
5805 * src/warshall.h: Remove accidental duplication of the content.
5806
5807 2001-12-05 Akim Demaille <akim@epita.fr>
5808
5809 * src/closure.c (set_fderives): De-obfuscate.
5810
5811 2001-12-05 Akim Demaille <akim@epita.fr>
5812
5813 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
5814
5815 2001-12-05 Akim Demaille <akim@epita.fr>
5816
5817 * src/closure.c (set_firsts): De-obfuscate.
5818
5819 2001-12-05 Akim Demaille <akim@epita.fr>
5820
5821 * src/output.c (action_row): De-obfuscate
5822 using the good o' techniques: arrays not pointers, variable
5823 locality, BITISSET, RESETBIT etc.
5824
5825 2001-12-05 Akim Demaille <akim@epita.fr>
5826
5827 Pessimize the code to simplify it: from now on, all the states
5828 have a valid SHIFTS, which NSHIFTS is possibly 0.
5829
5830 * src/LR0.c (shifts_new): Be global and move to..
5831 * src/state.c, src/state.h: here.
5832 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
5833 * src/print_graph: Adjust.
5834
5835 2001-12-05 Akim Demaille <akim@epita.fr>
5836
5837 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
5838 * src/conflicts.c: Use it.
5839 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
5840 incorrectly ``simplified''.
5841
5842 2001-12-05 Akim Demaille <akim@epita.fr>
5843
5844 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
5845 using the good o' techniques: arrays not pointers, variable
5846 locality, BITISSET, RESETBIT etc.
5847
5848 2001-12-05 Akim Demaille <akim@epita.fr>
5849
5850 * src/state.h (SHIFT_SYMBOL): New.
5851 * src/conflicts.c: Use it to deobfuscate.
5852
5853 2001-12-05 Akim Demaille <akim@epita.fr>
5854
5855 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
5856 (print_reductions): De-obfuscate using the good o' techniques:
5857 arrays not pointers, variable locality, BITISSET.
5858
5859 2001-12-05 Akim Demaille <akim@epita.fr>
5860
5861 * src/conflicts.c (print_reductions): Arrays, not pointers.
5862 Use BITISSET.
5863
5864 2001-12-05 Akim Demaille <akim@epita.fr>
5865
5866 * src/conflicts.c (print_reductions): Pessimize, but clarify.
5867
5868 2001-12-05 Akim Demaille <akim@epita.fr>
5869
5870 * src/conflicts.c (print_reductions): Improve variable locality.
5871
5872 2001-12-05 Akim Demaille <akim@epita.fr>
5873
5874 * src/conflicts.c (print_reductions): Pessimize, but clarify.
5875
5876 2001-12-05 Akim Demaille <akim@epita.fr>
5877
5878 * src/conflicts.c (print_reductions): Improve variable locality.
5879
5880 2001-12-05 Akim Demaille <akim@epita.fr>
5881
5882 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
5883 * src/lalr.c: Use them.
5884
5885 2001-12-05 Akim Demaille <akim@epita.fr>
5886
5887 * src/LR0.c (augment_automaton): Formatting changes.
5888 Better variable locality.
5889
5890 2001-12-05 Akim Demaille <akim@epita.fr>
5891
5892 * src/lalr.c (matrix_print): New.
5893 (transpose): Use it.
5894 Use arrays instead of pointers.
5895
5896 2001-12-05 Akim Demaille <akim@epita.fr>
5897
5898 * src/lalr.c (maxrhs): Move to...
5899 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
5900 * src/lalr.c (build_relations): Adjust.
5901
5902 2001-12-05 Akim Demaille <akim@epita.fr>
5903
5904 * src/lalr.c (transpose): Free the memory allocated to the
5905 argument, as it is replaced by the results by the unique caller.
5906 (build_relations): Merely invoke transpose: it handles the memory
5907 deallocation.
5908 Improve variable locality.
5909 Avoid variables used as mere abbreviations.
5910 (compute_lookaheads): Use arrays instead of pointers.
5911
5912 2001-12-05 Akim Demaille <akim@epita.fr>
5913
5914 * src/lalr.c (initialize_F): Improve variable locality.
5915 Avoid variables used as mere abbreviations.
5916
5917 2001-12-05 Akim Demaille <akim@epita.fr>
5918
5919 * src/derives.c (print_derives): Display the ruleno.
5920 * src/lalr.c (initialize_F, transpose): Better variable locality
5921 to improve readability.
5922 Avoid variables used as mere abbreviations.
5923
5924 2001-12-05 Akim Demaille <akim@epita.fr>
5925
5926 * src/lalr.c (traverse): Use arrays instead of pointers.
5927
5928 2001-12-05 Akim Demaille <akim@epita.fr>
5929
5930 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
5931 the handling of squeue.
5932 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
5933
5934 2001-12-05 Akim Demaille <akim@epita.fr>
5935
5936 Because useless nonterminals are now kept alive (instead of being
5937 `destroyed'), we now sometimes examine them, and store information
5938 related to them. Hence we need to know their number, and adjust
5939 memory allocations.
5940
5941 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
5942 static.
5943 * src/LR0.c (allocate_itemsets): The memory allocated to
5944 `symbol_count' was used for two different purpose: once to count
5945 the number of occurrences of each symbol, and later reassigned to
5946 `shift_symbol', containing the symbol that can be shifted from a
5947 given state.
5948 Deobfuscate, i.e., allocate, use and free `symbol_count' here
5949 only, and...
5950 (new_itemsets): Allocate `shift_symbol' here.
5951 (allocate_itemsets): symbol_count includes useless nonterminals.
5952 Make room for them.
5953 (free_storage): Use `free', not `XFREE', for pointers that cannot
5954 be null.
5955
5956 2001-12-05 Akim Demaille <akim@epita.fr>
5957
5958 * src/nullable.c (set_nullable): Deobfuscate the handling of
5959 ritem.
5960 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
5961
5962 2001-12-05 Akim Demaille <akim@epita.fr>
5963
5964 * src/gram.c, src/gram.h (ritem_print): New.
5965 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
5966 (This useless function was defined only to work around VMS linkers
5967 that can't handle compilation units with variables only).
5968 * src/reduce.c (dump_grammar): Use it to trace the construction of
5969 ritem.
5970
5971 2001-12-04 Paul Eggert <eggert@twinsun.com>
5972
5973 * src/bison.simple (union yyalloc): Change member names
5974 to be the same as the stack names.
5975 (yyparse): yyptr is now union yyalloc *, not char *.
5976 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
5977 and may generate better code on some machines.
5978 (yystpcpy): Use prototype if __STDC__ is defined, not just
5979 if __cplusplus is defined.
5980
5981 2001-11-30 Akim Demaille <akim@epita.fr>
5982
5983 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
5984 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
5985 Gettext doesn't compile cleanly, and dies with -Werror.
5986 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
5987 Include WARNING_CFLAGS here.
5988 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
5989 before being defined.
5990
5991 2001-11-27 Paul Eggert <eggert@twinsun.com>
5992
5993 * lib/quotearg.h (quotearg_n, quotearg_n_style):
5994 First arg is int, not unsigned.
5995 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
5996 (SIZE_MAX, UINT_MAX): New macros.
5997 (quotearg_n_options): Abort if N is negative.
5998 Avoid overflow check on hosts where size_t is 64 bits and int
5999 is 32 bits, as overflow is impossible there.
6000 Fix off-by-one typo that caused unnecessary reallocation.
6001
6002 2001-11-29 Paul Eggert <eggert@twinsun.com>
6003
6004 Name space cleanup in generated parser.
6005
6006 * doc/bison.texinfo (Bison Parser): Discuss system headers
6007 and their effect on the user name space.
6008
6009 * src/bison.simple:
6010 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
6011 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
6012 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
6013
6014 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
6015 on user names when possible.
6016
6017 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
6018 Simplify test for whather <alloca.h> exists.
6019
6020 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
6021
6022 (<stdio.h>): Include if YYDEBUG.
6023
6024 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
6025 ! defined (yyoverflow) && ! defined (yymemcpy).
6026
6027 (yymemcpy, yyparse): Rename local variables as needed so that
6028 they all begin with 'yy'.
6029
6030 (yystrlen, yystpcpy): New functions.
6031
6032 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
6033 All uses changed.
6034
6035 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
6036 instead of relying on string.h functions. Use YYSTACK_ALLOC
6037 and YYSTACK_FREE instead of malloc and free.
6038
6039 2001-11-30 Akim Demaille <akim@epita.fr>
6040
6041 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
6042 before their first uses.
6043 (YYBISON, YYPURE): Move to the top of the output.
6044
6045 2001-11-30 Akim Demaille <akim@epita.fr>
6046
6047 * tests/reduce.at (Useless Nonterminals): Fix.
6048
6049 2001-11-30 Akim Demaille <akim@epita.fr>
6050
6051 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
6052 if body instead of `;' to pacify GCC's warnings.
6053
6054 2001-11-30 Akim Demaille <akim@epita.fr>
6055
6056 Instead of mapping the LHS of unused rules to -1, keep the LHS
6057 valid, but flag the rules as invalid.
6058
6059 * src/gram.h (rule_t): `useful' is a new member.
6060 * src/print.c (print_grammar): Adjust.
6061 * src/derives.c (set_derives): Likewise.
6062 * src/reader.c (packgram, reduce_output): Likewise.
6063 * src/reduce.c (reduce_grammar_tables): Likewise.
6064 * tests/reduce.at (Underivable Rules, Useless Rules): New.
6065
6066 2001-11-30 Akim Demaille <akim@epita.fr>
6067
6068 * src/reduce.c (reduce_output): Formatting changes.
6069 * src/print.c (print_results, print_grammar): Likewise.
6070 * tests/regression.at (Rule Line Numbers)
6071 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
6072
6073 2001-11-30 Akim Demaille <akim@epita.fr>
6074
6075 * src/reduce.c (nonterminals_reduce): Instead of throwing away
6076 useless nonterminals, move them at the end of the symbol arrays.
6077 (reduce_output): Adjust.
6078 * tests/reduce.at (Useless Nonterminals): Adjust.
6079
6080 2001-11-30 Akim Demaille <akim@epita.fr>
6081
6082 * src/reduce.c: Various comment/formatting changes.
6083 (nonterminals_reduce): New, extracted from...
6084 (reduce_grammar_tables): here.
6085 (reduce_grammar): Call nonterminals_reduce.
6086
6087 2001-11-29 Paul Eggert <eggert@twinsun.com>
6088
6089 * src/bison.simple (YYSTACK_REALLOC): Remove.
6090 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
6091 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
6092 New macros.
6093 (union yyalloc): New type.
6094 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
6095 an arbitrary restriction on hosts where size_t is wider than int.
6096
6097 (yyparse): Don't dump core if alloca or malloc fails; instead, report
6098 a parser stack overflow. Allocate just one block of memory for all
6099 three stacks, instead of allocating three blocks; this typically is
6100 faster and reduces fragmentation.
6101
6102 Do not limit the number of items in the stack to a value that fits
6103 in 'int', as this is an arbitrary limit on hosts with 64-bit
6104 size_t and 32-bit int.
6105
6106 2001-11-29 Marc Autret <autret_m@epita.fr>
6107
6108 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
6109 of defining YYERROR_VERBOSE.
6110 [AT_DATA]: $4 is now out of C declarations in the prologue.
6111
6112 2001-11-28 Marc Autret <autret_m@epita.fr>
6113
6114 * src/reader.c (parse_dquoted_param): New.
6115 (parse_skel_decl): Use it.
6116 * src/lex.h: Add its prototype.
6117 * src/lex.c (literalchar): Become not static.
6118
6119 2001-11-28 Marc Autret <autret_m@epita.fr>
6120
6121 * src/output.h: And put its extern declaration here.
6122 * src/output.c (error_verbose): Define here.
6123 (prepare): Echo name modification.
6124 * src/getargs.h: Clean its extern declaration.
6125 * src/getargs.c (error_verbose_flag): Remove.
6126 (getargs): Remove case 'e'.
6127 * src/options.c (option_table): 'error-verbose' is now seen as simple
6128 percent option.
6129 Include output.h.
6130
6131 * src/reader.c (read_declarations): Remove case tok_include.
6132 (parse_include_decl): Remove.
6133 * src/lex.h (token_t): Remove tok_include.
6134 * src/options.c (option_table): 'include' is now a simple command line
6135 option.
6136
6137 2001-11-28 Marc Autret <autret_m@epita.fr>
6138
6139 * src/bison.simple: Adjust muscle names.
6140 * src/muscle_tab.c (muscle_init): Also rename the muscles.
6141 * src/output.c (prepare): s/_/-/ for the muscles names.
6142 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
6143
6144 2001-11-28 Marc Autret <autret_m@epita.fr>
6145
6146 * src/bison.simple: Fix debug.
6147 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
6148
6149 2001-11-28 Akim Demaille <akim@epita.fr>
6150
6151 * src/LR0.c (shifts_new): New.
6152 (save_shifts, insert_start_shift, augment_automaton): Use it.
6153
6154 2001-11-28 Akim Demaille <akim@epita.fr>
6155
6156 * src/closure.c (closure): `b' and `ruleno' denote the same value:
6157 keep ruleno only.
6158
6159 2001-11-28 Akim Demaille <akim@epita.fr>
6160
6161 * src/closure.c (closure): Instead of looping over word in array
6162 then bits in words, loop over bits in array.
6163
6164 2001-11-28 Akim Demaille <akim@epita.fr>
6165
6166 * src/closure.c (closure): No longer optimize the special case
6167 where all the bits of `ruleset[r]' are set to 0, to make the code
6168 clearer.
6169
6170 2001-11-28 Akim Demaille <akim@epita.fr>
6171
6172 * src/closure.c (closure): `r' and `c' are new variables, used to
6173 de-obfuscate accesses to RULESET and CORE.
6174
6175 2001-11-28 Akim Demaille <akim@epita.fr>
6176
6177 * src/reduce.c (reduce_print): Use ngettext.
6178 (dump_grammar): Improve the trace accuracy.
6179
6180 2001-11-28 Akim Demaille <akim@epita.fr>
6181
6182 * src/reduce.c (dump_grammar): Don't translate trace messages.
6183
6184 2001-11-28 Akim Demaille <akim@epita.fr>
6185
6186 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
6187 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
6188 as all tags are free'ed afterwards.
6189 From Enrico Scholz.
6190
6191 2001-11-27 Paul Eggert <eggert@twinsun.com>
6192
6193 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
6194 use alloca when we didn't want to, and vice versa.
6195
6196 2001-11-27 Marc Autret <autret_m@epita.fr>
6197
6198 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
6199 initialization.
6200 * src/output.c (prepare): Remove its update.
6201
6202 2001-11-27 Marc Autret <autret_m@epita.fr>
6203
6204 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
6205 Use %error-verbose.
6206
6207 2001-11-27 Marc Autret <autret_m@epita.fr>
6208
6209 * src/bison.simple: Remove YYERROR_VERBOSE using.
6210 Use %%error_verbose.
6211 (yyparse): Likewise.
6212 * src/output.c (prepare): Give its final value.
6213 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
6214 * src/getargs.h: Add its extern declaration.
6215 * src/getargs.c (error_verbose_flag): New int.
6216 (getargs): Update to catch new case.
6217 * src/options.c (option_table): 'error-verbose' is a new option.
6218 (shortopts): Update.
6219
6220 2001-11-27 Akim Demaille <akim@epita.fr>
6221
6222 * src/system.h: Use intl/libgettext.h.
6223 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
6224
6225 2001-11-27 Akim Demaille <akim@epita.fr>
6226
6227 * tests/torture.at (Exploding the Stack Size with Malloc):
6228 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
6229
6230 2001-11-27 Akim Demaille <akim@epita.fr>
6231
6232 * src/files.c: Include error.h.
6233 Reported by Hans Aberg.
6234
6235 2001-11-26 Marc Autret <autret_m@epita.fr>
6236
6237 * src/reader.c (parse_include_decl): New, not yet implemented.
6238 (read_declarations): Add case tok_include.
6239 * src/getargs.h (include): Add its extern definition.
6240 * src/getargs.c (include): New const char *.
6241 (getargs): Add case '-I'.
6242 * src/options.c (option_table): Add include as command line and
6243 percent option.
6244 * src/lex.h (token_t): Add tok_include.
6245
6246 2001-11-26 Akim Demaille <akim@epita.fr>
6247
6248 * src/reader.c (readgram): Make sure rules for mid-rule actions
6249 have a lineno equal to that of their host rule.
6250 Reported by Hans Aberg.
6251 * tests/regression.at (Rule Line Numbers): New.
6252
6253 2001-11-26 Akim Demaille <akim@epita.fr>
6254
6255 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
6256 size_ts.
6257
6258 2001-11-26 Akim Demaille <akim@epita.fr>
6259
6260 * src/complain.c, src/complain.h (error): Remove, provided by
6261 lib/error.[ch].
6262
6263 2001-11-26 Akim Demaille <akim@epita.fr>
6264
6265 * src/reader.c (read_declarations): Don't abort on tok_illegal,
6266 issue an error message.
6267 * tests/regression.at (Invalid %directive): New.
6268 Reported by Hans Aberg.
6269
6270 2001-11-26 Akim Demaille <akim@epita.fr>
6271
6272 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
6273 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
6274
6275 2001-11-26 Akim Demaille <akim@epita.fr>
6276
6277 * src/conflicts.c (conflicts_print): Don't complain at all when
6278 there are no reduce/reduce conflicts, and as many shift/reduce
6279 conflicts as expected.
6280 * tests/regression.at (%expect right): Adjust.
6281
6282 2001-11-23 Akim Demaille <akim@epita.fr>
6283
6284 * lib/alloca.c: Update, from fileutils.
6285
6286 2001-11-23 Akim Demaille <akim@epita.fr>
6287
6288 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
6289
6290 2001-11-23 Akim Demaille <akim@epita.fr>
6291
6292 * src/system.h: Include alloca.h.
6293 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
6294
6295 2001-11-23 Akim Demaille <akim@epita.fr>
6296
6297 * src/print_graph.c (print_actions): Remove `rule', unused.
6298 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
6299 pacify GCC's signed < unsigned warnings.
6300 * src/closure.c (itemsetsize): Likewise.
6301 * src/reader.c (symbol_list_new): Static.
6302
6303 2001-11-23 Akim Demaille <akim@epita.fr>
6304
6305 Attaching lineno to buckets is stupid, since only one copy of each
6306 symbol is kept, only the line of the first occurrence is kept too.
6307
6308 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
6309 * src/reader.c (rline_allocated): Remove, unused.
6310 (symbol_list): Have a `line' member.
6311 (symbol_list_new): New.
6312 (readgram): Use it.
6313 * src/print.c (print_grammar): Output the rule line numbers.
6314 * tests/regression.at (Solved SR Conflicts)
6315 (Unresolved SR Conflicts): Adjust.
6316 Reported by Hans Aberg.
6317
6318 2001-11-22 Marc Autret <autret_m@epita.fr>
6319
6320 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
6321
6322 2001-11-22 Marc Autret <autret_m@epita.fr>
6323
6324 * src/muscle_tab.c (muscle_init): Remove initialization of
6325 skeleton muscle.
6326 * src/output.c (output_master_parser): Do it here.
6327
6328 2001-11-20 Akim Demaille <akim@epita.fr>
6329
6330 * po/sv.po: New.
6331 * configure.in (ALL_LINGUAS): Adjust.
6332 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
6333 longer contains strings to translate.
6334
6335 2001-11-19 Akim Demaille <akim@epita.fr>
6336
6337 * src/conflicts.c (conflicts_print): Add a missing \n.
6338
6339 2001-11-19 Akim Demaille <akim@epita.fr>
6340
6341 * src/nullable.c (nullable_print): New.
6342 (set_nullable): Call it when tracing.
6343 Better locality of variables.
6344
6345 2001-11-19 Akim Demaille <akim@epita.fr>
6346
6347 * src/print.c (print_actions): Better locality of variables.
6348
6349 2001-11-19 Akim Demaille <akim@epita.fr>
6350
6351 * src/derives.c (print_derives): Fix and enrich.
6352 * src/closure.c (print_fderives): Likewise.
6353
6354 2001-11-19 Akim Demaille <akim@epita.fr>
6355
6356 * src/closure.c (itemsetend): Remove, replaced with...
6357 (itemsetsize): new.
6358
6359 2001-11-19 Akim Demaille <akim@epita.fr>
6360
6361 * src/LR0.c (kernel_end): Remove, replaced with...
6362 (kernel_size): new.
6363
6364 2001-11-19 Akim Demaille <akim@epita.fr>
6365
6366 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
6367 to clarify.
6368
6369 2001-11-19 Akim Demaille <akim@epita.fr>
6370
6371 * src/closure.c (closure): Use arrays instead of pointers to clarify.
6372
6373 2001-11-19 Akim Demaille <akim@epita.fr>
6374
6375 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
6376 trace messages.
6377 * src/LR0.c: Likewise.
6378 (allocate_itemsets): Use arrays instead of pointers to clarify.
6379
6380 2001-11-19 Akim Demaille <akim@epita.fr>
6381
6382 * src/getargs.c (statistics_flag): Replace with...
6383 (trace_flag): New.
6384 (longopts): Accept --trace instead of --statistics.
6385 * src/getargs.h, src/options.c: Adjust.
6386 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
6387 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
6388
6389 2001-11-19 Akim Demaille <akim@epita.fr>
6390
6391 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
6392 pointers to clarify the code.
6393 (save_reductions, save_shifts): Factor common parts of alternatives.
6394
6395 2001-11-19 Akim Demaille <akim@epita.fr>
6396
6397 * src/LR0.c (new_state, get_state): Complete TRACE code.
6398 * src/closure.c: Include `reader.h' to get `tags', needed by the
6399 trace code.
6400 Rename the conditional DEBUG as TRACE.
6401 Output consistently TRACEs to stderr, not stdout.
6402 * src/derives.c: Likewise.
6403 * src/reduce.c: (inaccessable_symbols): Using if is better style
6404 than goto.
6405 Use `#if TRACE' instead of `#if 0' for tracing code.
6406
6407 2001-11-19 Akim Demaille <akim@epita.fr>
6408
6409 * src/system.h (LIST_FREE, shortcpy): New.
6410 * src/LR0.c: Use them.
6411 * src/output.c (free_itemsets, free_reductions, free_shifts):
6412 Remove, replaced by LIST_FREE.
6413
6414 2001-11-19 Akim Demaille <akim@epita.fr>
6415
6416 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
6417 (REDUCTIONS_ALLOC): New.
6418 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
6419 allocation.
6420
6421 2001-11-19 Akim Demaille <akim@epita.fr>
6422
6423 * src/LR0.c (new_state): Complete trace code.
6424 * src/nullable.c (set_nullable): Don't translate traces.
6425
6426 2001-11-19 Akim Demaille <akim@epita.fr>
6427
6428 * src/print_graph.c (print_core): Better locality of variables.
6429 * src/print.c (print_core): Likewise.
6430
6431 2001-11-19 Akim Demaille <akim@epita.fr>
6432
6433 * src/vcg.c: You do the output, so you are responsible of the
6434 handling of VCG syntax, in particular: use quotearg.
6435 * src/print_graph.c: Don't.
6436 (print_actions): Don't output the actions as part of the nodes,
6437 since that's the job of the edges.
6438 (print_state): Don't output by hand: fill the node description,
6439 and ask for its output.
6440
6441 2001-11-19 Akim Demaille <akim@epita.fr>
6442
6443 * src/bison.simple (yyparse): When verbosely reporting an error,
6444 no longer put additional quotes around token names.
6445 * tests/calc.at: Adjust.
6446
6447 2001-11-19 Akim Demaille <akim@epita.fr>
6448
6449 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
6450 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
6451 * src/output.c: Adjust.
6452
6453 2001-11-19 Akim Demaille <akim@epita.fr>
6454
6455 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
6456 (rule_t): this.
6457 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
6458
6459 2001-11-19 Akim Demaille <akim@epita.fr>
6460
6461 * src/gram.h (rule_t): New.
6462 (rule_table): New.
6463 (rrhs, rlhs): Remove, part of state_t.
6464 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
6465 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
6466 * src/reader.c, src/reduce.c: Adjust.
6467
6468 2001-11-19 Akim Demaille <akim@epita.fr>
6469
6470 * src/reader.c (symbols_output): New, extracted from...
6471 (packsymbols): Here.
6472 (reader): Call it.
6473
6474 2001-11-19 Akim Demaille <akim@epita.fr>
6475
6476 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
6477 (maxrhs): this new function.
6478
6479 2001-11-19 Akim Demaille <akim@epita.fr>
6480
6481 * src/lalr.c (F): New macro to access the variable F.
6482 Adjust.
6483
6484 2001-11-19 Akim Demaille <akim@epita.fr>
6485
6486 * src/lalr.h (LA): New macro to access the variable LA.
6487 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
6488 * src/lalr.c: Adjust.
6489
6490 2001-11-19 Akim Demaille <akim@epita.fr>
6491
6492 * src/lalr.c (initialize_LA): Only initialize LA. Let...
6493 (set_state_table): handle the `lookaheads' members.
6494
6495 2001-11-19 Akim Demaille <akim@epita.fr>
6496
6497 * src/lalr.h (lookaheads): Removed array, whose contents is now
6498 a member of...
6499 (state_t): this structure.
6500 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
6501 Adjust.
6502
6503 2001-11-19 Akim Demaille <akim@epita.fr>
6504
6505 * src/lalr.h (consistent): Removed array, whose contents is now
6506 a member of...
6507 (state_t): this structure.
6508 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
6509 Adjust.
6510
6511 2001-11-19 Akim Demaille <akim@epita.fr>
6512
6513 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
6514 contents are now members of...
6515 (state_t): this structure.
6516 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
6517 Adjust.
6518
6519 2001-11-19 Akim Demaille <akim@epita.fr>
6520
6521 * src/lalr.h (state_t): New.
6522 (state_table): Be a state_t * instead of a core **.
6523 (accessing_symbol): Remove, part of state_t.
6524 * src/lalr.c: Adjust.
6525 (set_accessing_symbol): Merge into...
6526 (set_state_table): this.
6527 * src/print_graph.c, src/conflicts.c: Adjust.
6528
6529 2001-11-14 Akim Demaille <akim@epita.fr>
6530
6531 * tests/calc.at, tests/output.at, tests/regression.at,
6532 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
6533 now the tests are run in private dirs, therefore AC_CLEANUP and
6534 family can be simplified to 0-ary.
6535 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
6536 use abs. path to find config.h.
6537 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
6538 stderr, there can be way too much random noise.
6539 Instead pass -Werror to GCC and rely on the exit status.
6540 Reported by Wolfram Wagner.
6541
6542 2001-11-14 Akim Demaille <akim@epita.fr>
6543
6544 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
6545 defined only if yyoverflow is defined, to avoid `warning: unused
6546 variable `yyvs1''.
6547 Reported by The Test Suite.
6548
6549 2001-11-14 Akim Demaille <akim@epita.fr>
6550
6551 * src/print.c: Include reduce.h.
6552 Reported by Hans Aberg.
6553
6554 2001-11-14 Akim Demaille <akim@epita.fr>
6555
6556 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
6557 Revert a previous patch: these are really const.
6558 * src/conflicts.c (conflict_report): Additional useless pair of
6559 braces to pacify GCC's warnings for `if () if () {} else {}'.
6560 * src/lex.c (parse_percent_token): Replace equal_offset with
6561 arg_offset.
6562 arg is const.
6563 Be sure to strdup `arg' when used, since there is no reason for
6564 token_buffer not to change.
6565
6566 2001-11-14 Akim Demaille <akim@epita.fr>
6567
6568 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
6569 definition.
6570 * src/main.c (main): Use them.
6571 Suggested by Hans Aberg.
6572
6573 2001-11-12 Akim Demaille <akim@epita.fr>
6574
6575 * src/system.h (ngettext): Now that we use ngettext, be sure to
6576 provide a default definition when NLS are not used.
6577
6578 2001-11-12 Akim Demaille <akim@epita.fr>
6579
6580 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
6581 Use @kbd to denote user input.
6582 (Language and Grammar): ANSIfy the example.
6583 Adjust its layout for info/notinfo.
6584 (Location Tracking Calc): Output error messages to stderr.
6585 Output locations in a more GNUtically correct way.
6586 Fix a couple of Englishos.
6587 Adjust @group/@end group pairs.
6588
6589 2001-11-12 Akim Demaille <akim@epita.fr>
6590
6591 %expext was not functioning at all.
6592
6593 * src/conflicts.c (expected_conflicts): Set to -1.
6594 (conflict_report): Use ngettext.
6595 (conflicts_print): Check %expect and make its violation an error.
6596 * doc/bison.texinfo (Expect Decl): Adjust.
6597 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
6598 * tests/regression.at (%expect not enough, %expect right)
6599 (%expect too much): New.
6600
6601 2001-11-12 Akim Demaille <akim@epita.fr>
6602
6603 * tests/regression.at (Conflicts): Rename as...
6604 (Unresolved SR Conflicts): this.
6605 (Solved SR Conflicts): New.
6606
6607 2001-11-12 Akim Demaille <akim@epita.fr>
6608
6609 * src/reduce.c (print_results): Rename as...
6610 (reduce_output): This.
6611 Output to OUT, passed as argument, instead of output_obstack.
6612 (dump_grammar): Likewise.
6613 (reduce_free): New.
6614 Also free V1.
6615 (reduce_grammar): No longer call reduce_output, since...
6616 * src/print.c (print_results): do it.
6617 * src/main.c (main): Call reduce_free;
6618
6619 2001-11-12 Akim Demaille <akim@epita.fr>
6620
6621 * src/conflicts.c (print_reductions): Accept OUT as argument.
6622 Output to it, not to output_obstack.
6623 * src/print.c (print_actions): Adjust.
6624
6625 2001-11-12 Akim Demaille <akim@epita.fr>
6626
6627 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
6628 the result instead of using...
6629 (src_total, rrc_total, src_count, rrc_count): Remove.
6630 (any_conflicts): Remove.
6631 (print_conflicts): Split into...
6632 (conflicts_print, conflicts_output): New.
6633 * src/conflicts.h: Adjust.
6634 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
6635 * src/print.c (print_grammar): Issue `\n' between two rules.
6636 * tests/regression.at (Conflicts): New.
6637 Reported by Tom Lane.
6638
6639 2001-11-12 Akim Demaille <akim@epita.fr>
6640
6641 * tests/regression.at (Invalid input): Remove, duplicate with
6642 ``Invalid input: 1''.
6643
6644 2001-11-12 Akim Demaille <akim@epita.fr>
6645
6646 * tests/torture.at (AT_DATA_STACK_TORTURE)
6647 (Exploding the Stack Size with Alloca)
6648 (Exploding the Stack Size with Malloc): New.
6649
6650 2001-11-12 Akim Demaille <akim@epita.fr>
6651
6652 * src/bison.simple (YYSTACK_REALLOC): New.
6653 (yyparse) [!yyoverflow]: Use it and free the old stack.
6654 Reported by Per Allansson.
6655
6656 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
6657
6658 * src/bison.simple: Define type yystype instead of YYSTYPE, and
6659 define CPP macro, which substitute YYSTYPE by yystype.
6660 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
6661 with yyltype/YYLTYPE. This allows inclusion of the generated
6662 header within the parser if the compiler, such as GGC, accepts
6663 multiple equivalent #defines.
6664 From Akim.
6665
6666 2001-11-05 Akim Demaille <akim@epita.fr>
6667
6668 * src/reader.c (symbols_output): New, extracted from...
6669 (packsymbols): here.
6670 (reader): Adjust.
6671
6672 2001-11-05 Akim Demaille <akim@epita.fr>
6673
6674 * src/lex.c (parse_percent_token): s/quotearg/quote/.
6675
6676 2001-11-05 Akim Demaille <akim@epita.fr>
6677
6678 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
6679 pattern.
6680
6681 2001-11-05 Akim Demaille <akim@epita.fr>
6682
6683 * src/options.h (struct option_table_struct): set_flags is void*.
6684 * src/options.c (longopts): Support `--output' and `%output'.
6685 (usage): Adjust.
6686 * src/lex.h (tok_setopt): Remove, replaced with...
6687 (tok_intopt, tok_stropt): these new guys.
6688 * src/lex.c (getopt.h): Not needed.
6689 (token_buffer, unlexed_token_buffer): Not const.
6690 (percent_table): Promote `-' over `_' in directive names.
6691 Active `%name-prefix', `file-prefix', and `output'.
6692 (parse_percent_token): Accept possible arguments to directives.
6693 Promote `-' over `_' in directive names.
6694
6695 2001-11-04 Akim Demaille <akim@epita.fr>
6696
6697 * doc/bison.texinfo (Decl Summary): Split the list into
6698 `directives for grammars' and `directives for bison'.
6699 Sort'em.
6700 Add description of `%name-prefix', `file-prefix', and `output'.
6701 Promote `-' over `_' in directive names.
6702 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
6703 Simplify the description of `--name-prefix'.
6704 Promote `-' over `_' in directive names.
6705 Promote `--output' over `--output-file'.
6706 Fix the description of `--defines'.
6707 * tests/output.at: Exercise %file-prefix and %output.
6708
6709 2001-11-02 Akim Demaille <akim@epita.fr>
6710
6711 * doc/refcard.tex: Update.
6712
6713 2001-11-02 Akim Demaille <akim@epita.fr>
6714
6715 * src/symtab.h (SUNDEF): New.
6716 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
6717 stand for `uninitialized', instead of 0.
6718 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
6719 * src/lex.c (lex): Adjust.
6720
6721 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
6722 Number it 0.
6723 Let yylex return it instead of a plain 0.
6724 Reported by Dick Streefland.
6725
6726 2001-11-02 Akim Demaille <akim@epita.fr>
6727
6728 * tests/regression.at (Mixing %token styles): New test.
6729
6730 2001-11-02 Akim Demaille <akim@epita.fr>
6731
6732 * src/reader.c (parse_thong_decl): Formatting changes.
6733 (token_translations_init): New, extracted from...
6734 (packsymbols): Here.
6735 Adjust.
6736
6737 2001-11-01 Akim Demaille <akim@epita.fr>
6738
6739 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
6740 Check that `9foo.y' produces correct cpp guards.
6741 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
6742 guards.
6743 Reported by Wwp.
6744
6745 2001-11-01 Akim Demaille <akim@epita.fr>
6746
6747 * tests/regression.at (Invalid input: 2): New.
6748 * src/lex.c (unlexed_token_buffer): New.
6749 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
6750 too.
6751 Reported by Wwp.
6752
6753 2001-11-01 Akim Demaille <akim@epita.fr>
6754
6755 * tests/calc.at: Catch up with 1.30.
6756 * configure.in: Bump to 1.49a.
6757 Adjust to newer Autotest.
6758
6759 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
6760
6761 * src/conflicts.c: Move global variables rrc_total and src_total ...
6762 (print_conflicts): here.
6763 * src/output.c (output): Free global variable user_toknums.
6764 * src/lex.c (token_obstack): Become static.
6765
6766 2001-10-18 Akim Demaille <akim@epita.fr>
6767
6768 * tests/atlocal.in (GCC): Add.
6769 * tests/calc.at: s/m4_match/m4_bmatch/.
6770 s/m4_patsubst/m4_bpatsubst/.
6771 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
6772 * configure.in: AC_SUBST(GCC).
6773
6774 2001-10-14 Marc Autret <autret_m@epita.fr>
6775
6776 * src/options.c (create_long_option_table): Fix.
6777
6778 2001-10-10 Akim Demaille <akim@epita.fr>
6779
6780 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
6781
6782 2001-10-04 Akim Demaille <akim@epita.fr>
6783
6784 * src/reader.c (parse_union_decl): Push the caracters in
6785 union_obstack, not attrs_obstack.
6786
6787 2001-10-04 Akim Demaille <akim@epita.fr>
6788
6789 Merge in the branch 1.29.
6790
6791 * src/reader.c (packsymbols): Use a temporary obstack for
6792 `%%tokendef', since output_stack is already used elsewhere.
6793
6794 2001-10-02 Akim Demaille <akim@epita.fr>
6795
6796 Bump 1.29d.
6797
6798 2001-10-02 Akim Demaille <akim@epita.fr>
6799
6800 Version 1.29c.
6801
6802 2001-10-02 Akim Demaille <akim@epita.fr>
6803
6804 * tests/regression.at (Invalid CPP headers): New.
6805 From Alexander Belopolsky.
6806 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
6807
6808 2001-10-02 Akim Demaille <akim@epita.fr>
6809
6810 * tests/regression.at (Invalid input): New.
6811 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
6812 Reported by Shura.
6813
6814 2001-10-02 Akim Demaille <akim@epita.fr>
6815
6816 * tests/calc.at: Now that --debug works, the tests must be adjusted.
6817
6818 2001-10-02 Akim Demaille <akim@epita.fr>
6819
6820 * src/output.c (output_parser): Assert `skeleton'.
6821 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
6822 systems.
6823 From Shura.
6824
6825 2001-10-01 Marc Autret <autret_m@epita.fr>
6826
6827 * src/lex.h: Echo modifications.
6828 * src/lex.c (unlex): Parameter is now token_t.
6829 From Hans Aberg.
6830
6831 2001-10-01 Marc Autret <autret_m@epita.fr>
6832
6833 * src/main.c: Include lex.h.
6834 From Hans Aberg.
6835
6836 2001-09-29 Akim Demaille <akim@epita.fr>
6837
6838 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
6839
6840 2001-09-28 Akim Demaille <akim@epita.fr>
6841
6842 * tests/testsuite.at: Update to newer Autotest.
6843 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
6844
6845 2001-09-27 Akim Demaille <akim@epita.fr>
6846
6847 Position independent wrapper.
6848
6849 * tests/bison: Remove.
6850 * tests/bison.in: New.
6851 * configure.in: Adjust.
6852
6853 2001-09-27 Paul Eggert <eggert@twinsun.com>
6854
6855 Port quotearg fixes from tar 1.13.24.
6856
6857 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
6858 tm to be declared.
6859 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
6860 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
6861
6862 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
6863 * m4/mbrtowc.m4: New file.
6864 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
6865 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
6866
6867 2001-09-27 Akim Demaille <akim@epita.fr>
6868
6869 Bump to 1.29c.
6870
6871 2001-09-27 Akim Demaille <akim@epita.fr>
6872
6873 Version 1.29b.
6874
6875 2001-09-25 Akim Demaille <akim@epita.fr>
6876
6877 * src/system.h: Include `xalloc.h'.
6878 Remove it from the C files.
6879 * src/files.c (output_files): Free the obstacks.
6880 * src/lex.c (init_lex): Rename as...
6881 (lex_init): this.
6882 (lex_free): New.
6883 * src/main.c (main): Use it.
6884
6885 2001-09-24 Marc Autret <autret_m@epita.fr>
6886
6887 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
6888 to output informations in fout (FILE*).
6889 (open_graph, close_graph): Likewise.
6890 (output_graph, output_edge, output_node): Likewise.
6891 * src/vcg.h: Update function prototypes.
6892 * src/print_graph.c (print_graph): Open output graph file.
6893 (print_actions): Adjust.
6894 * src/files.h: Remove extern declaration.
6895 * src/files.c: Remove graph_obstack declaration.
6896 (open_files): Remove graph_obstack initialization.
6897 (output_files): Remove graph_obstack saving.
6898
6899 2001-09-24 Marc Autret <autret_m@epita.fr>
6900
6901 * src/files.c (compute_output_file_names): Fix.
6902
6903 2001-09-24 Marc Autret <autret_m@epita.fr>,
6904 Akim Demaille <akim@epita.fr>
6905
6906 * src/reader.c (reader): Remove call to free_symtab ().
6907 * src/main.c (main): Call it here.
6908 Include symtab.h.
6909 * src/conflicts.c (initialize_conflicts): Rename as...
6910 (solve_conflicts): this.
6911 * src/print.c (print_core, print_actions, print_state)
6912 (print_grammar): Dump to a file instead a `output_obstack'.
6913 (print_results): Dump `output_obstack', and then proceed with the
6914 FILE *.
6915 * src/files.c (compute_output_file_names, close_files): New.
6916 (output_files): Adjust.
6917 * src/main.c (main): Adjust.
6918
6919 2001-09-23 Marc Autret <autret_m@epita.fr>
6920
6921 * src/files.c (compute_header_macro): Computes header macro name
6922 from spec_defines_file when given.
6923
6924 2001-09-23 Marc Autret <autret_m@epita.fr>
6925
6926 * src/files.c (output_files): Add default extensions.
6927
6928 2001-09-22 Akim Demaille <akim@epita.fr>
6929
6930 * src/conflicts.c (finalize_conflicts): Rename as...
6931 (free_conflicts): this.
6932
6933 2001-09-22 Akim Demaille <akim@epita.fr>
6934
6935 * src/gram.c (gram_free): Rename back as...
6936 (dummy): this.
6937 (output_token_translations): Free `token_translations'.
6938 * src/symtab.c (free_symtab): Free the tag field.
6939
6940 2001-09-22 Akim Demaille <akim@epita.fr>
6941
6942 Remove `translations' as it is always set to true.
6943
6944 * src/gram.h: Adjust.
6945 * src/reader.c (packsymbols, parse_token_decl): Adjust
6946 * src/print.c (print_grammar): Adjust.
6947 * src/output.c (output_token_translations): Adjust.
6948 * src/lex.c (lex): Adjust.
6949 * src/gram.c: Be sure the set pointers to NULL.
6950 (dummy): Rename as...
6951 (gram_free): this.
6952
6953 2001-09-22 Akim Demaille <akim@epita.fr>
6954
6955 * configure.in: Invoke AM_LIB_DMALLOC.
6956 * src/system.h: Use dmalloc.
6957 * src/LR0.c: Be sure to have pointers initialized to NULL.
6958 (allocate_itemsets): Allocate kernel_items only if needed.
6959
6960 2001-09-22 Akim Demaille <akim@epita.fr>
6961
6962 * configure.in: Bump to 1.29b.
6963 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
6964 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
6965 need xmalloc.c in calc.y.
6966 From Pascal Bart.
6967
6968 2001-09-21 Akim Demaille <akim@epita.fr>
6969
6970 Version 1.29a.
6971 * Makefile.maint, config/config.guess, config/config.sub,
6972 * config/missing: Update from masters.
6973 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
6974 upon package.m4.
6975 * configure.in (ALL_LINGUAS): Add `tr'.
6976
6977 2001-09-21 Akim Demaille <akim@epita.fr>
6978
6979 * tests/Makefile.am (package.m4): Move to...
6980 ($(srcdir)/$(TESTSUITE)): here.
6981
6982 2001-09-20 Akim Demaille <akim@epita.fr>
6983
6984 * src/complain.c: No longer try to be standalone: use system.h.
6985 Don't assume __STDC__ is defined to 1. Just test if it is defined.
6986 * src/complain.h: Likewise.
6987 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
6988 Remove the unused variable `n'.
6989 From Albert Chin-A-Young.
6990
6991 2001-09-18 Marc Autret <autret_m@epita.fr>
6992
6993 * doc/bison.1: Update.
6994 * doc/bison.texinfo (Bison Options): Update --defines and --graph
6995 descriptions.
6996 (Option Cross Key): Update.
6997 Add --graph.
6998
6999 2001-09-18 Marc Autret <autret_m@epita.fr>
7000
7001 * tests/regression.at: New test (comment in %union).
7002
7003 2001-09-18 Marc Autret <autret_m@epita.fr>
7004
7005 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
7006 do that.
7007 Reported by Keith Browne.
7008
7009 2001-09-18 Marc Autret <autret_m@epita.fr>
7010
7011 * tests/output.at: Add tests for --defines and --graph.
7012
7013 2001-09-18 Marc Autret <autret_m@epita.fr>
7014
7015 * tests/output.at: Removes tests of %{header,src}_extension features.
7016
7017 2001-09-18 Akim Demaille <akim@epita.fr>
7018
7019 * tests/Makefile.am (package.m4): New.
7020 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
7021 (_AT_CHECK_CALC_ERROR): Likewise.
7022 Factor the `, ' part of verbose error messages.
7023
7024 2001-09-18 Marc Autret <autret_m@epita.fr>
7025
7026 * src/getargs.c (longopts): Declare --defines and --graph as options
7027 with optional arguments.
7028 * src/files.h: Add extern declarations.
7029 * src/files.c (spec_graph_file, spec_defines_file): New.
7030 (output_files): Update.
7031 Remove CPP-outed code.
7032
7033 2001-09-18 Marc Autret <autret_m@epita.fr>
7034
7035 Turn off %{source,header}_extension feature.
7036
7037 * src/files.c (compute_exts_from_gf): Update.
7038 (compute_exts_from_src): Update.
7039 (output_files): CPP-out useless code.
7040 * src/files.h: Remove {header,source}_extension extern declarations.
7041 * src/reader.c (parse_dquoted_param): CPP-out.
7042 (parse_header_extension_decl): Remove.
7043 (parse_source_extension_decl): Remove.
7044 (read_declarations): Remove cases tok_{hdrext,srcext}.
7045 * src/lex.c (percent_table): Remove {header,source}_extension entries.
7046 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
7047
7048 2001-09-10 Akim Demaille <akim@epita.fr>
7049
7050 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
7051 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
7052 (AT_CHECK_OUTPUT): this.
7053 Merely check ls' exit status, its output is useless.
7054
7055 2001-09-10 Akim Demaille <akim@epita.fr>
7056
7057 * tests/calc.at: Use m4_match.
7058 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
7059
7060 2001-09-10 Marc Autret <autret_m@epita.fr>,
7061 Akim Demaille <akim@epita.fr>
7062
7063 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
7064 enum color_e.
7065 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
7066 to `normal'.
7067 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
7068 * src/lex.h: Adjust prototype.
7069 (token_t): Add `tok_undef'.
7070 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
7071 (parse_percent_token): Now returns token_t.
7072 Add default statement in switch.
7073 (lex): Separate `c' as an input variable, from the token_t result
7074 part.
7075 (unlexed): Is a token_t.
7076
7077 2001-09-10 Akim Demaille <akim@epita.fr>
7078
7079 * configure.in: Bump to 1.29a.
7080
7081 2001-09-07 Akim Demaille <akim@epita.fr>
7082
7083 Version 1.29.
7084
7085 2001-08-30 Akim Demaille <akim@epita.fr>
7086
7087 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
7088 * m4/atconfig.m4: Remove.
7089 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
7090 * tests/bison: New.
7091 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
7092 m4_if, m4_patsubst, and m4_regexp.
7093 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
7094 `input' file instead of echo.
7095
7096 2001-08-29 Akim Demaille <akim@epita.fr>
7097
7098 Bump to 1.28e.
7099
7100 2001-08-29 Akim Demaille <akim@epita.fr>
7101
7102 Version 1.28d.
7103
7104 2001-08-29 Paul Eggert <eggert@twinsun.com>
7105
7106 * src/bison.simple (yyparse): Don't take the address of an
7107 item before the start of an array, as that doesn't conform to
7108 the C Standard.
7109
7110 2001-08-29 Robert Anisko <anisko_r@epita.fr>
7111
7112 * doc/bison.texinfo (Location Tracking Calc): New node.
7113
7114 2001-08-29 Paul Eggert <eggert@twinsun.com>
7115
7116 * src/output.c (output): Do not define const, as this now
7117 causes more problems than it cures.
7118
7119 2001-08-29 Akim Demaille <akim@epita.fr>
7120
7121 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
7122 the nodes.
7123 Be sure to tag the `detailmenu'.
7124
7125 2001-08-29 Akim Demaille <akim@epita.fr>
7126
7127 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
7128 download in a tmp dir.
7129
7130 2001-08-28 Marc Autret <autret_m@epita.fr>
7131
7132 * config/depcomp: New file.
7133
7134 2001-08-28 Marc Autret <autret_m@epita.fr>
7135
7136 * doc/bison.1 (mandoc): Adjust.
7137 From Juan Manuel Guerrero.
7138
7139 2001-08-28 Marc Autret <autret_m@epita.fr>
7140
7141 * src/print_graph.c (print_state): Fix.
7142
7143 2001-08-27 Marc Autret <autret_m@epita.fr>
7144
7145 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
7146 char * members.
7147 Echo modifications to the functions prototypes.
7148 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
7149
7150 2001-08-27 Marc Autret <autret_m@epita.fr>
7151
7152 * src/vcg.c: Include `xalloc.h'.
7153 (add_colorentry): New.
7154 (add_classname): New.
7155 (add_infoname): New.
7156 * src/vcg.h: Add new prototypes.
7157
7158 2001-08-27 Akim Demaille <akim@epita.fr>
7159
7160 * Makefile.maint: Sync. again with CVS Autoconf.
7161
7162 2001-08-27 Akim Demaille <akim@epita.fr>
7163
7164 * Makefile.maint: Formatting changes.
7165 (po-update, cvs-update, update): New targets.
7166 (AMTAR): Remove.
7167
7168 2001-08-27 Akim Demaille <akim@epita.fr>
7169
7170 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
7171 * Makefile.maint: Sync. with CVS Autoconf.
7172
7173 2001-08-27 Marc Autret <autret_m@epita.fr>
7174
7175 * src/vcg.h (struct infoname_s): New.
7176 (struct colorentry_s): New.
7177 (graph_s): New fields {vertical,horizontal}_order in structure.
7178 Add `infoname' field.
7179 Add `colorentry' field;
7180 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
7181 (G_HORIZONTAL_ORDER): New.
7182 (G_INFONAME): New.
7183 (G_COLORENTRY): New.
7184 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
7185 Add output of `infoname'.
7186 Add output of `colorentry'.
7187
7188 2001-08-27 Marc Autret <autret_m@epita.fr>
7189
7190 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
7191 This one shadowed a global parameter.
7192
7193 2001-08-24 Marc Autret <autret_m@epita.fr>
7194
7195 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
7196 instead of `unsigned'.
7197 (print_state): Do not call obstack_object_size () in obstack_grow ()
7198 to avoid macro variables shadowing.
7199
7200 2001-08-23 Marc Autret <autret_m@epita.fr>
7201
7202 * src/lex.c (percent_table): Typo: s/naem/name/.
7203 Add graph option.
7204 Normalize new options declarations.
7205
7206 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
7207
7208 * tests/suite.at: Exercise %header_extension and %source_extension.
7209
7210 2001-08-16 Marc Autret <autret_m@epita.fr>
7211
7212 * src/reader.c (parse_dquoted_param): New.
7213 (parse_header_extension_decl): Use it.
7214 (parse_source_extension_decl): Likewise.
7215
7216 2001-08-16 Marc Autret <autret_m@epita.fr>
7217
7218 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
7219 (get_xxxx_str): Use assert () instead of complain ().
7220 Remove return invokations in default cases.
7221 (get_decision_str): Modify default behaviour. Remove second argument.
7222 Echo modifications on calls.
7223 (output_graph): Fix.
7224
7225 2001-08-16 Marc Autret <autret_m@epita.fr>
7226
7227 * src/getargs.c (usage): Update with ``-g, --graph''.
7228
7229 2001-08-16 Marc Autret <autret_m@epita.fr>
7230
7231 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
7232 (Option Cross Key): Likewise.
7233 * doc/bison.1: Update.
7234
7235 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
7236
7237 * src/output.c (output_master_parser): Don't finish action_obstack.
7238 (output_parser): Don't care about the muscle action, here.
7239 (prepare): Copy the action_obstack in the action muscle.
7240 (output): Free action_obstack.
7241
7242 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
7243
7244 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
7245 will contain `%union' declaration.
7246 (parse_union_decl): Delete #line directive output.
7247 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
7248 informations about %union.
7249 (parse_union_decl): Copy the union_obstack in the muscle stype.
7250 * src/bison.simple: Add new #line directive.
7251 Add typdef %%stype YYSTYPE.
7252
7253 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
7254
7255 * src/bison.simple: Add new `#line' directive.
7256
7257 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
7258
7259 * src/bison.simple: New `#line' directive.
7260 * src/output.c (output_parser): Support new dynamic muscle input_line.
7261
7262 2001-09-22 Marc Autret <autret_m@epita.fr>
7263
7264 * src/output.c (output_master_parser): New.
7265 (output_parser): Be more re-entrant.
7266
7267 2001-09-21 Marc Autret <autret_m@epita.fr>
7268
7269 * src/reader.c (copy_definition, parse_union_decl): Update and use
7270 `linef' muscle.
7271 (copy_action): Likewise.
7272 Use obstack_1grow ().
7273 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
7274
7275 2001-09-21 Marc Autret <autret_m@epita.fr>
7276
7277 * src/options.c (option_table): Adjust.
7278 * src/lex.c (parse_percent_token): Fix.
7279
7280 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
7281
7282 * src/options.c (symtab.h): Include it, need by lex.h.
7283
7284 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
7285
7286 * src/lex.c (parse_percent_token): Change type of variable `tx', which
7287 is now an option_table_struct*.
7288 (option_strcmp): New function option_strcmp.
7289 (parse_percent_token): Call option_strcmp.
7290 * src/getargs.c (xalloc.h, options.h): Include it.
7291 (getargs): Call create_long_option_table.
7292 (getargs): Free longopts at the end of the function.
7293 (shortopts): Move in options.c.
7294 * src/options.c (create_long_option_table): New function. Convert
7295 information from option_table to option structure.
7296 * src/reader.c (options.h): Include it.
7297
7298 * src/Makefile.am: Adjust.
7299 * src/options.c (option_table): Create from longopts and percent_table.
7300 * src/getargs.c (longopts): Delete.
7301 * src/lex.c (struct percent_table_struct): Delete.
7302 (percent_table): Delete.
7303 (options.h): Include it.
7304 * src/options.c: Create.
7305 * src/options.h: Create.
7306 Declare enum opt_access_e.
7307 Define struct option_table_struct.
7308
7309 2001-09-20 Marc Autret <autret_m@epita.fr>
7310
7311 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
7312 sections of Bison.
7313
7314 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
7315
7316 * src/bison.simple: s/%%filename/%%skeleton.
7317 * src/muscle_tab.c (getargs.h): Include it.
7318 (muscle_init): Insert new muscle skeleton.
7319
7320 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
7321
7322 * src/output.c (output_parser): Delete unused variable actions_dumped.
7323
7324 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
7325
7326 * src/output.c (output): Delete call to reader_output_yylsp.
7327 * src/reader.c (reader): Likewise.
7328 * src/reader.h: Delete declaration of reader_output_yylsp.
7329
7330 2001-09-02 Marc Autret <autret_m@epita.fr>
7331
7332 * src/reader.c: Include muscle_tab.h.
7333 (parse_union_decl): Update.
7334 (parse_macro_decl): Rename parse_muscle_decl.
7335 Update to use renamed functions and variable.
7336 (read_declarations, copy_action, read_additionnal_code, : Updated
7337 with correct variables and functions names.
7338 (packsymbols, reader): Likewise.
7339
7340 * src/reader.h (muscle_obstack): Extern declaration update.
7341
7342 * src/output.c: Include muscle_tab.h
7343 In all functions using macro_insert, change by using muscle_insert ().
7344 (macro_obstack): Rename muscle_obstack.
7345 Echo modifications in the whole file.
7346 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
7347 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
7348 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
7349
7350 * src/muscle_tab.h: Update double inclusion macros.
7351 (macro_entry_s): Rename muscle_entry_s.
7352 Update prototypes.
7353
7354 * src/muscle_tab.c: Include muscle_tab.h.
7355 Rename macro_tabble to muscle_table.
7356 (mhash1, mhash2, mcmp): Use muscle_entry.
7357 (macro_init): Rename muscle_init. Update.
7358 (macro_insert): Rename muscle_insert. Update.
7359 (macro_find): Rename muscle_find. Update.
7360
7361 * src/main.c: Include muscle_tab.h.
7362 (main): Call muscle_init ().
7363 * src/Makefile.am (bison_SOURCES): Echo modifications.
7364
7365 2001-09-02 Marc Autret <autret_m@epita.fr>
7366
7367 Now the files macro_tab.[ch] are named muscle_tab.[ch].
7368
7369 * src/muscle_tab.c, src/muscle_tab.h: Add files.
7370
7371 2001-09-02 Marc Autret <autret_m@epita.fr>
7372
7373 * src/macrotab.c, src/macrotab.h: Remove.
7374
7375 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
7376
7377 * src/reader.c (copy_guard): Use muscle to specify the `#line'
7378 filename.
7379
7380 2001-09-01 Marc Autret <autret_m@epita.fr>
7381
7382 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
7383 to an explicit value to activate the feature. We do it here.
7384
7385 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
7386
7387 * src/output.c (prepare): Delete the `filename' muscule insertion.
7388 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
7389 (parse_union_decl): Likewise.
7390 * src/macrotab.c (macro_init): Initialize filename by infile.
7391
7392 2001-08-31 Marc Autret <autret_m@epita.fr>
7393
7394 * src/bison.simple (YYLSP_NEEDED): New definition.
7395 * src/output.c (prepare): Add macro insertion of `locations_flag'
7396
7397 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
7398
7399 * src/output.c (prepare): Delete insertion of previous muscles,
7400 and insert the `prefix' muscles.
7401 * src/macrotab.c (macro_init): Likewise.
7402 (macro_init): Initialization prefix directive by `yy'.
7403 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
7404 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
7405 yylval, yydebug, yyerror, yynerrs and yyparse.
7406 New directive `#define' to substitute yydebug, ... with option
7407 name_prefix.
7408
7409 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
7410
7411 * src/main.c (main): Standardize.
7412 * src/output.c (output_table_data, output_parser): Likewise.
7413 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
7414
7415 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
7416
7417 * src/reader.c (read_additionnal_code): Rename %%user_code to
7418 %%epilogue.
7419 * src/output.c (output): Rename %%declarations to %%prologue.
7420 * src/bison.simple: Echo modifications.
7421
7422 2001-08-31 Marc Autret <autret_m@epita.fr>
7423
7424 * src/reader.c (readgram): CleanUp.
7425 (output_token_defines): Likewise.
7426 (packsymbols): Likewise.
7427 (reader): Likewise.
7428 * src/output.c (output): CPP-out useless code.
7429
7430 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
7431
7432 * src/reader.c (reader): Delete obsolete call to function
7433 output_trailers and output_headers.
7434 * src/output.h: Remove obsolete functions prototypes of output_headers
7435 and output_trailers.
7436
7437 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
7438
7439 * src/main.c: Include macrotab.h.
7440 * src/macrotab.h (macro_entry_s): Constify fields.
7441 Adjust functions prototypes.
7442 * src/macrotab.c (macro_insert): Constify key and value.
7443 (macro_find): Constify key.
7444 (macro_insert): Include 'xalloc.h'
7445 (macro_insert): Use XMALLOC.
7446 (macro_find): Constify return value.
7447 * src/output.c (output_table_data): Rename table to table_data.
7448 (output_parser): Constify macro_key, macro_value.
7449
7450 2001-08-30 Marc Autret <autret_m@epita.fr>
7451
7452 * src/reader.c (parse_skel_decl): New.
7453 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
7454 * src/lex.h (token_t): New token `tok_skel'.
7455 * src/lex.c (percent_table): Add skeleton option entry.
7456 Standardize.
7457
7458 2001-08-29 Marc Autret <autret_m@epita.fr>
7459
7460 * src/bison.simple: Add %%user_code directive at the end.
7461 * src/reader.c (read_additionnal_code): New.
7462 (reader): Use it.
7463 * src/output.c (output_program): Remove.
7464 (output): Update.
7465
7466 2001-08-28 Marc Autret <autret_m@epita.fr>
7467
7468 * src/output.c (output_actions): Clean up.
7469 (output_gram): CPP-out useless code.
7470 * src/reader.c (reader): Clean up, CPP-out useless code.
7471
7472 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
7473
7474 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
7475 directive.
7476 * src/bison.simple: Add `%%definitions'.
7477
7478 2001-08-28 Marc Autret <autret_m@epita.fr>
7479
7480 * config/depcomp: New file.
7481
7482 2001-08-27 Paul Eggert <eggert@twinsun.com>
7483
7484 * src/bison.simple (yyparse): Don't take the address of an
7485 item before the start of an array, as that doesn't conform to
7486 the C Standard.
7487
7488 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
7489
7490 * src/output.c (output): Remove the initialization of the macro
7491 obstack. It was done too late here.
7492
7493 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
7494 completely wrong.
7495 (reader): Initialize the macro obstack here, since we need it to grow
7496 '%define' directives.
7497
7498 * src/reader.h: Declare the macro obstack as extern.
7499
7500 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
7501
7502 * src/output.c (output_parser): Fix. Store single '%' characters in
7503 the output obstack instead of throwing them away.
7504
7505 2001-08-27 Akim Demaille <akim@epita.fr>
7506
7507 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
7508
7509 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7510
7511 * lib/Makefile.am: Adjust.
7512
7513 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7514
7515 * src/bison.simple: Update and add '%%' directives.
7516
7517 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7518
7519 * src/reader.c (reader): Remove calls to 'output_headers' and
7520 'output_trailers'. Remove some C output.
7521 (readgram): Disable a piece of code that was writing a default
7522 definition for 'YYSTYPE'.
7523 (reader_output_yylsp): Remove.
7524 (packsymbols): Output token defintions to a macro.
7525 (copy_definition): Disable C output.
7526
7527 * src/reader.c (parse_macro_decl): New function used to parse macro
7528 declarations.
7529 (copy_string2): Put the body of copy_string into this new function.
7530 Add a parameter to let the caller choose whether he wants to copy the
7531 string delimiters or not.
7532 (copy_string): Be a simple call to copy_string2 with the last argument
7533 bound to true.
7534 (read_declarations): Add case for macro definition.
7535 (copy_identifier): New.
7536 (parse_macro_decl): Read macro identifiers using copy_identifier
7537 rather than lex.
7538
7539 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7540
7541 * src/output.c (prepare): Add prefixed names.
7542 (output_parser): Output semantic actions.
7543 (output_parser): Fix bug on '%%line' directives.
7544
7545 * src/output.c (output_headers): Remove. The C code printed by this
7546 function should now be in the skeletons.
7547 (output_trailers): Remove.
7548 (output): Disable call to 'reader_output_yylsp'.
7549 (output_rule_data): Do not output tables to the table obstack.
7550
7551 * src/output.c: Remove some C dedicated output.
7552 Improve the use of macro and output obstacks.
7553 (output_defines): Remove.
7554
7555 * src/output.c (output_token_translations): Associate 'translate'
7556 table with a macro. No output to the table obstack.
7557 (output_gram): Same for 'rhs' and 'prhs'.
7558 (output_stos): Same for 'stos'.
7559 (output_rule_data): Same for 'r1' and 'r2'.
7560 (token_actions): Same for 'defact'.
7561 (goto_actions): Same for 'defgoto'.
7562 (output_base): Same for 'pact' and 'pgoto'.
7563 (output_table): Same for 'table'.
7564 (output_check): Same for 'check'.
7565
7566 * src/output.c (output_table_data): New function.
7567 (output_short_table): Remove.
7568 (output_short_or_char_table): Remove.
7569
7570 * src/output.c (output_parser): Replace most of the skeleton copy code
7571 with something new. Skeletons are now processed character by character
7572 rather than line by line, and Bison looks for '%%' macros. This is the
7573 first step in making Bison's output process (a lot) more flexible.
7574 (output_parser): Use the macro table.
7575
7576 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7577
7578 * src/main.c (main): Initialize the macro table.
7579
7580 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7581
7582 * src/lex.c (percent_table): Add tok_define.
7583 * src/lex.h: Add tok_define.
7584
7585 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7586
7587 * src/macrotab.c: New file.
7588 * src/macrotab.h: New file.
7589 * src/Makefile.am: Update.
7590
7591 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7592
7593 * lib/hash.c: New file.
7594 * lib/hash.h: New file.
7595 * lib/Makefile.am: Update.
7596
7597 2001-08-15 Akim Demaille <akim@epita.fr>
7598
7599 Version 1.28c.
7600
7601 2001-08-15 Marc Autret <autret_m@epita.fr>
7602
7603 * src/reader.c (readgram): Indent output macro YYSTYPE.
7604 (packsymbols): Likewise.
7605 (output_token_defines): Likewise.
7606 * src/files.c: Standardize.
7607 (compute_header_macro): New.
7608 (defines_obstack_save): New. Use compute_header_macro.
7609 (output_files): Update. Use defines_obstack_save.
7610
7611 2001-08-15 Akim Demaille <akim@epita.fr>
7612
7613 * doc/bison.texinfo (Table of Symbols): Document
7614 YYSTACK_USE_ALLOCA.
7615
7616 2001-08-15 Akim Demaille <akim@epita.fr>
7617
7618 * missing: Update from CVS Automake.
7619 * config/config.guess, config/config.sub, config/texinfo.tex:
7620 Update from gnu.org.
7621
7622 2001-08-15 Akim Demaille <akim@epita.fr>
7623
7624 * Makefile.maint: Sync with CVS Autoconf.
7625
7626 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
7627
7628 * doc/bison.texinfo: Include GNU Free Documentation License from
7629 `fdl.texi'.
7630 * doc/fdl.texi: Add to package.
7631
7632 2001-08-14 Marc Autret <autret_m@epita.fr>
7633
7634 Turn on %{source,header}_extension features.
7635
7636 * src/lex.c (percent_table): Un-CPP out header_extension and
7637 source_extension.
7638 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
7639 (compute_exts_from_src): Remove conditions. It restores priorities
7640 between options.
7641
7642 2001-08-14 Marc Autret <autret_m@epita.fr>
7643
7644 * src/files.c (compute_base_names): Add extensions computing when
7645 `--file-prefix' used.
7646 Standardize function calls.
7647
7648 2001-08-13 Marc Autret <autret_m@epita.fr>
7649
7650 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
7651 defining it (defined but null disables alloca).
7652
7653 2001-08-13 Marc Autret <autret_m@epita.fr>
7654
7655 * src/bison.simple (_yy_memcpy): CPP reformat.
7656
7657 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
7658
7659 * tests/atconfig.in (CPPFLAGS): Fix.
7660
7661 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
7662
7663 * doc/bison.texinfo: Include GNU General Public License from
7664 `gpl.texi'.
7665 * doc/gpl.texi: Add to package.
7666
7667 2001-08-10 Marc Autret <autret_m@epita.fr>
7668
7669 * src/print_graph.h: Fix.
7670 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
7671
7672 2001-08-10 Akim Demaille <akim@epita.fr>
7673
7674 * src/system.h: Provide default declarations for stpcpy, strndup,
7675 and strnlen.
7676
7677 2001-08-10 Robert Anisko <anisko_r@epita.fr>
7678
7679 * doc/bison.texinfo (Locations): Update @$ stuff.
7680
7681 2001-08-09 Robert Anisko <anisko_r@epita.fr>
7682
7683 * src/bison.simple (YYLLOC_DEFAULT): Update.
7684 (yyparse): Adjust.
7685
7686 2001-08-08 Marc Autret <autret_m@epita.fr>
7687
7688 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
7689 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
7690 Reported by Fabrice Bauzac.
7691
7692 2001-08-08 Marc Autret <autret_m@epita.fr>
7693
7694 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
7695 * src/vcg.c (output_node): Fix.
7696 * src/vcg.h: Cleanup.
7697 * src/print_graph.c: Add comments.
7698 (node_output_size): New global variable. Simplify the formatting of
7699 the VCG graph output.
7700 (print_actions): Unused code is now used. It notifies the final state
7701 and no action states in the VCG graph. It also give the reduce actions.
7702 The `shift and goto' edges are red and the `go to state' edges are
7703 blue.
7704 Get the current node name and node_obstack by argument.
7705 (node_obstack): New variable.
7706 (print_state): Manage node_obstack.
7707 (print_core): Use node_obstack given by argument.
7708 A node is not only computed here but in print_actions also.
7709 (print_graph): CPP out useless code instead of commenting it.
7710
7711 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
7712
7713 * tests/atconfig.in (CPPFLAGS): Fix.
7714
7715 2001-08-07 Akim Demaille <akim@epita.fr>
7716
7717 * src/print_graph.c (quote): New.
7718 (print_core): Use it.
7719
7720 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
7721
7722 * src/vcg.c (complain.h): Include it.
7723 Unepitaize `return' invocations.
7724 [NDEBUG] (main): Remove.
7725 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
7726 * src/files.c (open_files): Initialize graph_obstack.
7727 * src/print_graph.c (print_actions): CPP out useless code.
7728 (print_core): Don't output the last `\n' in labels.
7729 Use `quote'.
7730 * src/files.c (output_files): Output the VCG file.
7731 * src/main.c (main): Invoke print_graph ();
7732
7733 2001-08-06 Marc Autret <autret_m@epita.fr>
7734
7735 Automaton VCG graph output.
7736 Using option ``-g'' or long option ``--graph'', you can generate
7737 a gram_filename.vcg file containing a VCG description of the LALR (1)
7738 automaton of your grammar.
7739
7740 * src/main.c: Call to print_graph() function.
7741 * src/getargs.h: Update.
7742 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
7743 (graph_flag): New flag.
7744 (longopts): Update.
7745 (getargs): Add case `g'.
7746 * src/files.c (graph_obstack): New obstack struct.
7747 (open_files): Initialize new obstack.
7748 (output_files): Saves graph_obstack if required.
7749 * src/files.h (graph_obstack): New extern declaration.
7750 * src/Makefile.am: Add new source files.
7751
7752 2001-08-06 Marc Autret <autret_m@epita.fr>
7753
7754 * src/print_graph.c, src/print_graph.h (graph): New.
7755 * src/vcg.h: New file.
7756 * src/vcg.c: New file, VCG graph handling.
7757
7758 2001-08-06 Marc Autret <autret_m@epita.fr>
7759
7760 Add of %source_extension and %header_extension which specify
7761 the source or/and the header output file extension.
7762
7763 * src/files.c (compute_base_names): Remove initialisation of
7764 src_extension and header_extension.
7765 (compute_exts_from_gf): Update.
7766 (compute_exts_from_src): Update.
7767 (output_files): Update.
7768 * src/reader.c (parse_header_extension_decl): New.
7769 (parse_source_extension_decl): New.
7770 (read_declarations): New case statements for the new tokens.
7771 * src/lex.c (percent_table): Add entries for %source_extension
7772 and %header_extension.
7773 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
7774
7775 2001-08-06 Marc Autret <autret_m@epita.fr>
7776
7777 * configure.in: Bump to 1.28c.
7778 * doc/bison.texinfo: Texinfo thingies.
7779
7780 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
7781
7782 * tests/atconfig.in (CPPFLAGS): Add.
7783 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
7784
7785 2001-08-03 Akim Demaille <akim@epita.fr>
7786
7787 Version 1.28b.
7788
7789 2001-08-03 Akim Demaille <akim@epita.fr>
7790
7791 * tests/Makefile.am (check-local): Ship testsuite.
7792 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
7793 Include `string.h'.
7794
7795 2001-08-03 Akim Demaille <akim@epita.fr>
7796
7797 * configure.in: Try using -Wformat when compiling.
7798
7799 2001-08-03 Akim Demaille <akim@epita.fr>
7800
7801 * configure.in: Bump to 1.28b.
7802
7803 2001-08-03 Akim Demaille <akim@epita.fr>
7804
7805 * src/complain.c: Adjust strerror_r portability issues.
7806
7807 2001-08-03 Akim Demaille <akim@epita.fr>
7808
7809 Version 1.28a.
7810
7811 2001-08-03 Akim Demaille <akim@epita.fr>
7812
7813 * src/getargs.c, src/getarg.h (skeleton)): Constify.
7814 * src/lex.c (literalchar): Avoid name clashes on `buf'.
7815 * src/getargs.c: Include complain.h.
7816 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
7817 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
7818
7819 2001-08-03 Akim Demaille <akim@epita.fr>
7820
7821 * src/reader.c (readgram): Display hidden chars in error messages.
7822
7823 2001-08-03 Akim Demaille <akim@epita.fr>
7824
7825 Update to gettext 0.10.39.
7826
7827 2001-08-03 Akim Demaille <akim@epita.fr>
7828
7829 * lib/strspn.c: New.
7830
7831 2001-08-01 Marc Autret <autret_m@epita.fr>
7832
7833 * doc/bison.texinfo: Update.
7834 * doc/bison.1 (mandoc): Update.
7835 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
7836 * src/files.c: Support output files extensions computing.
7837 (src_extension): New static variable.
7838 (header_extension): New static variable.
7839 (tr): New function.
7840 (get_extension_index): New function, gets the index of an extension
7841 filename in a string.
7842 (compute_exts_from_gf): New function, computes extensions from the
7843 grammar file extension.
7844 (compute_exts_from_src): New functions, computes extensions from the
7845 C source file extension, file given by ``-o'' option.
7846 (compute_base_names): Update.
7847 (output_files): Update.
7848
7849 2001-08-01 Robert Anisko <anisko_r@epita.fr>
7850
7851 * doc/bison.texi: Document @$.
7852 (Locations): New section.
7853
7854 2001-07-18 Akim Demaille <akim@epita.fr>
7855
7856 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
7857 * config/prev-version.txt, config/move-if-change: New.
7858 * Makefile.am: Adjust.
7859
7860 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
7861
7862 * src/bison.simple (yyparse): Suppress warning `comparaison
7863 between signed and unsigned'.
7864
7865 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
7866
7867 * src/getargs.h (raw_flag): Remove.
7868 * src/getargs.c: Die on `-r'/`--raw'.
7869 * src/lex.c (parse_percent_token): Die on `%raw'.
7870 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
7871 * tests/calc.at: Suppress test with option `--raw'.
7872
7873 2001-07-14 Akim Demaille <akim@epita.fr>
7874
7875 * config/: New.
7876 * configure.in: Require Autoconf 2.50.
7877 Update to gettext 0.10.38.
7878
7879 2001-03-16 Akim Demaille <akim@epita.fr>
7880
7881 * doc/bison.texinfo: ANSIfy the examples.
7882
7883 2001-03-16 Akim Demaille <akim@epita.fr>
7884
7885 * getargs.c (skeleton): New variable.
7886 (longopts): --skeleton is a new option.
7887 (shortopts, getargs): -S is a new option.
7888 * getargs.h: Declare skeleton.
7889 * output.c (output_parser): Use it.
7890
7891 2001-03-16 Akim Demaille <akim@epita.fr>
7892
7893 * m4/strerror_r.m4: New.
7894 * m4/error.m4: Run AC_FUNC_STRERROR_R.
7895 * lib/error.h, lib/error.c: Update.
7896
7897 2001-03-16 Akim Demaille <akim@epita.fr>
7898
7899 * src/getargs.c (longopts): Clean up.
7900
7901 2001-02-21 Akim Demaille <akim@epita.fr>
7902
7903 * src/reader.c (gensym): `gensym_count' is your own.
7904 Use a static buf to create the symbol name, as token_buffer is no
7905 longer a buffer.
7906
7907 2001-02-08 Akim Demaille <akim@epita.fr>
7908
7909 * src/conflicts.c (conflict_report): Be sure not to append to res
7910 between two calls, which could happen if both first sprintf were
7911 skipped, but not the first cp += strlen.
7912
7913 2001-02-08 Akim Demaille <akim@epita.fr>
7914
7915 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
7916 New, from fileutils 4.0.37.
7917 * configure.in: Require Autoconf 2.49c. I took some time before
7918 making this decision. This is the only way out for portability
7919 issues in Bison, it would mean way too much duplicate effort to
7920 import in Bison features implemented in 2.49c since 2.13.
7921 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
7922
7923 2001-02-02 Akim Demaille <akim@epita.fr>
7924
7925 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
7926 * lib/xalloc.h, lib/xmalloc.c: Update.
7927
7928 2001-01-19 Akim Demaille <akim@epita.fr>
7929
7930 Get rid of the ad hoc handling of token_buffer in the scanner: use
7931 the obstacks.
7932
7933 * src/lex.c (token_obstack): New.
7934 (init_lex): Initialize it. No longer call...
7935 (grow_token_buffer): this. Remove it.
7936 Adjust all the places which used it to use the obstack.
7937
7938 2001-01-19 Akim Demaille <akim@epita.fr>
7939
7940 * src/lex.h: Rename all the tokens:
7941 s/\bENDFILE\b/tok_eof/g;
7942 s/\bIDENTIFIER\b/tok_identifier/g;
7943 etc.
7944 Let them be enums, not #define, to ease debugging.
7945 Adjust all the code.
7946
7947 2001-01-18 Akim Demaille <akim@epita.fr>
7948
7949 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
7950 * src/lex.c (maxtoken, grow_token_buffer): Static.
7951
7952 2001-01-18 Akim Demaille <akim@epita.fr>
7953
7954 Since we now use obstacks, more % directives can be enabled.
7955
7956 * src/lex.c (percent_table): Also accept `%yacc',
7957 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
7958 `%debug'.
7959 Handle the actions for `%semantic_parser' and `%pure_parser' here,
7960 instead of returning a token.
7961 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
7962 * src/reader.c (read_declarations): Adjust.
7963 * src/files.c (open_files): Don't call `compute_base_names', don't
7964 compute `attrsfile' since they depend upon data which might be
7965 *in* the input file now.
7966 (output_files): Do it here.
7967 * src/output.c (output_headers): Document the fact that this patch
7968 introduces a guaranteed SEGV for semantic parsers.
7969 * doc/bison.texinfo: Document them.
7970 * tests/suite.at: Exercise these %options.
7971
7972 2000-12-20 Akim Demaille <akim@epita.fr>
7973
7974 Also handle the output file (--verbose) with obstacks.
7975
7976 * files.c (foutput): Remove.
7977 (output_obstack): New.
7978 Adjust all dependencies.
7979 * src/conflicts.c: Return a string.
7980 * src/system.h (obstack_grow_string): Rename as...
7981 (obstack_sgrow): this. Be ready to work with non literals.
7982 (obstack_fgrow4): New.
7983
7984 2000-12-20 Akim Demaille <akim@epita.fr>
7985
7986 * src/files.c (open_files): Fix the computation of short_base_name
7987 in the case of `-o foo.tab.c'.
7988
7989 2000-12-20 Akim Demaille <akim@epita.fr>
7990
7991 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
7992 (copy_dollar): Now that everything uses obstacks, get rid of the
7993 FILE * parameters.
7994
7995 2000-12-20 Akim Demaille <akim@epita.fr>
7996
7997 * src/files.c (open_files): Actually the `.output' file is based
7998 on the short_base_name, not base_name.
7999 * tests/suite.at (Checking output file names): Adjust.
8000
8001 2000-12-20 Akim Demaille <akim@epita.fr>
8002
8003 * src/bison.s1: Remove, we now use directly...
8004 * src/bison.simple: this.
8005 * src/Makefile.am: Use pkgdata instead of data.
8006
8007 2000-12-20 Akim Demaille <akim@epita.fr>
8008
8009 * src/files.c (guard_obstack): New.
8010 (open_files): Initialize it.
8011 (output_files): Dump it...
8012 * src/files.h: Export it.
8013 * src/reader.c (copy_guard): Use it.
8014
8015 2000-12-19 Akim Demaille <akim@epita.fr>
8016
8017 * src/files.c (outfile, defsfile, actfile): Removed as global
8018 vars.
8019 (open_files): Don't compute them.
8020 (output_files): Adjust.
8021 (base_name, short_base_name): Be global.
8022 Adjust dependencies.
8023
8024 2000-12-19 Akim Demaille <akim@epita.fr>
8025
8026 * src/files.c (strsuffix): New.
8027 (stringappend): Be just like strcat but allocate.
8028 (base_names): Eve out from open_files.
8029 Try to simplify the rather hairy computation of base_name and
8030 short_base_name.
8031 (open_files): Use it.
8032 * tests/suite.at (Checking output file names): New test.
8033
8034 2000-12-19 Akim Demaille <akim@epita.fr>
8035
8036 * src/system.h (obstack_grow_literal_string): Rename as...
8037 (obstack_grow_string): this.
8038 * src/output.c (output_parser): Recognize `%% actions' instead of
8039 `$'.
8040 * src/bison.s1: s/$/%% actions/.
8041 * src/bison.hairy: Likewise.
8042
8043 2000-12-19 Akim Demaille <akim@epita.fr>
8044
8045 * src/output.c (output_parser): Compute the `#line' lines when
8046 there are.
8047 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
8048 Suggested by Hans Aberg.
8049
8050 2000-12-19 Akim Demaille <akim@epita.fr>
8051
8052 Let the handling of the skeleton files be local to the procedures
8053 that use it.
8054
8055 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
8056 longer static.
8057 (fparser, open_extra_files): Remove.
8058 (open_files, output_files): Don't take care of fparser.
8059 * src/files.h: Adjust.
8060 * src/output.c (output_parser): Open and close the file to the
8061 skeleton.
8062 * src/reader.c (read_declarations): When %semantic_parser, open
8063 fguard.
8064
8065 2000-12-19 Akim Demaille <akim@epita.fr>
8066
8067 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
8068 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
8069
8070 2000-12-19 Akim Demaille <akim@epita.fr>
8071
8072 * src/files.c (open_files): Yipee! We no longer need all the code
8073 looking for `/tmp' since we have no tmp file.
8074
8075 2000-12-19 Akim Demaille <akim@epita.fr>
8076
8077 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
8078 New macros.
8079 * src/files.c (open_files): Less dependency on MSDOS etc.
8080
8081 2000-12-14 Akim Demaille <akim@epita.fr>
8082
8083 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
8084 Provide a default definition.
8085 Use it when executing the default @ action.
8086 * src/reader.c (reader_output_yylsp): No longer include
8087 `timestamp' and `text' in the default YYLTYPE.
8088
8089 2000-12-12 Akim Demaille <akim@epita.fr>
8090
8091 * src/reader.c (copy_definition, parse_union_decl, copy_action)
8092 (copy_guard): Quote the file names.
8093 Reported by Laurent Mascherpa.
8094
8095 2000-12-12 Akim Demaille <akim@epita.fr>
8096
8097 * src/output.c (output_headers, output_program, output): Be sure
8098 to escape special characters when outputting filenames.
8099 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
8100 (output_headers): Don't depend on them, Use ACTSTR.
8101
8102 2000-11-17 Akim Demaille <akim@epita.fr>
8103
8104 * lib/obstack.h: Formatting changes.
8105 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
8106 prevents type checking.
8107 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
8108 cast the value to (void *): assigning a `foo *' to a `void *'
8109 variable is valid.
8110 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
8111 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
8112 append characters.
8113
8114 2000-11-17 Akim Demaille <akim@epita.fr>
8115
8116 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
8117 as...
8118 (suite.m4, regression.m4, calc.m4): these.
8119 * tests/atgeneral.m4: Update from CVS Autoconf.
8120
8121 2000-11-17 Akim Demaille <akim@epita.fr>
8122
8123 * tests/regression.m4 (%union and --defines): New test,
8124 demonstrating a current bug in the obstack implementation.
8125
8126 2000-11-17 Akim Demaille <akim@epita.fr>
8127
8128 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
8129 macros.
8130 Use them to declare the variables which are global or local to
8131 `yyparse'.
8132
8133 2000-11-17 Akim Demaille <akim@epita.fr>
8134
8135 * acconfig.h: Remove, no longer used.
8136
8137 2000-11-07 Akim Demaille <akim@epita.fr>
8138
8139 * src: s/Copyright (C)/Copyright/g.
8140
8141 2000-11-07 Akim Demaille <akim@epita.fr>
8142
8143 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
8144 defining.
8145 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
8146
8147 2000-11-07 Akim Demaille <akim@epita.fr>
8148
8149 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
8150 Merge in a single CPP if/else.
8151
8152 2000-11-07 Akim Demaille <akim@epita.fr>
8153
8154 * src/output.c (output): Remove useless variables.
8155 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
8156 argument `data' for consistency with the prototypes.
8157 Qualify it `const'.
8158 (obstack_copy, obstack_copy0): Rename the second argument as
8159 `address' for consistency. Qualify it `const'.
8160 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
8161 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
8162 `const' their input argument (`data' or `address').
8163 Adjust the corresponding macros to include `const' in casts.
8164
8165 2000-11-03 Akim Demaille <akim@epita.fr>
8166
8167 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
8168 s/PFILE1/BISON_HAIRY/.
8169 Adjust dependencies.
8170
8171 2000-11-03 Akim Demaille <akim@epita.fr>
8172
8173 For some reason, this was not applied.
8174
8175 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
8176 `unlink': it's no longer used.
8177
8178 2000-11-03 Akim Demaille <akim@epita.fr>
8179
8180 * src/files.c (skeleton_find): New function, eved out of...
8181 (open_files, open_extra_files): here.
8182
8183 2000-11-03 Akim Demaille <akim@epita.fr>
8184
8185 Don't use `atexit'.
8186
8187 * src/files.c (obstack_save): New function.
8188 (done): Rename as...
8189 (output_files): this.
8190 Use `obstack_save'.
8191 * src/main.c (main): Don't use `atexit' to register `done', since
8192 it no longer has to remove tmp files, just call `output_files'
8193 when there are no errors.
8194
8195 2000-11-02 Akim Demaille <akim@epita.fr>
8196
8197 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
8198 `unlink': it's no longer used.
8199 * src/files.h: Formatting changes.
8200
8201 2000-11-02 Akim Demaille <akim@epita.fr>
8202
8203 Remove the last uses of mktemp and unlink/delete.
8204
8205 * src/files.c (fdefines, ftable): Removed.
8206 (defines_ostack, table_obstack): New.
8207 Adjust dependencies of the former into uses of the latter.
8208 * src/output.c (output_short_or_char_table, output_short_table):
8209 Convert to using obstacks.
8210 * src/reader.c (copy_comment2): Accept one FILE * and two
8211 obstacks.
8212 (output_token_defines, reader_output_yylsp): Use obstacks.
8213 * src/system.h (obstack_fgrow3): New.
8214
8215 2000-11-01 Akim Demaille <akim@epita.fr>
8216
8217 Change each use of `fattrs' into a use of `attrs_obstack'.
8218
8219 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
8220 * src/files.c (fattrs): Remove.
8221 (attrs_obstack): New.
8222 Adjust all dependencies.
8223 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
8224
8225 2000-11-01 Akim Demaille <akim@epita.fr>
8226
8227 Introduce obstacks.
8228 Change each use of `faction' into a use of `action_obstack'.
8229
8230 * lib/obstack.h, lib/obstack.c: New files.
8231 * src/files.c (faction): Remove.
8232 (action_obstack): New.
8233 Adjust all dependencies.
8234
8235 2000-10-20 Akim Demaille <akim@epita.fr>
8236
8237 * lib/quote.h (PARAMS): New macro. Use it.
8238
8239 2000-10-16 Akim Demaille <akim@epita.fr>
8240
8241 * src/output.c (output_short_or_char_table): New function.
8242 (output_short_table, output_token_translations): Use it.
8243 (goto_actions): Use output_short_table.
8244
8245 2000-10-16 Akim Demaille <akim@epita.fr>
8246
8247 * src/symtab.c (bucket_new): New function.
8248 (getsym): Use it.
8249
8250 * src/output.c (output_short_table): New argument to display the
8251 comment associated with the table.
8252 Adjust dependencies.
8253 (output_gram): Use it.
8254 (output_rule_data): Nicer output layout for YYTNAME.
8255
8256 2000-10-16 Akim Demaille <akim@epita.fr>
8257
8258 * src/lex.c (read_typename): New function.
8259 (lex): Use it.
8260 * src/reader.c (copy_dollar): Likewise.
8261
8262 2000-10-16 Akim Demaille <akim@epita.fr>
8263
8264 * src/reader.c (copy_comment2): Expect the input stream to be on
8265 the `/' which is suspected to open a comment, instead of being
8266 called after `//' or `/*' was read.
8267 (copy_comment, copy_definition, parse_union_decl, copy_action)
8268 (copy_guard): Adjust.
8269
8270 2000-10-16 Akim Demaille <akim@epita.fr>
8271
8272 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
8273 `read_signed_integer'.
8274
8275 2000-10-16 Akim Demaille <akim@epita.fr>
8276
8277 * src/reader.c (copy_dollar): New function.
8278 (copy_guard, copy_action): Use it.
8279
8280 2000-10-16 Akim Demaille <akim@epita.fr>
8281
8282 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
8283 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
8284 New files, from Fileutils 4.0.27.
8285 * src/main.c (printable_version): Remove.
8286 * src/lex.c, src/reader.c: Use `quote'.
8287
8288 2000-10-04 Akim Demaille <akim@epita.fr>
8289
8290 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
8291
8292 2000-10-04 Akim Demaille <akim@epita.fr>
8293
8294 * doc/bison.texinfo: Various typos spotted by Neil Booth.
8295
8296 2000-10-04 Akim Demaille <akim@epita.fr>
8297
8298 When a literal string is used to define two different tokens,
8299 `bison -v' segfaults.
8300 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
8301
8302 * tests/regression.m4: New file.
8303 Include the core of the sample provided by Piotr Gackiewicz.
8304 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
8305 properly.
8306
8307 2000-10-04 Akim Demaille <akim@epita.fr>
8308
8309 * src/reader.c (parse_expect_decl): Keep `count' within the size
8310 of `buffer'.
8311 From Neil Booth.
8312
8313 2000-10-02 Paul Eggert <eggert@twinsun.com>
8314
8315 * bison.s1 (yyparse): Assign the default value
8316 unconditionally, to avoid a GCC warning and make the parser a
8317 tad smaller.
8318
8319 2000-10-02 Akim Demaille <akim@epita.fr>
8320
8321 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
8322 options.
8323
8324 2000-10-02 Akim Demaille <akim@epita.fr>
8325
8326 * src/derives.c, src/print.c, src/reduce.c: To ease the
8327 translation, move some `\n' out of the translated strings.
8328
8329 2000-10-02 Akim Demaille <akim@epita.fr>
8330
8331 The location tracking mechanism is precious for parse error
8332 messages. Nevertheless, it is enabled only when `@n' is used in
8333 the grammar, which is a different issue (you can use it in error
8334 message, but not in the grammar per se). Therefore, there should
8335 be another means to enable it.
8336
8337 * src/getargs.c (getargs): Support `--locations'.
8338 (usage): Report it.
8339 * src/getargs.h (locationsflag): Export it.
8340 * src/lex.c (percent_table): Support `%locations'.
8341 * src/reader.c (yylsp_needed): Remove this variable, now replaced
8342 with `locationsflag'.
8343 * doc/bison.texinfo: Document `--locations' and `%locations'.
8344 Sort the options.
8345 * tests/calc.m4: Test it.
8346
8347 For regularity of the names, replace each
8348 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
8349 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
8350 In addition replace each `flag' with `_flag'.
8351
8352 2000-10-02 Akim Demaille <akim@epita.fr>
8353
8354 Also test parse error messages, including with YYERROR_VERBOSE.
8355
8356 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
8357 associative).
8358 Use it to check the computations.
8359 Use it to check `nonassoc' is honored.
8360 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
8361 `--yyerror-verbose'.
8362 (_AT_CHECK_CALC): Adjust to this option.
8363 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
8364
8365 2000-10-02 Akim Demaille <akim@epita.fr>
8366
8367 Test also `--verbose', `--defines' and `--name-prefix'. Testing
8368 the latter demonstrates a flaw in the handling of non debugging
8369 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
8370 was used in order to simplify:
8371
8372 #if YYDEBUG
8373 if (yydebug)
8374 {
8375 ...
8376 }
8377 #endif
8378
8379 into
8380
8381 if (yydebug)
8382 {
8383 ...
8384 }
8385
8386 unfortunately this leads to a CPP conflict when
8387 `--name-prefix=foo' is used since it produces `#define yydebug
8388 foodebug'.
8389
8390 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
8391 (YYDPRINTF): New macro.
8392 Spread its use.
8393 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
8394 the bison options.
8395 Also test `--verbose', `--defines' and `--name-prefix'.
8396
8397 2000-10-02 Akim Demaille <akim@epita.fr>
8398
8399 Improve the readability of the produced parsers.
8400
8401 * src/bison.s1: Formatting changes.
8402 Improve the comment related to the `$' mark.
8403 (yydefault): Don't fall through to `yyresume': `goto' there.
8404 * src/output.c (output_parser): When the `$' is met, skip the end
8405 of its line.
8406 New variable, `number_of_dollar_signs', to check there's exactly
8407 one `$' in the parser skeleton.
8408
8409 2000-10-02 Akim Demaille <akim@epita.fr>
8410
8411 * lib/xstrdup.c: New file, from the fileutils.
8412 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
8413 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
8414 instead of strlen + xmalloc + strcpy.
8415 * src/symtab.c (copys): Remove, use xstrdup instead.
8416
8417 2000-10-02 Akim Demaille <akim@epita.fr>
8418
8419 * src/gram.h (associativity): New enum type which replaces the
8420 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
8421 `right_assoc', `left_assoc' and `non_assoc'.
8422 Adjust all dependencies.
8423 * src/reader.c: Formatting changes.
8424 (LTYPESTR): Don't define it, use it as a literal in
8425 `reader_output_yylsp'.
8426 * src/symtab.h (symbol_class): New enum type which replaces the
8427 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
8428 `sunknown', `stoken and `snterm'.
8429
8430 2000-10-02 Akim Demaille <akim@epita.fr>
8431
8432 * src/getargs.c (fixed_outfiles): Rename as...
8433 (yaccflag): for consistency and accuracy.
8434 Adjust dependencies.
8435
8436 2000-10-02 Akim Demaille <akim@epita.fr>
8437
8438 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
8439 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
8440 difficult and introduced a lot of core dump. It turns out that
8441 Bison used an implementation of `xmalloc' based on `calloc', and
8442 at various places it does depend upon the initialization to 0. I
8443 have not tried to isolate the pertinent places, and all the former
8444 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
8445 someone should address this issue.
8446
8447 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
8448 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
8449 files.
8450 Adjust dependencies.
8451 * src/warshall.h: New file.
8452 Propagate.
8453
8454 2000-10-02 Akim Demaille <akim@epita.fr>
8455
8456 Various anti-`extern in *.c' changes.
8457
8458 * src/system.h: Include `assert.h'.
8459
8460 2000-10-02 Akim Demaille <akim@epita.fr>
8461
8462 * src/state.h (nstates, final_state, first_state, first_shift)
8463 (first_reduction): Move their exportation from here...
8464 * src/LR0.h: to here.
8465 Adjust dependencies.
8466 * src/getargs.c (statisticsflag): New variable.
8467 Add support for `--statistics'.
8468 Adjust dependencies.
8469
8470 Remove a lot of now useless `extern' statements in most files.
8471
8472 2000-10-02 Akim Demaille <akim@epita.fr>
8473
8474 * src/LR0.h: New file.
8475 Propagate its use.
8476
8477 2000-10-02 Akim Demaille <akim@epita.fr>
8478
8479 * src/print.h: New file.
8480 Propagate its use.
8481 * src/print.c: Formatting and ordering changes.
8482 (verbose, terse): Replace with...
8483 (print_results): this new function.
8484 Adjust dependencies.
8485
8486 2000-10-02 Akim Demaille <akim@epita.fr>
8487
8488 * src/conflicts.c (conflict_report): New function.
8489 (conflict_log, verbose_conflict_log): Replace with...
8490 (print_conflicts): this function.
8491 Adjust dependencies.
8492 * src/conflicts.h: New file.
8493 Propagate its inclusion.
8494
8495 2000-10-02 Akim Demaille <akim@epita.fr>
8496
8497 * src/nullable.h: New file.
8498 Propagate its inclusion.
8499 * src/nullable.c: Formatting changes.
8500
8501 2000-10-02 Akim Demaille <akim@epita.fr>
8502
8503 * src/reduce.h: New file.
8504 Propagate its inclusion.
8505 * src/reduce.c: Topological sort and other formatting changes.
8506 (bool, TRUE, FALSE): Move their definition to...
8507 * src/system.h: here.
8508
8509 2000-10-02 Akim Demaille <akim@epita.fr>
8510
8511 * src/files.c: Formatting changes.
8512 (tryopen, tryclose, openfiles): Rename as...
8513 (xfopen, xfclose, open_files): this.
8514 (stringappend): static.
8515 * src/files.h: Complete the list of exported symbols.
8516 Propagate its use.
8517
8518 2000-10-02 Akim Demaille <akim@epita.fr>
8519
8520 * src/reader.h: New file.
8521 Propagate its use instead of tedious list of `extern' and
8522 prototypes.
8523 * src/reader.c: Formatting changes, topological sort,
8524 s/register//.
8525
8526 2000-10-02 Akim Demaille <akim@epita.fr>
8527
8528 * src/lex.h: Prototype `lex.c' exported functions.
8529 * src/reader.c: Adjust.
8530 * src/lex.c: Formatting changes.
8531 (safegetc): Rename as...
8532 (xgetc): this.
8533
8534 2000-10-02 Akim Demaille <akim@epita.fr>
8535
8536 * src/lalr.h: New file.
8537 Propagate its inclusion instead of prototypes and `extern'.
8538 * src/lalr.c: Formatting changes, topological sorting etc.
8539
8540 2000-10-02 Akim Demaille <akim@epita.fr>
8541
8542 * src/output.c (token_actions): Introduce a temporary array,
8543 YYDEFACT, that makes it possible for this function to use
8544 output_short_table.
8545
8546 2000-10-02 Akim Demaille <akim@epita.fr>
8547
8548 `user_toknums' is output as a `short[]' in `output.c', while it is
8549 defined as a `int[]' in `reader.c'. For consistency with the
8550 other output tables, `user_toknums' is now defined as a table of
8551 shorts.
8552
8553 * src/reader.c (user_toknums): Be a short table instead of an int
8554 table.
8555 Adjust dependencies.
8556
8557 Factor the short table outputs.
8558
8559 * src/output.c (output_short_table): New function.
8560 * src/output.c (output_gram, output_stos, output_rule_data)
8561 (output_base, output_table, output_check): Use it.
8562
8563 2000-10-02 Akim Demaille <akim@epita.fr>
8564
8565 * src/output.c (output): Topological sort of the functions, in
8566 order to get rid of the `static' prototypes.
8567 No longer use `register'.
8568 * src/output.h: New file.
8569 Propagate its inclusion in files explicitly prototyping functions
8570 from output.c.
8571
8572 2000-09-21 Akim Demaille <akim@epita.fr>
8573
8574 * src/atgeneral.m4: Update from Autoconf.
8575
8576 2000-09-21 Akim Demaille <akim@epita.fr>
8577
8578 * src/closure.h: New file.
8579 * src/closure.c: Formatting changes, topological sort over the
8580 functions, use of closure.h.
8581 (initialize_closure, finalize_closure): Rename as...
8582 (new_closure, free_closure): these. Adjust dependencies.
8583 * src/LR0.c: Formatting changes, topological sort, use of
8584 cloture.h.
8585 (initialize_states): Rename as...
8586 (new_states): this.
8587 * src/Makefile.am (noinst_HEADERS): Adjust.
8588
8589 2000-09-20 Akim Demaille <akim@epita.fr>
8590
8591 * src/acconfig.h: Don't protect config.h against multiple
8592 inclusion.
8593 Don't define PARAMS.
8594 * src/system.h: Define PARAMS.
8595 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
8596 purpose of config.h. system.h must not try to fix wrong
8597 definitions in config.h.
8598
8599 2000-09-20 Akim Demaille <akim@epita.fr>
8600
8601 * src/derives.h: New file.
8602 * src/main.c, src/derives.h: Use it.
8603 Formatting changes.
8604 * src/Makefile.am (noinst_HEADERS): Adjust.
8605
8606 2000-09-20 Akim Demaille <akim@epita.fr>
8607
8608 * tests/atgeneral.m4: Update from Autoconf.
8609 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
8610 (AT_CHECK_CALC): New macros.
8611 Use these macros to test bison with options `', `--raw',
8612 `--debug', `--yacc', `--yacc --debug'.
8613
8614 2000-09-19 Akim Demaille <akim@epita.fr>
8615
8616 * src/output.c: Formatting changes.
8617 * src/machine.h: Remove, leaving its contents in...
8618 * src/system.h: here.
8619 Include stdio.h.
8620 Adjust all dependencies on stdio.h and machine.h.
8621 * src/getargs.h: New file.
8622 Let all `extern' declarations about getargs.c be replaced with
8623 inclusion of `getargs.h'.
8624 * src/Makefile.am (noinst_HEADERS): Adjust.
8625
8626 * tests/calc.m4 (yyin): Be initialized in main, not on the global
8627 scope.
8628 (yyerror): Returns void, not int.
8629 * doc/bison.texinfo: Formatting changes.
8630
8631 2000-09-19 Akim Demaille <akim@epita.fr>
8632
8633 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
8634 portable.
8635
8636 2000-09-18 Akim Demaille <akim@epita.fr>
8637
8638 * configure.in: Append WARNING_CFLAGS to CFLAGS.
8639 * src/Makefile.am (INCLUDES): Don't.
8640 Be ready to fetch headers in lib/.
8641
8642 2000-09-18 Akim Demaille <akim@epita.fr>
8643
8644 * doc/bison.texinfo: Update the copyright.
8645 ANSIfy and GNUify the examples.
8646 Remove the old menu.
8647
8648 2000-09-18 Akim Demaille <akim@epita.fr>
8649
8650 First set of tests: use the `calc' example from the documentation.
8651
8652 * src/bison.s1 (yyparse): Condition the code using `yytname' which
8653 is defined only when YYDEBUG is.
8654 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
8655 * src/files.c (tryopen, tryclose): Formatting changes.
8656 Move to the top and be static.
8657 * src/reader.c (read_signed_integer): Likewise.
8658 * tests/calc.m4: New file.
8659 * Makefile.am, suite.m4: Adjust.
8660 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
8661
8662 2000-09-18 Akim Demaille <akim@epita.fr>
8663
8664 Add support for an Autotest test suite for Bison.
8665
8666 * m4/m4.m4, m4/atconfig.m4: New files.
8667 * m4/Makefile.am (EXTRA_DIST): Adjust.
8668 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
8669 files.
8670 * src/getargs.c: Display a more standard --version message.
8671 * src/reader.c (reader): Formatting changes.
8672 No longer depend upon VERSION_STRING.
8673 * configure.in: No longer use `dnl'.
8674 Set up the test suite and the new directory `tests/.
8675 (VERSION_STRING): Remove.
8676
8677 2000-04-14 Akim Demaille <akim@epita.fr>
8678
8679 * src/reader.c (copy_comment2): New function, same as former
8680 `copy_comment', but outputs into two FILE *.
8681 (copy_comment): Use it.
8682 (parse_union_decl): Use it.
8683 (get_type, parse_start_decl): Use the same `invalid' message.
8684 (parse_start_decl, parse_union_decl): Use the same `multiple'
8685 message.
8686 (parse_union_decl, copy_guard, copy_action): Use the same
8687 `unmatched' message.
8688 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
8689
8690 2000-03-31 Akim Demaille <akim@epita.fr>
8691
8692 * src/files.c (tryopen, tryclose): Move to the top.
8693 Be static.
8694
8695 2000-03-31 Akim Demaille <akim@epita.fr>
8696
8697 * src/main.c (main): Don't call `done', exit does it.
8698
8699 2000-03-31 Akim Demaille <akim@epita.fr>
8700
8701 * allocate.c: s/return (foo)/return foo/.
8702 * lalr.c: Likewise.
8703 * LR0.c: Likewise.
8704 * output.c: Likewise.
8705 * reader.c: Likewise.
8706 * symtab.c: Likewise.
8707 * vmsgetargs.c: Likewise.
8708
8709 2000-03-31 Akim Demaille <akim@epita.fr>
8710
8711 Clean up the error reporting functions.
8712
8713 * src/report.c: New file.
8714 * src/report.h: Likewise.
8715 * src/Makefile.am: Adjust.
8716 * m4/error.m4: New file.
8717 * m4/Makefile.am: Adjust.
8718 * configure.in (jm_PREREQ_ERROR): Call it.
8719 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
8720 Remove.
8721 (fatal, fatals): Remove. All callers use complain.c::fatal.
8722 (warn, warni, warns, warnss, warnss): Remove. All callers use
8723 complain.c::complain.
8724 (toomany): Remove, use fatal instead.
8725 * src/files.c (done): No argument, use complain_message_count.
8726 * src/main.c (main): Register `done' to `atexit'.
8727
8728 * src/getargs.c (usage): More `fputs', less `fprintf'.
8729
8730 2000-03-28 Akim Demaille <akim@epita.fr>
8731
8732 * lib/: New directory.
8733 * Makefile.am (SUBDIRS): Adjust.
8734 * configure.in: Adjust.
8735 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
8736 useless.
8737 * src/alloca.c: Moved to lib/.
8738 * src/getopt.c: Likewise.
8739 * src/getopt1.c: Likewise.
8740 * src/getopt.h: Likewise.
8741 * src/ansi2knr.c: Likewise.
8742 * src/ansi2knr.1: Likewise.
8743 * src/Makefile.am: Adjust.
8744 * lib/Makefile.am: New file.
8745
8746 2000-03-28 Akim Demaille <akim@epita.fr>
8747
8748 * src/getargs.c (usage): Refresh the help message.
8749
8750 2000-03-17 Akim Demaille <akim@epita.fr>
8751
8752 * src/getopt1.c: Updated from textutils 2.0e
8753 * src/getopt.c: Likewise.
8754 * src/getopt.h: Likewise.
8755
8756 2000-03-17 Akim Demaille <akim@epita.fr>
8757
8758 * src/Makefile.am (bison.simple): Fix the awk program: quote only
8759 the file name, not the whole `#line LINE FILE'.
8760
8761 2000-03-17 Akim Demaille <akim@epita.fr>
8762
8763 On syntax errors, report the token on which we choked.
8764
8765 * src/bison.s1 (yyparse): In the label yyerrlab, when
8766 YYERROR_VERBOSE, add yychar in msg.
8767
8768 2000-03-17 Akim Demaille <akim@epita.fr>
8769
8770 * src/reader.c (copy_at): New function.
8771 (copy_guard): Use it.
8772 (copy_action): Use it.
8773
8774 2000-03-17 Akim Demaille <akim@epita.fr>
8775
8776 Be kind to translators, save some useless translations.
8777
8778 * src/main.c (banner): New function.
8779 (fatal_banner): Use it.
8780 (warn_banner): Use it.
8781
8782 2000-03-17 Akim Demaille <akim@epita.fr>
8783
8784 * src/reader.c (copy_definition): Use copy_string and
8785 copy_comment. Removed now unused `match', `ended',
8786 `cplus_comment'.
8787 (copy_comment, copy_string): Moved, to be visible from
8788 copy_definition.
8789
8790 2000-03-17 Akim Demaille <akim@epita.fr>
8791
8792 * src/reader.c (copy_string): Declare `static inline'. No
8793 problems with inline, since it is checked by configure.
8794 (copy_comment): Likewise.
8795
8796 2000-03-17 Akim Demaille <akim@epita.fr>
8797
8798 * src/reader.c (packsymbols): Formatting changes.
8799
8800 2000-03-17 Akim Demaille <akim@epita.fr>
8801
8802 * src/reader.c (copy_comment): New function, factored out from:
8803 (copy_action): Use it. Removed now unused `match', `ended',
8804 `cplus_comment'.
8805 (copy_guard): Likewise.
8806
8807 2000-03-17 Akim Demaille <akim@epita.fr>
8808
8809 * src/reader.c (copy_string): New function, factored out from:
8810 (copy_action): Use it.
8811 (copy_guard): Likewise.
8812
8813 2000-03-17 Akim Demaille <akim@epita.fr>
8814
8815 Change the handling of @s so that they behave exactly like $s.
8816 There is now a pseudo variable @$ (readble and writable), location
8817 of the lhs of the rule (by default ranging from the location of
8818 the first symbol of the rhs, to the location of the last symbol,
8819 or, if the rhs is empty, YYLLOC).
8820
8821 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
8822 yyval.
8823 (yyparse): When providing a default semantic action, provide a
8824 default location action.
8825 (after the $): No longer change `*YYLSP', just stack YYLOC the
8826 same way you stack YYVAL.
8827 * src/reader.c (read_declarations): Use warns.
8828 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
8829 (copy_action, case '@'): Likewise.
8830 Use a standard error message, to save useless work from
8831 translators.
8832
8833 2000-03-17 Akim Demaille <akim@epita.fr>
8834
8835 * src/bison.s1: Formatting and cosmetics changes.
8836 * src/reader.c: Likewise.
8837 Update the Copyright notice.
8838
8839 2000-03-17 Akim Demaille <akim@epita.fr>
8840
8841 * src/bison.s1 (#line): All set to `#line' only, since the
8842 Makefile now handles them.
8843
8844 2000-03-16 Akim Demaille <akim@epita.fr>
8845
8846 * src/output.c (output_rule_data): Output the documentation of
8847 some of the tables.
8848 (Copyright notice): Update.
8849 Formatting changes.
8850
8851 2000-03-16 Akim Demaille <akim@epita.fr>
8852
8853 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
8854 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
8855 One `#if YYDEBUG' remains, since it uses variables which are
8856 defined only if `YYDEBUG != 0'.
8857
8858 2000-03-16 Akim Demaille <akim@epita.fr>
8859
8860 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
8861 and related variables so that the similarities are highlighted.
8862
8863 2000-03-16 Akim Demaille <akim@epita.fr>
8864
8865 * src/bison.s1: Properly indent CPP directives.
8866
8867 2000-03-16 Akim Demaille <akim@epita.fr>
8868
8869 * src/bison.s1: Properly indent the `alloca' CPP section.
8870
8871 2000-03-16 Akim Demaille <akim@epita.fr>
8872
8873 Do not hard code values of directories in `configure.in'.
8874 Update the `configure' tool chain.
8875
8876 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
8877 src/makefile.am.
8878 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
8879 (AC_OUTPUT): Add m4/Makefile.
8880 Bump to bison 1.28a, 1.29 has never been released.
8881 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
8882 handled via src/Makefile.am.
8883 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
8884 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
8885 autoheader.
8886 * Makefile.am (SUBDIRS): Add m4.
8887 (ACLOCAL_AM_FLAGS): New variable.
8888 (AUTOMAKE_OPTIONS): Add check-news.
8889 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
8890 the proper line number and file name.
8891 (DEFS): Propagate the location of bison library files and of the
8892 locale files.
8893 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
8894 builddir.
8895 * acinclude.m4: Remove, replaced by the directory m4.
8896 * m4/Makefile.am (EXTRA_DIST): New variable.
8897 * m4/gettext.m4: New file, from the fileutils.
8898 * m4/lcmessage.m4: Likewise
8899 * m4/progtest.m4: Likewise.
8900 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
8901
8902 2000-03-10 Akim Demaille <akim@epita.fr>
8903
8904 * src/closure.c:
8905 Formatting changes of various comments.
8906 Respect the GNU coding standards at various places.
8907 Don't use `_()' when no translation is needed.
8908
8909 1999-12-13 Jesse Thilo <jthilo@gnu.org>
8910
8911 * src/files.c:
8912 OS/2 honors TMPDIR environment variable.
8913
8914 1999-12-13 Jesse Thilo <jthilo@gnu.org>
8915
8916 * doc/bison.texinfo: Tweaked spelling and grammar.
8917 Updated ISBN.
8918 Removed reference to price of printed copy.
8919 Mention BISON_SIMPLE and BISON_HAIRY.
8920
8921 1999-12-13 Jesse Thilo <jthilo@gnu.org>
8922
8923 * configure.in, NEWS:
8924 Bison 1.29 released.
8925
8926 1999-10-27 Jesse Thilo <jthilo@gnu.org>
8927
8928 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
8929 Added reference card.
8930
8931 1999-07-26 Jesse Thilo <jthilo@gnu.org>
8932
8933 * po/ru.po: Added Russian translation.
8934
8935 1999-07-26 Jesse Thilo <jthilo@gnu.org>
8936
8937 * configure.in: Added Russian translation.
8938
8939 1999-07-06 Jesse Thilo <jthilo@gnu.org>
8940
8941 * configure.in, NEWS, README:
8942 Released version 1.28.
8943
8944 1999-06-14 Jesse Thilo <jthilo@gnu.org>
8945
8946 * src/system.h:
8947 Squashed redefinition warning on some systems.
8948
8949 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
8950 Have configure build version string instead of relying on ANSI string
8951 concatentation.
8952
8953 1999-06-14 Jesse Thilo <jthilo@gnu.org>
8954
8955 * po/POTFILES.in: Got rid of version.c.
8956
8957 1999-06-14 Jesse Thilo <jthilo@gnu.org>
8958
8959 * acconfig.h, configure.in:
8960 Have configure build version string instead of relying on ANSI string
8961 concatentation.
8962
8963 1999-06-08 Jesse Thilo <jthilo@gnu.org>
8964
8965 * doc/bison.1:
8966 Dropped mention of `+' for long-named options.
8967
8968 1999-05-30 Jesse Thilo <jthilo@gnu.org>
8969
8970 * src/files.c: Added <unistd.h> for unlink().
8971
8972 * src/Makefile.am, src/system.h:
8973 I18n fixes.
8974
8975 1999-05-30 Jesse Thilo <jthilo@gnu.org>
8976
8977 * README: Added a FAQ list.
8978
8979 * configure.in, acconfig.h:
8980 I18n fixes.
8981
8982 1999-05-30 Jesse Thilo <jthilo@gnu.org>
8983
8984 * doc/FAQ, doc/Makefile.am:
8985 Added a FAQ list.
8986
8987 1999-05-19 Jesse Thilo <jthilo@gnu.org>
8988
8989 * src/alloc.h, src/symtab.h, src/version.c:
8990 Protected inclusion of "config.h" with HAVE_CONFIG_H.
8991
8992 1999-04-18 Jesse Thilo <jthilo@gnu.org>
8993
8994 * src/.cvsignore, src/Makefile.am:
8995 Reorganized: sources in `src', documentation in `doc'.
8996
8997 * src/lex.c (literalchar):
8998 fixed the code for escaping double quotes (thanks
8999 Jonathan Czisny.)
9000
9001 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9002
9003 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
9004 Adjusted paths to reflect directory reorganization.
9005
9006 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9007
9008 * doc/.cvsignore, doc/Makefile.am:
9009 Reorganized: sources in `src', documentation in `doc'.
9010
9011 1999-04-18 Jesse Thilo <jthilo@gnu.org>
9012
9013 * configure.in:
9014 Updated AC_INIT file to reflect directory reorganization.
9015
9016 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
9017 Reorganized: sources in `src', documentation in `doc'.
9018
9019 1999-04-13 Jesse Thilo <jthilo@gnu.org>
9020
9021 * src/allocate.c:
9022 Don't declare calloc() and realloc() if not necessary.
9023
9024 1999-04-13 Jesse Thilo <jthilo@gnu.org>
9025
9026 * configure.in, acconfig.h, acinclude.m4:
9027 Don't declare calloc() and realloc() if not necessary.
9028
9029 1999-03-23 Jesse Thilo <jthilo@gnu.org>
9030
9031 * po/.cvsignore: Added i18n support.
9032
9033 1999-03-23 Jesse Thilo <jthilo@gnu.org>
9034
9035 * acconfig.h, configure.in, Makefile.am:
9036 Added i18n support.
9037
9038 1999-03-22 Jesse Thilo <jthilo@gnu.org>
9039
9040 * src/bison.s1: Fixed #line numbers.
9041
9042 1999-03-15 Jesse Thilo <jthilo@gnu.org>
9043
9044 * po/es.po, po/fr.po, po/nl.po, po/de.po:
9045 Added PO files from Translation Project.
9046
9047 1999-03-03 Jesse Thilo <jthilo@gnu.org>
9048
9049 * Makefile.am:
9050 Added support for non-ANSI compilers (ansi2knr).
9051
9052 1999-02-16 Jesse Thilo <jthilo@gnu.org>
9053
9054 * configure.in: Bumped version number to 1.27.
9055
9056 * Makefile.am:
9057 Added `bison.simple' to list of files removed by `make distclean'.
9058
9059 1999-02-12 Jesse Thilo <jthilo@gnu.org>
9060
9061 * src/files.c, src/files.h:
9062 Defined locations of parser files in config.h instead of Makefile.
9063
9064 1999-02-12 Jesse Thilo <jthilo@gnu.org>
9065
9066 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
9067 Defined locations of parser files in config.h instead of Makefile.
9068
9069 1999-02-09 Jesse Thilo <jthilo@gnu.org>
9070
9071 * Makefile.am:
9072 Removed inappropriate use of $< macro.
9073
9074 1999-02-05 Jesse Thilo <jthilo@gnu.org>
9075
9076 * po/Makefile.in.in, po/POTFILES.in:
9077 Add `po' directory skeleton.
9078
9079 1999-01-27 Jesse Thilo <jthilo@gnu.org>
9080
9081 * README: Document help-bison list.
9082
9083 * configure.in: Add check for mkstemp().
9084
9085 1999-01-20 Jesse Thilo <jthilo@gnu.org>
9086
9087 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
9088 Hush a few compiler warnings.
9089
9090 * src/files.c:
9091 Add tryclose(), which verifies that fclose was successful.
9092 Hush a couple of compiler warnings.
9093
9094 1999-01-20 Jesse Thilo <jthilo@gnu.org>
9095
9096 * Makefile.am, OChangeLog:
9097 ChangeLog is now automatically generated. Include the old version as
9098 OChangeLog.
9099
9100 1999-01-14 Jesse Thilo <jthilo@gnu.org>
9101
9102 * 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:
9103 Update FSF address.
9104
9105 1999-01-14 Jesse Thilo <jthilo@gnu.org>
9106
9107 * doc/bison.texinfo: Fix formatting glitch.
9108
9109 * doc/bison.texinfo: Update FSF address.
9110
9111 1999-01-14 Jesse Thilo <jthilo@gnu.org>
9112
9113 * acconfig.h: Update FSF address.
9114
9115 1999-01-08 Jesse Thilo <jthilo@gnu.org>
9116
9117 * src/system.h:
9118 Don't define PACKAGE here, since config.h defines it.
9119
9120 1998-12-30 Jesse Thilo <jthilo@gnu.org>
9121
9122 * src/reader.c: Update copyright date.
9123
9124 * src/main.c:
9125 Ditch sprintf to statically-sized buffers in fatal/warn functions in
9126 favor of output directly to stderr (avoids buffer overruns).
9127
9128 * src/reader.c: Some checks for premature EOF.
9129
9130 * 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:
9131 Use prototypes if the compiler understands them.
9132
9133 * src/files.c: Honor TMPDIR on Unix hosts.
9134 Use prototypes if the compiler understands them.
9135
9136 * src/reader.c:
9137 Fix a couple of buffer overrun bugs.
9138 Use prototypes if the compiler understands them.
9139
9140 * src/system.h: Include unistd.h and ctype.h.
9141 Use #ifdef instead of #if for NLS symbols.
9142
9143 1998-12-30 Jesse Thilo <jthilo@gnu.org>
9144
9145 * doc/bison.texinfo:
9146 Delete comment "consider using @set for edition number, etc..." since
9147 we now are doing so.
9148
9149 1998-12-30 Jesse Thilo <jthilo@gnu.org>
9150
9151 * configure.in:
9152 Use prototypes if the compiler understands them.
9153
9154 * NEWS: Document 1.26 highlights.
9155
9156 * Makefile.am: Require Automake 1.3 or later.
9157
9158 * acconfig.h:
9159 Use prototypes if the compiler understands them.
9160
9161 1998-12-29 Jesse Thilo <jthilo@gnu.org>
9162
9163 * src/version.c:
9164 Use VERSION symbol from automake for version number.
9165
9166 1998-12-29 Jesse Thilo <jthilo@gnu.org>
9167
9168 * acconfig.h, configure.in, version.cin:
9169 Use VERSION symbol from automake for version number.
9170
9171 1998-11-28 Jesse Thilo <jthilo@gnu.org>
9172
9173 * Makefile.am:
9174 Distribute original version of simple parser (bison.s1), not built
9175 version (bison.simple).
9176
9177 1998-11-28 Jesse Thilo <jthilo@gnu.org>
9178
9179 * doc/bison.texinfo: Add info dir entry.
9180
9181 * doc/bison.texinfo:
9182 Let automake put version number into documentation.
9183
9184 1998-11-26 Jesse Thilo <jthilo@gnu.org>
9185
9186 * src/bison.cld, src/build.com, src/vmshlp.mar:
9187 Add non-RCS files from /gd/gnu/bison.
9188
9189 1998-11-26 Jesse Thilo <jthilo@gnu.org>
9190
9191 * doc/bison.1:
9192 Document the BISON_HAIRY and BISON_SIMPLE variables.
9193
9194 1998-11-25 Jesse Thilo <jthilo@gnu.org>
9195
9196 * src/version.c: Build version.c automatically.
9197
9198 * src/reader.c:
9199 Fix token numbering (used to start at 258, not 257).
9200
9201 * src/system.h: Include config.h.
9202
9203 * src/getargs.c: Update bug report address.
9204
9205 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
9206 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
9207
9208 1998-11-25 Jesse Thilo <jthilo@gnu.org>
9209
9210 * Makefile.am:
9211 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
9212
9213 * configure.in, version.cin:
9214 Build version.c automatically.
9215
9216 * AUTHORS: Add AUTHORS file.
9217
9218 * README: Update bug report address.
9219
9220 * bison.simple:
9221 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
9222
9223 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
9224 Add automake stuff.
9225
9226 1998-11-25 Jesse Thilo <jthilo@gnu.org>
9227
9228 * doc/bison.texinfo: Clean up some formatting.
9229
9230 1998-05-05 Richard Stallman <rms@gnu.org>
9231
9232 * doc/bison.texinfo:
9233 Explain better why to make a pure parser.
9234
9235 1998-01-05 Richard Stallman <rms@gnu.org>
9236
9237 * src/files.c (openfiles):
9238 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
9239 find a temporary directory, if possible. Do not unlink files while
9240 they are open.
9241
9242 1997-08-25 Richard Stallman <rms@gnu.org>
9243
9244 * src/reader.c (stack_offset;):
9245 Change some warni to warns.
9246
9247 * src/lex.c (literalchar): Use warns, not warni.
9248
9249 1997-06-28 Richard Stallman <rms@gnu.org>
9250
9251 * src/bison.s1: Add a Bison version comment.
9252
9253 * src/main.c (fatal, warn, berror):
9254 Use program_name.
9255
9256 1997-06-28 Richard Stallman <rms@gnu.org>
9257
9258 * Makefile.in (bison_version): New variable.
9259 (dist): Use that variable.
9260 (bison.s1): Substitute the Bison version into bison.simple.
9261
9262 * bison.simple: Add a Bison version comment.
9263
9264 1997-06-18 Richard Stallman <rms@gnu.org>
9265
9266 * src/main.c (fatal, warn, berror):
9267 Make error messages standard.
9268 (toomany): Improve error message text.
9269
9270 * 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:
9271 new.h renamed to alloc.h.
9272
9273 1997-06-18 Richard Stallman <rms@gnu.org>
9274
9275 * Makefile.in: new.h renamed to alloc.h.
9276
9277 1997-05-24 Richard Stallman <rms@gnu.org>
9278
9279 * src/lex.c (literalchar):
9280 Fix the code for escaping \, " and '.
9281
9282 (lex): Avoid trouble when there are many chars
9283 to discard in a char literal with just several chars in it.
9284
9285 1997-05-17 Richard Stallman <rms@gnu.org>
9286
9287 * src/bison.s1:
9288 Use malloc, if using alloca is troublesome.
9289 (YYSTACK_USE_ALLOCA): New flag macro.
9290 Define it for some systems and compilers.
9291 (YYSTACK_ALLOC): New macro.
9292 (yyparse): Use YYSTACK_ALLOC to allocate stack.
9293 If it was malloc'd, free it.
9294
9295 1997-05-17 Richard Stallman <rms@gnu.org>
9296
9297 * bison.simple:
9298 Use malloc, if using alloca is troublesome.
9299 (YYSTACK_USE_ALLOCA): New flag macro.
9300 Define it for some systems and compilers.
9301 (YYSTACK_ALLOC): New macro.
9302 (yyparse): Use YYSTACK_ALLOC to allocate stack.
9303 If it was malloc'd, free it.
9304
9305 1997-04-23 Richard Stallman <rms@gnu.org>
9306
9307 * src/bison.s1:
9308 (alloca) [__hpux]: Always define as __builtin_alloca.
9309
9310 1997-04-23 Richard Stallman <rms@gnu.org>
9311
9312 * bison.simple:
9313 (alloca) [__hpux]: Always define as __builtin_alloca.
9314
9315 1997-04-22 Richard Stallman <rms@gnu.org>
9316
9317 * src/bison.s1:
9318 [__hpux]: Include alloca.h (right for HPUX 10)
9319 instead of declaring alloca (right for HPUX 9).
9320
9321 * src/bison.s1 (__yy_memcpy):
9322 Declare arg `count' as unsigned int.
9323 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
9324
9325 1997-04-22 Richard Stallman <rms@gnu.org>
9326
9327 * bison.simple:
9328 [__hpux]: Include alloca.h (right for HPUX 10)
9329 instead of declaring alloca (right for HPUX 9).
9330
9331 * bison.simple (__yy_memcpy):
9332 Declare arg `count' as unsigned int.
9333 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
9334
9335 1997-01-03 Richard Stallman <rms@gnu.org>
9336
9337 * src/allocate.c: [__STDC__ or _MSC_VER]:
9338 Declare calloc and realloc to return void *.
9339
9340 1997-01-02 Richard Stallman <rms@gnu.org>
9341
9342 * src/system.h:
9343 [_MSC_VER]: Include stdlib.h and process.h.
9344 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
9345
9346 * src/main.c (main): Return FAILURE as a value.
9347 (printable_version): Declare arg as int, not char.
9348
9349 1997-01-02 Richard Stallman <rms@gnu.org>
9350
9351 * Makefile.in (dist):
9352 Explicitly check for symlinks, and copy them.
9353
9354 1996-12-19 Richard Stallman <rms@gnu.org>
9355
9356 * src/files.c:
9357 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
9358
9359 1996-12-18 Paul Eggert <eggert@gnu.org>
9360
9361 * src/bison.s1 (yyparse):
9362 If __GNUC__ and YYPARSE_PARAM are both defined,
9363 declare yyparse to have a void * argument.
9364
9365 1996-12-18 Paul Eggert <eggert@gnu.org>
9366
9367 * bison.simple (yyparse):
9368 If __GNUC__ and YYPARSE_PARAM are both defined,
9369 declare yyparse to have a void * argument.
9370
9371 1996-12-17 Richard Stallman <rms@gnu.org>
9372
9373 * src/reduce.c (nbits): Add some casts.
9374
9375 1996-08-12 Richard Stallman <rms@gnu.org>
9376
9377 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
9378
9379 1996-08-12 Richard Stallman <rms@gnu.org>
9380
9381 * bison.simple: Test _MSDOS as well as _MSDOS_.
9382
9383 1996-07-31 Richard Stallman <rms@gnu.org>
9384
9385 * src/bison.s1:
9386 [__sun && __i386]: Include alloca.h.
9387
9388 1996-07-31 Richard Stallman <rms@gnu.org>
9389
9390 * bison.simple:
9391 [__sun && __i386]: Include alloca.h.
9392
9393 1996-07-30 Richard Stallman <rms@gnu.org>
9394
9395 * src/bison.s1: Comment change.
9396
9397 * src/bison.s1: Test _MSDOS_, not MSDOS.
9398
9399 1996-07-30 Richard Stallman <rms@gnu.org>
9400
9401 * bison.simple: Comment change.
9402
9403 * bison.simple: Test _MSDOS_, not MSDOS.
9404
9405 1996-06-01 Richard Stallman <rms@gnu.org>
9406
9407 * 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:
9408 Insert `_' macro around many string constants.
9409
9410 * src/main.c:
9411 Insert `_' macro around many string constants.
9412
9413 (main): Call setlocale, bindtextdomain and textdomain.
9414
9415 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
9416 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
9417 [ENABLE_NLS]: Include libintl.h.
9418 [ENABLE_NLS] (gettext): Define.
9419 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
9420 (N_, PACKAGE, LOCALEDIR): New macros.
9421
9422 1996-06-01 Richard Stallman <rms@gnu.org>
9423
9424 * POTFILES.in: New file.
9425
9426 * Makefile.in (allocate.o):
9427 Define target explicitly.
9428
9429 * Makefile.in (CFLAGS): Set to @CFLAGS@.
9430 (LDFLAGS): Set to @LDFLAGS@.
9431 (configure): Run autoconf only if preceding `cd' succeeds.
9432 (bison.s1): Redirect output to temporary file then move the
9433 temporary to the target, rather than redirecting directly to bison.s1.
9434 (clean): Remove config.status and config.log.
9435 (distclean): Don't remove config.status here.
9436
9437 1996-05-12 Richard Stallman <rms@gnu.org>
9438
9439 * src/bison.s1:
9440 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
9441
9442 1996-05-12 Richard Stallman <rms@gnu.org>
9443
9444 * bison.simple:
9445 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
9446
9447 1996-05-11 Richard Stallman <rms@gnu.org>
9448
9449 * src/bison.s1 (__yy_memcpy):
9450 Really reorder the args, as was supposedly done on Feb 14 1995.
9451 (yyparse): Calls changed accordingly.
9452
9453 1996-05-11 Richard Stallman <rms@gnu.org>
9454
9455 * Makefile.in (dist): Don't use $(srcdir).
9456
9457 * bison.simple (__yy_memcpy):
9458 Really reorder the args, as was supposedly done on Feb 14 1995.
9459 (yyparse): Calls changed accordingly.
9460
9461 1996-01-27 Richard Stallman <rms@gnu.org>
9462
9463 * src/output.c (output_rule_data):
9464 Test YYERROR_VERBOSE in the conditional
9465 around the definition of ttyname.
9466
9467 1995-12-29 Richard Stallman <rms@gnu.org>
9468
9469 * src/bison.s1:
9470 Fix line numbers in #line commands.
9471
9472 1995-12-29 Richard Stallman <rms@gnu.org>
9473
9474 * bison.simple:
9475 Fix line numbers in #line commands.
9476
9477 1995-12-27 Richard Stallman <rms@gnu.org>
9478
9479 * src/bison.s1 (YYPARSE_PARAM_DECL):
9480 In C++, make it always null.
9481 (YYPARSE_PARAM_ARG): New macro.
9482 (yyparse): Use YYPARSE_PARAM_ARG.
9483
9484 1995-12-27 Richard Stallman <rms@gnu.org>
9485
9486 * bison.simple (YYPARSE_PARAM_DECL):
9487 In C++, make it always null.
9488 (YYPARSE_PARAM_ARG): New macro.
9489 (yyparse): Use YYPARSE_PARAM_ARG.
9490
9491 1995-11-29 Richard Stallman <rms@gnu.org>
9492
9493 * doc/bison.texinfo:
9494 Describe literal string tokens, %raw, %no_lines, %token_table.
9495
9496 1995-11-29 Daniel Hagerty <hag@gnu.org>
9497
9498 * doc/bison.texinfo: Fixed update date
9499
9500 1995-10-16 Richard Stallman <rms@gnu.org>
9501
9502 * src/version.c: Version 1.25.
9503
9504 1995-10-16 Richard Stallman <rms@gnu.org>
9505
9506 * NEWS: *** empty log message ***
9507
9508 1995-10-16 Richard Stallman <rms@gnu.org>
9509
9510 * doc/bison.1, doc/bison.rnh:
9511 Add new options.
9512
9513 1995-10-15 Richard Stallman <rms@gnu.org>
9514
9515 * src/vmsgetargs.c, src/getargs.c:
9516 Added -n, -k, and -raw switches.
9517 (noparserflag, toknumflag, rawtoknumflag): New variables.
9518
9519 * src/symtab.h (SALIAS):
9520 New #define for adding aliases to %token.
9521 (struct bucket): Added `alias' field.
9522
9523 * src/reduce.c (reduce_grammar):
9524 Revise error message.
9525 (print_notices): Remove final `.' from error message.
9526
9527 * src/reader.c (reader_output_yylsp):
9528 New function.
9529 (readgram): Use `#if 0' around code that accepted %command
9530 inside grammar rules: The documentation doesn't allow it,
9531 and it will fail since the %command processors scan for the next %.
9532 (parse_token_decl): Extended the %token
9533 declaration to allow a multi-character symbol as an alias.
9534 (parse_thong_decl): New function.
9535 (read_declarations): Added %thong declarations.
9536 (read_declarations): Handle NOOP to deal with allowing
9537 % declarations as another means to specify the flags.
9538 (readgram): Allow %prec prior to semantics embedded in a rule.
9539 (skip_to_char, read_declarations, copy_definition)
9540 (parse_token_decl, parse_start_decl, parse_type_decl)
9541 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
9542 (get_type_name, copy_guard, copy_action, readgram)
9543 (get_type, packsymbols): Revised most error messages.
9544 Changed `fatal' to `warnxxx' to avoid aborting for error.
9545 Revised and use multiple warnxxx functions to avoid using VARARGS1.
9546 (read_declarations): Improve the error message for
9547 an invalid character. Do not abort.
9548 (read_declarations, copy_guard, copy_action): Use
9549 printable_version to avoid unprintable characters in printed output.
9550 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
9551 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
9552 Allow the type of a non-terminal can be given
9553 more than once, as long as all specifications give the same type.
9554
9555 * src/output.c:
9556 (output_headers, output_trailers, output, output_gram)
9557 (output_rule_data): Implement noparserflag variable.
9558 Implement toknumflag variable.
9559 (output): Call reader_output_yylsp to output LTYPESTR.
9560
9561 * src/main.c (main):
9562 If reader sees an error, don't process the grammar.
9563 (fatals): Updated to not use VARARGS1.
9564 (printable_version, int_to_string, warn, warni, warns, warnss)
9565 (warnsss): New error reporting functions. Avoid abort for error.
9566
9567 * src/lex.h:
9568 Added THONG and NOOP for alias processing.
9569 Added SETOPT for the new code that allows setting options with %flags.
9570
9571 * src/lex.c:
9572 Include getopt.h. Add some extern decls.
9573 (safegetc): New function to deal with EOF gracefully.
9574 (literalchar); new function to deal with reading \ escapes.
9575 (lex): Use literalchar.
9576 (lex): Implemented "..." tokens.
9577 (literalchar, lex, parse_percent_token): Made tokenbuffer
9578 always contain the token. This includes growing the token
9579 buffer while reading an integer.
9580 (parse_percent_token): Replaced if-else statement with percent_table.
9581 (parse_percent_token): Added % declarations as another
9582 way to specify the flags -n, -l, and -r. Also added hooks for
9583 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
9584 major changes to files.c.
9585 (lex) Retain in the incoming stream a character following
9586 an incorrect '/'.
9587 (skip_white_space, lex): Revised most error messages
9588 and changed fatal to warn to avoid aborting.
9589 (percent_table): Added %thong declarations.
9590
9591 * src/gram.h: Comment changes.
9592
9593 * src/files.c (openfiles, open_extra_files, done):
9594 Add faction flag
9595 and actfile file. Handle noparserflag. Both for -n switch.
9596
9597 * src/conflicts.c (resolve_sr_conflict):
9598 Remove use of alloca.
9599
9600 1995-06-01 Jim Meyering <meyering@gnu.org>
9601
9602 * doc/bison.texinfo: *** empty log message ***
9603
9604 1995-05-06 Richard Stallman <rms@gnu.org>
9605
9606 * src/bison.s1: Comment change.
9607
9608 1995-05-06 Richard Stallman <rms@gnu.org>
9609
9610 * bison.simple: Comment change.
9611
9612 1995-05-03 Richard Stallman <rms@gnu.org>
9613
9614 * src/version.c: Version now 1.24.
9615
9616 * src/bison.s1: Change distribution terms.
9617
9618 * src/version.c: Version now 1.23.
9619
9620 1995-05-03 Richard Stallman <rms@gnu.org>
9621
9622 * doc/bison.texinfo:
9623 Rewrite "Conditions for Using Bison".
9624 Update version to 1.24.
9625
9626 1995-05-03 Richard Stallman <rms@gnu.org>
9627
9628 * bison.simple: Change distribution terms.
9629
9630 1995-02-23 Richard Stallman <rms@gnu.org>
9631
9632 * src/files.c: Test __VMS_POSIX as well as VMS.
9633
9634 1995-02-14 Jim Meyering <meyering@gnu.org>
9635
9636 * src/bison.s1 (__yy_memcpy):
9637 Renamed from __yy_bcopy to avoid
9638 confusion. Reverse FROM and TO arguments to be consistent with
9639 those of memcpy.
9640
9641 1995-02-14 Jim Meyering <meyering@gnu.org>
9642
9643 * bison.simple (__yy_memcpy):
9644 Renamed from __yy_bcopy to avoid
9645 confusion. Reverse FROM and TO arguments to be consistent with
9646 those of memcpy.
9647
9648 1994-11-10 David J. MacKenzie <djm@gnu.org>
9649
9650 * NEWS: reformat
9651
9652 * NEWS: New file.
9653
9654 * Makefile.in (DISTFILES): Include NEWS.
9655
9656 * Makefile.in (DISTFILES):
9657 Include install-sh, not install.sh.
9658
9659 * configure.in: Update to Autoconf v2 macro names.
9660
9661 1994-10-05 David J. MacKenzie <djm@gnu.org>
9662
9663 * Makefile.in: fix typo
9664
9665 * Makefile.in (prefix, exec_prefix):
9666 Let configure set them.
9667
9668 1994-09-28 David J. MacKenzie <djm@gnu.org>
9669
9670 * Makefile.in: Set datadir to $(prefix)/share.
9671
9672 1994-09-15 Richard Stallman <rms@gnu.org>
9673
9674 * src/bison.s1:
9675 Update copyright notice and GPL version.
9676
9677 1994-09-15 Richard Stallman <rms@gnu.org>
9678
9679 * bison.simple:
9680 Update copyright notice and GPL version.
9681
9682 1994-07-12 Richard Stallman <rms@gnu.org>
9683
9684 * src/reduce.c, src/reader.c:
9685 entered into RCS
9686
9687 1994-05-05 David J. MacKenzie <djm@gnu.org>
9688
9689 * Makefile.in: entered into RCS
9690
9691 1994-03-26 Richard Stallman <rms@gnu.org>
9692
9693 * src/bison.s1: entered into RCS
9694
9695 1994-03-26 Richard Stallman <rms@gnu.org>
9696
9697 * bison.simple: entered into RCS
9698
9699 1994-03-25 Richard Stallman <rms@gnu.org>
9700
9701 * src/main.c: entered into RCS
9702
9703 1994-03-24 Richard Stallman <rms@gnu.org>
9704
9705 * src/conflicts.c: entered into RCS
9706
9707 1994-01-02 Richard Stallman <rms@gnu.org>
9708
9709 * Makefile.in: *** empty log message ***
9710
9711 1993-11-21 Richard Stallman <rms@gnu.org>
9712
9713 * src/bison.s1: *** empty log message ***
9714
9715 1993-11-21 Richard Stallman <rms@gnu.org>
9716
9717 * doc/bison.texinfo: entered into RCS
9718
9719 * doc/bison.texinfo: *** empty log message ***
9720
9721 1993-11-21 Richard Stallman <rms@gnu.org>
9722
9723 * bison.simple: *** empty log message ***
9724
9725 1993-10-25 David J. MacKenzie <djm@gnu.org>
9726
9727 * doc/bison.texinfo: *** empty log message ***
9728
9729 1993-10-19 Richard Stallman <rms@gnu.org>
9730
9731 * src/bison.s1: *** empty log message ***
9732
9733 1993-10-19 Richard Stallman <rms@gnu.org>
9734
9735 * bison.simple: *** empty log message ***
9736
9737 1993-10-14 Richard Stallman <rms@gnu.org>
9738
9739 * src/bison.s1: *** empty log message ***
9740
9741 1993-10-14 Richard Stallman <rms@gnu.org>
9742
9743 * bison.simple: *** empty log message ***
9744
9745 1993-09-14 David J. MacKenzie <djm@gnu.org>
9746
9747 * doc/bison.texinfo: *** empty log message ***
9748
9749 1993-09-13 Noah Friedman <friedman@gnu.org>
9750
9751 * Makefile.in: *** empty log message ***
9752
9753 1993-09-10 Richard Stallman <rms@gnu.org>
9754
9755 * src/conflicts.c: *** empty log message ***
9756
9757 * src/system.h: entered into RCS
9758
9759 1993-09-10 Richard Stallman <rms@gnu.org>
9760
9761 * doc/bison.1: entered into RCS
9762
9763 1993-09-06 Noah Friedman <friedman@gnu.org>
9764
9765 * src/version.c: entered into RCS
9766
9767 1993-09-06 Noah Friedman <friedman@gnu.org>
9768
9769 * Makefile.in: *** empty log message ***
9770
9771 1993-07-30 David J. MacKenzie <djm@gnu.org>
9772
9773 * Makefile.in: *** empty log message ***
9774
9775 1993-07-24 Richard Stallman <rms@gnu.org>
9776
9777 * src/bison.s1: *** empty log message ***
9778
9779 1993-07-24 Richard Stallman <rms@gnu.org>
9780
9781 * bison.simple: *** empty log message ***
9782
9783 1993-07-08 David J. MacKenzie <djm@gnu.org>
9784
9785 * Makefile.in: *** empty log message ***
9786
9787 1993-07-04 Richard Stallman <rms@gnu.org>
9788
9789 * src/bison.s1: *** empty log message ***
9790
9791 1993-07-04 Richard Stallman <rms@gnu.org>
9792
9793 * bison.simple: *** empty log message ***
9794
9795 1993-06-26 David J. MacKenzie <djm@gnu.org>
9796
9797 * src/getargs.c: entered into RCS
9798
9799 1993-06-26 David J. MacKenzie <djm@gnu.org>
9800
9801 * doc/bison.texinfo: *** empty log message ***
9802
9803 * doc/bison.1: New file.
9804
9805 1993-06-25 Richard Stallman <rms@gnu.org>
9806
9807 * src/getargs.c: New file.
9808
9809 1993-06-16 Richard Stallman <rms@gnu.org>
9810
9811 * src/bison.s1: *** empty log message ***
9812
9813 1993-06-16 Richard Stallman <rms@gnu.org>
9814
9815 * bison.simple: *** empty log message ***
9816
9817 1993-06-03 Richard Stallman <rms@gnu.org>
9818
9819 * src/bison.s1: New file.
9820
9821 1993-06-03 Richard Stallman <rms@gnu.org>
9822
9823 * doc/bison.texinfo: *** empty log message ***
9824
9825 1993-06-03 Richard Stallman <rms@gnu.org>
9826
9827 * bison.simple: New file.
9828
9829 1993-05-19 Richard Stallman <rms@gnu.org>
9830
9831 * doc/bison.texinfo: New file.
9832
9833 1993-05-07 Noah Friedman <friedman@gnu.org>
9834
9835 * Makefile.in: *** empty log message ***
9836
9837 1993-04-28 Noah Friedman <friedman@gnu.org>
9838
9839 * src/reader.c: *** empty log message ***
9840
9841 1993-04-23 Noah Friedman <friedman@gnu.org>
9842
9843 * src/alloc.h: entered into RCS
9844
9845 1993-04-20 David J. MacKenzie <djm@gnu.org>
9846
9847 * src/version.c: *** empty log message ***
9848
9849 * src/files.c, src/allocate.c:
9850 entered into RCS
9851
9852 * src/reader.c: *** empty log message ***
9853
9854 * src/lex.c: entered into RCS
9855
9856 * src/conflicts.c: New file.
9857
9858 * src/symtab.c: entered into RCS
9859
9860 * src/alloc.h: New file.
9861
9862 * src/LR0.c: entered into RCS
9863
9864 1993-04-18 Noah Friedman <friedman@gnu.org>
9865
9866 * src/reader.c: New file.
9867
9868 * src/version.c: *** empty log message ***
9869
9870 1993-04-18 Noah Friedman <friedman@gnu.org>
9871
9872 * Makefile.in: *** empty log message ***
9873
9874 1993-04-17 Noah Friedman <friedman@gnu.org>
9875
9876 * Makefile.in: *** empty log message ***
9877
9878 1993-04-15 Richard Stallman <rms@gnu.org>
9879
9880 * src/main.c, src/files.c:
9881 New file.
9882
9883 1993-04-15 Noah Friedman <friedman@gnu.org>
9884
9885 * configure.in: entered into RCS
9886
9887 * configure.in: *** empty log message ***
9888
9889 * configure.in: New file.
9890
9891 1993-04-14 Richard Stallman <rms@gnu.org>
9892
9893 * Makefile.in: New file.
9894
9895 1993-04-13 Richard Stallman <rms@gnu.org>
9896
9897 * src/version.c: New file.
9898
9899 1993-03-25 Richard Stallman <rms@gnu.org>
9900
9901 * src/output.c: entered into RCS
9902
9903 1992-09-25 Richard Stallman <rms@gnu.org>
9904
9905 * configure.bat: entered into RCS
9906
9907 1992-06-22 Richard Stallman <rms@gnu.org>
9908
9909 * src/vmsgetargs.c: entered into RCS
9910
9911 1992-06-22 Richard Stallman <rms@gnu.org>
9912
9913 * doc/bison.rnh: entered into RCS
9914
9915 1992-04-20 David J. MacKenzie <djm@gnu.org>
9916
9917 * README: entered into RCS
9918
9919 1992-01-22 Richard Stallman <rms@gnu.org>
9920
9921 * src/machine.h: entered into RCS
9922
9923 1991-12-21 Richard Stallman <rms@gnu.org>
9924
9925 * src/lalr.c, src/closure.c:
9926 entered into RCS
9927
9928 1991-12-20 Richard Stallman <rms@gnu.org>
9929
9930 * src/state.h: entered into RCS
9931
9932 1991-12-18 Richard Stallman <rms@gnu.org>
9933
9934 * src/print.c, src/nullable.c, src/derives.c:
9935 entered into RCS
9936
9937 1991-11-03 David J. MacKenzie <djm@gnu.org>
9938
9939 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
9940 entered into RCS
9941
9942 1988-09-09 Richard Stallman <rms@gnu.org>
9943
9944 * src/bison.hairy: entered into RCS
9945
9946 1987-12-16 Richard Stallman <rms@gnu.org>
9947
9948 * REFERENCES: entered into RCS
9949 -----
9950
9951 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
9952
9953 This file is part of GNU Bison.
9954
9955 GNU Bison is free software; you can redistribute it and/or modify
9956 it under the terms of the GNU General Public License as published by
9957 the Free Software Foundation; either version 2, or (at your option)
9958 any later version.
9959
9960 GNU Bison is distributed in the hope that it will be useful,
9961 but WITHOUT ANY WARRANTY; without even the implied warranty of
9962 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9963 GNU General Public License for more details.
9964
9965 You should have received a copy of the GNU General Public License
9966 along with GNU Bison; see the file COPYING. If not, write to
9967 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
9968 Boston, MA 02111-1307, USA.