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