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