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