1 2002-11-15 Akim Demaille <akim@epita.fr>
3 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
4 take two BRACED_CODE, not two string_content.
5 Free the scanner's obstack when we are done.
7 * tests/calc.at: Adjust.
8 * doc/bison.texinfo: Adjust.
9 Also, make sure to include the `,' for these declarations.
11 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14 definition; avoids potential autoreconf problems.
16 2002-11-15 Akim Demaille <akim@epita.fr>
18 Always check the value returned by yyparse.
20 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
22 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
24 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
27 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
29 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
32 2002-11-14 Paul Eggert <eggert@twinsun.com>
34 * src/output.c (output_skeleton): Call xfopen instead of
35 duplicating xfopen's body.
37 Fix bugs reported by Nelson H. F. Beebe in
38 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001893.html>.
40 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
41 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
42 Group compiler. Instead, use "$CC -E bar.c". Include the .h
43 file twice in the grammar, as an extra check.
45 * tests/input.at (Torturing the Scanner): Surround the
46 backslash-newline tests with "#if 0", to make it less likely that
47 we'll run into compiler bugs. Bring back solitary \ inside
48 comment, but add a closing comment to work around HP C bug. Don't
49 test backslash-newline in C character constant. This should fix
50 the input.at bug reported by Nelson H. F. Beebe in
51 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001893.html>.
53 2002-11-14 Akim Demaille <akim@epita.fr>
55 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
56 status of the compiler.
57 Calling `exit 1' is no longer needed.
58 Reported by Nelson H. F. Beebe.
60 2002-11-14 Akim Demaille <akim@epita.fr>
62 * tests/atlocal.in (CPPFLAGS): We have config.h.
63 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
65 * tests/actions.at, tests/calc.at, tests/conflicts.at,
66 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
67 * tests/regression.at, tests/torture.at: Use them for all the
68 grammars that are to be compiled.
69 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
70 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
71 * doc/bison.texinfo (GLR Parsers): Document `inline'.
73 2002-11-14 Akim Demaille <akim@epita.fr>
75 * doc/bison.texinfo: Various formatting changes (alignments in
76 samples, additional @group/@end group, GCS in samples.
77 Use @deffn instead of simple @table to define the directives,
78 macros, variables etc.
80 2002-11-13 Paul Eggert <eggert@twinsun.com>
82 Fix some bugs reported by Albert Chin-A-Young in
83 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001881.html>.
85 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
86 -o c"; the HP C compiler chatters during compilation.
87 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
88 * tests/headers.at (export YYLTYPE): Likewise.
90 * tests/input.at (Torturing the Scanner): Remove lines containing
91 solitary backslashes, as they tickle a bug in the HP C compiler.
93 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
94 comments, since they're not portable. Use GNU coding style.
96 2002-11-13 Akim Demaille <akim@epita.fr>
98 * data/yacc.c: Leave bigger chunks of quoted text.
100 Use it to report symbol activities.
101 * data/glr.c (YYDSYMPRINTF): New.
104 2002-11-12 Paul Eggert <eggert@twinsun.com>
108 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
109 (yyglrReduce): Return yyok, not 0.
110 This should avoid the enumerated-type warnings reported
111 by Nelson H.F. Beebe in
112 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001872.html>.
114 * lib/bbitset.h (BITSET_INLINE): Remove.
115 * lib/bitset.h [! BITSET_INLINE]: Remove.
116 (bitset_set, bitset_reset, bitset_test): Rename local vars
117 to avoid shadowing warnings by GCC.
119 * data/glr.c (inline): Remove #define. It's the user's
120 responsibility to #define it away, just like 'const'.
121 This fixes one of the bugs reported by Nelson H.F. Beebe in
122 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001873.html>.
124 * Makefile.maint (po-check): Scan .l and .y files instead of the
125 .c and the .h files that they generate. This fixes the bug
126 reported by Tim Van Holder in:
127 <http://mail.gnu.org/pipermail/bison-patches/2002-November/001352.html>
128 Look for N_ as well as for _. Try to avoid matching #define for
130 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
131 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
132 * src/scan-gram.l: Revamp regular expressions so that " and '
133 do not confuse xgettext.
135 * src/struniq.h (struniq_new): Do not declare the return type
136 to be 'const'; this violates the C standard.
137 * src/struniq.c (struniq_new): Likewise.
139 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
141 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
142 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
145 2002-11-12 Akim Demaille <akim@epita.fr>
147 * Makefile.maint: Sync with Autoconf:
148 (local_updates): New.
150 2002-11-12 Akim Demaille <akim@epita.fr>
152 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
154 2002-11-12 Akim Demaille <akim@epita.fr>
156 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
159 2002-11-12 Akim Demaille <akim@epita.fr>
161 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
164 2002-11-12 Akim Demaille <akim@epita.fr>
166 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
167 Use it to test the GLR parser.
169 2002-11-12 Akim Demaille <akim@epita.fr>
171 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
173 * data/glr.c (yystos): New.
174 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
176 (yyval): Don't define it, it is handled via M4.
177 (yyrecoverParseError): Free verbosely the discarded symbols.
178 * data/yacc.c (yysymprint): Remove, rather...
179 (b4_yysymprint_generate): invoke.
180 * data/c.m4 (b4_yysymprint_generate): New.
181 Accept pointers as arguments, as opposed to the version from
183 (b4_yydestruct_generate): Likewise.
184 * tests/cations.at (Printers and Destructors): Use Bison directives
185 instead of CPP macros.
186 Don't rely on internal details.
188 2002-11-12 Akim Demaille <akim@epita.fr>
190 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
191 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
192 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
193 it against YYEMPTY and so forth), work on yytoken (i.e., set
195 (yydestruct): Replace with a b4_yydestruct_generate invocation.
196 (b4_symbol_actions): Remove.
197 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
200 2002-11-12 Akim Demaille <akim@epita.fr>
202 * doc/bison.texinfo (Destructor Decl): New.
204 2002-11-12 Akim Demaille <akim@epita.fr>
206 * src/tables.c (tables_generate): Use free for pointers that
207 cannot be NULL, not XFREE.
208 (pack_vector): Use assert, not fatal, for bound violations.
209 * src/state.c (state_new): Likewise.
210 * src/reader.c (reader): Likewise.
211 * src/lalr.c (set_goto_map): Likewise.
212 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
215 2002-11-12 Akim Demaille <akim@epita.fr>
217 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
219 * src/scan-gram.l (last_string): Is global to the file, not to
221 * src/parse-gram.y (input): Don't append the epilogue here,
222 (epilogue.opt): do it here, and free the scanner's obstack.
223 * src/reader.c (epilogue_set): Rename as...
224 (epilogue_augment): this.
225 * data/c.m4 (b4_epilogue): Defaults to empty.
227 2002-11-12 Akim Demaille <akim@epita.fr>
229 * src/getargs.c (long_options): Remove duplicates.
230 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
232 * doc/bison.rnh: Remove.
233 * doc/bison.texinfo (VMS Invocation): Remove.
235 2002-11-12 Akim Demaille <akim@epita.fr>
237 * src/struniq.h, src/struniq.c (struniq_t): Is const.
238 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
240 Use struniq for symbols.
242 * src/symtab.h (symbol_t): The tag member is a struniq.
243 (symbol_type_set): Adjust.
244 * src/symtab.c (symbol_new): Takes a struniq.
245 (symbol_free): Don't free the tag member.
246 (hash_compare_symbol_t, hash_symbol_t): Rename as...
247 (hash_compare_symbol, hash_symbol): these.
248 Use the fact that tags as struniqs.
249 (symbol_get): Use struniq_new.
250 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
252 * src/reader.h (merger_list, grammar_currentmerge_set): The name
253 and type members are struniqs.
254 * src/reader.c (get_merge_function)
255 (grammar_current_rule_merge_set): Adjust.
256 (TYPE, current_type): Are struniq.
258 Use struniq for file names.
260 * src/files.h, src/files.c (infile): Split into...
261 (grammar_file, current_file): these.
262 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
263 * src/reduce.c (reduce_print): Likewise.
264 * src/getargs.c (getargs): Likewise.
265 * src/complain.h, src/complain.c: Likewise.
266 * src/main.c (main): Call struniqs_new early enough to use it for
268 Don't free the input file name.
270 2002-11-12 Akim Demaille <akim@epita.fr>
272 * src/symtab.c (symbol_free): Remove dead deactivated code:
273 type_name are properly removed.
274 Don't use XFREE to free items that cannot be NULL.
275 * src/struniq.h, src/struniq.c: New.
276 * src/main.c (main): Initialize/free struniqs.
277 * src/parse-gram.y (%union): Add astruniq member.
279 * src/scan-gram.l (<{tag}>): Return a struniq.
280 Free the obstack bit that used to store it.
281 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
283 2002-11-11 Paul Eggert <eggert@twinsun.com>
285 Revamp to fix many (but not all) of the C- and M4-related quoting
286 problems. Among other things, this fixes the Bison bug reported
287 by Jan Hubicka when processing the Bash grammar; see:
288 <http://mail.gnu.org/pipermail/bison-patches/2002-November/001329.html>
290 Use new @ escapes consistently. Represent brackets with @{ and @}
291 rather than @<:@ and @:>@, since this works a bit better with dumb
292 editors like vi. Represent @ with @@, since @ is now consistently
293 an escape. Use @oline@ and @ofile@ rather than __oline__ and
294 __ofile__, to avoid unexpected expansions. Similarly, use @output
297 * data/c.m4 (b4_copyright): Omit file name from comment, since
298 the file name could contain "*/".
299 (b4_synclines_flag): Don't quote the 2nd argument; it should already
300 be quoted. All uses changed.
302 * data/glr.c: Use new @ escapes consistently.
303 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
304 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
305 Remove, since they couldn't handle arbitrary characters in file
307 * data/lalr1.cc: Likewise.
308 * data/yacc.c: Likewise.
310 * src/files.c (output_infix): Remove; all uses removed.
311 * src/files.h: Likewise.
313 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
314 mishandled funny characters in file names, and anyway it isn't
316 * data/yacc.c: Likewise.
317 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
319 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
320 * data/yacc.c: Likewise.
322 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
324 (muscle_init): Quote filename as a C string.
325 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
326 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
327 * src/output.c (escaped_file_name_output): New function.
328 (prepare_symbols): Quote tokens for M4.
329 (prepare): Don't insert output_infix, output_prefix,
330 output_parser_name, output_header_name; this is now down by scan-skel.
331 Insert skeleton as a C string.
333 * src/output.c (user_actions_output, symbol_destructors_output,
334 symbol_printers_output): Quote filenames for C and M4.
335 * src/reader.c (prologue_augment, epilogue_set): Likewise.
337 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
338 escapes other than \\ and \'; this simplifies the code.
339 (<SC_STRING>): Likewise, for \\ and \".
340 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
341 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
342 Use new escapes @{ and @} for [ and ].
344 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
346 Switch to new escape scheme, where @ is the escape character uniformly.
347 Abort if a stray escape character is found. Avoid unbounded input
348 buffer when parsing non-escaped text.
350 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
351 __oline__, #output, $@, and @{ do not have unintended meanings.
353 2002-11-09 Paul Eggert <eggert@twinsun.com>
355 Fix the test failure due to GCC warnings described in
356 <http://mail.gnu.org/pipermail/bug-bison/2002-November/001815.html>.
357 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
358 evaluate to 0 if it's impossible for NINF to be in the respective
360 (yygetLRActions, yyrecoverParseError): Use them.
362 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
363 counted in the token inserted at end of file. Now takes
364 location_t *, not location_t, so that the location can be
365 adjusted. All uses changed.
367 * tests/regression.at (Invalid inputs): Adjust wording in
368 diagnostic to match the new behavior.
370 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
371 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
372 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
373 abort ();'. This reduces the runtime of the "Many lookaheads"
374 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
377 2002-11-07 Paul Eggert <eggert@twinsun.com>
379 * src/parse-gram.y (CHARACTER): Remove unused token.
382 * src/scan-gram.l: Remove stack option. We no longer use the
383 stack, since the stack was never deeper than 1; instead, use the
384 new auto var c_context to record the stacked value.
386 Remove nounput option. At an unexpected end of file, we now unput
387 the minimal input necessary to end cleanly; this simplifies the
390 Avoid unbounded token sizes where this is easy.
392 (unexpected_end_of_file): New function.
393 Use it to systematize the error message on unexpected EOF.
394 (last-string): Now auto, not static.
395 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
396 (scanner_last_string_free): Remove; not used.
397 (percent_percent_count): Move decl to just before use.
398 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
399 not the (never otherwised-used) CHARACTER.
401 2002-11-07 Akim Demaille <akim@epita.fr>
403 Let yyerror always receive the msg as last argument, so that
404 yyerror can be variadic.
406 * data/yacc.c (b4_yyerror_args): New.
407 Use it when calling yyerror.
408 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
409 Use it when calling yyerror.
410 * doc/bison.texinfo (Error Reporting): Adjust.
411 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
412 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
414 2002-11-06 Akim Demaille <akim@epita.fr>
416 #line should have quoted strings.
417 Ideally, this should be done by m4_quotearg.
419 * src/scan-skel.l: Include quotearg.h.
421 * src/output.c (symbol_printers_output)
422 (symbol_destructors_output): Quote the file name.
424 2002-11-06 Akim Demaille <akim@epita.fr>
426 * tests/regression.at (Invalid inputs): Adjust to the recent
429 2002-11-06 Akim Demaille <akim@epita.fr>
432 Reported by Jim Kent.
434 * data/c.m4 (b4_syncline): New.
435 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
436 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
437 * src/output.c (user_actions_output): Likewise.
438 (prepare): Define 'b4_synclines_flag'.
439 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
441 2002-11-06 Akim Demaille <akim@epita.fr>
443 * src/main.c (main): Free `infile'.
444 * src/scan-gram.l (handle_syncline): New.
446 * src/output.c (user_actions_output, symbol_destructors_output)
447 (symbol_printers_output): Use the location's file name, not
449 * src/reader.c (prologue_augment, epilogue_set): Likewise.
451 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
453 * src/tables.c (matching_state): Don't allow states to match if
454 either has GLR conflict entries.
456 2002-11-05 Paul Eggert <eggert@twinsun.com>
458 * src/scan-gram.l: Use more accurate diagnostics, e.g.
459 "integer out of range" rather than "invalid value".
460 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
463 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
464 Also, remove one static variable in the scanner.
466 * src/scan-gram.l (braces_level): Now auto, not static.
467 Initialize to zero if the compiler is being picky.
468 (INITIAL): Clear braces_level instead of incrementing it.
469 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
470 as POSIX 1003.1-2001 requires.
471 * src/system.h (IF_LINT): New macro, taken from coreutils.
472 * configure.ac: Define "lint" if --enable-gcc-warnings.
474 2002-11-05 Akim Demaille <akim@epita.fr>
476 * src/scan-gram.l: When it starts with `%', complain about the
477 whole directive, not just that `invalid character: %'.
479 2002-11-04 Akim Demaille <akim@epita.fr>
481 * Makefile.maint: Update from Autoconf.
482 (update, cvs-update, po-update, do-po-update): New.
484 2002-11-04 Akim Demaille <akim@epita.fr>
486 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
488 Have yyerror `use' its arguments.
489 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
490 returns true when location & yacc & pure & parse-param.
491 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
493 2002-11-04 Akim Demaille <akim@epita.fr>
495 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
497 * src/scan-gram.l: Use [\'] instead of ['] to pacify
500 Use quote, not quote_n since LOCATION_PRINT no longer uses the
503 2002-11-03 Paul Eggert <eggert@twinsun.com>
505 * src/reader.c (get_merge_function, grammar_current_rule_check):
506 Use consistent diagnostics for reporting type name clashes.
507 Quote the types with <>, for consistency with Yacc.
508 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
510 2002-11-03 Akim Demaille <akim@epita.fr>
512 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
514 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
515 (b4_parse_param): Remove.
516 Use b4_identification.
517 Propagate b4_pure_args where needed to pass them to yyerror.
518 * data/glr.m4 (b4_parse_param): Remove.
519 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
520 (b4_lpure_formals): New.
521 Use b4_identification.
522 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
523 b4_user_formals and b4_user_args.
524 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
525 (yyreportAmbiguity): When using a pure parser, also need
526 the location, and the parse-params.
528 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
529 When using a pure parser, also need the parse-params.
531 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
532 (%pure-parser + %parse-param) LALR and GLR parsers.
533 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
534 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
535 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
536 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
537 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
538 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
539 * doc/bison.texinfo: Untabify the whole file.
540 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
541 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
542 (Error Reporting): Adjust to these new directives.
543 Document %error-verbose, deprecate YYERROR_VERBOSE.
545 2002-11-03 Akim Demaille <akim@epita.fr>
547 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
548 AT_CHECK_CALC_GLR invocations to use % directives, instead of
549 command line options.
550 * tests/cxx-type.at: Formatting changes.
552 2002-11-03 Paul Eggert <eggert@twinsun.com>
554 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
555 to count columns correctly, and to check for invalid inputs.
557 Use mbsnwidth to count columns correctly. Account for tabs, too.
559 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
560 (extend_location): New function.
563 Handle CRLF in C code rather than in Lex code.
564 (YY_INPUT): New macro.
565 (no_cr_read): New function.
567 Scan UCNs, even though we don't fully handle them yet.
568 (convert_ucn_to_byte): New function.
570 Handle backslash-newline correctly in C code.
571 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
572 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
574 (tag, splice): New EREs. Do not allow NUL or newline in tags.
575 Use {splice} wherever C allows backslash-newline.
576 YY_STEP after space, newline, vertical-tab.
577 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
579 (letter, id): Don't assume ASCII; e.g., spell out a-z.
581 ({int}, handle_action_dollar, handle_action_at): Check for integer
584 (YY_STEP): Omit trailing semicolon, so that it's more like C.
586 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
587 as well as \000. Check for UCHAR_MAX, not 255.
588 Allow \x with an arbitrary positive number of digits, as in C.
589 Check for overflow here.
590 Allow \? and UCNs, for compatibility with C.
592 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
593 with quote slot used by complain_at.
595 * tests/input.at: Add tests for backslash-newline, m4 quotes
596 in symbols, long literals, and funny escapes in strings.
598 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
599 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
600 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
601 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
602 * m4/mbswidth.m4: New file, from GNU coreutils.
604 * doc/bison.texinfo (Grammar Outline): Document // comments.
605 (Symbols): Document that trigraphs have no special meaning in Bison,
606 nor is backslash-newline allowed.
607 (Actions): Document that trigraphs have no special meaning.
609 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
612 2002-11-02 Paul Eggert <eggert@twinsun.com>
614 * src/reader.c: Don't include quote.h; not needed.
615 (get_merge_function): Reword warning to be consistent with
616 type clash diagnostic in grammar_current_rule_check.
618 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
619 bug in trigraph handling.
621 * src/output.c (prepare_symbols): When printing token names,
622 escape "[" as "@<:@" and likewise for "]".
624 * src/system.h (errno): Remove declaration, as we are now
625 assuming C89 or better, and C89 guarantees errno.
627 2002-10-30 Paul Eggert <eggert@twinsun.com>
629 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
630 Check for close failures.
631 * src/files.h (xfclose): Return void, not int, since it always
633 * src/files.c (xfclose): Likewise. Report I/O error if ferror
635 * src/output.c (output_skeleton): Use xfclose rather than fclose
636 and ferror. xfclose now checks ferror.
638 * data/glr.c (YYLEFTMOST_STATE): Remove.
639 (yyreportTree): Use a stack-based leftmost state. This avoids
640 our continuing battles with bogus warnings about initializers.
642 2002-10-30 Akim Demaille <akim@epita.fr>
644 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
647 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
649 * tests/glr-regr1.at: New test for reported regressions.
650 * tests/testsuite.at: Add glr-regr1.at test.
651 * tests/Makefile.am: Add glr-regr1.at test.
653 2002-10-24 Paul Eggert <eggert@twinsun.com>
657 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
658 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
659 we use malloc. Don't assume 'A' through 'Z' are contiguous.
660 Don't assume strdup exists; POSIX says its an XSI extension.
661 Check for buffer overflow on input.
663 2002-10-24 Akim Demaille <akim@epita.fr>
665 * src/output.c (output_skeleton): Don't disable M4sugar comments
666 too soon: it results in comments being expanded.
667 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
670 2002-10-24 Akim Demaille <akim@epita.fr>
672 * data/yacc.c (m4_int_type): New.
673 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
674 char' as only yacc.c wants K&R portability.
675 * data/glr.c (yysigned_char): Remove.
676 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
677 Reported by Quoc Peyrot.
679 2002-10-23 Paul Eggert <eggert@twinsun.com>
681 * src/main.c (main): With --trace=time, report times even if a
682 non-fatal error occurs. Formerly, the times were reported in some
683 such cases but not in others.
684 * src/reader.c (reader): Just return if a complaint has been issued,
685 instead of exiting, so that 'main' can report times.
687 2002-10-22 Akim Demaille <akim@epita.fr>
689 * src/system.h: Include sys/types.
690 Reported by Bert Deknuydt.
692 2002-10-23 Paul Eggert <eggert@twinsun.com>
694 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
695 Suggested by Art Haas.
697 2002-10-22 Paul Eggert <eggert@twinsun.com>
699 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
700 decl; not needed any more.
701 * src/main.c (main): Use return to exit, undoing yesterday's change.
702 The last OS that we could find where this wouldn't work is
703 SunOS 3.5, and that's too old to worry about now.
705 * data/glr.c (struct yyltype): Define members even when not
706 doing locations. This is more consistent with yacc.c, and it
707 works around the following bug reports:
708 http://mail.gnu.org/pipermail/bug-bison/2002-October/001764.html
709 http://mail.gnu.org/pipermail/bug-bison/2002-October/001769.html
710 and I hope it also fixes this bug report:
711 http://mail.gnu.org/pipermail/bug-bison/2002-October/001748.html
713 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
714 @acronym consistently. Standardize on "Yacc" instead of "YACC",
715 "Algol" instead of "ALGOL". Give a bit more history about BNF.
717 2002-10-22 Akim Demaille <akim@epita.fr>
721 2002-10-21 Paul Eggert <eggert@twinsun.com>
723 Be consistent about 'bool'; the old code used an enum in one
724 module and an int in another, and this violates the C standard.
725 * m4/stdbool.m4: New file, from coreutils 4.5.3.
726 * configure.ac (AC_HEADER_STDBOOL): Add.
727 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
728 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
729 * src/symtab.c (hash_compare_symbol_t): Likewise.
730 * src/system.h (bool, false, true): Use a definition consistent
731 with ../lib/hash.c. All uses changed.
733 * src/complain.c (warning_issued): Renamed from warn_message_count,
734 so that we needn't worry about integer overflow (!).
735 Now of type bool. All uses changed.
736 (complaint_issued): Renamed from complain_message_count; likewise.
738 * src/main.c (main): Use exit to exit with failure.
740 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
742 * src/main.c (main): Likewise.
743 * src/getargs.c (getargs): Likewise.
744 * src/reader.c (reader): Likewise.
746 * src/getarg.c (getargs): Remove duplicate code for
747 "Try `bison --help'".
749 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
750 What was that "2" for?
752 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
753 * src/getargs.c (usage): Likewise.
755 * src/getargs.c (getargs): When there are too few operands, report
756 the last one. When there are too many, report the first extra
757 one. This is how diffutils does it.
759 2002-10-20 Paul Eggert <eggert@twinsun.com>
762 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
763 * src/complain.c (VA_START): Remove. Assume prototypes.
764 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
765 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
766 fatal): Assume prototypes.
767 * src/complain.h: Assume prototypes.
768 * src/system.h (PARAMS): Remove.
769 Include <limits.h> unconditionally, since it's guaranteeed even
770 for a freestanding C89 compiler.
771 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
772 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
774 2002-10-20 Akim Demaille <akim@epita.fr>
776 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
777 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
778 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
779 (yyresolveStates, yyresolveAction, yyresolveStack)
780 (yyprocessOneStack): Use them.
781 (yy_reduce_print): New.
782 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
784 2002-10-20 Akim Demaille <akim@epita.fr>
786 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
787 arguments and output `void'.
788 (b4_c_function): Rename as...
789 (b4_c_function_def): this.
790 (b4_c_function_decl, b4_c_ansi_function_def)
791 (b4_c_ansi_function_decl): New.
792 Change the interpretation of the arguments: before `int, foo', now
794 * data/yacc.c (yyparse): Prototype and define thanks to these.
795 Adjust b4_c_function_def uses.
796 * data/glr.c (yyparse): Likewise, but ANSI only.
798 2002-10-20 Akim Demaille <akim@epita.fr>
800 * src/output.c (prepare): Move the definition of `tokens_number',
801 `nterms_number', `undef_token_number', `user_token_number_max'
803 (prepare_tokens): Here.
804 (prepare_tokens): Rename as...
805 (prepare_symbols): this.
806 (prepare): Move the definition of `rules_number' to...
807 (prepare_rules): here.
808 (prepare): Move the definition of `last', `final_state_number',
809 `states_number' to...
810 (prepare_states): here.
811 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
813 2002-10-20 Akim Demaille <akim@epita.fr>
815 * src/tables.h, src/tables.c, src/output.c: Comment changes.
817 2002-10-20 Akim Demaille <akim@epita.fr>
819 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
822 2002-10-20 Akim Demaille <akim@epita.fr>
824 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
825 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
827 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
829 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
830 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
833 2002-10-19 Paul Eggert <eggert@twinsun.com>
835 Do not create a temporary file, as that involves security and
836 cleanup headaches. Instead, use a pair of pipes.
837 Derived from a suggestion by Florian Krohm.
838 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
839 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
840 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
841 (BISON_PREREQ_SUBPIPE): Add.
842 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
843 Add subpipe.h, subpipe.c.
844 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
845 * po/POTFILES.in: Add lib/subpipe.c.
846 * src/output.c: Include "subpipe.h".
847 (m4_invoke): Remove decl.
848 (scan_skel): New decl.
849 (output_skeleton): Use pipe rather than temporary file for m4 input.
850 Check that m4sugar.m4 is readable, to avoid deadlock.
851 Check for pipe I/O error.
852 * src/scan-skel.l (readpipe): Remove decl.
853 (scan_skel): New function, to be used in place of m4_invoke.
854 Read from stream rather than file.
856 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
857 float, as this generates a warning on Solaris 8 + GCC 3.2 with
858 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
859 this generates a more-accurate value anyway.
861 * lib/timevar.c (timervar_accumulate): Rename locals to
862 avoid confusion with similarly-named more-global.
863 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
865 * src/output.c (prepare): Use xstrdup to convert char const *
866 to char *, to avoid GCC warning.
868 2002-10-19 Akim Demaille <akim@epita.fr>
870 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
871 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
872 Use them to have `calc.y' ready for %pure-parser.
873 * data/yacc.c (YYLEX): Pass a yylex return type to
876 2002-10-19 Akim Demaille <akim@epita.fr>
878 Prototype support of %lex-param and %parse-param.
880 * src/parse-gram.y: Add the definition of the %lex-param and
881 %parse-param tokens, plus their rules.
882 Drop the `_' version of %glr-parser.
884 * src/scan-gram.l (INITIAL): Scan them.
885 * src/muscle_tab.c: Comment changes.
886 (muscle_insert, muscle_find): Rename `pair' as `probe'.
887 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
888 (muscle_entry_s): The `value' member is no longer const.
889 Adjust all dependencies.
890 * src/muscle_tab.c (muscle_init): Adjust: use
891 MUSCLE_INSERT_STRING.
892 Initialize the obstack earlier.
893 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
894 (muscle_pair_list_grow): New.
895 * data/c.m4 (b4_c_function_call, b4_c_args): New.
896 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
897 * tests/calc.at: Use %locations, not --locations.
898 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
900 2002-10-19 Akim Demaille <akim@epita.fr>
902 * src/getargs.c (usage): Take status as argument and exit
904 Report the traditional `Try ... --help' message when status != 0.
905 (usage, version): Don't take a FILE * as arg, it is pointless.
906 (getargs): When there is an incorrect number of arguments, make it
907 an error, and report it GNUlically thanks to `usage ()'.
909 2002-10-18 Paul Eggert <eggert@twinsun.com>
911 * data/glr.c (yyreportParseError): Don't assume that sprintf
912 yields the length of the printed string, as this is not true
913 on SunOS 4.1.4. Reported by Peter Klein.
915 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
916 * tests/conflicts.at (%nonassoc and eof): Likewise.
917 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
919 2002-10-17 Akim Demaille <akim@epita.fr>
921 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
922 * src/getargs.c (trace_types, trace_args): Adjust.
923 * src/reader.c (grammar_current_rule_prec_set)
924 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
925 Standardize error messages.
927 (reader): Use trace_flag to enable scanner/parser debugging,
928 instead of an adhoc scheme.
929 * src/scan-gram.l: Remove trailing debugging code.
931 2002-10-16 Paul Eggert <eggert@twinsun.com>
933 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
936 * NEWS: Officially drop support for building Bison with K&R C,
937 since it didn't work anyway and it's not worth worrying about.
938 * Makefile.maint (wget_files): Remove ansi2knr.c.
939 (ansi2knr.c-url_prefix): Remove.
940 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
941 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
942 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
944 2002-10-15 Paul Eggert <eggert@twinsun.com>
946 Stop using the "enum_" trick for K&R-style function definitions;
947 it confused me, and I was the author! Instead, assume that people
948 who want to use K&R C compilers (when using these modules in GCC,
949 perhaps?) will run ansi2knr.
951 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
952 All uses of "enum_" changed to "enum ".
953 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
954 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
956 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
957 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
958 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
959 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
960 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
961 abitset_not, abitset_ones, abitset_or, abitset_or_and,
962 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
963 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
964 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
965 Use function prototypes; this removes the need for declaring
966 static functions simply to provide their prototypes.
967 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
968 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
969 bitset_count_, bitset_create, bitset_dump, bitset_first,
970 bitset_free, bitset_init, bitset_last, bitset_next,
971 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
972 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
973 bitset_print, bitset_release_memory, bitset_toggle_,
974 bitset_type_choose, bitset_type_get, bitset_type_name_get,
975 debug_bitset): Likewise.
976 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
977 * lib/bitset_stats.c (bitset_log_histogram_print,
978 bitset_percent_histogram_print, bitset_stats_and,
979 bitset_stats_and_cmp, bitset_stats_and_or,
980 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
981 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
982 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
983 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
984 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
985 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
986 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
987 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
988 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
989 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
990 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
991 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
992 bitset_stats_zero): Likewise.
993 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
994 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
995 bitsetv_dump, debug_bitsetv): Likewise.
996 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
997 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
998 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
999 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
1000 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
1001 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
1002 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
1003 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
1004 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
1005 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
1006 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
1008 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
1009 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
1010 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
1011 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
1012 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
1013 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
1014 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
1015 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
1016 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
1017 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
1018 lbitset_xor_cmp, lbitset_zero): Likewise.
1020 2002-10-14 Akim Demaille <akim@epita.fr>
1024 2002-10-14 Akim Demaille <akim@epita.fr>
1026 * tests/Makefile.am (maintainer-check-posix): New.
1028 2002-10-14 Akim Demaille <akim@epita.fr>
1030 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
1033 2002-10-14 Akim Demaille <akim@epita.fr>
1035 * src/tables.c (table_ninf_remap): base -> tab.
1036 Reported by Matt Rosing.
1038 2002-10-14 Paul Eggert <eggert@twinsun.com>
1040 * tests/action.at, tests/calc.at, tests/conflicts.at,
1041 tests/cxx-type.at, tests/headers.at, tests/input.at,
1042 tests/regression.at, tests/synclines.at, tests/torture.at:
1043 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
1044 so that the tests still work even if POSIXLY_CORRECT is set.
1045 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
1047 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
1048 for portability to K&R hosts. Fix typo: signed char is guaranteed
1049 only to 127, not to 128.
1050 * data/glr.c (yysigned_char): New type.
1051 * data/yacc.c (yysigned_char): Likewise.
1052 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
1054 2002-10-13 Paul Eggert <eggert@twinsun.com>
1056 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
1057 true due to limited range of data type" warning from GCC.
1059 * data/c.m4 (b4_token_defines): Protect against double-inclusion
1060 by wrapping enum yytokentype's definition inside #ifndef
1061 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
1063 2002-10-13 Akim Demaille <akim@epita.fr>
1065 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
1066 Un yy- yyrhs to avoid the name clash with the global YYRHS.
1068 2002-10-13 Akim Demaille <akim@epita.fr>
1070 * Makefile.maint: Update from Autoconf 2.54.
1071 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
1073 2002-10-13 Akim Demaille <akim@epita.fr>
1075 * src/print.c (print_state): Separate the list of solved conflicts
1076 from the other items.
1077 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
1079 2002-10-13 Akim Demaille <akim@epita.fr>
1081 Let nondeterministic skeletons be usable with deterministic
1084 With the patch, GAWK compiled by GCC without -O2 passes its test
1085 suite using a GLR parser driven by LALR tables. It fails with -O2
1086 because `struct stat' gives two different answers on my machine:
1087 88 (definition of an auto var) and later 96 (memset on this var).
1088 Hence the stack is badly corrumpted. The headers inclusion is to
1089 blame: if I move the awk.h inclusion before GLR's system header
1090 inclusion, the two struct stat have the same size.
1092 * src/tables.c (pack_table): Always create conflict_table.
1093 (token_actions): Always create conflict_list.
1094 * data/glr.c (YYFLAG): Remove, unused.
1096 2002-10-13 Akim Demaille <akim@epita.fr>
1098 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
1100 (VALGRIND, GXX): New.
1101 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
1102 * tests/bison.in: Run $PREBISON a pre-command.
1103 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
1104 (maintainer-check-g++): New.
1105 * Makefile.am (maintainer-check): New.
1107 2002-10-13 Akim Demaille <akim@epita.fr>
1109 * data/glr.c: Formatting changes.
1110 Tweak some trace messages to match yacc.c's.
1112 2002-10-13 Akim Demaille <akim@epita.fr>
1114 GLR parsers sometimes raise parse errors instead of performing the
1116 Reported by Charles-Henry de Boysson.
1118 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
1119 check the length of the traces when %glr.
1120 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
1122 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
1124 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
1125 (yyltype): Remove the yy prefix from the member names.
1126 (yytable): Complete its comment.
1127 (yygetLRActions): Map error action number from YYTABLE from
1129 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
1130 (which was a bug: it should have been YYTABEL_NINF, and yet it was
1131 not satisfying as we could compare an YYACTION computed from
1132 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
1133 only value for error actions.
1134 (yyreportParseError): In verbose parse error messages, don't issue
1135 `error' in the list of expected tokens.
1136 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
1137 next action to perform to match glr.c's decoding.
1138 (yytable): Complete its comment.
1140 2002-10-13 Paul Eggert <eggert@twinsun.com>
1142 Fix problem reported by Henrik Grubbstroem in
1143 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001670.html>:
1144 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
1145 because the Bison parser reads the second action before reducing
1147 * src/scan-gram.l (rule_length): New static var.
1148 Use it to keep track of the rule length in the scanner, since
1149 we can't expect the parser to be in lock-step sync with the scanner.
1150 (handle_action_dollar, handle_action_at): Use this var.
1151 * tests/actions.at (Exotic Dollars): Test for the problem.
1153 2002-10-12 Paul Eggert <eggert@twinsun.com>
1155 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
1156 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
1157 Include <sys/time.h> when checking for clock_t and struct tms.
1158 Use same include order as source.
1159 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
1160 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001674.html>.
1162 * lib/timevar.c: Update copyright date and clarify comments.
1163 (get_time) [IN_GCC]: Keep the GCC version for reference.
1165 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
1166 GCC version as of today, then merge Bison's changes.
1167 Change "GCC" to "Bison" in copyright notice. timevar.def's
1168 author is Akim, so change that too.
1170 * src/reader.c (grammar_current_rule_check):
1171 Don't worry about the default action if $$ is untyped.
1172 Prevents bogus warnings reported by Jim Gifford in
1173 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001673.html>.
1175 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
1176 * data/glr.c, data/lalr1.cc, data/yacc.c:
1177 Output token definitions before the first part of user declarations.
1178 Fixes compatibility problem reported by Jim Gifford for kbd in
1179 <http://mail.gnu.org/pipermail/bug-bison/2002-October/001672.html>.
1181 2002-10-11 Paul Eggert <eggert@twinsun.com>
1183 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
1184 (yyparse): here. This undoes some of the 2002-07-25 change.
1185 Compatibility problem reported by Ralf S. Engelschall with
1186 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
1188 2002-10-11 Akim Demaille <akim@epita.fr>
1190 * tests/regression.at Characters Escapes): New.
1191 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
1193 Reported by Jan Nieuwenhuizen.
1195 2002-10-11 Akim Demaille <akim@epita.fr>
1199 2002-10-10 Paul Eggert <eggert@twinsun.com>
1201 Portability fixes for bitsets; this also avoids several GCC
1204 * lib/abitset.c: Include <stddef.h>, for offsetof.
1205 * lib/lbitset.c: Likewise.
1207 * lib/abitset.c (abitset_bytes): Return a size that is aligned
1208 properly for vectors of objects. Do not assume that adding a
1209 header size to a multiple of a word size yields a value that is
1210 properly aligned for the whole union.
1211 * lib/bitsetv.c (bitsetv_alloc): Likewise.
1213 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
1214 unique names for structures.
1215 * lib/ebitset.c (ebitset_bytes): Likewise.
1216 * lib/lbitset.c (lbitset_bytes): Likewise.
1218 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
1219 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
1220 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
1221 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
1222 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
1223 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
1224 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
1225 to improve the type-checking that GCC can do.
1226 * lib/bitset.c (bitset_op4_cmp): Likewise.
1227 * lib/bitset_stats.c (bitset_stats_count,
1228 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
1229 bitset_stats_copy, bitset_stats_disjoint_p,
1230 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
1231 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
1232 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
1233 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
1234 bitset_stats_and_or_cmp, bitset_stats_andn_or,
1235 bitset_stats_andn_or_cmp, bitset_stats_or_and,
1236 bitset_stats_or_and_cmp): Likewise.
1237 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
1238 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
1239 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
1240 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
1242 * lib/abitset.h: Include bitset.h, not bbitset.h.
1243 * lib/ebitset.h: Likewise.
1244 * lib/lbitset.h: Likewise.
1246 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
1247 All instances of parameters of type enum bitset_opts are now of
1248 type enum_bitset_opts, to conform to the C Standard, and similarly
1249 for enum_bitset_type.
1250 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
1251 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
1253 Do not use "struct bitset_struct" to mean different things in
1254 different modules. Not only is this confusing, it violates
1255 the C Standard, which requires that structure types in different
1256 modules must be compatible if one is to be passed to the other.
1257 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
1258 All instances of "struct bitset_struct *" replaced with "bitset".
1259 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
1260 (union bitset_union, struct abitset_struct, struct ebitset_struct,
1261 struct lbitset_struct, struct bitset_stats_struct): New types.
1262 All uses of struct bitset_struct changed to union bitset_union,
1264 * lib/abitset.c (struct abitset_struct, abitset,
1265 struct bitset_struct): Remove.
1266 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
1267 struct bitset_struct): Remove.
1268 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
1269 bitset_struct): Remove.
1270 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
1273 Do not call a function of type T using a call that assumes the
1274 function is of a different type U. Standard C requires that a
1275 function must be called with a type that is compatible with its
1277 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
1279 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
1281 * lib/ebitset.c (PFV): Remove.
1282 * lib/lbitset.c (PFV): Likewise.
1283 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
1284 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
1286 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
1287 (ebitset_vtable): Use them.
1288 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
1289 lbitset_xor): New functions.
1290 (lbitset_vtable): Use them.
1292 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
1295 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
1297 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
1298 Use offsetof, for simplicity.
1300 2002-10-06 Paul Eggert <eggert@twinsun.com>
1302 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
1303 the same width as int. This reapplies a hunk of the 2002-08-12 patch
1304 <http://mail.gnu.org/pipermail/bison-patches/2002-August/001111.html>,
1305 which was inadvertently undone by the 2002-09-30 patch.
1306 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
1307 the same width as int.
1309 2002-10-04 Paul Eggert <eggert@twinsun.com>
1313 * configure.ac (AC_INIT), NEWS: Increment version number.
1315 * doc/bison.texinfo: Minor spelling, grammar, and white space
1317 (Symbols): Mention that any negative value returned from yylex
1318 signifies end-of-input. Warn about negative chars. Mention
1319 the portable Standard C character set.
1321 The GNU coding standard says CFLAGS and YFLAGS are reserved
1322 for the installer to set.
1323 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
1324 * src/Makefile.am (AM_CFLAGS): Likewise.
1325 (AM_YFLAGS): Renamed from YFLAGS.
1327 Fix some MAX and MIN problems.
1328 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
1329 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
1330 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
1331 * src/reader.c (reader): Use it.
1333 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
1334 POSIX 1003.1-2001 has removed fgrep.
1336 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
1338 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
1339 interpreted as signed.
1340 * lib/ebitset.c (ebitset_list): Fix bug.
1342 2002-10-01 Paul Eggert <eggert@twinsun.com>
1344 More fixes for 64-bit hosts and large bitsets.
1346 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
1347 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
1348 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
1349 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
1350 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
1351 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
1352 bitset_count_): Likewise.
1353 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
1354 bitset_first, bitset_last): Likewise.
1355 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
1356 bitset_stats_list_reverse, bitset_stats_size,
1357 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
1359 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
1360 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
1361 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
1362 bitsetv_reflexive_transitive_closure): Likewise.
1363 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
1364 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
1366 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
1369 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
1370 Use size_t, not unsigned int, to count bytes.
1371 * lib/abitset.h (abitset_bytes): Likewise.
1372 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
1374 * lib/bitset.h (bitset_bytes): Likewise.
1375 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
1376 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
1377 * lib/bitsetv.c (bitsetv_alloc): Likewise.
1378 * lib/ebitset.c (ebitset_bytes): Likewise.
1379 * lib/ebitset.h (ebitset_bytes): Likewise.
1380 * lib/lbitset.c (lbitset_bytes): Likewise.
1381 * lib/lbitset.h (lbitset_bytes): Likewise.
1383 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
1384 abitset_subset_p, abitset_disjoint_p, abitset_and,
1385 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
1386 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
1387 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
1388 abitset_or_and, abitset_or_and_cmp):
1389 Use bitset_windex instead of unsigned int.
1390 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
1391 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
1392 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
1393 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
1395 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
1397 * lib/bitset.c (bitset_print):
1398 Use proper printf formats for widths of integer types.
1399 * lib/bitset_stats.c (bitset_percent_histogram_print,
1400 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
1401 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
1402 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
1403 * lib/lbitset.c (lbitset_bytes): Likewise.
1405 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
1406 BITSET_SIZE_MAX): New macros.
1407 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
1408 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
1409 to BITSET_WINDEX_MAX.
1411 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
1412 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
1413 since we now return the bitset_bindex type (not int).
1415 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
1416 when computing sizes.
1417 * lib/ebitset.c (ebitset_elts_grow): Likewise.
1419 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
1420 and avoid cast to unsigned.
1422 2002-09-30 Akim Demaille <akim@epita.fr>
1424 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
1425 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
1426 Updates from Michael Hayes.
1428 2002-09-30 Art Haas <ahaas@neosoft.com>
1430 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
1432 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
1435 2002-09-27 Akim Demaille <akim@epita.fr>
1439 2002-09-27 Akim Demaille <akim@epita.fr>
1441 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
1442 (Because of AC_LIBSOURCE).
1444 2002-09-27 Akim Demaille <akim@epita.fr>
1446 Playing with Autoscan.
1448 * configure.ac: Remove the old LIBOBJ tweaks.
1449 (AC_REPLACE_FUNCS): Add strrchr and strtol.
1450 * lib/strrchr.c: New.
1451 * lib/strtol.c: New, from the Coreutils 4.5.1.
1453 2002-09-27 Akim Demaille <akim@epita.fr>
1455 Playing with Autoscan.
1457 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
1458 * lib/Makefile.am (libbison_a_SOURCES): No longer include
1459 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
1460 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
1463 2002-09-24 Akim Demaille <akim@epita.fr>
1465 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
1466 (Frequently Asked Questions, Parser Stack Overflow): New.
1468 2002-09-13 Akim Demaille <akim@epita.fr>
1470 Playing with autoscan.
1472 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
1473 * src/files.c (skeleton_find): Remove, unused.
1474 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
1475 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
1477 2002-09-13 Akim Demaille <akim@epita.fr>
1479 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
1480 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
1482 2002-09-13 Akim Demaille <akim@epita.fr>
1484 * configure.ac: Require 2.54.
1485 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
1486 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
1487 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
1488 Remove, provided by Autoconf macros.
1490 2002-09-12 Akim Demaille <akim@epita.fr>
1492 * m4/prereq.m4: Update, from Coreutils 4.5.1.
1494 2002-09-12 Akim Demaille <akim@epita.fr>
1496 * m4/prereq.m4: Update, from Fileutils 4.1.5.
1497 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
1498 Reported by Martin Mokrejs.
1500 2002-09-10 Akim Demaille <akim@epita.fr>
1502 * src/parse-gram.y: Associate a human readable string to each
1504 * tests/regression.at (Invalid inputs): Adjust.
1506 2002-09-10 Gary V. Vaughan <gary@gnu.org>
1508 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
1509 with an Autoconf-2.5x style configure.ac.
1511 2002-09-06 Paul Eggert <eggert@twinsun.com>
1513 * doc/bison.texinfo (Conditions): Make explicit that the GPL
1514 exception applies only to yacc.c. This is a modification of a
1515 patch originally suggested by Akim Demaille.
1517 2002-09-06 Akim Demaille <akim@epita.fr>
1519 * data/c.m4 (b4_copyright): Move the GPL exception comment from
1521 * data/yacc.c: here.
1523 * data/lalr1.cc (struct yyltype): Don't define it, since we use
1525 (b4_ltype): Default to yy::Location from location.hh.
1527 2002-09-04 Jim Meyering <jim@meyering.net>
1529 * data/yacc.c: Guard the declaration of yytoknum also with
1530 `#ifdef YYPRINT', so it is declared only when used.
1532 2002-09-04 Akim Demaille <akim@epita.fr>
1534 * configure.in: Rename as...
1535 * configure.ac: this.
1538 2002-09-04 Akim Demaille <akim@epita.fr>
1540 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
1541 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
1542 translate maintainer only messages.
1544 2002-08-12 Paul Eggert <eggert@twinsun.com>
1548 * Makefile.am (SUBDIRS): Remove intl.
1549 (DISTCLEANFILES): Remove.
1550 * NEWS: Mention that GNU M4 is now required. Clarify what is
1551 meant by "larger grammars". Mention the pt_BR translation.
1552 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
1553 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
1554 Bump version from 0.11.2 to 0.11.5.
1555 (BISON_PREREQ_STAGE): Remove.
1556 (AM_GNU_GETTEXT): Use external gettext.
1557 (AC_OUTPUT): Remove intl/Makefile.
1559 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
1561 * data/glr.c: Include string.h, for strlen.
1562 (yyreportParseError): Use size_t for yysize.
1563 (yy_yypstack): No longer nested inside yypstates, as nested
1564 functions are not portable. Do not assume size_t is the
1566 (yypstates): Do not assume that ptrdiff_t is the same width
1567 as int, and similarly for yyposn and YYINDEX.
1569 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
1571 * lib/Makefile.am (INCLUDES): Do not include from the intl
1572 directory, which has been removed.
1573 * src/Makefile.am (INCLUDES): Likewise.
1575 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
1576 (bitsets_sources, additional_bitsets_sources, timevars_sources):
1579 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
1580 * tests/Makefile.am (EXTRA_DIST): Likewise.
1582 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
1583 Do not assume that bitset_windex is the same width as unsigned.
1585 * lib/abitset.c (abitset_unused_clear): Do not assume that
1586 bitset_word is the same width as int.
1587 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
1588 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
1589 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
1590 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
1591 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
1593 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
1594 portability to one's complement hosts!).
1595 * lib/ebitset.c (ebitset_op1): Likewise.
1596 * lib/lbitset.c (lbitset_op1): Likewise.
1598 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
1599 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
1600 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
1601 Sync with fileutils.
1602 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
1603 lib/gettext.h: Sync with diffutils.
1605 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
1606 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
1608 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
1609 PROTOTYPES to check for prototypes, and "defined __STDC__" to
1612 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
1613 size_t; the old version tried to do this but casted improperly.
1614 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
1615 (bitset_test): Now returns int, not unsigned long.
1617 * lib/bitset_stats.c: Include "gettext.h".
1619 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
1620 name locals "index", as it generates unnecessary warnings on some
1621 hosts that have an "index" function.
1623 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
1624 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
1625 they need translation.
1626 * src/LR0.c (state_list_append, new_itemsets, get_state,
1627 append_states, generate_states): Likewise.
1628 * src/assoc.c (assoc_to_string): Likewise.
1629 * src/closure.c (print_closure, set_firsts, closure): Likewise.
1630 * src/gram.c (grammar_dump): Likewise.
1631 * src/injections.c (injections_compute): Likewise.
1632 * src/lalr.c (lookaheads_print): Likewise.
1633 * src/relation.c (relation_transpose): Likewise.
1634 * src/scan-gram.l: Likewise.
1635 * src/tables.c (table_grow, pack_vector): Likewise.
1637 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
1638 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
1639 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
1640 * m4/mbstate_t.m4: Sync with fileutils.
1641 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
1643 * po/LINGUAS: Add pt_BR.
1644 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
1645 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
1647 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
1649 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
1651 * src/complain.c (strerror_r): Remove decl; not needed.
1652 (strerror): Use same pattern as ../lib/error.c.
1654 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
1656 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
1658 * src/main.c (main): Cast result of bindtextdomain and textdomain
1659 to void, to avoid a GCC warning when --disable-nls is in effect.
1661 * src/scan-gram.l: Use strings rather than escapes when possible,
1662 to minimize the number of warnings from xgettext.
1663 (handle_action_dollar, handle_action_at): Don't use isdigit,
1664 as it mishandles negative chars and it may not work as expected
1665 outside the C locale.
1667 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
1668 this is a GCC extension and is not portable to other compilers.
1670 * src/system.h (alloca): Use same pattern as ../lib/error.c.
1671 Do not include <ctype.h>; no longer needed.
1672 Do not include <malloc.h>; no longer needed (and generates
1673 warnings on OpenBSD 3.0).
1675 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
1678 * tests/regression.at: Do not use 'cc -c input.c -o input';
1679 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
1681 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
1682 exit status as failure, not just exit status 1. Sun C exits
1683 with status 2 sometimes.
1685 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
1686 Use it for the two large tests.
1688 2002-08-02 Akim Demaille <akim@epita.fr>
1690 * src/conflicts.c (conflicts_output): Don't output rules never
1691 reduced here, since anyway that computation doesn't work.
1692 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
1693 (rule_useless_p, rule_never_reduced_p): New.
1694 (grammar_rules_partial_print): Use a filter instead of a range.
1695 Display the title only if needed.
1696 (grammar_rules_print): Adjust.
1697 (grammar_rules_never_reduced_report): New.
1698 * src/tables.c (action_row): Move the computation of rules never
1700 (token_actions): here.
1701 * src/main.c (main): Make the parser before making the report, so
1702 that rules never reduced are computed.
1703 Call grammar_rules_never_reduced_report.
1704 * src/print.c (print_results): Report rules never reduced.
1705 * tests/conflicts.at, tests/reduce.at: Adjust.
1707 2002-08-01 Akim Demaille <akim@epita.fr>
1709 Instead of attaching lookaheads and duplicating the rules being
1710 reduced by a state, attach the lookaheads to the reductions.
1712 * src/state.h (state_t): Remove the `lookaheads',
1713 `lookaheads_rule' member.
1714 (reductions_t): Add a `lookaheads' member.
1715 Use a regular array for the `rules'.
1716 * src/state.c (reductions_new): Initialize the lookaheads member
1718 (state_rule_lookaheads_print): Adjust.
1719 * src/state.h, src/state.c (state_reductions_find): New.
1720 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
1721 (count_rr_conflicts): Adjust.
1722 * src/lalr.c (LArule): Remove.
1723 (add_lookback_edge): Adjust.
1724 (state_lookaheads_count): New.
1725 (states_lookaheads_initialize): Merge into...
1726 (initialize_LA): this.
1727 (lalr_free): Adjust.
1728 * src/main.c (main): Don't free nullable and derives too early: it
1729 is used by --verbose.
1730 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
1732 2002-08-01 Akim Demaille <akim@epita.fr>
1734 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
1736 (set_derives, free_derives): Rename as...
1737 (derives_compute, derives_free): this.
1738 Adjust all dependencies.
1739 * src/nullable.c (set_nullable, free_nullable): Rename as...
1740 (nullable_compute, nullable_free): these.
1741 (rule_list_t): Store rule_t *, not rule_number_t.
1742 * src/state.c (state_rule_lookaheads_print): Directly compare rule
1743 pointers, instead of their numbers.
1744 * src/main.c (main): Call nullable_free, and derives_free earlier,
1745 as they were lo longer used.
1747 2002-08-01 Akim Demaille <akim@epita.fr>
1749 * lib/timevar.c (get_time): Include children time.
1750 * src/lalr.h (LA, LArule): Don't export them: used with the
1752 * src/lalr.c (LA, LArule): Static.
1753 * src/lalr.h, src/lalr.c (lalr_free): New.
1754 * src/main.c (main): Call it.
1755 * src/tables.c (pack_vector): Check whether loc is >= to the
1757 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
1758 (tables_generate): do it, since that's also it which allocates
1760 Don't free LA and LArule, main does.
1762 2002-07-31 Akim Demaille <akim@epita.fr>
1764 Separate parser tables computation and output.
1766 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
1767 (conflict_list, conflict_list_cnt, table, check, table_ninf)
1768 (yydefgoto, yydefact, high): Move to...
1769 * src/tables.h, src/tables.c: here.
1770 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
1771 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
1772 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
1773 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
1774 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
1775 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
1776 (action_row, save_row, token_actions, save_column, default_goto)
1777 (goto_actions, sort_actions, matching_state, pack_vector)
1778 (table_ninf_remap, pack_table, prepare_actions): Move to...
1779 * src/tables.c: here.
1780 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
1781 * src/output.c (token_actions, output_base, output_conflicts)
1782 (output_check): Merge into...
1783 (prepare_actions): this.
1784 (actions_output): Rename as...
1785 (user_actions_output): this.
1786 * src/main.c (main): Call tables_generate and tables_free.
1788 2002-07-31 Akim Demaille <akim@epita.fr>
1790 Steal GCC's --time-report support.
1792 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
1793 stolen/adjusted from GCC.
1794 * m4/stage.m4: Remove time related checks.
1795 * m4/timevar.m4: New.
1796 * configure.in: Adjust.
1797 * src/system.h: Adjust to using timevar.h.
1798 * src/getargs.h, src/getargs.c: Support trace_time for
1800 * src/main.c (stage): Remove.
1801 (main): Replace `stage' invocations with timevar calls.
1802 * src/output.c: Insert pertinent timevar calls.
1804 2002-07-31 Akim Demaille <akim@epita.fr>
1806 Let --trace have arguments.
1808 * src/getargs.h (enum trace_e): New.
1809 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
1810 (long_options, short_options): --trace/-T takes an optional
1812 Change all the uses of trace_flag to reflect the new flags.
1813 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
1815 Strengthen `stage' portability.
1817 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
1818 * configure.in: Use it.
1819 Don't check for malloc.h and sys/times.h.
1820 * src/system.h: Include them when appropriate.
1821 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
1822 times and struct tms are available.
1824 2002-07-30 Akim Demaille <akim@epita.fr>
1826 In verbose parse error message, don't report `error' as an
1828 * tests/actions.at (Printers and Destructors): Adjust.
1829 * tests/calc.at (Calculator $1): Adjust.
1830 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
1831 error message, do not report the parser accepts the error token in
1834 2002-07-30 Akim Demaille <akim@epita.fr>
1836 Normalize conflict related messages.
1838 * src/complain.h, src/complain.c (warn, complain): New.
1839 * src/conflicts.c (conflicts_print): Use them.
1840 (conflict_report_yacc): New, extracted from...
1841 (conflicts_print): here.
1842 * tests/conflicts.at, tests/existing.at: Adjust.
1844 2002-07-30 Akim Demaille <akim@epita.fr>
1846 Report rules which are never reduced by the parser: those hidden
1849 * src/LR0.c (save_reductions): Don't make the final state too
1850 different: save its reduction (accept) instead of having a state
1851 without any action (no shift or goto, no reduce).
1852 Note: the final state is now a ``regular'' state, i.e., the
1853 parsers now contain `reduce 0' as default reduction.
1854 Nevertheless, since they decide to `accept' when yystate =
1855 final_state, they still will not reduce rule 0.
1856 * src/print.c (print_actions, print_reduction): Adjust.
1857 * src/output.c (action_row): Track reduced rules.
1858 (token_actions): Report rules never reduced.
1859 * tests/conflicts.at, tests/regression.at: Adjust.
1861 2002-07-30 Akim Demaille <akim@epita.fr>
1863 `stage' was accidently included in a previous patch.
1864 Initiate its autoconfiscation.
1866 * configure.in: Look for malloc.h and sys/times.h.
1867 * src/main.c (stage): Adjust.
1868 Report only when trace_flag.
1870 2002-07-29 Akim Demaille <akim@epita.fr>
1872 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
1874 (errs_t): symbol_t*, not symbol_number_t.
1875 (reductions_t): rule_t*, not rule_number_t.
1876 (FOR_EACH_SHIFT): New.
1877 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
1878 * src/print.c, src/print_graph.c: Adjust.
1880 2002-07-29 Akim Demaille <akim@epita.fr>
1882 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
1884 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
1885 (endtoken, accept): these.
1886 * src/reader.c (reader): Set endtoken's default tag to "$end".
1887 Set undeftoken's tag to "$undefined" instead of "$undefined.".
1888 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
1891 2002-07-29 Akim Demaille <akim@epita.fr>
1893 * src/reduce.c (reduce_grammar): When the language is empty,
1894 complain about the start symbol, not the axiom.
1896 * tests/reduce.at (Empty Language): New.
1898 2002-07-26 Akim Demaille <akim@epita.fr>
1900 * src/reader.h, src/reader.c (gram_error): ... can't get
1901 yycontrol without making too strong assumptions on the parser
1903 * src/output.c (prepare_tokens): Use the real 0th value of
1904 token_translations instead of `0'.
1905 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
1907 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
1908 for the time being: %locations ought to provide it to yyerror.
1910 2002-07-25 Akim Demaille <akim@epita.fr>
1912 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
1913 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
1914 * tests/regression.at (Web2c Actions): Adjust.
1916 2002-07-25 Akim Demaille <akim@epita.fr>
1918 Stop storing rules from 1 to nrules + 1.
1920 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
1921 * src/nullable.c, src/output.c, src/print.c, src/reader.c
1922 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
1923 Iterate from 0 to nrules.
1924 Use rule_number_as_item_number and item_number_as_rule_number.
1925 Adjust to `derive' now containing possibly 0.
1926 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
1927 Handle the `- 1' part in rule numbers from/to item numbers.
1928 * src/conflicts.c (log_resolution): Fix the message which reversed
1930 * src/output.c (action_row): Initialize default_rule to -1.
1931 (token_actions): Adjust.
1932 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
1934 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
1936 2002-07-25 Akim Demaille <akim@epita.fr>
1938 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
1939 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
1940 (b4_c_knr_arg_decl): New.
1941 * data/yacc.c: Use it to define yysymprint, yydestruct, and
1942 yyreport_parse_error.
1944 2002-07-25 Akim Demaille <akim@epita.fr>
1946 * data/yacc.c (yyreport_parse_error): New, extracted from...
1948 (yydestruct, yysymprint): Move above yyparse.
1951 2002-07-25 Akim Demaille <akim@epita.fr>
1953 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
1955 (b4_sint_type, b4_uint_type): these.
1956 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
1957 * tests/regression.at (Web2c Actions): Adjust.
1959 2002-07-25 Akim Demaille <akim@epita.fr>
1961 * src/gram.h (TIEM_NUMBER_MAX): New.
1962 (item_number_of_rule_number, rule_number_of_item_number): Rename
1964 (rule_number_as_item_number, item_number_as_rule_number): these.
1965 Adjust dependencies.
1966 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
1967 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
1968 (symbol_number_to_vector_number): New.
1969 (order): Of vector_number_t* type.
1970 (base_t, BASE_MAX, BASE_MIN): New.
1971 (froms, tos, width, pos, check): Of base_t type.
1972 (action_number_t, ACTION_MIN, ACTION_MAX): New.
1973 (actrow): Of action_number_t type.
1974 (conflrow): Of unsigned int type.
1975 (table_ninf, base_ninf): New.
1976 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
1977 (muscle_insert_int_table, muscle_insert_base_table)
1978 (muscle_insert_rule_number_table): New.
1979 (prepare_tokens): Output `toknum' as int_table.
1980 (action_row): Returns a rule_number_t.
1981 Use ACTION_MIN, not SHRT_MIN.
1982 (token_actions): yydefact is rule_number_t*.
1983 (table_ninf_remap): New.
1984 (pack_table): Use it for `base' and `table'.
1985 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
1987 (YYPACT_NINF, YYTABLE_NINF): these.
1988 (yypact, yytable): Compute their types instead of hard-coded
1990 * tests/regression.at (Web2c Actions): Adjust.
1992 2002-07-19 Akim Demaille <akim@epita.fr>
1994 * src/scan-gram.l (id): Can start with an underscore.
1996 2002-07-16 Akim Demaille <akim@epita.fr>
1998 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
1999 Adjust all former `associativity' dependencies.
2000 * src/symtab.c (symbol_new): Default associativity is `undef', not
2002 (symbol_check_alias_consistence): Adjust.
2004 2002-07-09 Akim Demaille <akim@epita.fr>
2006 * doc/bison.texinfo: Properly set the ``header'' part.
2007 Use @dircategory ``GNU programming tools'' as per Texinfo's
2011 2002-07-09 Akim Demaille <akim@epita.fr>
2013 * lib/quotearg.h: Protect against multiple inclusions.
2014 * src/location.h (location_t): Add a `file' member.
2015 (LOCATION_RESET, LOCATION_PRINT): Adjust.
2016 * src/complain.c (warn_at, complain_at, fatal_at): Drop
2017 `error_one_per_line' support.
2019 2002-07-09 Akim Demaille <akim@epita.fr>
2021 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
2022 * src/reader.c (lineno): Remove.
2023 Adjust all dependencies.
2024 (get_merge_function): Take a location and use complain_at.
2025 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
2026 * tests/regression.at (Invalid inputs, Mixing %token styles):
2029 2002-07-09 Akim Demaille <akim@epita.fr>
2031 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
2032 recovery rule, and forbid extensions when --yacc.
2033 (gram_error): Use complain_at.
2034 * src/reader.c (reader): Exit if there were parse errors.
2036 2002-07-09 Akim Demaille <akim@epita.fr>
2038 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
2039 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
2040 Reported by R Blake <blakers@mac.com>.
2042 2002-07-09 Akim Demaille <akim@epita.fr>
2044 * data/yacc.c: Output the copyright notive in the header.
2046 2002-07-03 Akim Demaille <akim@epita.fr>
2048 * src/output.c (froms, tos): Are state_number_t.
2049 (save_column): sp, sp1, and sp2 are state_number_t.
2050 (prepare): Rename `final' as `final_state_number', `nnts' as
2051 `nterms_number', `nrules' as `rules_number', `nstates' as
2052 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
2054 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
2055 * data/lalr1.cc (nsym_): Remove, unused.
2057 2002-07-03 Akim Demaille <akim@epita.fr>
2059 * src/lalr.h, src/lalr.c (goto_number_t): New.
2060 * src/lalr.c (goto_list_t): New.
2062 * src/nullable.c (rule_list_t): New.
2064 * src/types.h: Remove.
2066 2002-07-03 Akim Demaille <akim@epita.fr>
2068 * src/closure.c (print_fderives): Use rule_rhs_print.
2069 * src/derives.c (print_derives): Use rule_rhs_print.
2070 (rule_list_t): New, replaces `shorts'.
2071 (set_derives): Add comments.
2072 * tests/sets.at (Nullable, Firsts): Adjust.
2074 2002-07-03 Akim Demaille <akim@epita.fr>
2076 * src/output.c (prepare_actions): Free `tally' and `width'.
2077 (prepare_actions): Allocate and free `order'.
2078 * src/symtab.c (symbols_free): Free `symbols'.
2079 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
2080 * src/output.c (m4_invoke): Move to...
2081 * src/scan-skel.l: here.
2082 (<<EOF>>): Close yyout, and free its name.
2084 2002-07-03 Akim Demaille <akim@epita.fr>
2086 Fix some memory leaks, and fix a bug: state 0 was examined twice.
2088 * src/LR0.c (new_state): Merge into...
2089 (state_list_append): this.
2090 (new_states): Merge into...
2091 (generate_states): here.
2092 (set_states): Don't ensure a proper `errs' state member here, do it...
2093 * src/conflicts.c (conflicts_solve): here.
2094 * src/state.h, src/state.c: Comment changes.
2095 (state_t): Rename member `shifts' as `transitions'.
2096 Adjust all dependencies.
2097 (errs_new): For consistency, also take the values as argument.
2099 (state_errs_set): New.
2100 (state_reductions_set, state_transitions_set): Assert that no
2101 previous value was assigned.
2103 (states_free): Use it.
2104 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
2105 temporary storage: use `errs' and `nerrs' as elsewhere.
2106 (set_conflicts): Allocate and free this `errs'.
2108 2002-07-02 Akim Demaille <akim@epita.fr>
2110 * lib/libiberty.h: New.
2111 * lib: Update the bitset implementation from upstream.
2112 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
2113 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
2114 * src/main.c: Adjust bitset stats calls.
2116 2002-07-01 Paul Eggert <eggert@twinsun.com>
2118 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
2119 char, so that negative chars don't collide with $.
2121 2002-06-30 Akim Demaille <akim@epita.fr>
2123 Have the GLR tests be `warning' checked, and fix the warnings.
2125 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
2126 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
2127 (yyremoveDeletes): `yyi' and `yyj' are size_t.
2128 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
2129 (yyaddDeferredAction): static.
2130 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
2131 (yyreportParseError): yyprefix is const.
2132 yytokenp is used only when verbose.
2133 (yy__GNUC__): Replace with __GNUC__.
2134 (yypdumpstack): yyi is size_t.
2135 (yypreference): Un-yy local variables and arguments, to avoid
2136 clashes with `yyr1'. Anyway, we are not in the user name space.
2137 (yytname_size): be an int, as is compared with ints.
2138 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
2140 * tests/cxx-gram.at: Use quotation to protect $1.
2141 Use AT_COMPILE to enable warnings hunts.
2142 Prototype yylex and yyerror.
2144 Include `string.h', not `strings.h'.
2145 Produce and prototype stmtMerge only when used.
2146 yylex takes a location.
2148 2002-06-30 Akim Demaille <akim@epita.fr>
2150 We spend a lot of time in quotearg, in particular when --verbose.
2152 * src/symtab.c (symbol_get): Store a quoted version of the key.
2153 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
2156 2002-06-30 Akim Demaille <akim@epita.fr>
2158 * src/state.h (reductions_t): Rename member `nreds' as num.
2159 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
2160 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
2162 2002-06-30 Akim Demaille <akim@epita.fr>
2164 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
2165 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
2166 (shifts_to): Rename as...
2167 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
2168 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
2169 (TRANSITION_IS_DISABLED, transitions_to): these.
2171 2002-06-30 Akim Demaille <akim@epita.fr>
2173 * src/print.c (print_shifts, print_gotos): Merge into...
2174 (print_transitions): this.
2175 (print_transitions, print_errs, print_reductions): Align the
2177 (print_core, print_transitions, print_errs, print_state,
2178 print_grammar): Output empty lines separator before, not after.
2179 (state_default_rule_compute): Rename as...
2180 (state_default_rule): this.
2181 * tests/conflicts.at (Defaulted Conflicted Reduction),
2182 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
2183 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
2185 2002-06-30 Akim Demaille <akim@epita.fr>
2187 Display items as we display rules.
2189 * src/gram.h, src/gram.c (rule_lhs_print): New.
2190 * src/gram.c (grammar_rules_partial_print): Use it.
2191 * src/print.c (print_core): Likewise.
2192 * tests/conflicts.at (Defaulted Conflicted Reduction),
2193 (Unresolved SR Conflicts): Adjust.
2194 (Unresolved SR Conflicts): Adjust and rename as...
2195 (Resolved SR Conflicts): this, as was meant.
2196 * tests/regression.at (Web2c Report): Adjust.
2198 2002-06-30 Akim Demaille <akim@epita.fr>
2200 * src/print.c (state_default_rule_compute): New, extracted from...
2201 (print_reductions): here.
2202 Pessimize, but clarify the code.
2203 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
2205 2002-06-30 Akim Demaille <akim@epita.fr>
2207 * src/output.c (action_row): Let default_rule be always a rule
2210 2002-06-30 Akim Demaille <akim@epita.fr>
2212 * src/closure.c (print_firsts, print_fderives, closure):
2214 * src/lalr.c (lookaheads_print): Likewise.
2215 * src/state.c (state_rule_lookaheads_print): Likewise.
2216 * src/print_graph.c (print_core): Likewise.
2217 * src/print.c (print_reductions): Likewise.
2218 * src/output.c (action_row): Likewise.
2219 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
2221 2002-06-30 Akim Demaille <akim@epita.fr>
2223 * src/print_graph.c: Use report_flag.
2225 2002-06-30 Akim Demaille <akim@epita.fr>
2227 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
2229 * src/relation.h, src/relation.c (traverse, relation_digraph)
2230 (relation_print, relation_transpose): New.
2232 2002-06-30 Akim Demaille <akim@epita.fr>
2234 * src/state.h, src/state.c (shifts_to): New.
2235 * src/lalr.c (build_relations): Use it.
2237 2002-06-30 Akim Demaille <akim@epita.fr>
2239 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
2240 (item_number_of_rule_number, rule_number_of_item_number): New.
2241 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
2242 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
2243 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
2244 Propagate their use.
2245 Much remains to be done, in particular wrt `shorts' from types.h.
2247 2002-06-30 Akim Demaille <akim@epita.fr>
2249 * src/symtab.c (symbol_new): Initialize the `printer' member.
2251 2002-06-30 Akim Demaille <akim@epita.fr>
2253 * src/LR0.c (save_reductions): Remove, replaced by...
2254 * src/state.h, src/state.c (state_reductions_set): New.
2255 (reductions, errs): Rename as...
2256 (reductions_t, errs_t): these.
2257 Adjust all dependencies.
2259 2002-06-30 Akim Demaille <akim@epita.fr>
2261 * src/LR0.c (state_list_t, state_list_append): New.
2262 (first_state, last_state): Now symbol_list_t.
2263 (this_state): Remove.
2264 (new_itemsets, append_states, save_reductions): Take a state_t as
2266 (set_states, generate_states): Adjust.
2267 (save_shifts): Remove, replaced by...
2268 * src/state.h, src/state.c (state_shifts_set): New.
2269 (shifts): Rename as...
2271 Adjust all dependencies.
2272 * src/state.h (state_t): Remove the `next' member.
2274 2002-06-30 Akim Demaille <akim@epita.fr>
2276 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
2279 2002-06-30 Akim Demaille <akim@epita.fr>
2281 Use hash.h for the state hash table.
2283 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
2284 (allocate_storage): Use state_hash_new.
2285 (free_storage): Use state_hash_free.
2286 (new_state, get_state): Adjust.
2287 * src/lalr.h, src/lalr.c (states): Move to...
2288 * src/states.h (state_t): Remove the `link' member, no longer
2290 * src/states.h, src/states.c: here.
2291 (state_hash_new, state_hash_free, state_hash_lookup)
2292 (state_hash_insert, states_free): New.
2293 * src/states.c (state_table, state_compare, state_hash): New.
2294 * src/output.c (output_actions): Do not free states now, since we
2295 still need to know the final_state number in `prepare', called
2296 afterwards. Do it...
2297 * src/main.c (main): here: call states_free after `output'.
2299 2002-06-30 Akim Demaille <akim@epita.fr>
2301 * src/state.h, src/state.c (state_new): New, extracted from...
2302 * src/LR0.c (new_state): here.
2303 * src/state.h (STATE_ALLOC): Move to...
2304 * src/state.c: here.
2305 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
2306 * src/state.h, src/state.c: here.
2308 2002-06-30 Akim Demaille <akim@epita.fr>
2310 * src/reader.c (gensym): Rename as...
2311 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
2312 (getsym): Rename as...
2315 2002-06-30 Akim Demaille <akim@epita.fr>
2317 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
2318 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
2319 * src/output.c, src/print.c, src/print_graph.c: Propagate.
2320 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
2322 2002-06-30 Akim Demaille <akim@epita.fr>
2324 Make the test suite pass with warnings checked.
2326 * tests/actions.at (Printers and Destructors): Improve.
2327 Avoid unsigned vs. signed issues.
2328 * tests/calc.at: Don't exercise the scanner here, do it...
2329 * tests/input.at (Torturing the Scanner): here.
2331 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2333 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
2334 reorganize first lines parallel to yacc.c.
2336 2002-06-28 Akim Demaille <akim@epita.fr>
2338 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
2339 (b4_token_enum, b4_token_defines): New, factored from...
2340 * data/lalr1.cc, data/yacc.c, glr.c: here.
2342 2002-06-28 Akim Demaille <akim@epita.fr>
2344 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
2346 * src/output.c (merger_output): static.
2348 2002-06-28 Akim Demaille <akim@epita.fr>
2350 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
2351 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
2353 * src/output.c (save_row): Initialize all the variables to pacify GCC.
2355 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2357 Accumulated changelog for new GLR parsing features.
2359 * src/conflicts.c (count_total_conflicts): Change name to
2360 conflicts_total_count.
2361 * src/conflicts.h: Ditto.
2362 * src/output.c (token_actions): Use the new name.
2363 (output_conflicts): Change conflp => conflict_list_heads, and
2364 confl => conflict_list for better readability.
2365 * data/glr.c: Use the new names.
2366 * NEWS: Add self to GLR announcement.
2368 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
2370 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
2373 * data/bison.glr: Change name to glr.c
2374 * data/glr.c: Renamed from bison.glr.
2375 * data/Makefile.am: Add glr.c
2379 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
2380 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
2382 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2384 * data/bison.glr: Be sure to restore the
2385 current #line when returning to the skeleton contents after having
2386 exposed the input file's #line.
2388 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2390 * data/bison.glr: Bring up to date with changes to bison.simple.
2392 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2394 * data/bison.glr: Correct definitions that use b4_prefix.
2395 Various reformatting.
2396 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
2397 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
2398 yytokenp argument; now part of stack.
2399 (yychar): Define to behave as documented.
2402 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
2404 * src/reader.h: Add declaration for free_merger_functions.
2406 * src/reader.c (merge_functions): New variable.
2407 (get_merge_function): New function.
2408 (free_merger_functions): New function.
2409 (readgram): Check for %prec that is not followed by a symbol.
2410 Handle %dprec and %merge declarations.
2411 (packgram): Initialize dprec and merger fields in rules array.
2413 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
2414 conflict_list_cnt, conflict_list_free): New variables.
2415 (table_grow): Also grow conflict_table.
2416 (prepare_rules): Output dprec and merger tables.
2417 (conflict_row): New function.
2418 (action_row): Output conflict lists for GLR parser. Don't use
2419 default reduction in conflicted states for GLR parser so that there
2420 are spaces for the conflict lists.
2421 (save_row): Also save conflict information.
2422 (token_actions): Allocate conflict list.
2423 (merger_output): New function.
2424 (pack_vector): Pack conflict table, too.
2425 (output_conflicts): New function to output yyconflp and yyconfl.
2426 (output_check): Allocate conflict_tos.
2427 (output_actions): Output conflict tables, also.
2428 (output_skeleton): Output b4_mergers definition.
2429 (prepare): Output b4_max_rhs_length definition.
2430 Use 'bison.glr' as default skeleton for GLR parsers.
2432 * src/gram.c (glr_parser): New flag.
2433 (grammar_free): Call free_merger_functions.
2435 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
2436 all pairs of conflicting reductions, rather than just all tokens
2437 causing conflicts. Needed to size conflict tables.
2438 (conflicts_output): Modify call to count_rr_conflicts for new
2440 (conflicts_print): Ditto.
2441 (count_total_conflicts): New function.
2443 * src/reader.h (merger_list): New type.
2444 (merge_functions): New variable.
2446 * src/lex.h (tok_dprec, tok_merge): New token types.
2448 * src/gram.h (rule_s): Add dprec and merger fields.
2449 (glr_parser): New flag.
2451 * src/conflicts.h (count_total_conflicts): New function.
2453 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
2455 * doc/bison.texinfo (Generalized LR Parsing): New section.
2456 (GLR Parsers): New section.
2457 (Language and Grammar): Mention GLR parsing.
2458 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
2459 Correct typo ("tge" -> "the").
2461 * data/bison.glr: New skeleton for GLR parsing.
2463 * tests/cxx-gram.at: New tests for GLR parsing.
2465 * tests/testsuite.at: Include cxx-gram.at.
2467 * tests/Makefile.am: Add cxx-gram.at.
2471 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
2473 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
2475 2002-06-27 Akim Demaille <akim@epita.fr>
2477 * src/options.h, src/options.c: Remove.
2478 * src/getargs.c (short_options, long_options): New.
2480 2002-06-27 Akim Demaille <akim@epita.fr>
2482 * data/bison.simple, data/bison.c++: Rename as...
2483 * data/yacc.c, data/lalr1.cc: these.
2484 * doc/bison.texinfo (Environment Variables): Remove.
2486 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
2488 * src/getargs.c (report_argmatch): Initialize strtok().
2490 2002-06-20 Akim Demaille <akim@epita.fr>
2492 * data/bison.simple (b4_symbol_actions): New, replaces...
2493 (b4_symbol_destructor, b4_symbol_printer): these.
2494 (yysymprint): Be sure to call YYPRINT only for tokens, and using
2497 2002-06-20 Akim Demaille <akim@epita.fr>
2499 * data/bison.simple (yydestructor): Rename as...
2502 2002-06-20 Akim Demaille <akim@epita.fr>
2504 * src/symtab.h, src/symtab.c (symbol_type_set)
2505 (symbol_destructor_set, symbol_precedence_set): The location is
2509 2002-06-20 Akim Demaille <akim@epita.fr>
2511 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
2513 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
2515 * src/symtab.h, src/symtab.c (symbol_class_set)
2516 (symbol_user_token_number_set): Likewise.
2518 Promote complain_at.
2519 * tests/input.at (Type Clashes): Adjust.
2521 2002-06-20 Akim Demaille <akim@epita.fr>
2523 * data/bison.simple (YYLEX): Fix the declaration when
2526 2002-06-20 Akim Demaille <akim@epita.fr>
2528 * data/bison.simple (yysymprint): Don't print the token number,
2530 * tests/actions.at (Destructors): Rename as...
2531 (Printers and Destructors): this.
2532 Also exercise %printer.
2534 2002-06-20 Akim Demaille <akim@epita.fr>
2536 * data/bison.simple (YYDSYMPRINT): New.
2537 Use it to remove many of the #if YYDEBUG/if (yydebug).
2539 2002-06-20 Akim Demaille <akim@epita.fr>
2541 * src/symtab.h, src/symtab.c (symbol_t): printer and
2542 printer_location are new members.
2543 (symbol_printer_set): New.
2544 * src/parse-gram.y (PERCENT_PRINTER): New token.
2545 Handle its associated rule.
2546 * src/scan-gram.l: Adjust.
2547 (handle_destructor_at, handle_destructor_dollar): Rename as...
2548 (handle_symbol_code_at, handle_symbol_code_dollar): these.
2549 * src/output.c (symbol_printers_output): New.
2550 (output_skeleton): Call it.
2551 * data/bison.simple (yysymprint): New. Cannot be named yyprint
2552 since there are already many grammar files with a user `yyprint'.
2553 Replace the calls to YYPRINT to calls to yysymprint.
2554 * tests/calc.at: Adjust.
2555 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
2556 taking advantage of parser very internal details (stack size!).
2558 2002-06-20 Akim Demaille <akim@epita.fr>
2560 * src/scan-gram.l: Complete the scanner with the missing patterns
2562 Use `quote' and `symbol_tag_get' where appropriate.
2564 2002-06-19 Akim Demaille <akim@epita.fr>
2566 * tests/actions.at (Destructors): Augment to test locations.
2567 * data/bison.simple (yydestructor): Pass it the current location
2568 if locations are enabled.
2569 Prototype only when __STDC__ or C++.
2570 Change the argument names to move into the yy name space: there is
2573 2002-06-19 Akim Demaille <akim@epita.fr>
2575 * data/bison.simple (b4_pure_if): New.
2576 Use it instead of #ifdef YYPURE.
2578 2002-06-19 Akim Demaille <akim@epita.fr>
2580 * data/bison.simple (b4_location_if): New.
2581 Use it instead of #ifdef YYLSP_NEEDED.
2583 2002-06-19 Akim Demaille <akim@epita.fr>
2585 Prepare @$ in %destructor, but currently don't bind it in the
2586 skeleton, as %location use is not cleaned up yet.
2588 * src/scan-gram.l (handle_dollar, handle_destructor_at)
2589 (handle_action_at): New.
2590 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
2591 a braced_code_t and a location as additional arguments.
2592 (handle_destructor_dollar): Instead of requiring `b4_eval', just
2593 unquote one when outputting `b4_dollar_dollar'.
2595 * data/bison.simple (b4_eval): Remove.
2596 (b4_symbol_destructor): Adjust.
2597 * tests/input.at (Invalid @n): Adjust.
2599 2002-06-19 Zack Weinberg <zack@codesourcery.com>
2601 * doc/bison.texinfo: Document ability to have multiple
2604 2002-06-18 Akim Demaille <akim@epita.fr>
2606 * src/files.c (compute_base_names): When computing the output file
2607 names from the input file name, strip the directory part.
2609 2002-06-18 Akim Demaille <akim@epita.fr>
2611 * data/bison.simple.new: Comment changes.
2612 Reported by Andreas Schwab.
2614 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
2616 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
2617 there are no `label `yyoverflowlab' defined but not used' warnings
2618 when yyoverflow is defined.
2620 2002-06-18 Akim Demaille <akim@epita.fr>
2622 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
2624 (symbol_destructor_set): Adjust.
2625 * src/output.c (symbol_destructors_output): Output the destructor
2627 Output the symbol name.
2628 * data/bison.simple (b4_symbol_destructor): Adjust.
2630 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
2631 and Akim Demaille <akim@epita.fr>
2633 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
2634 what's left on the stack when the error recovery hits EOF.
2635 * tests/actions.at (Destructors): Complete to exercise this case.
2637 2002-06-17 Akim Demaille <akim@epita.fr>
2639 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
2640 arguments is really empty, not only equal to `[]'.
2641 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
2643 (symbol_destructor_set): New.
2644 * src/output.c (symbol_destructors_output): New.
2645 * src/reader.h (brace_code_t, current_braced_code): New.
2646 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
2647 (handle_dollar): Rename as...
2648 (handle_action_dollar): this.
2649 (handle_destructor_dollar): New.
2650 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
2651 (grammar_declaration): Use it.
2652 * data/bison.simple (yystos): Is always defined.
2653 (yydestructor): New.
2654 * tests/actions.at (Destructors): New.
2655 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
2657 2002-06-17 Akim Demaille <akim@epita.fr>
2659 * src/symlist.h, src/symlist.c (symbol_list_length): New.
2660 * src/scan-gram.l (handle_dollar, handle_at): Compute the
2661 rule_length only when needed.
2662 * src/output.c (actions_output, token_definitions_output): Output
2664 * src/symtab.c: Don't access directly to the symbol tag, use
2666 * src/parse-gram.y: Use symbol_list_free.
2668 2002-06-17 Akim Demaille <akim@epita.fr>
2670 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
2671 (symbol_list_prepend, get_type_name): Move to...
2672 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
2673 (symbol_list_prepend, symbol_list_n_type_name_get): here.
2675 (symbol_list_free): New.
2676 * src/scan-gram.l (handle_dollar): Takes a location.
2677 * tests/input.at (Invalid $n): Adjust.
2679 2002-06-17 Akim Demaille <akim@epita.fr>
2681 * src/reader.h, src/reader.c (symbol_list_new): Export it.
2682 (symbol_list_prepend): New.
2683 * src/parse-gram.y (%union): `list' is a new member.
2684 (symbols.1): New, replaces...
2685 (terms_to_prec.1, nterms_to_type.1): these.
2686 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
2687 Take a location as additional argument.
2690 2002-06-15 Akim Demaille <akim@epita.fr>
2692 * src/parse-gram.y: Move %token in the declaration section so that
2693 we don't depend upon CVS Bison.
2695 2002-06-15 Akim Demaille <akim@epita.fr>
2697 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
2698 * src/print.c (print_core): Use it.
2700 2002-06-15 Akim Demaille <akim@epita.fr>
2702 * src/conflicts.c (log_resolution): Accept the rule involved in
2703 the sr conflicts instead of the lookahead number that points to
2705 (flush_reduce): Accept the current lookahead vector as argument,
2706 instead of the index in LA.
2707 (resolve_sr_conflict): Accept the current number of lookahead
2708 bitset to consider for the STATE, instead of the index in LA.
2709 (set_conflicts): Adjust.
2710 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
2712 2002-06-15 Akim Demaille <akim@epita.fr>
2714 * src/state.h (state_t): Replace the `lookaheadsp' member, a
2715 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
2716 Adjust all dependencies.
2717 * src/lalr.c (initialize_lookaheads): Split into...
2718 (states_lookaheads_count, states_lookaheads_initialize): these.
2721 2002-06-15 Akim Demaille <akim@epita.fr>
2723 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
2725 (grammar_rules_print): here.
2726 * src/reduce.c (reduce_output): Use it.
2727 * tests/reduce.at (Useless Rules, Reduced Automaton)
2728 (Underivable Rules): Adjust.
2730 2002-06-15 Akim Demaille <akim@epita.fr>
2732 Copy BYacc's nice way to report the grammar.
2734 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
2736 Don't print the rules' location, it is confusing and useless.
2737 (rule_print): Use grammar_rhs_print.
2738 * src/print.c (print_grammar): Use grammar_rules_print.
2740 2002-06-15 Akim Demaille <akim@epita.fr>
2742 Complete and rationalize `useless thing' warnings.
2744 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
2745 (symbol_tag_print): New.
2746 Use them everywhere in place of accessing directly the tag member.
2747 * src/gram.h, src/gram.c (rule_print): New.
2748 Use it where a rule used to be printed `by hand'.
2749 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
2750 (reduce_grammar_tables): Report the useless rules.
2751 (reduce_print): Useless things are a warning, not an error.
2753 * tests/reduce.at (Useless Nonterminals, Useless Rules):
2754 (Reduced Automaton, Underivable Rules): Adjust.
2755 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
2756 * tests/conflicts.at (Unresolved SR Conflicts)
2757 (Solved SR Conflicts): Adjust.
2759 2002-06-15 Akim Demaille <akim@epita.fr>
2761 Let symbols have a location.
2763 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
2766 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
2767 Use location_t, not int.
2768 * src/symtab.c (symbol_check_defined): Take advantage of the
2770 * tests/regression.at (Invalid inputs): Adjust.
2772 2002-06-15 Akim Demaille <akim@epita.fr>
2774 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
2775 (input): Don't try to initialize yylloc here, do it in the
2777 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
2778 * src/gram.h (rule_t): Change line and action_line into location
2779 and action_location, of location_t type.
2780 Adjust all dependencies.
2781 * src/location.h, src/location.c (empty_location): New.
2782 * src/reader.h, src/reader.c (grammar_start_symbol_set)
2783 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
2784 (grammar_current_rule_symbol_append)
2785 (grammar_current_rule_action_append): Expect a location as argument.
2786 * src/reader.c (grammar_midrule_action): Adjust to attach an
2787 action's location as dummy symbol location.
2788 * src/symtab.h, src/symtab.c (startsymbol_location): New.
2789 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
2792 2002-06-14 Akim Demaille <akim@epita.fr>
2794 Grammar declarations may be found in the grammar section.
2796 * src/parse-gram.y (rules_or_grammar_declaration): New.
2797 (declarations): Each declaration may end with a semicolon, not
2799 (grammar_declaration): `"%union"'.
2800 (grammar): Branch to rules_or_grammar_declaration.
2802 2002-06-14 Akim Demaille <akim@epita.fr>
2804 * src/main.c (main): Invoke scanner_free.
2806 2002-06-14 Akim Demaille <akim@epita.fr>
2808 * src/output.c (m4_invoke): Extracted from...
2809 (output_skeleton): here.
2812 2002-06-14 Akim Demaille <akim@epita.fr>
2814 * src/parse-gram.y (directives, directive, gram)
2815 (grammar_directives, precedence_directives, precedence_directive):
2817 (declarations, declaration, grammar, grammar_declaration)
2818 (precedence_declaration, precedence_declarator): these.
2819 (symbol_declaration): New.
2821 2002-06-14 Akim Demaille <akim@epita.fr>
2823 * src/files.c (action_obstack): Remove, unused.
2824 (output_obstack): Remove it, and all its dependencies, as it is no
2826 * src/reader.c (epilogue_set): Build the epilogue in the
2828 * src/output.h, src/output.c (muscle_obstack): Move to...
2829 * src/muscle_tab.h, src/muscle_tab.h: here.
2830 (muscle_init): Initialize muscle_obstack.
2832 * src/main.c (main): Call it.
2834 2002-06-14 Akim Demaille <akim@epita.fr>
2836 * src/location.h: New, extracted from...
2837 * src/reader.h: here.
2838 * src/Makefile.am (noinst_HEADERS): Merge into
2839 (bison_SOURCES): this.
2841 * src/parse-gram.y: Use location_t instead of Bison's.
2842 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
2843 Use location_t instead of ints.
2845 2002-06-14 Akim Demaille <akim@epita.fr>
2847 * data/bison.simple, data/bison.c++: Be sure to restore the
2848 current #line when returning to the skeleton contents after having
2849 exposed the input file's #line.
2851 2002-06-12 Akim Demaille <akim@epita.fr>
2853 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
2855 * tests/actions.at (Exotic Dollars): New.
2857 2002-06-12 Akim Demaille <akim@epita.fr>
2859 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
2861 * tests/input.at (Torturing the Scanner): New.
2863 2002-06-11 Akim Demaille <akim@epita.fr>
2865 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
2866 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
2867 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
2868 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
2869 * src/reader.c (reader): Use it.
2871 2002-06-11 Akim Demaille <akim@epita.fr>
2873 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
2875 (scanner_last_string_free): New.
2877 2002-06-11 Akim Demaille <akim@epita.fr>
2879 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
2880 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
2881 (last_string, YY_OBS_FREE): New.
2882 Use them when returning an ID.
2884 2002-06-11 Akim Demaille <akim@epita.fr>
2886 Have Bison grammars parsed by a Bison grammar.
2888 * src/reader.c, src/reader.h (prologue_augment): New.
2889 * src/reader.c (copy_definition): Remove.
2891 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
2892 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
2893 (grammar_current_rule_prec_set, grammar_current_rule_check)
2894 (grammar_current_rule_symbol_append)
2895 (grammar_current_rule_action_append): Export.
2896 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
2897 (symbol_list_action_append): Remove.
2898 Hook the routines from reader.
2899 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
2900 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
2902 * src/reader.c (read_declarations): Remove, unused.
2904 * src/parse-gram.y: Handle the epilogue.
2905 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
2906 (grammar_start_symbol_set): this.
2907 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
2908 * src/reader.c (readgram): Remove, unused.
2909 (reader): Adjust to insert eoftoken and axiom where appropriate.
2911 * src/reader.c (copy_dollar): Replace with...
2912 * src/scan-gram.h (handle_dollar): this.
2913 * src/parse-gram.y: Remove `%thong'.
2915 * src/reader.c (copy_at): Replace with...
2916 * src/scan-gram.h (handle_at): this.
2918 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
2921 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
2924 * src/reader.h, src/reader.c (grammar_rule_end): New.
2926 * src/parse.y (current_type, current_class): New.
2927 Implement `%nterm', `%token' support.
2928 Merge `%term' into `%token'.
2929 (string_as_id): New.
2930 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
2933 * src/parse-gram.y: Be sure to handle properly the beginning of
2936 * src/parse-gram.y: Handle %type.
2937 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
2939 * src/parse-gram.y: More directives support.
2940 * src/options.c: No longer handle source directives.
2942 * src/parse-gram.y: Fix %output.
2944 * src/parse-gram.y: Handle %union.
2945 Use the prologue locations.
2946 * src/reader.c (parse_union_decl): Remove.
2948 * src/reader.h, src/reader.c (epilogue_set): New.
2949 * src/parse-gram.y: Use it.
2951 * data/bison.simple, data/bison.c++: b4_stype is now either not
2952 defined, then default to int, or to the contents of %union,
2953 without `union' itself.
2955 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
2957 * src/output.c (actions_output): Don't output braces, as they are
2958 already handled by the scanner.
2960 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
2961 characters to themselves.
2963 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
2964 that the epilogue has a proper #line.
2966 * src/parse-gram.y: Handle precedence/associativity.
2968 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
2970 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
2971 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
2972 at all to define terminals that cannot be emitted.
2974 * src/scan-gram.l: Escape M4 characters.
2976 * src/scan-gram.l: Working properly with escapes in user
2979 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
2980 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
2982 Use more modest sizes, as for the time being the parser does not
2983 release memory, and therefore the process swallows a huge amount
2986 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
2987 stricter %token grammar.
2989 * src/symtab.h (associativity): Add `undef_assoc'.
2990 (symbol_precedence_set): Do nothing when passed an undef_assoc.
2991 * src/symtab.c (symbol_check_alias_consistence): Adjust.
2993 * tests/regression.at (Invalid %directive): Remove, as it is now
2995 (Invalid inputs): Adjust to the new error messages.
2996 (Token definitions): The new grammar doesn't allow too many
2999 * src/lex.h, src/lex.c: Remove.
3000 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
3001 (copy_character, copy_string2, copy_string, copy_identifier)
3002 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
3003 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
3004 (parse_action): Remove.
3005 * po/POTFILES.in: Adjust.
3007 2002-06-11 Akim Demaille <akim@epita.fr>
3009 * src/reader.c (parse_action): Don't store directly into the
3010 rule's action member: return the action as a string.
3011 Don't require `rule_length' as an argument: compute it.
3012 (grammar_current_rule_symbol_append)
3013 (grammar_current_rule_action_append): New, eved out from
3015 Remove `action_flag', `rulelength', unused now.
3017 2002-06-11 Akim Demaille <akim@epita.fr>
3019 * src/reader.c (grammar_current_rule_prec_set).
3020 (grammar_current_rule_check): New, eved out from...
3022 Remove `xaction', `first_rhs': useless.
3023 * tests/input.at (Type clashes): New.
3024 * tests/existing.at (GNU Cim Grammar): Adjust.
3026 2002-06-11 Akim Demaille <akim@epita.fr>
3028 * src/reader.c (grammar_midrule_action): New, Eved out from
3031 2002-06-11 Akim Demaille <akim@epita.fr>
3033 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
3035 (readgram): Use them as replacement of inlined code, crule and
3038 2002-06-11 Akim Demaille <akim@epita.fr>
3040 * src/reader.c (grammar_end, grammar_symbol_append): New.
3041 (readgram): Use them.
3042 Make the use of `p' as local as possible.
3044 2002-06-10 Akim Demaille <akim@epita.fr>
3046 GCJ's parser requires the tokens to be defined before the prologue.
3048 * data/bison.simple: Output the token definition before the user's
3050 * tests/regression.at (Braces parsing, Duplicate string)
3051 (Mixing %token styles): Check the output from bison.
3052 (Early token definitions): New.
3054 2002-06-10 Akim Demaille <akim@epita.fr>
3056 * src/symtab.c (symbol_user_token_number_set): Don't complain when
3057 assigning twice the same user number to a token, so that we can
3059 * src/lex.c (lex): here.
3060 Also use `symbol_class_set' instead of hand written code.
3061 * src/reader.c (parse_assoc_decl): Likewise.
3063 2002-06-10 Akim Demaille <akim@epita.fr>
3065 * src/symtab.c, src/symtab.c (symbol_class_set)
3066 (symbol_user_token_number_set): New.
3067 * src/reader.c (parse_token_decl): Use them.
3068 Use a switch instead of ifs.
3069 Use a single argument.
3071 2002-06-10 Akim Demaille <akim@epita.fr>
3073 Remove `%thong' support as it is undocumented, unused, duplicates
3074 `%token's job, and creates useless e-mail traffic with people who
3075 want to know what it is, why it is undocumented, unused, and
3076 duplicates `%token's job.
3078 * src/reader.c (parse_thong_decl): Remove.
3079 * src/options.c (option_table): Remove "thong".
3080 * src/lex.h (tok_thong): Remove.
3082 2002-06-10 Akim Demaille <akim@epita.fr>
3084 * src/symtab.c, src/symtab.c (symbol_type_set)
3085 (symbol_precedence_set): New.
3086 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
3087 (value_components_used): Remove, unused.
3089 2002-06-09 Akim Demaille <akim@epita.fr>
3091 Move symbols handling code out of the reader.
3093 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
3095 * src/symtab.h, src/symtab.c: here.
3097 * src/gram.c (start_symbol): Remove: use startsymbol->number.
3098 * src/reader.c (startval): Rename as...
3099 * src/symtab.h, src/symtab.c (startsymbol): this.
3100 * src/reader.c: Adjust.
3102 * src/reader.c (symbol_check_defined, symbol_make_alias)
3103 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
3104 (token_translations_init)
3106 * src/symtab.c: here.
3107 * src/reader.c (packsymbols): Move to...
3108 * src/symtab.h, src/symtab.c (symbols_pack): here.
3109 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
3112 2002-06-03 Akim Demaille <akim@epita.fr>
3114 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
3117 2002-06-03 Akim Demaille <akim@epita.fr>
3119 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
3120 structs with non literals.
3121 * src/scan-skel.l: never-interactive.
3122 * src/conflicts.c (enum conflict_resolution_e): No trailing
3124 * src/getargs.c (usage): Split long literal strings.
3125 Reported by Hans Aberg.
3127 2002-05-28 Akim Demaille <akim@epita.fr>
3129 * data/bison.c++: Use C++ ostreams.
3130 (cdebug_): New member.
3132 2002-05-28 Akim Demaille <akim@epita.fr>
3134 * src/output.c (output_skeleton): Be sure to allocate enough room
3135 for `/' _and_ for `\0' in full_skeleton.
3137 2002-05-28 Akim Demaille <akim@epita.fr>
3139 * data/bison.c++: Catch up with bison.simple:
3140 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3141 and Paul Eggert <eggert@twinsun.com>: `error' handing.
3142 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
3145 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3147 * src/output.c (output_skeleton): Put an explicit path in front of
3148 the skeleton file name, rather than relying on the -I directory,
3149 to partially alleviate effects of having a skeleton file lying around
3150 in the current directory.
3152 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3154 * src/conflicts.c (log_resolution): Correct typo:
3155 obstack_printf should be obstack_fgrow1.
3157 2002-05-26 Akim Demaille <akim@epita.fr>
3159 * src/state.h (state_t): `solved_conflicts' is a new member.
3160 * src/LR0.c (new_state): Set it to 0.
3161 * src/conflicts.h, src/conflicts.c (print_conflicts)
3162 (free_conflicts, solve_conflicts): Rename as...
3163 (conflicts_print, conflicts_free, conflicts_solve): these.
3165 * src/conflicts.c (enum conflict_resolution_e)
3166 (solved_conflicts_obstack): New, used by...
3167 (log_resolution): this.
3168 Adjust to attach the conflict resolution to each state.
3169 Complete the description with the precedence/associativity
3171 (resolve_sr_conflict): Adjust.
3172 * src/print.c (print_state): Output its solved_conflicts.
3173 * tests/conflicts.at (Unresolved SR Conflicts)
3174 (Solved SR Conflicts): Exercise --report=all.
3176 2002-05-26 Akim Demaille <akim@epita.fr>
3178 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
3179 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
3180 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
3181 (token_number_t, item_number_as_token_number)
3182 (token_number_as_item_number, muscle_insert_token_number_table):
3184 (symbol_number_t, item_number_as_symbol_number)
3185 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
3186 these, since it is more appropriate.
3188 2002-05-26 Akim Demaille <akim@epita.fr>
3190 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
3192 * data/bison.simple (yystos) [YYDEBUG]: New.
3193 (yyparse) [YYDEBUG]: Display the symbols which are popped during
3195 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
3197 2002-05-25 Akim Demaille <akim@epita.fr>
3199 * doc/bison.texinfo (Debugging): Split into...
3200 (Tracing): this new section, its former contents, and...
3201 (Understanding): this new section.
3202 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
3204 (report_flag): this.
3205 Adjust all dependencies.
3206 (report_args, report_types, report_argmatch): New.
3207 (usage, getargs): Report/support -r, --report.
3209 (struct option_table_struct): Rename as..,
3210 (struct option_table_s): this.
3211 Rename the `set_flag' member to `flag' to match with getopt_long's
3213 * src/options.c (option_table): Split verbose into an entry for
3214 %verbose, and another for --verbose.
3215 Support --report/-r, so remove -r from the obsolete --raw.
3216 * src/print.c: Attach full item sets and lookaheads reports to
3217 report_flag instead of trace_flag.
3218 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
3220 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3221 and Paul Eggert <eggert@twinsun.com>
3223 * data/bison.simple (yyparse): Correct error handling to conform to
3224 POSIX and yacc. Specifically, after syntax error is discovered,
3225 do not reduce further before shifting the error token.
3226 Clean up the code a bit by removing the labels yyerrdefault,
3227 yyerrhandle, yyerrpop.
3228 * NEWS: Document the above.
3230 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3232 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
3233 type; it isn't always big enough, since it doesn't necessarily
3234 include non-terminals.
3235 (yytranslate): Expand definition of yy_token_number_type, so that
3236 the latter can be removed.
3237 (yy_token_number_type): Remove, only one use.
3238 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
3239 don't use TokenNumberType as element type.
3241 * tests/regression.at: Modify expected output to agree with change
3242 to yyr1 and yytranslate.
3244 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
3246 * src/reader.c (parse_action): Use copy_character instead of
3249 2002-05-13 Akim Demaille <akim@epita.fr>
3251 * tests/regression.at (Token definitions): Prototype yylex and
3254 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
3256 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
3257 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
3259 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
3261 2002-05-07 Akim Demaille <akim@epita.fr>
3263 * tests/synclines.at: Be sure to prototype yylex and yyerror to
3266 2002-05-07 Akim Demaille <akim@epita.fr>
3270 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
3271 over the RHS of each rule.
3272 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
3273 * src/state.h (state_t): Member `nitems' is unsigned short.
3274 * src/LR0.c (get_state): Adjust.
3275 * src/reader.c (packgram): Likewise.
3276 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
3278 (muscle_insert_int_table): Remove, unused.
3279 (prepare_rules): Remove `max'.
3281 2002-05-06 Akim Demaille <akim@epita.fr>
3283 * src/closure.c (print_firsts): Display of the symbol tags.
3284 (bitmatrix_print): Move to...
3285 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
3287 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
3289 2002-05-06 Akim Demaille <akim@epita.fr>
3291 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
3294 2002-05-06 Akim Demaille <akim@epita.fr>
3296 * src/LR0.c (new_state, get_state): Instead of using the global
3297 `kernel_size' and `kernel_base', have two new arguments:
3298 `core_size' and `core'.
3301 2002-05-06 Akim Demaille <akim@epita.fr>
3303 * src/reader.c (packgram): No longer end `ritem' with a 0
3304 sentinel: it is not used.
3306 2002-05-05 Akim Demaille <akim@epita.fr>
3308 New experimental feature: display the lookaheads in the report and
3311 * src/print (print_core): When --trace-flag, display the rules
3313 * src/print_graph.c (print_core): Likewise.
3317 2002-05-05 Akim Demaille <akim@epita.fr>
3319 * tests/torture.at (Many lookaheads): New test.
3321 2002-05-05 Akim Demaille <akim@epita.fr>
3323 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
3324 (GENERATE_MUSCLE_INSERT_TABLE): this.
3325 (output_int_table, output_unsigned_int_table, output_short_table)
3326 (output_token_number_table, output_item_number_table): Replace with...
3327 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
3328 (muscle_insert_short_table, muscle_insert_token_number_table)
3329 (muscle_insert_item_number_table): these.
3331 (prepare_tokens): Don't free `translations', since...
3332 * src/reader.h, src/reader.c (grammar_free): do it.
3334 * src/gram.h, src/gram.c (grammar_free): here.
3335 * data/bison.simple, data/bison.c++: b4_token_number_max is now
3338 2002-05-05 Akim Demaille <akim@epita.fr>
3340 * src/output.c (output_unsigned_int_table): New.
3341 (prepare_rules): `i' is unsigned.
3342 `prhs', `rline', `r2' are unsigned int.
3343 Rename muscle `rhs_number_max' as `rhs_max'.
3344 Output muscles `prhs_max', `rline_max', and `r2_max'.
3346 * data/bison.simple, data/bison.c++: Adjust to use these muscles
3347 to compute types instead of constant types.
3348 * tests/regression.at (Web2c Actions): Adjust.
3350 2002-05-04 Akim Demaille <akim@epita.fr>
3352 * src/symtab.h (SALIAS, SUNDEF): Rename as...
3353 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
3354 Adjust dependencies.
3355 * src/output.c (token_definitions_output): Be sure not to output a
3356 `#define 'a'' when fed with `%token 'a' "a"'.
3357 * tests/regression.at (Token definitions): New.
3359 2002-05-03 Paul Eggert <eggert@twinsun.com>
3361 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
3364 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
3366 * Makefile.am (SUBDIRS): Remove intl.
3367 (EXTRA_DIST): Add config/config.rpath.
3369 2002-05-03 Akim Demaille <akim@epita.fr>
3371 * data/bison.simple (m4_if): Don't output empty enums.
3372 And actually, output valid enum definitions :(.
3374 2002-05-03 Akim Demaille <akim@epita.fr>
3376 * configure.bat: Remove, completely obsolete.
3377 * Makefile.am (EXTRA_DIST): Adjust.
3378 Don't distribute config.rpath...
3379 * config/Makefile.am (EXTRA_DIST): Do it.
3381 2002-05-03 Akim Demaille <akim@epita.fr>
3383 * configure.in (GETTEXT_VERSION): New.
3384 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
3386 2002-05-03 Akim Demaille <akim@epita.fr>
3388 * data/bison.simple (b4_token_enum): New.
3389 (b4_token_defines): Use it to output tokens both as #define and
3391 Suggested by Paul Eggert.
3392 * src/output.c (token_definitions_output): Don't output spurious
3395 2002-05-03 Akim Demaille <akim@epita.fr>
3397 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
3399 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
3401 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
3402 Update the stack class, give a try to deque as the default container.
3404 2002-05-02 Akim Demaille <akim@epita.fr>
3406 * data/bison.simple (yyparse): Do not implement @$ = @1.
3407 (YYLLOC_DEFAULT): Adjust to do it.
3408 * doc/bison.texinfo (Location Default Action): Fix.
3410 2002-05-02 Akim Demaille <akim@epita.fr>
3412 * src/reader.c (parse_braces): Merge into...
3413 (parse_action): this.
3415 2002-05-02 Akim Demaille <akim@epita.fr>
3417 * configure.in (ALL_LINGUAS): Remove.
3418 * po/LINGUAS, hr.po: New.
3420 2002-05-02 Akim Demaille <akim@epita.fr>
3422 Remove the so called hairy (semantic) parsers.
3424 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
3425 * src/gram.h, src/gram.c (semantic_parser): Remove.
3426 (rule_t): Remove the guard and guard_line members.
3427 * src/lex.h (token_t): remove tok_guard.
3428 * src/options.c (option_table): Remove %guard and %semantic_parser
3430 * src/output.c, src/output.h (guards_output): Remove.
3432 (token_definitions_output): Don't output the `T'
3434 (output_skeleton): Don't output the guards.
3435 * src/files.c, src/files.c (attrsfile): Remove.
3436 * src/reader.c (symbol_list): Remove the guard and guard_line
3438 Adjust dependencies.
3439 (parse_guard): Remove.
3440 * data/bison.hairy: Remove.
3441 * doc/bison.texinfo (Environment Variables): Remove occurrences of
3444 2002-05-02 Akim Demaille <akim@epita.fr>
3446 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
3447 (parse_guard): Rename the formal argument `stack_offset' as
3448 `rule_length', which is more readable.
3450 (copy_at, copy_dollar): Instead of outputting the hard coded
3451 values of $$, $n and so forth, output invocation to b4_lhs_value,
3452 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
3453 Note: this patch partially drops `semantic-parser' support: it
3454 always does `rule_length - n', where semantic parsers ought to
3456 * data/bison.simple, data/bison.c++ (b4_lhs_value)
3457 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
3459 2002-05-02 Akim Demaille <akim@epita.fr>
3461 * configure.in (AC_INIT): Bump to 1.49b.
3462 (AM_INIT_AUTOMAKE): Short invocation.
3464 2002-05-02 Akim Demaille <akim@epita.fr>
3468 2002-05-01 Akim Demaille <akim@epita.fr>
3470 * src/skeleton.h: Remove.
3472 2002-05-01 Akim Demaille <akim@epita.fr>
3474 * src/skeleton.h: Fix the #endif.
3475 Reported by Magnus Fromreide.
3477 2002-04-26 Paul Eggert <eggert@twinsun.com>
3479 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
3480 Define if we define YYSTYPE and YYLTYPE, respectively.
3481 (YYCOPY): Fix [] quoting problem in the non-GCC case.
3483 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
3485 * src/scan-skel.l: Postprocess quadrigraphs.
3487 * src/reader.c (copy_character): New function, used to output
3488 single characters while replacing `[' and `]' with quadrigraphs, to
3489 avoid troubles with M4 quotes.
3490 (copy_comment): Output characters with copy_character.
3491 (read_additionnal_code): Likewise.
3492 (copy_string2): Likewise.
3493 (copy_definition): Likewise.
3495 * tests/calc.at: Exercise M4 quoting.
3497 2002-04-25 Akim Demaille <akim@epita.fr>
3499 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
3500 between `!' and the command.
3501 Reported by Paul Eggert.
3503 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
3505 * tests/calc.at: Exercise prologue splitting.
3507 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
3508 `b4_post_prologue' instead of `b4_prologue'.
3510 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
3512 (output): Free pre_prologue_obstack and post_prologue_obstack.
3513 * src/files.h, src/files.c (attrs_obstack): Remove.
3514 (pre_prologue_obstack, post_prologue_obstack): New.
3515 * src/reader.c (copy_definition): Add a parameter to specify the
3516 obstack to fill, instead of using attrs_obstack unconditionally.
3517 (read_declarations): Pass pre_prologue_obstack to copy_definition if
3518 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
3520 2002-04-23 Paul Eggert <eggert@twinsun.com>
3522 * data/bison.simple: Remove unnecessary commentary and white
3523 space differences from 1_29-branch.
3524 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
3526 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
3527 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
3528 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
3529 constructors or destructors.
3531 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
3533 2002-04-23 Akim Demaille <akim@epita.fr>
3535 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
3536 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
3537 location with columns.
3538 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
3539 All reported by Paul Eggert.
3541 2002-04-22 Akim Demaille <akim@epita.fr>
3543 * src/reduce.c (dump_grammar): Move to...
3544 * src/gram.h, src/gram.c (grammar_dump): here.
3545 Be sure to separate long item numbers.
3546 Don't read the members of a rule's prec if its nil.
3548 2002-04-22 Akim Demaille <akim@epita.fr>
3550 * src/output.c (table_size, table_grow): New.
3551 (MAXTABLE): Remove, replace uses with table_size.
3552 (pack_vector): Instead of dying when the table is too big, grow it.
3554 2002-04-22 Akim Demaille <akim@epita.fr>
3556 * data/bison.simple (yyr1): Its type is that of a token number.
3557 * data/bison.c++ (r1_): Likewise.
3558 * tests/regression.at (Web2c Actions): Adjust.
3560 2002-04-22 Akim Demaille <akim@epita.fr>
3562 * src/reader.c (token_translations_init): 256 is now the default
3563 value for the error token, i.e., it will be assigned another
3564 number if the user assigned 256 to one of her tokens.
3565 (reader): Don't force 256 to error.
3566 * doc/bison.texinfo (Symbols): Adjust.
3567 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
3568 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
3569 etc. instead of 10, 20, 30 (which was used to `jump' over error
3570 (256) and undefined (2)).
3572 2002-04-22 Akim Demaille <akim@epita.fr>
3574 Propagate more token_number_t.
3576 * src/gram.h (token_number_as_item_number)
3577 (item_number_as_token_number): New.
3578 * src/output.c (GENERATE_OUTPUT_TABLE): New.
3579 Use it to create output_item_number_table and
3580 output_token_number_table.
3581 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
3582 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
3583 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
3584 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
3586 2002-04-22 Akim Demaille <akim@epita.fr>
3588 * src/output.h, src/output.c (get_lines_number): Remove.
3590 2002-04-19 Akim Demaille <akim@epita.fr>
3592 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
3594 (Debugging): More details about enabling the debugging features.
3595 (Table of Symbols): Describe $$, $n, @$, and @n.
3596 Suggested by Tim Josling.
3598 2002-04-19 Akim Demaille <akim@epita.fr>
3600 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
3602 2002-04-10 Akim Demaille <akim@epita.fr>
3604 * src/system.h: Rely on HAVE_LIMITS_H.
3605 Suggested by Paul Eggert.
3607 2002-04-09 Akim Demaille <akim@epita.fr>
3609 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
3610 full stderr, and strip it according to the bison options, instead
3611 of composing the error message from different bits.
3612 This makes it easier to check for several error messages.
3613 Adjust all the invocations.
3614 Add an invocation exercising the error token.
3615 Add an invocation demonstrating a stupid error message.
3616 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
3618 Error message are for stderr, not stdout.
3620 2002-04-09 Akim Demaille <akim@epita.fr>
3622 * src/gram.h, src/gram.c (error_token_number): Remove, use
3624 * src/reader.c (reader): Don't specify the user token number (2)
3625 for $undefined, as it uselessly prevents using it.
3626 * src/gram.h (token_number_t): Move to...
3627 * src/symtab.h: here.
3628 (state_t.number): Is a token_number_t.
3629 * src/print.c, src/reader.c: Use undeftoken->number instead of
3631 (Even though this 2 is not the same as above: the number of the
3632 undeftoken remains being 2, it is its user token number which
3634 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
3635 `user_token_number_max'.
3636 Output `undef_token_number'.
3637 * data/bison.simple, data/bison.c++: Use them.
3638 Be sure to map invalid yylex return values to
3639 `undef_token_number'. This saves us from gratuitous SEGV.
3641 * tests/conflicts.at (Solved SR Conflicts)
3642 (Unresolved SR Conflicts): Adjust.
3643 * tests/regression.at (Web2c Actions): Adjust.
3645 2002-04-08 Akim Demaille <akim@epita.fr>
3647 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
3649 Remove the duplicate `typedefs'.
3650 (RhsNumberType): Fix the declaration and various other typos.
3652 * data/bison.simple: Use __ofile__.
3653 * src/scan-skel.l: Handle __ofile__.
3655 2002-04-08 Akim Demaille <akim@epita.fr>
3657 * src/gram.h (item_number_t): New, the type of item numbers in
3658 RITEM. Note that it must be able to code symbol numbers as
3659 positive number, and the negation of rule numbers as negative
3661 Adjust all dependencies (pretty many).
3662 * src/reduce.c (rule): Remove this `short *' pointer: use
3664 * src/system.h (MINSHORT, MAXSHORT): Remove.
3666 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
3668 (MAXTABLE): Move to...
3669 * src/output.c (MAXTABLE): here.
3670 (prepare_rules): Use output_int_table to output rhs.
3671 * data/bison.simple, data/bison.c++: Adjust.
3672 * tests/torture.at (Big triangle): Move the limit from 254 to
3674 * tests/regression.at (Web2c Actions): Ajust.
3676 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
3677 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
3678 passes, but produces negative #line number, once fixed, GCC is
3679 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
3681 * src/state.h (state_h): Code input lines on ints, not shorts.
3683 2002-04-08 Akim Demaille <akim@epita.fr>
3685 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
3686 and then the grammar.
3688 2002-04-08 Akim Demaille <akim@epita.fr>
3690 * src/system.h: No longer using strndup.
3692 2002-04-07 Akim Demaille <akim@epita.fr>
3694 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
3695 * src/output.c (output_table_data): Return the longest number.
3696 (prepare_tokens): Output `token_number_max').
3697 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
3699 Use them to define yy_token_number_type/TokenNumberType.
3700 Use this type for yytranslate.
3701 * tests/torture.at (Big triangle): Push the limit from 124 to
3703 * tests/regression.at (Web2c Actions): Adjust.
3705 2002-04-07 Akim Demaille <akim@epita.fr>
3707 * tests/torture.at (Big triangle): New.
3708 (GNU AWK Grammar, GNU Cim Grammar): Move to...
3709 * tests/existing.at: here.
3711 2002-04-07 Akim Demaille <akim@epita.fr>
3713 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
3715 Adjust dependencies.
3717 2002-04-07 Akim Demaille <akim@epita.fr>
3719 * src/reader.c: Normalize increments to prefix form.
3721 2002-04-07 Akim Demaille <akim@epita.fr>
3723 * src/reader.c, symtab.c: Remove debugging code.
3725 2002-04-07 Akim Demaille <akim@epita.fr>
3727 Rename all the `bucket's as `symbol_t'.
3729 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
3730 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
3731 * src/symtab.c, src/symtab.h (bucket): Rename as...
3733 (symbol_list_new, bucket_check_defined, bucket_make_alias)
3734 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
3735 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
3736 (buckets_new, buckets_free, buckets_do): Rename as...
3737 (symbol_list_new, symbol_check_defined, symbol_make_alias)
3738 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
3739 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
3740 (symbols_new, symbols_free, symbols_do): these.
3742 2002-04-07 Akim Demaille <akim@epita.fr>
3744 Use lib/hash for the symbol table.
3746 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
3748 * src/lex.c (lex): Set the `number' member of new terminals.
3749 * src/reader.c (bucket_check_defined, bucket_make_alias)
3750 (bucket_check_alias_consistence, bucket_translation): New.
3751 (reader, grammar_free, readgram, token_translations_init)
3752 (packsymbols): Adjust.
3753 (reader): Number the predefined tokens.
3754 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
3755 for predefined tokens.
3756 * src/symtab.h (bucket): Remove all the hash table related
3758 * src/symtab.c (symtab): Replace by...
3759 (bucket_table): this.
3760 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
3761 (buckets_new, buckets_do): New.
3763 2002-04-07 Akim Demaille <akim@epita.fr>
3765 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
3766 (start_symbol, max_user_token_number, semantic_parser)
3767 (error_token_number): Initialize.
3768 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
3771 (errtoken, eoftoken, undeftoken, axiom): Extern.
3773 2002-04-07 Akim Demaille <akim@epita.fr>
3775 * src/gram.h (rule_s): prec and precsym are now pointers
3776 to the bucket giving the priority/associativity.
3777 Member `associativity' removed: useless.
3778 * src/reduce.c, src/conflicts.c: Adjust.
3780 2002-04-07 Akim Demaille <akim@epita.fr>
3782 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
3783 Properly escape the symbols' TAG when outputting them.
3785 2002-04-07 Akim Demaille <akim@epita.fr>
3787 * src/lalr.h (LA): Is a bitsetv, not bitset*.
3789 2002-04-07 Akim Demaille <akim@epita.fr>
3791 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
3792 (LArule): this, which is an array to rule_t*.
3793 * src/print.c, src/conflicts.c: Adjust.
3795 2002-04-07 Akim Demaille <akim@epita.fr>
3797 * src/gram.h (rule_t): Rename `number' as `user_number'.
3798 `number' is a new member.
3799 Adjust dependencies.
3800 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
3802 2002-04-07 Akim Demaille <akim@epita.fr>
3804 As a result of the previous patch, it is no longer needed
3805 to reorder ritem itself.
3807 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
3809 2002-04-07 Akim Demaille <akim@epita.fr>
3811 Be sure never to walk through RITEMS, but use only data related to
3812 the rules themselves. RITEMS should be banished.
3814 * src/output.c (output_token_translations): Rename as...
3815 (prepare_tokens): this.
3816 In addition to `translate', prepare the muscles `tname' and
3817 `toknum', which were handled by...
3818 (output_rule_data): this.
3819 Remove, and move the remainder of its outputs into...
3820 (prepare_rules): this new routines, which also merges content from
3821 (output_gram): this.
3822 (prepare_rules): Be sure never to walk through RITEMS.
3823 (output_stos): Rename as...
3824 (prepare_stos): this.
3825 (output): Always invoke prepare_states, after all, just don't use it
3826 in the output if you don't need it.
3828 2002-04-07 Akim Demaille <akim@epita.fr>
3830 * src/LR0.c (new_state): Display `nstates' as the name of the
3831 newly created state.
3832 Adjust to initialize first_state and last_state if needed.
3833 Be sure to distinguish the initial from the final state.
3834 (new_states): Create the itemset of the initial state, and use
3836 * src/closure.c (closure): Now that the initial state has its
3837 items properly set, there is no need for a special case when
3840 As a result, now the rule 0, reducing to $axiom, is visible in the
3841 outputs. Adjust the test suite.
3843 * tests/conflicts.at (Solved SR Conflicts)
3844 (Unresolved SR Conflicts): Adjust.
3845 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
3846 * tests/conflicts.at (S/R in initial): New.
3848 2002-04-07 Akim Demaille <akim@epita.fr>
3850 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
3851 the RHS of the rules.
3852 * src/output.c (output_gram): Likewise.
3854 2002-04-07 Akim Demaille <akim@epita.fr>
3856 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
3858 Adjust all dependencies.
3859 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
3860 `number' of the buckets too.
3861 * src/gram.h: Include `symtab.h'.
3862 (associativity): Move to...
3863 * src/symtab.h: here.
3864 No longer include `gram.h'.
3866 2002-04-07 Akim Demaille <akim@epita.fr>
3868 * src/gram.h, src/gram.c (rules_rhs_length): New.
3869 (ritem_longest_rhs): Use it.
3870 * src/gram.h (rule_t): `number' is a new member.
3871 * src/reader.c (packgram): Set it.
3872 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
3873 the end of `rules', and count them out of `nrules'.
3874 (reduce_output, dump_grammar): Adjust.
3875 * src/print.c (print_grammar): It is no longer needed to check for
3876 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
3877 * tests/reduce.at (Reduced Automaton): New test.
3879 2002-04-07 Akim Demaille <akim@epita.fr>
3881 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
3882 lacking `+ 1' to nrules, Bison reported as useless a token if it
3883 was used solely to set the precedence of the last rule...
3885 2002-04-07 Akim Demaille <akim@epita.fr>
3887 * data/bison.c++, data/bison.simple: Don't output the current file
3888 name in #line, to avoid useless diffs between two identical
3889 outputs under different names.
3891 2002-04-07 Akim Demaille <akim@epita.fr>
3893 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
3894 Normalize loops to using `< nrules + 1', not `<= nrules'.
3896 2002-04-07 Akim Demaille <akim@epita.fr>
3900 2002-04-07 Akim Demaille <akim@epita.fr>
3902 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
3903 bucket.value as bucket.number.
3905 2002-04-07 Akim Demaille <akim@epita.fr>
3907 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
3908 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
3909 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
3910 RHS, instead of being an index in RITEMS.
3912 2002-04-04 Paul Eggert <eggert@twinsun.com>
3914 * doc/bison.texinfo: Update copyright date.
3915 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
3916 (Symbols): Warn about running Bison in one character set,
3917 but compiling and/or running in an incompatible one.
3918 Warn about character code 256, too.
3920 2002-04-03 Paul Eggert <eggert@twinsun.com>
3922 * src/bison.data (YYSTACK_ALLOC): Depend on whether
3923 YYERROR_VERBOSE is nonzero, not whether it is defined.
3925 Merge changes from bison-1_29-branch.
3927 2002-03-20 Paul Eggert <eggert@twinsun.com>
3929 Merge fixes from Debian bison_1.34-1.diff.
3931 * configure.in (AC_PREREQ): 2.53.
3933 2002-03-20 Akim Demaille <akim@epita.fr>
3935 * src/conflicts.c (log_resolution): Argument `resolution' is const.
3937 2002-03-19 Paul Eggert <eggert@twinsun.com>
3939 * src/bison.simple (YYCOPY): New macro.
3940 (YYSTACK_RELOCATE): Use it.
3941 Remove Type arg; no longer needed. All callers changed.
3942 (yymemcpy): Remove; no longer needed.
3944 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
3945 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
3947 2002-03-19 Akim Demaille <akim@epita.fr>
3949 Test and fix the #line outputs.
3951 * tests/atlocal.at (GCC): New.
3952 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
3953 (Prologue synch line, ,%union synch line, Postprologue synch line)
3954 (Action synch line, Epilogue synch line): New tests.
3955 * src/reader.c (parse_union_decl): Define the muscle stype_line.
3956 * data/bison.simple, data/bison.c++: Use it.
3958 2002-03-19 Akim Demaille <akim@epita.fr>
3960 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
3961 (Solved SR Conflicts, %expect not enough, %expect right)
3962 (%expect too much): Move to...
3963 * tests/conflicts.at: this new file.
3965 2002-03-19 Akim Demaille <akim@epita.fr>
3967 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
3968 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
3969 that we can move to enums for instance.
3970 * src/output.c (token_definitions_output): Output a list of
3971 `token-name, token-number' instead of the #define.
3972 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
3974 2002-03-14 Akim Demaille <akim@epita.fr>
3978 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
3980 * data/bison.c++: Make the user able to add members to the generated
3981 parser by subclassing.
3983 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
3985 * src/reader.c (read_additionnal_code): `c' should be an integer, not
3987 Reported by Nicolas Tisserand and Nicolas Burrus.
3989 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
3991 * src/reader.c: Warn about lacking semi-colons, do not complain.
3993 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
3995 * data/bison.c++: Remove a debug line.
3997 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
3999 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
4000 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
4001 provide a default implementation.
4003 2002-03-04 Akim Demaille <akim@epita.fr>
4005 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
4006 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
4007 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
4008 * tests/semantic.at (Parsing Guards): Similarly.
4009 * src/reader.at (readgram): Complain if the last rule is not ended
4012 2002-03-04 Akim Demaille <akim@epita.fr>
4014 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
4015 * src/closure.c: here.
4016 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
4018 * src/warshall.h, src/warshall.c: Remove.
4019 * tests/sets.at (Broken Closure): Adjust.
4021 2002-03-04 Akim Demaille <akim@epita.fr>
4023 * src/output.c (output_skeleton): tempdir is const.
4024 bytes_read is unused.
4026 2002-03-04 Akim Demaille <akim@epita.fr>
4028 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
4029 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
4033 2002-03-04 Akim Demaille <akim@epita.fr>
4035 * src/closure.c (closure): `r' is unused.
4037 2002-03-04 Akim Demaille <akim@epita.fr>
4039 * tests/sets.at (Broken Closure): Add the ending `;'.
4040 * src/reader.at (readgram): Complain if a rule is not ended with a
4043 2002-03-04 Akim Demaille <akim@epita.fr>
4045 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
4046 (count_sr_conflicts): Use bitset_count.
4047 * src/reduce.c (inaccessable_symbols): Ditto.
4048 (bits_size): Remove.
4049 * src/warshall.h, src/warshall.c: Convert to bitsetv.
4051 2002-03-04 Akim Demaille <akim@epita.fr>
4053 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
4054 * src/reduce.c: Remove the `bitset_zero's following the
4055 `bitset_create's, as now it is performed by the latter.
4057 2002-03-04 Akim Demaille <akim@epita.fr>
4059 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
4060 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
4061 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
4062 latest sources from Michael.
4064 2002-03-04 Akim Demaille <akim@epita.fr>
4066 * src/output.c (output): Don't free the grammar.
4067 * src/reader.c (grammar_free): New.
4068 * src/main.c (main): Call it and don't free symtab here.
4070 2002-03-04 Akim Demaille <akim@epita.fr>
4072 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
4074 Reported by Benoit Perrot.
4076 2002-03-04 Akim Demaille <akim@epita.fr>
4078 Use bitset operations when possible, not loops over bits.
4080 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
4082 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
4083 * src/reduce.c (useless_nonterminals): Formatting changes.
4084 * src/warshall.c (TC): Use bitset_or.
4086 2002-03-04 Akim Demaille <akim@epita.fr>
4088 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
4089 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
4092 2002-03-04 Akim Demaille <akim@epita.fr>
4094 * src/lalr.c (F): Now a bitset*.
4095 Adjust all dependencies.
4097 2002-03-04 Akim Demaille <akim@epita.fr>
4099 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
4100 Adjust all dependencies.
4102 2002-03-04 Akim Demaille <akim@epita.fr>
4104 * src/L0.c, src/LR0.h (nstates): Be size_t.
4105 Adjust comparisons (signed vs unsigned).
4106 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
4108 Adjust all dependencies.
4110 2002-03-04 Akim Demaille <akim@epita.fr>
4112 * src/closure.c (firsts): Now, also a bitset.
4113 Adjust all dependencies.
4114 (varsetsize): Remove, now unused.
4115 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
4117 2002-03-04 Akim Demaille <akim@epita.fr>
4119 * src/print.c: Convert to use bitset.h, not hand coded iterations
4122 2002-03-04 Akim Demaille <akim@epita.fr>
4124 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
4126 2002-03-04 Akim Demaille <akim@epita.fr>
4128 * src/closure.c (ruleset): Be a bitset.
4129 (rulesetsize): Remove.
4131 2002-03-04 Akim Demaille <akim@epita.fr>
4133 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
4134 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
4135 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
4136 * src/closure.c (fderives): Be an array of bitsets.
4138 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
4140 * data/bison.c++: Merge the two generated headers. Insert a copyright
4141 notice in each output file.
4143 2002-02-28 Akim Demaille <akim@epita.fr>
4145 * data/bison.c++: Copy the prologue of bison.simple to fetch
4146 useful M4 definitions, such as b4_header_guard.
4148 2002-02-25 Akim Demaille <akim@epita.fr>
4150 * src/getargs.c (version): Give the name of the authors, and use a
4151 translator friendly scheme for the bgr
4154 2002-02-25 Akim Demaille <akim@epita.fr>
4156 * src/output.c (header_output): Remove, now handled completely via
4159 2002-02-25 Akim Demaille <akim@epita.fr>
4161 * m4/m4.m4: New, from CVS Autoconf.
4162 * configure.in: Invoke it.
4163 * src/output.c (output_skeleton): Use its result instead of the
4166 2002-02-25 Akim Demaille <akim@epita.fr>
4168 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
4170 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
4171 * src/output.c (output_skeleton): Use mkstemp to create a real
4173 Move the filling of `skeleton' and its muscle to...
4175 (output): Move the definition of the prologue muscle to...
4177 * src/system.h (DEFAULT_TMPDIR): New.
4179 2002-02-14 Paul Eggert <eggert@twinsun.com>
4181 Remove the support for C++ namespace cleanliness; it was
4182 causing more problems than it was curing, since it didn't work
4183 properly on some nonstandard C++ compilers. This can wait
4184 for a proper C++ parser.
4186 * NEWS: Document this.
4187 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
4188 of C++, as it's treated like C now.
4189 * src/bison.simple (YYSTD): Remove.
4190 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
4191 Treat C++ just like Standard C instead of trying to support
4192 namespace cleanliness.
4194 2002-02-14 Akim Demaille <akim@epita.fr>
4196 * tests/regression.at (else): Adjust to Andreas' change.
4198 2002-02-14 Akim Demaille <akim@epita.fr>
4200 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
4202 2002-02-13 Andreas Schwab <schwab@suse.de>
4204 * src/output.c (output_rule_data): Don't output NULL, it might
4207 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
4209 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
4210 (Copyright notice): Update.
4212 2002-02-11 Akim Demaille <akim@epita.fr>
4214 * tests/regression.at (%nonassoc and eof): Don't include
4215 nonportable headers.
4217 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
4219 * data/bison.c++: Correct error recovery. Make the user able to
4220 initialize the starting location.
4222 2002-02-07 Akim Demaille <akim@epita.fr>
4224 * tests/input.at: New.
4226 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
4228 * data/bison.c++: Replace some direct m4 expansions by constants. Be
4229 more consistent when naming methods and variables. Put preprocessor
4230 directives around tables only needed for debugging.
4232 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
4234 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
4236 (yy::b4_name::parse): Use print_.
4238 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
4240 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
4242 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
4244 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
4246 (yy::b4_name::parse): Build verbose error messages, and use error_.
4248 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
4250 * data/bison.c++: Fix m4 quoting in comments.
4252 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
4254 * data/bison.c++: Adjust the parser code. Fix some muscles that were
4257 2002-02-05 Akim Demaille <akim@epita.fr>
4259 * data/bison.c++: Adjust to the M4 back end.
4260 More is certainly needed.
4262 2002-02-05 Akim Demaille <akim@epita.fr>
4264 Give a try to M4 as a back end.
4266 * lib/readpipe.c: New, from wdiff.
4267 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
4269 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
4270 specific values. Now it is m4 that performs the lookup.
4271 * src/parse-skel.y: Remove.
4272 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
4273 * src/output.c (actions_output, guards_output)
4274 (token_definitions_output): No longer keeps track of the output
4275 line number, hence remove the second argument.
4276 (guards_output): Check against the guard member of a rule, not the
4279 (output_skeleton): Don't look for the skeleton location, let m4 do
4281 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
4283 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
4284 (prepare): Given that for the time being changesyntax is not
4285 usable in M4, rename the muscles using `-' to `_'.
4286 Define `defines_flag', `output_parser_name' and `output_header_name'.
4287 * src/output.h (actions_output, guards_output)
4288 (token_definitions_output): Adjust prototypes.
4289 * src/scan-skel.l: Instead of scanning the skeletons, it now
4290 processes the output of m4: `__oline__' and `#output'.
4291 * data/bison.simple: Adjust to be used by M4(sugar).
4292 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
4294 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
4295 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
4296 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
4297 shamelessly stolen from CVS Autoconf.
4299 2002-02-05 Akim Demaille <akim@epita.fr>
4301 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
4302 * configure.in: Check for the declarations of free and malloc.
4303 * src/muscle_tab.c: Adjust.
4305 2002-02-05 Akim Demaille <akim@epita.fr>
4307 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
4308 which have no values.
4310 2002-02-05 Akim Demaille <akim@epita.fr>
4312 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
4315 2002-01-29 Paul Eggert <eggert@twinsun.com>
4317 * src/bison.simple (YYSIZE_T): Do not define merely because
4318 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
4319 On some platforms, <alloca.h> does not declare YYSTD (size_t).
4321 2002-01-27 Akim Demaille <akim@epita.fr>
4323 Fix `%nonassoc and eof'.
4325 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
4326 which were not properly copied! Replace
4327 memcpy (res->errs, src->errs, src->nerrs);
4329 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
4331 * tests/regression.at (%nonassoc and eof): Adjust to newest
4332 Autotest: `.' is not in the PATH.
4334 2002-01-27 Akim Demaille <akim@epita.fr>
4336 * tests/sets.at (AT_EXTRACT_SETS): New.
4340 2002-01-26 Akim Demaille <akim@epita.fr>
4342 * tests/actions.at, tests/calc.at, tests/headers.at,
4343 * tests/torture.at: Adjust to the newest Autotest which no longer
4344 forces `.' in the PATH.
4346 2002-01-25 Akim Demaille <akim@epita.fr>
4348 * tests/regression.at (%nonassoc and eof): New.
4349 Suggested by Robert Anisko.
4351 2002-01-24 Akim Demaille <akim@epita.fr>
4353 Bison dumps core when trying to complain about broken input files.
4354 Reported by Cris van Pelt.
4356 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
4357 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
4359 (Invalid inputs): Strengthen: exercise parse_percent_token.
4361 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
4363 * src/Makefile.am: Add bison.c++.
4364 * src/bison.c++: New skeleton.
4366 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
4370 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
4372 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
4374 2002-01-20 Marc Autret <marc@gnu.org>
4376 * src/files.c (compute_output_file_names): Fix
4378 2002-01-20 Marc Autret <marc@gnu.org>
4380 * tests/output.at: New test.
4381 * src/files.c (compute_base_names): Don't map extensions when
4382 the YACC flag is set, use defaults.
4383 Reported by Evgeny Stambulchik.
4385 2002-01-20 Marc Autret <marc@gnu.org>
4387 * src/system.h: Need to define __attribute__ away for non-GCC
4388 compilers as well (i.e. the vendor C compiler).
4389 Suggested by Albert Chin-A-Young.
4391 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
4393 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
4394 canonical definition.
4395 * src/system.h: Use the canonical definition for PARAMS (avoids
4396 a conflict with the macro from lib/hash.h).
4398 2002-01-11 Akim Demaille <akim@epita.fr>
4400 * configure.in: Use AC_FUNC_STRNLEN.
4401 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
4403 2002-01-09 Akim Demaille <akim@epita.fr>
4405 * src/files.c, src/files.h (output_infix): New.
4406 (tab_extension): Remove.
4407 (compute_base_names): Compute the former, drop the latter.
4408 * src/output.c (prepare): Insert the muscles `output-infix', and
4410 * src/parse-skel.y (string, string.1): New.
4411 (section.header): Use it.
4412 (section.yacc): Remove.
4413 (prefix): Remove too.
4414 * src/scan-skel.l: Adjust.
4415 * src/bison.simple, src/bison.hairy: Adjust.
4417 2002-01-09 Akim Demaille <akim@epita.fr>
4419 * configure.in (WERROR_CFLAGS): Compute it.
4420 * src/Makefile.am (CFLAGS): Pass it.
4421 * tests/atlocal.in (CFLAGS): Idem.
4422 * src/files.c: Fix a few warnings.
4423 (get_extension_index): Remove, unused.
4425 2002-01-08 Akim Demaille <akim@epita.fr>
4427 * src/getargs.c (AS_FILE_NAME): New.
4428 (getargs): Use it to convert DOSish file names.
4429 * src/files.c (base_name): Rename as full_base_name to avoid
4430 clashes with `base_name ()'.
4431 (filename_split): New.
4432 (compute_base_names): N-th rewrite, using filename_split.
4434 2002-01-08 Akim Demaille <akim@epita.fr>
4436 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
4437 New, stolen from the Fileutils 4.1.
4438 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
4439 * configure.in: Check for the presence of memrchr, and of its
4442 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
4444 * lib/hash.h (__P): Added definition for this macro.
4445 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
4446 BUILT_SOURCES, to ensure they are generated first.
4447 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
4448 %error-verbose to allow bootstrapping with bison 1.30x.
4450 2002-01-06 Akim Demaille <akim@epita.fr>
4452 * src/reader.c (parse_braces): Don't fetch the next char, the
4453 convention is to fetch on entry.
4454 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
4455 'switch' without a following semicolon.
4456 * tests/regression.at (braces parsing): New.
4458 2002-01-06 Akim Demaille <akim@epita.fr>
4460 Bison is dead wrong in its RR conflict reports.
4462 * tests/torture.at (GNU Cim Grammar): New.
4463 * src/conflicts.c (count_rr_conflicts): Fix.
4465 2002-01-06 Akim Demaille <akim@epita.fr>
4467 Creating package.m4 from configure.ac causes too many problems.
4469 * tests/Makefile.am (package.m4): Create it by hand,
4470 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
4472 2002-01-06 Akim Demaille <akim@epita.fr>
4474 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
4477 2002-01-04 Paul Eggert <eggert@twinsun.com>
4479 * doc/bison.texinfo (Debugging):
4480 Remove YYSTDERR; it's no longer defined or used.
4481 Also, s/cstdio.h/cstdio/.
4483 2002-01-03 Akim Demaille <akim@epita.fr>
4485 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
4487 2002-01-03 Akim Demaille <akim@epita.fr>
4489 * src/parse-skel.y (process_skeleton): Don't bind the parser's
4490 tracing code to --trace, wait for a better --trace option, with
4493 2002-01-03 Akim Demaille <akim@epita.fr>
4495 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
4496 The ISO C++ standard is extremely clear about it: stderr is
4497 considered a macro, not a regular symbol (see table 94 `Header
4498 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
4499 Therefore std:: does not apply to it. It still does with fprintf.
4500 Also, s/cstdio.h/cstdio/.
4502 2002-01-03 Akim Demaille <akim@epita.fr>
4504 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
4505 for non system headers.
4507 2002-01-02 Akim Demaille <akim@epita.fr>
4509 Equip the skeleton chain with location tracking, runtime trace,
4510 pure parser and scanner.
4512 * src/parse-skel.y: Request a pure parser, locations, and prefix
4514 (%union): Having several members with the same type does not help
4515 type mismatches, simplify.
4516 (YYPRINT, yyprint): New.
4517 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
4520 * src/scan-skel.l: Adjust to these changes.
4521 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
4522 (LOCATION_PRINT, skel_control_t): New.
4524 2001-12-30 Akim Demaille <akim@epita.fr>
4526 * src/parse-skel.y: Get rid of the shift/reduce conflict:
4527 replace `gb' with BLANKS.
4528 * src/scan-skel.l: Adjust.
4530 2001-12-30 Akim Demaille <akim@epita.fr>
4532 * src/system.h: We don't need nor want bcopy.
4533 Throw away MS-DOS crap: we don't need getpid.
4534 * configure.in: We don't need strndup. It was even causing
4535 problems: because Flex includes the headers *before* us,
4536 _GNU_SOURCE is not defined by config.h, and therefore strndup was
4538 * lib/xstrndup.c: New.
4539 * src/scan-skel.l: Use it.
4540 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
4541 * src/parse-skel.y: Use %directives instead of #defines.
4543 2001-12-30 Akim Demaille <akim@epita.fr>
4545 * src/skeleton.h: New.
4546 * src/output.c (output_parser, output_master_parser): Remove, dead
4548 * src/output.h (get_lines_number, actions_output, guards_output)
4549 (token_definitions_output): Prototype them.
4550 * src/parse-skel.y: Add the license notice.
4551 Include output.h and skeleton.h.
4552 (process_skeleton): Returns void, and takes a single parameter.
4553 * src/scan-skel.l: Add the license notice.
4555 Don't use %option yylineno: it seems that then Flex imagines
4556 REJECT has been used, and therefore it won't reallocate its
4557 buffers (which makes no other sense to me than a bug). It results
4558 in warnings for `unused: yy_flex_realloc'.
4560 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
4562 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
4563 (MUSCLE_INSERT_PREFIX): ...to there.
4564 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
4565 (MUSCLE_INSERT_PREFIX): Move from here...
4567 * src/bison.hairy: Add a section directive. Put braces around muscle
4568 names. This parser skeleton is still broken, but Bison should not
4569 choke on a bad muscle 'syntax'.
4570 * src/bison.simple: Add a section directive. Put braces around muscle
4573 * src/files.h (strsuffix, stringappend): Add declarations.
4574 (tab_extension): Add declaration.
4575 (short_base_name): Add declaration.
4577 * src/files.c (strsuffix, stringappend): No longer static. These
4578 functions are used in the skeleton parser.
4579 (tab_extension): New.
4580 (compute_base_names): Use the computations done in this function
4581 to guess if the generated parsers should have '.tab' in their
4583 (short_base_name): No longer static.
4585 * src/output.c (output_skeleton): New.
4586 (output): Disable call to output_master_parser, and give a try to
4587 a new skeleton handling system.
4588 (guards_output, actions_output): No longer static.
4589 (token_definitions_output, get_lines_number): No longer static.
4591 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
4593 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
4596 * src/parse-skel.y: New file.
4597 * src/scan-skel.l: New file.
4599 2001-12-29 Akim Demaille <akim@epita.fr>
4601 %name-prefix is broken.
4603 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
4604 Adjust all dependencies.
4605 * tests/headers.at (export YYLTYPE): Strengthen this test: use
4608 Renaming yylval but not yylloc is not consistent. Now we do.
4610 * src/bison.simple: Prefix yylloc if used.
4611 * doc/bison.texinfo (Decl Summary): Document that.
4613 2001-12-29 Akim Demaille <akim@epita.fr>
4615 * doc/bison.texinfo: Promote `%long-directive' over
4617 Remove all references to fixed-output-files, yacc is enough.
4619 2001-12-29 Akim Demaille <akim@epita.fr>
4621 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
4622 user prologue. These are defaults.
4623 * tests/actions.at (Mid-rule actions): Make sure the user can
4624 define YYDEBUG and YYERROR_VERBOSE.
4626 2001-12-29 Akim Demaille <akim@epita.fr>
4628 * src/output.c (header_output): Don't forget to export YYLTYPE and
4630 * tests/headers.at (export YYLTYPE): New, make sure it does.
4631 * tests/regression.at (%union and --defines, Invalid CPP headers):
4633 * tests/headers.at: here.
4635 2001-12-29 Akim Demaille <akim@epita.fr>
4637 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
4639 2001-12-29 Akim Demaille <akim@epita.fr>
4641 * tests/actions.at (Mid-rule actions): Output on a single line
4644 2001-12-29 Akim Demaille <akim@epita.fr>
4646 * doc/bison.texinfo: Formatting changes.
4648 2001-12-29 Akim Demaille <akim@epita.fr>
4650 Don't store the token defs in a muscle, just be ready to output it
4651 on command. Now possible via `symbols'. Fixes a memory leak.
4653 * src/output.c (token_definitions_output): New.
4654 (output_parser, header_output): Use it.
4655 * src/reader.c (symbols_save): Remove.
4657 2001-12-29 Akim Demaille <akim@epita.fr>
4659 * src/bison.simple: Do not provide a default for YYSTYPE and
4660 YYLTYPE before the user's prologue. Otherwise it's hardly... a
4663 2001-12-29 Akim Demaille <akim@epita.fr>
4665 Mid-rule actions are simply... ignored!
4667 * src/reader.c (readgram): Be sure to attach mid-rule actions to
4668 the empty-rule associated to the dummy symbol, not to the host
4670 * tests/actions.at (Mid-rule actions): New.
4672 2001-12-29 Akim Demaille <akim@epita.fr>
4676 * src/reader.c (reader): Free grammar.
4678 2001-12-29 Akim Demaille <akim@epita.fr>
4682 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
4683 since it allocates it for each state, although only one is needed.
4684 (allocate_storage): Do it here.
4686 2001-12-29 Akim Demaille <akim@epita.fr>
4688 * src/options.h, src/options.c (create_long_option_table): Rename
4690 (long_option_table_new): this, with a clearer prototype.
4691 (percent_table): Remove, unused,
4692 * src/getargs.c (getargs): Adjust.
4694 2001-12-29 Akim Demaille <akim@epita.fr>
4696 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
4697 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
4700 2001-12-29 Akim Demaille <akim@epita.fr>
4702 * src/lalr.c (build_relations): Rename `states' as `states1'.
4703 Sorry, I don't understand exactly what it is, no better name...
4705 2001-12-29 Akim Demaille <akim@epita.fr>
4707 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
4708 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
4709 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
4712 2001-12-29 Akim Demaille <akim@epita.fr>
4714 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
4717 2001-12-29 Akim Demaille <akim@epita.fr>
4719 * src/reader.c, src/reader.h (user_toknums): Remove.
4720 Adjust all users to use symbols[i]->user_token_number.
4722 2001-12-29 Akim Demaille <akim@epita.fr>
4724 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
4725 Adjust all users to use symbols[i]->prec or ->assoc.
4727 2001-12-29 Akim Demaille <akim@epita.fr>
4729 * src/reader.c, src/reader.h (tags): Remove.
4730 Adjust all users to use symbols[i]->tag.
4732 2001-12-29 Akim Demaille <akim@epita.fr>
4734 * src/gram.h, src/gram.c (symbols): New, similar to state_table
4736 * src/reader.c (packsymbols): Fill this table.
4738 * src/conflicts.c (resolve_sr_conflict): Adjust.
4739 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
4741 Use symbols[i]->tag instead of tags[i].
4743 2001-12-29 Akim Demaille <akim@epita.fr>
4745 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
4746 In addition, put a comment in there, to replace...
4747 * tests/regression.at (%union and C comments): Remove.
4749 2001-12-29 Akim Demaille <akim@epita.fr>
4751 * tests/regression.at (Web2c Actions): Blindly move the actual
4752 output as expected output. The contents *seem* right to me, but I
4753 can't pretend reading perfectly parser tables... Nonetheless, all
4754 the other tests pass correctly, the table look OK, even though the
4755 presence of `$axiom' is to be noted: AFAICS it is useless (but
4758 2001-12-29 Akim Demaille <akim@epita.fr>
4760 * src/reader.c (readgram): Don't add the rule 0 if there were no
4761 rules read. In other words, add it _after_ having performed
4762 grammar sanity checks.
4763 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
4765 2001-12-29 Akim Demaille <akim@epita.fr>
4767 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
4768 visible, and some states have now a different number.
4770 2001-12-29 Akim Demaille <akim@epita.fr>
4772 * src/reader.c (readgram): Bind the initial rule's lineno to that
4774 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
4775 (Solved SR Conflicts): Adjust rule 0's line number.
4777 2001-12-29 Akim Demaille <akim@epita.fr>
4779 Fix the `GAWK Grammar' failure.
4781 * src/LR0.c (final_state): Initialize to -1 so that we do compute
4782 the reductions of the first state which was mistakenly confused
4783 with the final state because precisely final_state was initialized
4785 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
4786 now noticed by Bison.
4787 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
4788 have a reduction on $default.
4790 2001-12-29 Akim Demaille <akim@epita.fr>
4792 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
4794 * src/closure.c (print_closure): Likewise.
4795 * src/derives.c (print_derives): Likewise.
4796 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
4799 2001-12-29 Akim Demaille <akim@epita.fr>
4801 * src/lalr.c (lookaheads_print): New.
4802 (lalr): Call it when --trace-flag.
4803 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
4806 2001-12-29 Akim Demaille <akim@epita.fr>
4808 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
4809 when walking through ritem, even via rule->rhs.
4810 * src/reduce.c (dump_grammar, useful_production, reduce_output)
4811 (useful_production, useless_nonterminals): Likewise.
4812 (reduce_grammar_tables): Likewise, plus update nritems.
4813 * src/nullable.c (set_nullable): Likewise.
4814 * src/lalr.c (build_relations): Likewise.
4815 * tests/sets.at (Nullable): Adjust.
4816 Fortunately, now, the $axiom is no longer nullable.
4818 2001-12-29 Akim Demaille <akim@epita.fr>
4820 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
4822 * src/gram.c (ritem_longest_rhs): Likewise.
4823 * src/reduce.c (nonterminals_reduce): Likewise.
4824 * src/print_graph.c (print_graph): Likewise.
4825 * src/output.c (output_rule_data): Likewise.
4826 * src/nullable.c (set_nullable): Likewise.
4828 2001-12-29 Akim Demaille <akim@epita.fr>
4830 * src/output.c: Comment changes.
4832 2001-12-27 Paul Eggert <eggert@twinsun.com>
4834 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
4835 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
4836 Sparc, as they were causing more porting problems than the
4837 (minor) performance improvement was worth.
4839 Also, catch up with 1.31's YYSTD.
4841 2001-12-27 Akim Demaille <akim@epita.fr>
4843 * src/output.c (output_gram): Rely on nritems, not the
4844 0-sentinel. See below.
4845 Use -1 as separator, not 0.
4846 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
4847 Rely on -1 as separator in yyrhs, instead of 0.
4848 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
4849 twice `Now at end of input', therefore there are two lines less to
4852 2001-12-27 Akim Demaille <akim@epita.fr>
4854 * tests/regression.at (Unresolved SR Conflicts):
4855 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
4858 2001-12-27 Akim Demaille <akim@epita.fr>
4860 * src/LR0.c (new_state): Recognize the final state by the fact it
4861 is reached by eoftoken.
4862 (insert_start_shifting_state, insert_eof_shifting_state)
4863 (insert_accepting_state, augment_automaton): Remove, since now
4864 these states are automatically computed from the initial state.
4865 (generate_states): Adjust.
4866 * src/print.c: When reporting a rule number to the user, substract
4867 1, so that the axiom rule is rule 0, and the first user rule is 1.
4868 * src/reduce.c: Likewise.
4869 * src/print_graph.c (print_core): For the time being, just as for
4870 the report, depend upon --trace-flags to dump the full set of
4872 * src/reader.c (readgram): Once the grammar read, insert the rule
4873 0: `$axiom: START-SYMBOL $'.
4874 * tests/set.at: Adjust: rule 0 is now displayed, and since the
4875 number of the states has changed (the final state is no longer
4876 necessarily the last), catch up.
4878 2001-12-27 Akim Demaille <akim@epita.fr>
4880 Try to make the use of the eoftoken valid. Given that its value
4881 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
4882 is used instead of > 0 where appropriate, (ii), depend upon nritems
4883 instead of the 0-sentinel.
4885 * src/gram.h, src/gram.c (nritems): New.
4886 Expected to be duplication of nitems, but for the time being...
4887 * src/reader.c (packgram): Assert nritems and nitems are equal.
4888 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
4889 * src/closure.c (print_closure, print_fderives): Likewise.
4890 * src/gram.c (ritem_print): Likewise.
4891 * src/print.c (print_core, print_grammar): Likewise.
4892 * src/print_graph.c: Likewise.
4894 2001-12-27 Akim Demaille <akim@epita.fr>
4896 * src/main.c (main): If there are complains after grammar
4897 reductions, then output the report anyway if requested, then die.
4898 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
4899 * src/reader.c (eoftoken): New.
4900 (parse_token_decl): If the token being defined has value `0', it
4902 (packsymbols): No longer hack `tags' to insert `$' by hand.
4903 Be sure to preserve the value of the eoftoken.
4904 (reader): Make sure eoftoken is defined.
4905 Initialize nsyms to 0: now eoftoken is created just like the others.
4906 * src/print.c (print_grammar): Don't special case the eof token.
4907 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
4908 lie anyway, albeit pleasant.
4909 * tests/calc.at: Exercise error messages with eoftoken.
4910 Change the grammar so that empty input is invalid.
4911 Adjust expectations.
4912 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
4914 2001-12-27 Akim Demaille <akim@epita.fr>
4916 * configure.in: Check the protos of strchr ans strspn.
4917 Replace strchr if needed.
4918 * src/system.h: Provide the protos of strchr, strspn and memchr if
4920 * lib/strchr.c: New.
4921 * src/reader.c (symbols_save): Use strchr.
4923 2001-12-27 Akim Demaille <akim@epita.fr>
4925 * src/print.c, src/print_graph.c (escape): New.
4926 Use it to quote the TAGS outputs.
4927 * src/print_graph.c (print_state): Now errors are in red, and
4928 reductions in green.
4929 Prefer high to wide: output the state number on a line of its own.
4931 2001-12-27 Akim Demaille <akim@epita.fr>
4933 * src/state.h, src/state.c (reductions_new): New.
4934 * src/LR0.c (set_state_table): Let all the states have a
4935 `reductions', even if reduced to 0.
4936 (save_reductions): Adjust.
4937 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
4938 * src/print.c (print_reductions, print_actions): Adjust.
4939 * src/output.c (action_row): Adjust.
4941 2001-12-27 Akim Demaille <akim@epita.fr>
4943 * src/state.h, src/state.c (errs_new, errs_dup): New.
4944 * src/LR0.c (set_state_table): Let all the states have an errs,
4945 even if reduced to 0.
4946 * src/print.c (print_errs, print_reductions): Adjust.
4947 * src/output.c (output_actions, action_row): Adjust.
4948 * src/conflicts.c (resolve_sr_conflict): Adjust.
4950 2001-12-27 Akim Demaille <akim@epita.fr>
4952 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
4954 2001-12-27 Akim Demaille <akim@epita.fr>
4956 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
4957 * src/print.c: here.
4958 (lookaheadset, shiftset): New, used as additional storage by
4960 (print_results): Adjust.
4961 (print_shifts, print_gotos, print_errs): New, extracted from...
4962 (print_actions): here.
4963 * src/print_graph.c (print_actions): Remove dead code.
4965 2001-12-27 Akim Demaille <akim@epita.fr>
4967 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
4970 2001-12-27 Akim Demaille <akim@epita.fr>
4972 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
4973 (build_relations): Adjust.
4975 2001-12-27 Akim Demaille <akim@epita.fr>
4977 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
4980 2001-12-27 Akim Demaille <akim@epita.fr>
4982 * src/reader.c (packgram): Catch nitems overflows.
4984 2001-12-27 Akim Demaille <akim@epita.fr>
4986 * src/files.c, src/files.h (guard_obstack): Remove.
4987 * src/output.c (output): Adjust.
4988 * src/reader.c (parse_braces): New, factoring...
4989 (copy_action, copy_guard): these two which are renamed as...
4990 (parse_action, parse_guard): these.
4991 As a voluntary consequence, using braces around guards is now
4994 2001-12-27 Akim Demaille <akim@epita.fr>
4996 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
4997 * src/reader.c (symbol_list): `guard' and `guard_line' are new
4999 (symbol_list_new): Adjust.
5000 (copy_action): action_line is the first line, not the last.
5001 (copy_guard): Just as for actions, store the `action' only, not
5002 the switch/case/break flesh.
5003 Don't parse the user action that might follow the guard, let...
5004 (readgram): do it, i.e., now, there can be an action after a
5006 In other words the guard is just explicitly optional.
5008 * src/output.c (guards_output): New.
5009 (output_parser): Call it when needed.
5010 (output): Also free the guard and attrs obstacks.
5011 * src/files.c, src/files.h (obstack_save): Remove.
5012 (output_files): Remove.
5013 As a result, if one needs the former `.act' file, using an
5014 appropriate skeleton which requires actions and guards is now
5016 * src/main.c (main): Adjust.
5017 * tests/semantic.at: New.
5018 * tests/regression.at: Use `input.y' as input file name.
5019 Avoid 8+3 problems by requiring input.c when the test needs the
5022 2001-12-27 Akim Demaille <akim@epita.fr>
5024 * src/reader.c (symbol_list_new): Be sure to initialize all the
5027 2001-12-27 Akim Demaille <akim@epita.fr>
5029 All the hacks using a final pseudo state are now useless.
5031 * src/LR0.c (set_state_table): state_table holds exactly nstates.
5032 * src/lalr.c (nLA): New.
5033 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
5034 instead of lookaheadsp from the pseudo state (nstate + 1).
5036 2001-12-27 Akim Demaille <akim@epita.fr>
5038 * src/output.c (action_row, token_actions): Use a state_t instead
5039 of a integer, and nlookaheads instead of the following state's
5042 2001-12-27 Akim Demaille <akim@epita.fr>
5044 * src/conflicts.c (log_resolution, flush_shift)
5045 (resolve_sr_conflict, set_conflicts, solve_conflicts)
5046 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
5047 (conflicts_print, print_reductions): Use a state_t instead of an
5048 integer when referring to a state.
5049 As much as possible, depend upon nlookaheads, instead of the
5050 `lookaheadsp' member of the following state (since lookaheads of
5051 successive states are successive, the difference between state n + 1
5052 and n served as the number of lookaheads for state n).
5053 * src/lalr.c (add_lookback_edge): Likewise.
5054 * src/print.c (print_core, print_actions, print_state)
5055 (print_results): Likewise.
5056 * src/print_graph.c (print_core, print_actions, print_state)
5057 (print_graph): Likewise.
5058 * src/conflicts.h: Adjust.
5060 2001-12-27 Akim Demaille <akim@epita.fr>
5062 * src/bison.hairy: Formatting/comment changes.
5064 Remove `register' indications.
5065 Add plenty of `static'.
5067 2001-12-27 Akim Demaille <akim@epita.fr>
5069 * src/output.c (prepare): Drop the muscle `ntbase' which
5071 * src/bison.simple: Formatting/comment changes.
5072 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
5073 is an undocumented synonym.
5075 2001-12-22 Akim Demaille <akim@epita.fr>
5077 * src/output.c (output_table_data): Change the prototype to use
5078 `int' for array ranges: some invocations do pass an int, not a
5080 Reported by Wayne Green.
5082 2001-12-22 Akim Demaille <akim@epita.fr>
5084 Some actions of web2c.y are improperly triggered.
5085 Reported by Mike Castle.
5087 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
5088 * tests/regression.at (Web2c): Rename as...
5089 (Web2c Report): this.
5090 (Web2c Actions): New.
5092 2001-12-22 Akim Demaille <akim@epita.fr>
5094 Reductions in web2c.y are improperly reported.
5095 Reported by Mike Castle.
5097 * src/conflicts.c (print_reductions): Fix.
5098 * tests/regression.at (Web2c): New.
5100 2001-12-18 Akim Demaille <akim@epita.fr>
5102 Some host fail on `assert (!"foo")', which expands to
5103 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
5104 Reported by Nelson Beebee.
5106 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
5107 `#define it_succeeded 0' and `assert (it_succeeded)'.
5109 2001-12-17 Marc Autret <autret_m@epita.fr>
5111 * src/bison.simple: Don't hard code the skeleton line and filename.
5112 * src/output.c (output_parser): Rename 'line' as 'output_line'.
5113 New line counter 'skeleton_line' (skeleton-line muscle).
5115 2001-12-17 Paul Eggert <eggert@twinsun.com>
5117 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
5118 YYDEBUG must be defined to a nonzero value.
5120 * src/bison.simple (yytname): Do not assume that the user defines
5121 YYDEBUG to a properly parenthesized expression.
5123 2001-12-17 Akim Demaille <akim@epita.fr>
5125 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
5126 nlookaheads is a new member.
5128 * src/lalr.h (nlookaheads): Remove this orphan declaration.
5129 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
5132 2001-12-17 Akim Demaille <akim@epita.fr>
5134 * src/files.h, src/files.c (open_files, close_files): Remove.
5135 * src/main.c (main): Don't open/close files, nor invoke lex_free,
5137 * src/reader.c (reader): Do it.
5139 2001-12-17 Akim Demaille <akim@epita.fr>
5141 * src/conflicts.c (print_reductions): Formatting changes.
5143 2001-12-17 Akim Demaille <akim@epita.fr>
5145 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
5146 (flush_reduce): New.
5147 (resolve_sr_conflict): Adjust.
5149 2001-12-17 Akim Demaille <akim@epita.fr>
5151 * src/output.c (output_obstack): Be static and rename as...
5152 (format_obstack): this, to avoid any confusion with files.c's
5154 * src/reader.h (muscle_obstack): Move to...
5155 * src/output.h: here, since it's defined in output.c.
5157 2001-12-17 Akim Demaille <akim@epita.fr>
5159 * src/output.c (action_row, save_column, default_goto)
5160 (sort_actions, matching_state, pack_vector): Better variable
5163 2001-12-17 Akim Demaille <akim@epita.fr>
5165 * src/output.c: Various formatting changes.
5167 2001-12-17 Akim Demaille <akim@epita.fr>
5169 * src/files.c (output_files): Free the output_obstack.
5170 * src/main.c (main): Call print and print_graph conditionally.
5171 * src/print.c (print): Work unconditionally.
5172 * src/print_graph.c (print_graph): Work unconditionally.
5173 * src/conflicts.c (log_resolution): Output only if verbose_flag.
5175 2001-12-16 Marc Autret <autret_m@epita.fr>
5177 * src/output.c (actions_output): Fix. When we use %no-lines,
5178 there is one less line per action.
5180 2001-12-16 Marc Autret <autret_m@epita.fr>
5182 * src/bison.simple: Remove a useless #line directive.
5183 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
5184 * src/output.c (get_lines_number): New.
5185 (output_parser): Adjust, now takes care about the lines of a
5188 (actions_output): Computes the number of lines taken by actions.
5189 (output_master_parser): Insert new skeleton which is the name of
5190 the output parser file name.
5192 2001-12-15 Marc Autret <autret_m@epita.fr>
5194 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
5196 2001-12-15 Marc Autret <autret_m@epita.fr>
5198 * src/output.c (output_gram): Keep track of the hairy one.
5200 2001-12-15 Akim Demaille <akim@epita.fr>
5202 Make `make distcheck' work.
5204 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
5205 system.h which uses libgettext.h.
5207 2001-12-15 Akim Demaille <akim@epita.fr>
5209 * src/nullable.c (set_nullable): Useless rules must be skipped,
5210 otherwise, since we range over their symbols, we might look at a
5211 nonterminal which no longer ``exists'', i.e., it is not counted in
5212 `nvars', hence we overflow our arrays.
5214 2001-12-15 Akim Demaille <akim@epita.fr>
5216 The header can also be produced directly, without any obstack!
5219 * src/files.c, src/files.h (defines_obstack): Remove.
5220 (compute_header_macro): Global.
5221 (defines_obstack_save): Remove.
5222 * src/reader.c (parse_union_decl): No longer output to
5223 defines_obstack: its content can be found in the `stype' muscle
5225 (output_token_translations): Merge into...
5226 (symbols_output): this.
5228 (symbols_save): this.
5230 * src/output.c (header_output): New.
5233 2001-12-15 Akim Demaille <akim@epita.fr>
5235 * src/reader.c (parse_union_decl): Instead of handling two obstack
5236 simultaneously, use one to define the `stype' muscle, and use the
5237 value of the latter to fill defines_obstack.
5238 (copy_comment): Remove.
5239 (copy_comment2): Work for a single obstack.
5241 (copy_comment): this.
5243 2001-12-15 Akim Demaille <akim@epita.fr>
5245 * src/lex.c, src/lex.h (xgetc): No longer static.
5246 * src/reader.c (parse_union_decl): Revamp.
5248 2001-12-15 Akim Demaille <akim@epita.fr>
5250 Still making progress in separating Bison into (i) input, (ii)
5251 process, (iii) output: now we can directly output the parser file
5252 without using table_obstack at all.
5254 * src/files.c, src/files.h (table_obstack): Bye bye.
5255 (parser_file_name): New.
5256 * src/files.c (compute_output_file_names): Compute it.
5257 * src/output.c (actions_output, output_parser)
5258 (output_master_parser): To a file instead of an obstack.
5260 2001-12-15 Akim Demaille <akim@epita.fr>
5262 Attach actions to rules, instead of pre-outputting them to
5265 * src/gram.h (rule_t): action and action_line are new members.
5266 * src/reader.c (symbol_list): Likewise.
5267 (copy_action): Save the actions within the rule.
5268 (packgram): Save them in rule_table.
5269 * src/output.c (actions_output): New.
5270 (output_parser): Use it on `%%actions'.
5271 (output_rule_data): Don't free rule_table.
5273 (prepare): Don't save the `action' muscle.
5274 * src/bison.simple: s/%%action/%%actions/.
5276 2001-12-15 Akim Demaille <akim@epita.fr>
5278 * src/reader.c (copy_action): When --yacc, don't append a `;'
5279 to the user action: let it fail if lacking.
5280 Suggested by Arnold Robbins and Tom Tromey.
5282 2001-12-14 Akim Demaille <akim@epita.fr>
5284 * src/lex.c (literalchar): Simply return the char you decoded, non
5285 longer mess around with obstacks and int pointers.
5288 2001-12-14 Akim Demaille <akim@epita.fr>
5290 * src/lex.c (literalchar): Don't escape the special characters,
5291 just decode them, and keep them as char (before, eol was output as
5292 the 2 char string `\n' etc.).
5293 * src/output.c (output_rule_data): Use quotearg to output the
5296 2001-12-13 Paul Eggert <eggert@twinsun.com>
5298 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
5299 Do not infringe on the global user namespace when using C++.
5300 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
5301 All uses of `fprintf' and `stderr' changed.
5303 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
5305 2001-12-13 Akim Demaille <akim@epita.fr>
5307 The computation of nullable is broken: it doesn't handle empty
5310 * tests/torture.at (GNU AWK Grammar): New.
5311 * tests/sets.at (Nullable): New.
5312 * src/nullable.c (set_nullable): Instead of blindly looping over
5313 `ritems', loop over the rules, and then over their rhs's.
5315 Work around Autotest bugs.
5317 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
5318 frame, because Autotest understand lines starting with a `+' as
5319 traces from the shell. Then, they are not processed properly.
5320 Admittedly an Autotest bug, but we don't have time to wait for
5321 Autotest to catch up.
5322 * tests/regression.at (Broken Closure): Adjust to the new table
5325 * tests/sets.at: here.
5327 2001-12-13 Akim Demaille <akim@epita.fr>
5329 * src/closure.c (closure): Use nrules instead of playing tricks
5332 2001-12-13 Akim Demaille <akim@epita.fr>
5334 * src/print.c (print_actions): Output the handling of `$' as the
5335 traces do: shifting the token EOF. Before EOF was treated as a
5337 * tests/regression.at: Adjust some tests.
5338 * src/print_graph.c (print_core): Complete the set of items via
5339 closure. The next-to-final and final states are still unsatisfying,
5340 but that's to be addressed elsewhere.
5341 No longer output the rule numbers, but do output the state number.
5342 A single loop for the shifts + gotos is enough, but picked a
5343 distinct color for each.
5344 (print_graph): Initialize and finalize closure.
5346 2001-12-13 Akim Demaille <akim@epita.fr>
5348 * src/reader.c (readgram): Remove dead code, an strip useless
5350 (get_type): Remove, unused.
5352 2001-12-12 Akim Demaille <akim@epita.fr>
5354 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
5355 on that of lib/error.c.
5357 2001-12-12 Akim Demaille <akim@epita.fr>
5359 Some hosts don't like `/' in includes.
5361 * src/system.h: Include libgettext.h without qualifying the path.
5362 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
5365 2001-12-11 Marc Autret <autret_m@epita.fr>
5367 * src/output.c (output_parser): Remove useless muscle.
5369 2001-12-11 Marc Autret <autret_m@epita.fr>
5371 * src/bison.simple: Remove #line just before %%epilogue. It
5372 is now handled in ...
5373 * src/reader.c (read_additionnal_code): Add the output of a
5374 #line for the epilogue.
5376 2001-12-10 Marc Autret <autret_m@epita.fr>
5378 * src/reader.c (copy_definition): Re-use CPP-outed code which
5379 replace precedent remove.
5380 * src/bison.simple: Remove #line before %%prologue because
5381 %%input-line is wrong at this time.
5383 2001-12-10 Marc Autret <autret_m@epita.fr>
5385 * src/reader.c (symbols_output): Clean up.
5386 * src/output.c (output_gram, output): Clean up.
5388 2001-12-10 Akim Demaille <akim@epita.fr>
5390 * src/lalr.c (initialize_lookaheads): New. Extracted from...
5391 * src/LR0.c (set_state_table): here.
5392 * src/lalr.c (lalr): Call it.
5394 2001-12-10 Akim Demaille <akim@epita.fr>
5396 * src/state.h (shifts): Remove the `number' member: shifts are
5397 attached to state, hence no longer need to be labelled with a
5400 2001-12-10 Akim Demaille <akim@epita.fr>
5402 Now that states have a complete set of members, the linked list of
5403 shifts is useless: just fill directly the state's shifts member.
5405 * src/state.h (shifts): Remove the `next' member.
5406 * src/LR0.c (first_state, last_state): Remove.
5408 (augment_automaton): Don't look for the shifts that must be added
5409 a shift on EOF: it is those of the state we looked for! But now,
5410 since shifts are attached, it is no longer needed to looking
5411 merely by its id: its number.
5413 2001-12-10 Akim Demaille <akim@epita.fr>
5415 * src/LR0.c (augment_automaton): Better variable locality.
5416 Remove an impossible branch: if there is a state corresponding to
5417 the start symbol being shifted, then there is shift for the start
5418 symbol from the initial state.
5420 2001-12-10 Akim Demaille <akim@epita.fr>
5422 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
5423 only when appropriate: when insert_start_shifting_state' is not
5425 * tests/regression.at (Rule Line Numbers): Adjust.
5427 2001-12-10 Akim Demaille <akim@epita.fr>
5429 * src/LR0.c (augment_automaton): Now that all states have shifts,
5430 merge the two cases addition shifts to the initial state.
5432 2001-12-10 Akim Demaille <akim@epita.fr>
5434 * src/lalr.c (set_state_table): Move to...
5436 * src/lalr.c (lalr): Don't call it...
5437 * src/LR0.c (generate_states): do it.
5438 * src/LR0.h (first_state): Remove, only the table is used.
5440 2001-12-10 Akim Demaille <akim@epita.fr>
5442 * src/LR0.h (first_shift, first_reduction): Remove.
5443 * src/lalr.c: Don't use first_shift: find shifts through the
5446 2001-12-10 Akim Demaille <akim@epita.fr>
5448 * src/LR0.c: Attach shifts to states as soon as they are
5450 * src/lalr.c (set_state_table): Instead of assigning shifts to
5451 state, just assert that the mapping was properly done.
5453 2001-12-10 Akim Demaille <akim@epita.fr>
5455 * src/LR0.c (insert_start_shift): Rename as...
5456 (insert_start_shifting_state): this.
5457 (insert_eof_shifting_state, insert_accepting_state): New.
5458 (augment_automaton): Adjust.
5459 Better locality of the variables.
5460 When looking if the start_symbol is shifted from the initial
5461 state, using `while (... symbol != start_symbol ...)' sounds
5462 better than `while (... symbol < start_symbol ...)': If fail
5463 to see how the order between symbols could be relevant!
5465 2001-12-10 Akim Demaille <akim@epita.fr>
5467 * src/getargs.h: Don't declare `spec_name_prefix' and
5468 `spec_file_prefix', declared by src/files.h.
5469 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
5470 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
5471 * src/output.c (prepare): Adjust.
5472 * src/reader.c (symbols_output): Likewise.
5473 * src/vmsgetargs.c: Vaguely adjust, but who cares?
5475 2001-12-10 Akim Demaille <akim@epita.fr>
5477 * src/muscle_tab.c (muscle_init): NULL is a better default than
5480 2001-12-10 Akim Demaille <akim@epita.fr>
5482 * src/reader.c (reader): Calling symbols_output once is enough.
5484 2001-12-10 Akim Demaille <akim@epita.fr>
5486 Now that states have a complete set of members, the linked list of
5487 reductions is useless: just fill directly the state's reductions
5490 * src/state.h (struct reductions): Remove member `number' and
5492 * src/LR0.c (first_reduction, last_reduction): Remove.
5493 (save_reductions): Don't link the new reductions, store them in
5495 * src/lalr.c (set_state_table): No need to attach reductions to
5496 states, it's already done.
5497 * src/output.c (output_actions): No longer free the shifts, then
5498 the reductions, then the states: free all the states and their
5501 2001-12-10 Akim Demaille <akim@epita.fr>
5503 * src/options.c (OPTN, DRTV, BOTH): New.
5504 (option_table): Use them.
5506 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
5507 the job of system.h.
5508 * src/options.c: Don't include stdio.h and xalloc.h for the same
5511 2001-12-10 Akim Demaille <akim@epita.fr>
5513 * src/output.c (output, prepare): Make sure the values of the
5514 muscles `action' and `prologue' are 0-terminated.
5516 2001-12-10 Akim Demaille <akim@epita.fr>
5518 Clean up GCC warnings.
5520 * src/reader.c (copy_action): `buf' is not used.
5521 (parse_skel_decl): Be static.
5522 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
5523 * src/options.h (create_long_option_table): Have a real prototype.
5524 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
5525 (hash_delete_at): Return const void *.
5526 Adjust casts to preserve the const.
5528 2001-12-10 Akim Demaille <akim@epita.fr>
5530 * configure.in: Require 2.52g.
5531 M4 is not needed, but AUTOM4TE is.
5533 * tests/Makefile.am: Adjust.
5535 2001-12-10 Akim Demaille <akim@epita.fr>
5537 One structure for states is enough, even though theoretically
5538 there are LR(0) states and LALR(1) states.
5540 * src/lalr.h (state_t): Remove.
5541 (state_table): Be state_t **, not state_t *.
5542 * src/state.h (core, CORE_ALLOC): Rename as...
5543 (state_t, STATE_ALLOC): this.
5544 Add the LALR(1) members: shifts, reductions, errs.
5545 * src/LR0.c (state_table): Rename as...
5546 (state_hash): this, to avoid name clashes with the global
5548 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
5549 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
5551 2001-12-10 Akim Demaille <akim@epita.fr>
5553 Bison dumps core on bash.y.
5554 Reported by Pascal Bart.
5556 * src/warshall.c (bitmatrix_print): New.
5558 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
5559 j must be the outer loop.
5560 * tests/regression.at (Broken Closure): New.
5562 2001-12-05 Akim Demaille <akim@epita.fr>
5564 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
5566 Reported by Peter Hámorský.
5568 2001-12-05 Akim Demaille <akim@epita.fr>
5570 * src/conflicts.c (err_table): Remove.
5571 (resolve_sr_conflict): Adjust.
5572 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
5574 (state_t.reductions, state_t.shifts): this.
5576 2001-12-05 Akim Demaille <akim@epita.fr>
5578 * src/reduce.c (reduce_grammar_tables): No longer disable the
5579 removal of useless rules via CPP but via `if (0)', so that the
5580 compiler still check the code is valid.
5581 For instance, it should have noticed `rline' no longer exists: use
5582 the `line' member of rule_t.
5583 * src/gram.c (dummy, rline): Remove, unused.
5585 2001-12-05 Akim Demaille <akim@epita.fr>
5587 * src/output.c (pack_vector): Use assert, not berror.
5588 * src/main.c (berror): Remove, unused.
5590 2001-12-05 Akim Demaille <akim@epita.fr>
5592 New experimental feature: if --verbose --trace output all the
5593 items of a state, not only its kernel.
5595 * src/print.c (print_core): If `trace_flag', then invoke closure
5596 before outputting the items of the state (print_core is no longer
5597 a correct name them).
5598 (print_results): Invoke new_closure/free_closure if needed.
5600 2001-12-05 Akim Demaille <akim@epita.fr>
5602 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
5603 * src/closure.c, src/closure.h (itemsetsize): Rename as...
5604 (nitemset): for consistency with the rest of the project.
5606 2001-12-05 Akim Demaille <akim@epita.fr>
5608 * src/closure.c (print_closure): Improve.
5609 (closure): Use it for printing input and output.
5611 2001-12-05 Akim Demaille <akim@epita.fr>
5613 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
5614 indexed by nonterminals.
5616 2001-12-05 Akim Demaille <akim@epita.fr>
5618 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
5620 * src/warshall.h: Remove accidental duplication of the content.
5622 2001-12-05 Akim Demaille <akim@epita.fr>
5624 * src/closure.c (set_fderives): De-obfuscate.
5626 2001-12-05 Akim Demaille <akim@epita.fr>
5628 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
5630 2001-12-05 Akim Demaille <akim@epita.fr>
5632 * src/closure.c (set_firsts): De-obfuscate.
5634 2001-12-05 Akim Demaille <akim@epita.fr>
5636 * src/output.c (action_row): De-obfuscate
5637 using the good o' techniques: arrays not pointers, variable
5638 locality, BITISSET, RESETBIT etc.
5640 2001-12-05 Akim Demaille <akim@epita.fr>
5642 Pessimize the code to simplify it: from now on, all the states
5643 have a valid SHIFTS, which NSHIFTS is possibly 0.
5645 * src/LR0.c (shifts_new): Be global and move to..
5646 * src/state.c, src/state.h: here.
5647 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
5648 * src/print_graph: Adjust.
5650 2001-12-05 Akim Demaille <akim@epita.fr>
5652 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
5653 * src/conflicts.c: Use it.
5654 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
5655 incorrectly ``simplified''.
5657 2001-12-05 Akim Demaille <akim@epita.fr>
5659 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
5660 using the good o' techniques: arrays not pointers, variable
5661 locality, BITISSET, RESETBIT etc.
5663 2001-12-05 Akim Demaille <akim@epita.fr>
5665 * src/state.h (SHIFT_SYMBOL): New.
5666 * src/conflicts.c: Use it to deobfuscate.
5668 2001-12-05 Akim Demaille <akim@epita.fr>
5670 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
5671 (print_reductions): De-obfuscate using the good o' techniques:
5672 arrays not pointers, variable locality, BITISSET.
5674 2001-12-05 Akim Demaille <akim@epita.fr>
5676 * src/conflicts.c (print_reductions): Arrays, not pointers.
5679 2001-12-05 Akim Demaille <akim@epita.fr>
5681 * src/conflicts.c (print_reductions): Pessimize, but clarify.
5683 2001-12-05 Akim Demaille <akim@epita.fr>
5685 * src/conflicts.c (print_reductions): Improve variable locality.
5687 2001-12-05 Akim Demaille <akim@epita.fr>
5689 * src/conflicts.c (print_reductions): Pessimize, but clarify.
5691 2001-12-05 Akim Demaille <akim@epita.fr>
5693 * src/conflicts.c (print_reductions): Improve variable locality.
5695 2001-12-05 Akim Demaille <akim@epita.fr>
5697 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
5698 * src/lalr.c: Use them.
5700 2001-12-05 Akim Demaille <akim@epita.fr>
5702 * src/LR0.c (augment_automaton): Formatting changes.
5703 Better variable locality.
5705 2001-12-05 Akim Demaille <akim@epita.fr>
5707 * src/lalr.c (matrix_print): New.
5708 (transpose): Use it.
5709 Use arrays instead of pointers.
5711 2001-12-05 Akim Demaille <akim@epita.fr>
5713 * src/lalr.c (maxrhs): Move to...
5714 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
5715 * src/lalr.c (build_relations): Adjust.
5717 2001-12-05 Akim Demaille <akim@epita.fr>
5719 * src/lalr.c (transpose): Free the memory allocated to the
5720 argument, as it is replaced by the results by the unique caller.
5721 (build_relations): Merely invoke transpose: it handles the memory
5723 Improve variable locality.
5724 Avoid variables used as mere abbreviations.
5725 (compute_lookaheads): Use arrays instead of pointers.
5727 2001-12-05 Akim Demaille <akim@epita.fr>
5729 * src/lalr.c (initialize_F): Improve variable locality.
5730 Avoid variables used as mere abbreviations.
5732 2001-12-05 Akim Demaille <akim@epita.fr>
5734 * src/derives.c (print_derives): Display the ruleno.
5735 * src/lalr.c (initialize_F, transpose): Better variable locality
5736 to improve readability.
5737 Avoid variables used as mere abbreviations.
5739 2001-12-05 Akim Demaille <akim@epita.fr>
5741 * src/lalr.c (traverse): Use arrays instead of pointers.
5743 2001-12-05 Akim Demaille <akim@epita.fr>
5745 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
5746 the handling of squeue.
5747 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
5749 2001-12-05 Akim Demaille <akim@epita.fr>
5751 Because useless nonterminals are now kept alive (instead of being
5752 `destroyed'), we now sometimes examine them, and store information
5753 related to them. Hence we need to know their number, and adjust
5756 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
5758 * src/LR0.c (allocate_itemsets): The memory allocated to
5759 `symbol_count' was used for two different purpose: once to count
5760 the number of occurrences of each symbol, and later reassigned to
5761 `shift_symbol', containing the symbol that can be shifted from a
5763 Deobfuscate, i.e., allocate, use and free `symbol_count' here
5765 (new_itemsets): Allocate `shift_symbol' here.
5766 (allocate_itemsets): symbol_count includes useless nonterminals.
5768 (free_storage): Use `free', not `XFREE', for pointers that cannot
5771 2001-12-05 Akim Demaille <akim@epita.fr>
5773 * src/nullable.c (set_nullable): Deobfuscate the handling of
5775 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
5777 2001-12-05 Akim Demaille <akim@epita.fr>
5779 * src/gram.c, src/gram.h (ritem_print): New.
5780 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
5781 (This useless function was defined only to work around VMS linkers
5782 that can't handle compilation units with variables only).
5783 * src/reduce.c (dump_grammar): Use it to trace the construction of
5786 2001-12-04 Paul Eggert <eggert@twinsun.com>
5788 * src/bison.simple (union yyalloc): Change member names
5789 to be the same as the stack names.
5790 (yyparse): yyptr is now union yyalloc *, not char *.
5791 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
5792 and may generate better code on some machines.
5793 (yystpcpy): Use prototype if __STDC__ is defined, not just
5794 if __cplusplus is defined.
5796 2001-11-30 Akim Demaille <akim@epita.fr>
5798 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
5799 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
5800 Gettext doesn't compile cleanly, and dies with -Werror.
5801 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
5802 Include WARNING_CFLAGS here.
5803 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
5804 before being defined.
5806 2001-11-27 Paul Eggert <eggert@twinsun.com>
5808 * lib/quotearg.h (quotearg_n, quotearg_n_style):
5809 First arg is int, not unsigned.
5810 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
5811 (SIZE_MAX, UINT_MAX): New macros.
5812 (quotearg_n_options): Abort if N is negative.
5813 Avoid overflow check on hosts where size_t is 64 bits and int
5814 is 32 bits, as overflow is impossible there.
5815 Fix off-by-one typo that caused unnecessary reallocation.
5817 2001-11-29 Paul Eggert <eggert@twinsun.com>
5819 Name space cleanup in generated parser.
5821 * doc/bison.texinfo (Bison Parser): Discuss system headers
5822 and their effect on the user name space.
5825 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
5826 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
5827 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
5829 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
5830 on user names when possible.
5832 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
5833 Simplify test for whather <alloca.h> exists.
5835 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
5837 (<stdio.h>): Include if YYDEBUG.
5839 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
5840 ! defined (yyoverflow) && ! defined (yymemcpy).
5842 (yymemcpy, yyparse): Rename local variables as needed so that
5843 they all begin with 'yy'.
5845 (yystrlen, yystpcpy): New functions.
5847 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
5850 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
5851 instead of relying on string.h functions. Use YYSTACK_ALLOC
5852 and YYSTACK_FREE instead of malloc and free.
5854 2001-11-30 Akim Demaille <akim@epita.fr>
5856 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
5857 before their first uses.
5858 (YYBISON, YYPURE): Move to the top of the output.
5860 2001-11-30 Akim Demaille <akim@epita.fr>
5862 * tests/reduce.at (Useless Nonterminals): Fix.
5864 2001-11-30 Akim Demaille <akim@epita.fr>
5866 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
5867 if body instead of `;' to pacify GCC's warnings.
5869 2001-11-30 Akim Demaille <akim@epita.fr>
5871 Instead of mapping the LHS of unused rules to -1, keep the LHS
5872 valid, but flag the rules as invalid.
5874 * src/gram.h (rule_t): `useful' is a new member.
5875 * src/print.c (print_grammar): Adjust.
5876 * src/derives.c (set_derives): Likewise.
5877 * src/reader.c (packgram, reduce_output): Likewise.
5878 * src/reduce.c (reduce_grammar_tables): Likewise.
5879 * tests/reduce.at (Underivable Rules, Useless Rules): New.
5881 2001-11-30 Akim Demaille <akim@epita.fr>
5883 * src/reduce.c (reduce_output): Formatting changes.
5884 * src/print.c (print_results, print_grammar): Likewise.
5885 * tests/regression.at (Rule Line Numbers)
5886 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
5888 2001-11-30 Akim Demaille <akim@epita.fr>
5890 * src/reduce.c (nonterminals_reduce): Instead of throwing away
5891 useless nonterminals, move them at the end of the symbol arrays.
5892 (reduce_output): Adjust.
5893 * tests/reduce.at (Useless Nonterminals): Adjust.
5895 2001-11-30 Akim Demaille <akim@epita.fr>
5897 * src/reduce.c: Various comment/formatting changes.
5898 (nonterminals_reduce): New, extracted from...
5899 (reduce_grammar_tables): here.
5900 (reduce_grammar): Call nonterminals_reduce.
5902 2001-11-29 Paul Eggert <eggert@twinsun.com>
5904 * src/bison.simple (YYSTACK_REALLOC): Remove.
5905 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
5906 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
5908 (union yyalloc): New type.
5909 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
5910 an arbitrary restriction on hosts where size_t is wider than int.
5912 (yyparse): Don't dump core if alloca or malloc fails; instead, report
5913 a parser stack overflow. Allocate just one block of memory for all
5914 three stacks, instead of allocating three blocks; this typically is
5915 faster and reduces fragmentation.
5917 Do not limit the number of items in the stack to a value that fits
5918 in 'int', as this is an arbitrary limit on hosts with 64-bit
5919 size_t and 32-bit int.
5921 2001-11-29 Marc Autret <autret_m@epita.fr>
5923 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
5924 of defining YYERROR_VERBOSE.
5925 [AT_DATA]: $4 is now out of C declarations in the prologue.
5927 2001-11-28 Marc Autret <autret_m@epita.fr>
5929 * src/reader.c (parse_dquoted_param): New.
5930 (parse_skel_decl): Use it.
5931 * src/lex.h: Add its prototype.
5932 * src/lex.c (literalchar): Become not static.
5934 2001-11-28 Marc Autret <autret_m@epita.fr>
5936 * src/output.h: And put its extern declaration here.
5937 * src/output.c (error_verbose): Define here.
5938 (prepare): Echo name modification.
5939 * src/getargs.h: Clean its extern declaration.
5940 * src/getargs.c (error_verbose_flag): Remove.
5941 (getargs): Remove case 'e'.
5942 * src/options.c (option_table): 'error-verbose' is now seen as simple
5946 * src/reader.c (read_declarations): Remove case tok_include.
5947 (parse_include_decl): Remove.
5948 * src/lex.h (token_t): Remove tok_include.
5949 * src/options.c (option_table): 'include' is now a simple command line
5952 2001-11-28 Marc Autret <autret_m@epita.fr>
5954 * src/bison.simple: Adjust muscle names.
5955 * src/muscle_tab.c (muscle_init): Also rename the muscles.
5956 * src/output.c (prepare): s/_/-/ for the muscles names.
5957 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
5959 2001-11-28 Marc Autret <autret_m@epita.fr>
5961 * src/bison.simple: Fix debug.
5962 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
5964 2001-11-28 Akim Demaille <akim@epita.fr>
5966 * src/LR0.c (shifts_new): New.
5967 (save_shifts, insert_start_shift, augment_automaton): Use it.
5969 2001-11-28 Akim Demaille <akim@epita.fr>
5971 * src/closure.c (closure): `b' and `ruleno' denote the same value:
5974 2001-11-28 Akim Demaille <akim@epita.fr>
5976 * src/closure.c (closure): Instead of looping over word in array
5977 then bits in words, loop over bits in array.
5979 2001-11-28 Akim Demaille <akim@epita.fr>
5981 * src/closure.c (closure): No longer optimize the special case
5982 where all the bits of `ruleset[r]' are set to 0, to make the code
5985 2001-11-28 Akim Demaille <akim@epita.fr>
5987 * src/closure.c (closure): `r' and `c' are new variables, used to
5988 de-obfuscate accesses to RULESET and CORE.
5990 2001-11-28 Akim Demaille <akim@epita.fr>
5992 * src/reduce.c (reduce_print): Use ngettext.
5993 (dump_grammar): Improve the trace accuracy.
5995 2001-11-28 Akim Demaille <akim@epita.fr>
5997 * src/reduce.c (dump_grammar): Don't translate trace messages.
5999 2001-11-28 Akim Demaille <akim@epita.fr>
6001 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
6002 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
6003 as all tags are free'ed afterwards.
6006 2001-11-27 Paul Eggert <eggert@twinsun.com>
6008 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
6009 use alloca when we didn't want to, and vice versa.
6011 2001-11-27 Marc Autret <autret_m@epita.fr>
6013 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
6015 * src/output.c (prepare): Remove its update.
6017 2001-11-27 Marc Autret <autret_m@epita.fr>
6019 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
6022 2001-11-27 Marc Autret <autret_m@epita.fr>
6024 * src/bison.simple: Remove YYERROR_VERBOSE using.
6025 Use %%error_verbose.
6026 (yyparse): Likewise.
6027 * src/output.c (prepare): Give its final value.
6028 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
6029 * src/getargs.h: Add its extern declaration.
6030 * src/getargs.c (error_verbose_flag): New int.
6031 (getargs): Update to catch new case.
6032 * src/options.c (option_table): 'error-verbose' is a new option.
6033 (shortopts): Update.
6035 2001-11-27 Akim Demaille <akim@epita.fr>
6037 * src/system.h: Use intl/libgettext.h.
6038 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
6040 2001-11-27 Akim Demaille <akim@epita.fr>
6042 * tests/torture.at (Exploding the Stack Size with Malloc):
6043 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
6045 2001-11-27 Akim Demaille <akim@epita.fr>
6047 * src/files.c: Include error.h.
6048 Reported by Hans Aberg.
6050 2001-11-26 Marc Autret <autret_m@epita.fr>
6052 * src/reader.c (parse_include_decl): New, not yet implemented.
6053 (read_declarations): Add case tok_include.
6054 * src/getargs.h (include): Add its extern definition.
6055 * src/getargs.c (include): New const char *.
6056 (getargs): Add case '-I'.
6057 * src/options.c (option_table): Add include as command line and
6059 * src/lex.h (token_t): Add tok_include.
6061 2001-11-26 Akim Demaille <akim@epita.fr>
6063 * src/reader.c (readgram): Make sure rules for mid-rule actions
6064 have a lineno equal to that of their host rule.
6065 Reported by Hans Aberg.
6066 * tests/regression.at (Rule Line Numbers): New.
6068 2001-11-26 Akim Demaille <akim@epita.fr>
6070 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
6073 2001-11-26 Akim Demaille <akim@epita.fr>
6075 * src/complain.c, src/complain.h (error): Remove, provided by
6078 2001-11-26 Akim Demaille <akim@epita.fr>
6080 * src/reader.c (read_declarations): Don't abort on tok_illegal,
6081 issue an error message.
6082 * tests/regression.at (Invalid %directive): New.
6083 Reported by Hans Aberg.
6085 2001-11-26 Akim Demaille <akim@epita.fr>
6087 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
6088 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
6090 2001-11-26 Akim Demaille <akim@epita.fr>
6092 * src/conflicts.c (conflicts_print): Don't complain at all when
6093 there are no reduce/reduce conflicts, and as many shift/reduce
6094 conflicts as expected.
6095 * tests/regression.at (%expect right): Adjust.
6097 2001-11-23 Akim Demaille <akim@epita.fr>
6099 * lib/alloca.c: Update, from fileutils.
6101 2001-11-23 Akim Demaille <akim@epita.fr>
6103 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
6105 2001-11-23 Akim Demaille <akim@epita.fr>
6107 * src/system.h: Include alloca.h.
6108 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
6110 2001-11-23 Akim Demaille <akim@epita.fr>
6112 * src/print_graph.c (print_actions): Remove `rule', unused.
6113 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
6114 pacify GCC's signed < unsigned warnings.
6115 * src/closure.c (itemsetsize): Likewise.
6116 * src/reader.c (symbol_list_new): Static.
6118 2001-11-23 Akim Demaille <akim@epita.fr>
6120 Attaching lineno to buckets is stupid, since only one copy of each
6121 symbol is kept, only the line of the first occurrence is kept too.
6123 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
6124 * src/reader.c (rline_allocated): Remove, unused.
6125 (symbol_list): Have a `line' member.
6126 (symbol_list_new): New.
6128 * src/print.c (print_grammar): Output the rule line numbers.
6129 * tests/regression.at (Solved SR Conflicts)
6130 (Unresolved SR Conflicts): Adjust.
6131 Reported by Hans Aberg.
6133 2001-11-22 Marc Autret <autret_m@epita.fr>
6135 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
6137 2001-11-22 Marc Autret <autret_m@epita.fr>
6139 * src/muscle_tab.c (muscle_init): Remove initialization of
6141 * src/output.c (output_master_parser): Do it here.
6143 2001-11-20 Akim Demaille <akim@epita.fr>
6146 * configure.in (ALL_LINGUAS): Adjust.
6147 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
6148 longer contains strings to translate.
6150 2001-11-19 Akim Demaille <akim@epita.fr>
6152 * src/conflicts.c (conflicts_print): Add a missing \n.
6154 2001-11-19 Akim Demaille <akim@epita.fr>
6156 * src/nullable.c (nullable_print): New.
6157 (set_nullable): Call it when tracing.
6158 Better locality of variables.
6160 2001-11-19 Akim Demaille <akim@epita.fr>
6162 * src/print.c (print_actions): Better locality of variables.
6164 2001-11-19 Akim Demaille <akim@epita.fr>
6166 * src/derives.c (print_derives): Fix and enrich.
6167 * src/closure.c (print_fderives): Likewise.
6169 2001-11-19 Akim Demaille <akim@epita.fr>
6171 * src/closure.c (itemsetend): Remove, replaced with...
6174 2001-11-19 Akim Demaille <akim@epita.fr>
6176 * src/LR0.c (kernel_end): Remove, replaced with...
6179 2001-11-19 Akim Demaille <akim@epita.fr>
6181 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
6184 2001-11-19 Akim Demaille <akim@epita.fr>
6186 * src/closure.c (closure): Use arrays instead of pointers to clarify.
6188 2001-11-19 Akim Demaille <akim@epita.fr>
6190 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
6192 * src/LR0.c: Likewise.
6193 (allocate_itemsets): Use arrays instead of pointers to clarify.
6195 2001-11-19 Akim Demaille <akim@epita.fr>
6197 * src/getargs.c (statistics_flag): Replace with...
6199 (longopts): Accept --trace instead of --statistics.
6200 * src/getargs.h, src/options.c: Adjust.
6201 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
6202 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
6204 2001-11-19 Akim Demaille <akim@epita.fr>
6206 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
6207 pointers to clarify the code.
6208 (save_reductions, save_shifts): Factor common parts of alternatives.
6210 2001-11-19 Akim Demaille <akim@epita.fr>
6212 * src/LR0.c (new_state, get_state): Complete TRACE code.
6213 * src/closure.c: Include `reader.h' to get `tags', needed by the
6215 Rename the conditional DEBUG as TRACE.
6216 Output consistently TRACEs to stderr, not stdout.
6217 * src/derives.c: Likewise.
6218 * src/reduce.c: (inaccessable_symbols): Using if is better style
6220 Use `#if TRACE' instead of `#if 0' for tracing code.
6222 2001-11-19 Akim Demaille <akim@epita.fr>
6224 * src/system.h (LIST_FREE, shortcpy): New.
6225 * src/LR0.c: Use them.
6226 * src/output.c (free_itemsets, free_reductions, free_shifts):
6227 Remove, replaced by LIST_FREE.
6229 2001-11-19 Akim Demaille <akim@epita.fr>
6231 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
6232 (REDUCTIONS_ALLOC): New.
6233 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
6236 2001-11-19 Akim Demaille <akim@epita.fr>
6238 * src/LR0.c (new_state): Complete trace code.
6239 * src/nullable.c (set_nullable): Don't translate traces.
6241 2001-11-19 Akim Demaille <akim@epita.fr>
6243 * src/print_graph.c (print_core): Better locality of variables.
6244 * src/print.c (print_core): Likewise.
6246 2001-11-19 Akim Demaille <akim@epita.fr>
6248 * src/vcg.c: You do the output, so you are responsible of the
6249 handling of VCG syntax, in particular: use quotearg.
6250 * src/print_graph.c: Don't.
6251 (print_actions): Don't output the actions as part of the nodes,
6252 since that's the job of the edges.
6253 (print_state): Don't output by hand: fill the node description,
6254 and ask for its output.
6256 2001-11-19 Akim Demaille <akim@epita.fr>
6258 * src/bison.simple (yyparse): When verbosely reporting an error,
6259 no longer put additional quotes around token names.
6260 * tests/calc.at: Adjust.
6262 2001-11-19 Akim Demaille <akim@epita.fr>
6264 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
6265 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
6266 * src/output.c: Adjust.
6268 2001-11-19 Akim Demaille <akim@epita.fr>
6270 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
6272 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
6274 2001-11-19 Akim Demaille <akim@epita.fr>
6276 * src/gram.h (rule_t): New.
6278 (rrhs, rlhs): Remove, part of state_t.
6279 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
6280 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
6281 * src/reader.c, src/reduce.c: Adjust.
6283 2001-11-19 Akim Demaille <akim@epita.fr>
6285 * src/reader.c (symbols_output): New, extracted from...
6286 (packsymbols): Here.
6289 2001-11-19 Akim Demaille <akim@epita.fr>
6291 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
6292 (maxrhs): this new function.
6294 2001-11-19 Akim Demaille <akim@epita.fr>
6296 * src/lalr.c (F): New macro to access the variable F.
6299 2001-11-19 Akim Demaille <akim@epita.fr>
6301 * src/lalr.h (LA): New macro to access the variable LA.
6302 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
6303 * src/lalr.c: Adjust.
6305 2001-11-19 Akim Demaille <akim@epita.fr>
6307 * src/lalr.c (initialize_LA): Only initialize LA. Let...
6308 (set_state_table): handle the `lookaheads' members.
6310 2001-11-19 Akim Demaille <akim@epita.fr>
6312 * src/lalr.h (lookaheads): Removed array, whose contents is now
6314 (state_t): this structure.
6315 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
6318 2001-11-19 Akim Demaille <akim@epita.fr>
6320 * src/lalr.h (consistent): Removed array, whose contents is now
6322 (state_t): this structure.
6323 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
6326 2001-11-19 Akim Demaille <akim@epita.fr>
6328 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
6329 contents are now members of...
6330 (state_t): this structure.
6331 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
6334 2001-11-19 Akim Demaille <akim@epita.fr>
6336 * src/lalr.h (state_t): New.
6337 (state_table): Be a state_t * instead of a core **.
6338 (accessing_symbol): Remove, part of state_t.
6339 * src/lalr.c: Adjust.
6340 (set_accessing_symbol): Merge into...
6341 (set_state_table): this.
6342 * src/print_graph.c, src/conflicts.c: Adjust.
6344 2001-11-14 Akim Demaille <akim@epita.fr>
6346 * tests/calc.at, tests/output.at, tests/regression.at,
6347 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
6348 now the tests are run in private dirs, therefore AC_CLEANUP and
6349 family can be simplified to 0-ary.
6350 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
6351 use abs. path to find config.h.
6352 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
6353 stderr, there can be way too much random noise.
6354 Instead pass -Werror to GCC and rely on the exit status.
6355 Reported by Wolfram Wagner.
6357 2001-11-14 Akim Demaille <akim@epita.fr>
6359 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
6360 defined only if yyoverflow is defined, to avoid `warning: unused
6362 Reported by The Test Suite.
6364 2001-11-14 Akim Demaille <akim@epita.fr>
6366 * src/print.c: Include reduce.h.
6367 Reported by Hans Aberg.
6369 2001-11-14 Akim Demaille <akim@epita.fr>
6371 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
6372 Revert a previous patch: these are really const.
6373 * src/conflicts.c (conflict_report): Additional useless pair of
6374 braces to pacify GCC's warnings for `if () if () {} else {}'.
6375 * src/lex.c (parse_percent_token): Replace equal_offset with
6378 Be sure to strdup `arg' when used, since there is no reason for
6379 token_buffer not to change.
6381 2001-11-14 Akim Demaille <akim@epita.fr>
6383 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
6385 * src/main.c (main): Use them.
6386 Suggested by Hans Aberg.
6388 2001-11-12 Akim Demaille <akim@epita.fr>
6390 * src/system.h (ngettext): Now that we use ngettext, be sure to
6391 provide a default definition when NLS are not used.
6393 2001-11-12 Akim Demaille <akim@epita.fr>
6395 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
6396 Use @kbd to denote user input.
6397 (Language and Grammar): ANSIfy the example.
6398 Adjust its layout for info/notinfo.
6399 (Location Tracking Calc): Output error messages to stderr.
6400 Output locations in a more GNUtically correct way.
6401 Fix a couple of Englishos.
6402 Adjust @group/@end group pairs.
6404 2001-11-12 Akim Demaille <akim@epita.fr>
6406 %expext was not functioning at all.
6408 * src/conflicts.c (expected_conflicts): Set to -1.
6409 (conflict_report): Use ngettext.
6410 (conflicts_print): Check %expect and make its violation an error.
6411 * doc/bison.texinfo (Expect Decl): Adjust.
6412 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
6413 * tests/regression.at (%expect not enough, %expect right)
6414 (%expect too much): New.
6416 2001-11-12 Akim Demaille <akim@epita.fr>
6418 * tests/regression.at (Conflicts): Rename as...
6419 (Unresolved SR Conflicts): this.
6420 (Solved SR Conflicts): New.
6422 2001-11-12 Akim Demaille <akim@epita.fr>
6424 * src/reduce.c (print_results): Rename as...
6425 (reduce_output): This.
6426 Output to OUT, passed as argument, instead of output_obstack.
6427 (dump_grammar): Likewise.
6430 (reduce_grammar): No longer call reduce_output, since...
6431 * src/print.c (print_results): do it.
6432 * src/main.c (main): Call reduce_free;
6434 2001-11-12 Akim Demaille <akim@epita.fr>
6436 * src/conflicts.c (print_reductions): Accept OUT as argument.
6437 Output to it, not to output_obstack.
6438 * src/print.c (print_actions): Adjust.
6440 2001-11-12 Akim Demaille <akim@epita.fr>
6442 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
6443 the result instead of using...
6444 (src_total, rrc_total, src_count, rrc_count): Remove.
6445 (any_conflicts): Remove.
6446 (print_conflicts): Split into...
6447 (conflicts_print, conflicts_output): New.
6448 * src/conflicts.h: Adjust.
6449 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
6450 * src/print.c (print_grammar): Issue `\n' between two rules.
6451 * tests/regression.at (Conflicts): New.
6452 Reported by Tom Lane.
6454 2001-11-12 Akim Demaille <akim@epita.fr>
6456 * tests/regression.at (Invalid input): Remove, duplicate with
6457 ``Invalid input: 1''.
6459 2001-11-12 Akim Demaille <akim@epita.fr>
6461 * tests/torture.at (AT_DATA_STACK_TORTURE)
6462 (Exploding the Stack Size with Alloca)
6463 (Exploding the Stack Size with Malloc): New.
6465 2001-11-12 Akim Demaille <akim@epita.fr>
6467 * src/bison.simple (YYSTACK_REALLOC): New.
6468 (yyparse) [!yyoverflow]: Use it and free the old stack.
6469 Reported by Per Allansson.
6471 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
6473 * src/bison.simple: Define type yystype instead of YYSTYPE, and
6474 define CPP macro, which substitute YYSTYPE by yystype.
6475 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
6476 with yyltype/YYLTYPE. This allows inclusion of the generated
6477 header within the parser if the compiler, such as GGC, accepts
6478 multiple equivalent #defines.
6481 2001-11-05 Akim Demaille <akim@epita.fr>
6483 * src/reader.c (symbols_output): New, extracted from...
6484 (packsymbols): here.
6487 2001-11-05 Akim Demaille <akim@epita.fr>
6489 * src/lex.c (parse_percent_token): s/quotearg/quote/.
6491 2001-11-05 Akim Demaille <akim@epita.fr>
6493 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
6496 2001-11-05 Akim Demaille <akim@epita.fr>
6498 * src/options.h (struct option_table_struct): set_flags is void*.
6499 * src/options.c (longopts): Support `--output' and `%output'.
6501 * src/lex.h (tok_setopt): Remove, replaced with...
6502 (tok_intopt, tok_stropt): these new guys.
6503 * src/lex.c (getopt.h): Not needed.
6504 (token_buffer, unlexed_token_buffer): Not const.
6505 (percent_table): Promote `-' over `_' in directive names.
6506 Active `%name-prefix', `file-prefix', and `output'.
6507 (parse_percent_token): Accept possible arguments to directives.
6508 Promote `-' over `_' in directive names.
6510 2001-11-04 Akim Demaille <akim@epita.fr>
6512 * doc/bison.texinfo (Decl Summary): Split the list into
6513 `directives for grammars' and `directives for bison'.
6515 Add description of `%name-prefix', `file-prefix', and `output'.
6516 Promote `-' over `_' in directive names.
6517 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
6518 Simplify the description of `--name-prefix'.
6519 Promote `-' over `_' in directive names.
6520 Promote `--output' over `--output-file'.
6521 Fix the description of `--defines'.
6522 * tests/output.at: Exercise %file-prefix and %output.
6524 2001-11-02 Akim Demaille <akim@epita.fr>
6526 * doc/refcard.tex: Update.
6528 2001-11-02 Akim Demaille <akim@epita.fr>
6530 * src/symtab.h (SUNDEF): New.
6531 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
6532 stand for `uninitialized', instead of 0.
6533 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
6534 * src/lex.c (lex): Adjust.
6536 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
6538 Let yylex return it instead of a plain 0.
6539 Reported by Dick Streefland.
6541 2001-11-02 Akim Demaille <akim@epita.fr>
6543 * tests/regression.at (Mixing %token styles): New test.
6545 2001-11-02 Akim Demaille <akim@epita.fr>
6547 * src/reader.c (parse_thong_decl): Formatting changes.
6548 (token_translations_init): New, extracted from...
6549 (packsymbols): Here.
6552 2001-11-01 Akim Demaille <akim@epita.fr>
6554 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
6555 Check that `9foo.y' produces correct cpp guards.
6556 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
6560 2001-11-01 Akim Demaille <akim@epita.fr>
6562 * tests/regression.at (Invalid input: 2): New.
6563 * src/lex.c (unlexed_token_buffer): New.
6564 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
6568 2001-11-01 Akim Demaille <akim@epita.fr>
6570 * tests/calc.at: Catch up with 1.30.
6571 * configure.in: Bump to 1.49a.
6572 Adjust to newer Autotest.
6574 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
6576 * src/conflicts.c: Move global variables rrc_total and src_total ...
6577 (print_conflicts): here.
6578 * src/output.c (output): Free global variable user_toknums.
6579 * src/lex.c (token_obstack): Become static.
6581 2001-10-18 Akim Demaille <akim@epita.fr>
6583 * tests/atlocal.in (GCC): Add.
6584 * tests/calc.at: s/m4_match/m4_bmatch/.
6585 s/m4_patsubst/m4_bpatsubst/.
6586 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
6587 * configure.in: AC_SUBST(GCC).
6589 2001-10-14 Marc Autret <autret_m@epita.fr>
6591 * src/options.c (create_long_option_table): Fix.
6593 2001-10-10 Akim Demaille <akim@epita.fr>
6595 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
6597 2001-10-04 Akim Demaille <akim@epita.fr>
6599 * src/reader.c (parse_union_decl): Push the caracters in
6600 union_obstack, not attrs_obstack.
6602 2001-10-04 Akim Demaille <akim@epita.fr>
6604 Merge in the branch 1.29.
6606 * src/reader.c (packsymbols): Use a temporary obstack for
6607 `%%tokendef', since output_stack is already used elsewhere.
6609 2001-10-02 Akim Demaille <akim@epita.fr>
6613 2001-10-02 Akim Demaille <akim@epita.fr>
6617 2001-10-02 Akim Demaille <akim@epita.fr>
6619 * tests/regression.at (Invalid CPP headers): New.
6620 From Alexander Belopolsky.
6621 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
6623 2001-10-02 Akim Demaille <akim@epita.fr>
6625 * tests/regression.at (Invalid input): New.
6626 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
6629 2001-10-02 Akim Demaille <akim@epita.fr>
6631 * tests/calc.at: Now that --debug works, the tests must be adjusted.
6633 2001-10-02 Akim Demaille <akim@epita.fr>
6635 * src/output.c (output_parser): Assert `skeleton'.
6636 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
6640 2001-10-01 Marc Autret <autret_m@epita.fr>
6642 * src/lex.h: Echo modifications.
6643 * src/lex.c (unlex): Parameter is now token_t.
6646 2001-10-01 Marc Autret <autret_m@epita.fr>
6648 * src/main.c: Include lex.h.
6651 2001-09-29 Akim Demaille <akim@epita.fr>
6653 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
6655 2001-09-28 Akim Demaille <akim@epita.fr>
6657 * tests/testsuite.at: Update to newer Autotest.
6658 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
6660 2001-09-27 Akim Demaille <akim@epita.fr>
6662 Position independent wrapper.
6664 * tests/bison: Remove.
6665 * tests/bison.in: New.
6666 * configure.in: Adjust.
6668 2001-09-27 Paul Eggert <eggert@twinsun.com>
6670 Port quotearg fixes from tar 1.13.24.
6672 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
6674 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
6675 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
6677 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
6678 * m4/mbrtowc.m4: New file.
6679 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
6680 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
6682 2001-09-27 Akim Demaille <akim@epita.fr>
6686 2001-09-27 Akim Demaille <akim@epita.fr>
6690 2001-09-25 Akim Demaille <akim@epita.fr>
6692 * src/system.h: Include `xalloc.h'.
6693 Remove it from the C files.
6694 * src/files.c (output_files): Free the obstacks.
6695 * src/lex.c (init_lex): Rename as...
6698 * src/main.c (main): Use it.
6700 2001-09-24 Marc Autret <autret_m@epita.fr>
6702 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
6703 to output informations in fout (FILE*).
6704 (open_graph, close_graph): Likewise.
6705 (output_graph, output_edge, output_node): Likewise.
6706 * src/vcg.h: Update function prototypes.
6707 * src/print_graph.c (print_graph): Open output graph file.
6708 (print_actions): Adjust.
6709 * src/files.h: Remove extern declaration.
6710 * src/files.c: Remove graph_obstack declaration.
6711 (open_files): Remove graph_obstack initialization.
6712 (output_files): Remove graph_obstack saving.
6714 2001-09-24 Marc Autret <autret_m@epita.fr>
6716 * src/files.c (compute_output_file_names): Fix.
6718 2001-09-24 Marc Autret <autret_m@epita.fr>,
6719 Akim Demaille <akim@epita.fr>
6721 * src/reader.c (reader): Remove call to free_symtab ().
6722 * src/main.c (main): Call it here.
6724 * src/conflicts.c (initialize_conflicts): Rename as...
6725 (solve_conflicts): this.
6726 * src/print.c (print_core, print_actions, print_state)
6727 (print_grammar): Dump to a file instead a `output_obstack'.
6728 (print_results): Dump `output_obstack', and then proceed with the
6730 * src/files.c (compute_output_file_names, close_files): New.
6731 (output_files): Adjust.
6732 * src/main.c (main): Adjust.
6734 2001-09-23 Marc Autret <autret_m@epita.fr>
6736 * src/files.c (compute_header_macro): Computes header macro name
6737 from spec_defines_file when given.
6739 2001-09-23 Marc Autret <autret_m@epita.fr>
6741 * src/files.c (output_files): Add default extensions.
6743 2001-09-22 Akim Demaille <akim@epita.fr>
6745 * src/conflicts.c (finalize_conflicts): Rename as...
6746 (free_conflicts): this.
6748 2001-09-22 Akim Demaille <akim@epita.fr>
6750 * src/gram.c (gram_free): Rename back as...
6752 (output_token_translations): Free `token_translations'.
6753 * src/symtab.c (free_symtab): Free the tag field.
6755 2001-09-22 Akim Demaille <akim@epita.fr>
6757 Remove `translations' as it is always set to true.
6759 * src/gram.h: Adjust.
6760 * src/reader.c (packsymbols, parse_token_decl): Adjust
6761 * src/print.c (print_grammar): Adjust.
6762 * src/output.c (output_token_translations): Adjust.
6763 * src/lex.c (lex): Adjust.
6764 * src/gram.c: Be sure the set pointers to NULL.
6765 (dummy): Rename as...
6768 2001-09-22 Akim Demaille <akim@epita.fr>
6770 * configure.in: Invoke AM_LIB_DMALLOC.
6771 * src/system.h: Use dmalloc.
6772 * src/LR0.c: Be sure to have pointers initialized to NULL.
6773 (allocate_itemsets): Allocate kernel_items only if needed.
6775 2001-09-22 Akim Demaille <akim@epita.fr>
6777 * configure.in: Bump to 1.29b.
6778 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
6779 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
6780 need xmalloc.c in calc.y.
6783 2001-09-21 Akim Demaille <akim@epita.fr>
6786 * Makefile.maint, config/config.guess, config/config.sub,
6787 * config/missing: Update from masters.
6788 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
6790 * configure.in (ALL_LINGUAS): Add `tr'.
6792 2001-09-21 Akim Demaille <akim@epita.fr>
6794 * tests/Makefile.am (package.m4): Move to...
6795 ($(srcdir)/$(TESTSUITE)): here.
6797 2001-09-20 Akim Demaille <akim@epita.fr>
6799 * src/complain.c: No longer try to be standalone: use system.h.
6800 Don't assume __STDC__ is defined to 1. Just test if it is defined.
6801 * src/complain.h: Likewise.
6802 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
6803 Remove the unused variable `n'.
6804 From Albert Chin-A-Young.
6806 2001-09-18 Marc Autret <autret_m@epita.fr>
6808 * doc/bison.1: Update.
6809 * doc/bison.texinfo (Bison Options): Update --defines and --graph
6811 (Option Cross Key): Update.
6814 2001-09-18 Marc Autret <autret_m@epita.fr>
6816 * tests/regression.at: New test (comment in %union).
6818 2001-09-18 Marc Autret <autret_m@epita.fr>
6820 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
6822 Reported by Keith Browne.
6824 2001-09-18 Marc Autret <autret_m@epita.fr>
6826 * tests/output.at: Add tests for --defines and --graph.
6828 2001-09-18 Marc Autret <autret_m@epita.fr>
6830 * tests/output.at: Removes tests of %{header,src}_extension features.
6832 2001-09-18 Akim Demaille <akim@epita.fr>
6834 * tests/Makefile.am (package.m4): New.
6835 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
6836 (_AT_CHECK_CALC_ERROR): Likewise.
6837 Factor the `, ' part of verbose error messages.
6839 2001-09-18 Marc Autret <autret_m@epita.fr>
6841 * src/getargs.c (longopts): Declare --defines and --graph as options
6842 with optional arguments.
6843 * src/files.h: Add extern declarations.
6844 * src/files.c (spec_graph_file, spec_defines_file): New.
6845 (output_files): Update.
6846 Remove CPP-outed code.
6848 2001-09-18 Marc Autret <autret_m@epita.fr>
6850 Turn off %{source,header}_extension feature.
6852 * src/files.c (compute_exts_from_gf): Update.
6853 (compute_exts_from_src): Update.
6854 (output_files): CPP-out useless code.
6855 * src/files.h: Remove {header,source}_extension extern declarations.
6856 * src/reader.c (parse_dquoted_param): CPP-out.
6857 (parse_header_extension_decl): Remove.
6858 (parse_source_extension_decl): Remove.
6859 (read_declarations): Remove cases tok_{hdrext,srcext}.
6860 * src/lex.c (percent_table): Remove {header,source}_extension entries.
6861 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
6863 2001-09-10 Akim Demaille <akim@epita.fr>
6865 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
6866 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
6867 (AT_CHECK_OUTPUT): this.
6868 Merely check ls' exit status, its output is useless.
6870 2001-09-10 Akim Demaille <akim@epita.fr>
6872 * tests/calc.at: Use m4_match.
6873 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
6875 2001-09-10 Marc Autret <autret_m@epita.fr>,
6876 Akim Demaille <akim@epita.fr>
6878 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
6880 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
6882 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
6883 * src/lex.h: Adjust prototype.
6884 (token_t): Add `tok_undef'.
6885 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
6886 (parse_percent_token): Now returns token_t.
6887 Add default statement in switch.
6888 (lex): Separate `c' as an input variable, from the token_t result
6890 (unlexed): Is a token_t.
6892 2001-09-10 Akim Demaille <akim@epita.fr>
6894 * configure.in: Bump to 1.29a.
6896 2001-09-07 Akim Demaille <akim@epita.fr>
6900 2001-08-30 Akim Demaille <akim@epita.fr>
6902 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
6903 * m4/atconfig.m4: Remove.
6904 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
6906 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
6907 m4_if, m4_patsubst, and m4_regexp.
6908 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
6909 `input' file instead of echo.
6911 2001-08-29 Akim Demaille <akim@epita.fr>
6915 2001-08-29 Akim Demaille <akim@epita.fr>
6919 2001-08-29 Paul Eggert <eggert@twinsun.com>
6921 * src/bison.simple (yyparse): Don't take the address of an
6922 item before the start of an array, as that doesn't conform to
6925 2001-08-29 Robert Anisko <anisko_r@epita.fr>
6927 * doc/bison.texinfo (Location Tracking Calc): New node.
6929 2001-08-29 Paul Eggert <eggert@twinsun.com>
6931 * src/output.c (output): Do not define const, as this now
6932 causes more problems than it cures.
6934 2001-08-29 Akim Demaille <akim@epita.fr>
6936 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
6938 Be sure to tag the `detailmenu'.
6940 2001-08-29 Akim Demaille <akim@epita.fr>
6942 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
6943 download in a tmp dir.
6945 2001-08-28 Marc Autret <autret_m@epita.fr>
6947 * config/depcomp: New file.
6949 2001-08-28 Marc Autret <autret_m@epita.fr>
6951 * doc/bison.1 (mandoc): Adjust.
6952 From Juan Manuel Guerrero.
6954 2001-08-28 Marc Autret <autret_m@epita.fr>
6956 * src/print_graph.c (print_state): Fix.
6958 2001-08-27 Marc Autret <autret_m@epita.fr>
6960 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
6962 Echo modifications to the functions prototypes.
6963 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
6965 2001-08-27 Marc Autret <autret_m@epita.fr>
6967 * src/vcg.c: Include `xalloc.h'.
6968 (add_colorentry): New.
6969 (add_classname): New.
6970 (add_infoname): New.
6971 * src/vcg.h: Add new prototypes.
6973 2001-08-27 Akim Demaille <akim@epita.fr>
6975 * Makefile.maint: Sync. again with CVS Autoconf.
6977 2001-08-27 Akim Demaille <akim@epita.fr>
6979 * Makefile.maint: Formatting changes.
6980 (po-update, cvs-update, update): New targets.
6983 2001-08-27 Akim Demaille <akim@epita.fr>
6985 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
6986 * Makefile.maint: Sync. with CVS Autoconf.
6988 2001-08-27 Marc Autret <autret_m@epita.fr>
6990 * src/vcg.h (struct infoname_s): New.
6991 (struct colorentry_s): New.
6992 (graph_s): New fields {vertical,horizontal}_order in structure.
6993 Add `infoname' field.
6994 Add `colorentry' field;
6995 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
6996 (G_HORIZONTAL_ORDER): New.
6998 (G_COLORENTRY): New.
6999 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
7000 Add output of `infoname'.
7001 Add output of `colorentry'.
7003 2001-08-27 Marc Autret <autret_m@epita.fr>
7005 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
7006 This one shadowed a global parameter.
7008 2001-08-24 Marc Autret <autret_m@epita.fr>
7010 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
7011 instead of `unsigned'.
7012 (print_state): Do not call obstack_object_size () in obstack_grow ()
7013 to avoid macro variables shadowing.
7015 2001-08-23 Marc Autret <autret_m@epita.fr>
7017 * src/lex.c (percent_table): Typo: s/naem/name/.
7019 Normalize new options declarations.
7021 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
7023 * tests/suite.at: Exercise %header_extension and %source_extension.
7025 2001-08-16 Marc Autret <autret_m@epita.fr>
7027 * src/reader.c (parse_dquoted_param): New.
7028 (parse_header_extension_decl): Use it.
7029 (parse_source_extension_decl): Likewise.
7031 2001-08-16 Marc Autret <autret_m@epita.fr>
7033 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
7034 (get_xxxx_str): Use assert () instead of complain ().
7035 Remove return invokations in default cases.
7036 (get_decision_str): Modify default behaviour. Remove second argument.
7037 Echo modifications on calls.
7038 (output_graph): Fix.
7040 2001-08-16 Marc Autret <autret_m@epita.fr>
7042 * src/getargs.c (usage): Update with ``-g, --graph''.
7044 2001-08-16 Marc Autret <autret_m@epita.fr>
7046 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
7047 (Option Cross Key): Likewise.
7048 * doc/bison.1: Update.
7050 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
7052 * src/output.c (output_master_parser): Don't finish action_obstack.
7053 (output_parser): Don't care about the muscle action, here.
7054 (prepare): Copy the action_obstack in the action muscle.
7055 (output): Free action_obstack.
7057 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
7059 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
7060 will contain `%union' declaration.
7061 (parse_union_decl): Delete #line directive output.
7062 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
7063 informations about %union.
7064 (parse_union_decl): Copy the union_obstack in the muscle stype.
7065 * src/bison.simple: Add new #line directive.
7066 Add typdef %%stype YYSTYPE.
7068 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
7070 * src/bison.simple: Add new `#line' directive.
7072 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
7074 * src/bison.simple: New `#line' directive.
7075 * src/output.c (output_parser): Support new dynamic muscle input_line.
7077 2001-09-22 Marc Autret <autret_m@epita.fr>
7079 * src/output.c (output_master_parser): New.
7080 (output_parser): Be more re-entrant.
7082 2001-09-21 Marc Autret <autret_m@epita.fr>
7084 * src/reader.c (copy_definition, parse_union_decl): Update and use
7086 (copy_action): Likewise.
7087 Use obstack_1grow ().
7088 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
7090 2001-09-21 Marc Autret <autret_m@epita.fr>
7092 * src/options.c (option_table): Adjust.
7093 * src/lex.c (parse_percent_token): Fix.
7095 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
7097 * src/options.c (symtab.h): Include it, need by lex.h.
7099 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
7101 * src/lex.c (parse_percent_token): Change type of variable `tx', which
7102 is now an option_table_struct*.
7103 (option_strcmp): New function option_strcmp.
7104 (parse_percent_token): Call option_strcmp.
7105 * src/getargs.c (xalloc.h, options.h): Include it.
7106 (getargs): Call create_long_option_table.
7107 (getargs): Free longopts at the end of the function.
7108 (shortopts): Move in options.c.
7109 * src/options.c (create_long_option_table): New function. Convert
7110 information from option_table to option structure.
7111 * src/reader.c (options.h): Include it.
7113 * src/Makefile.am: Adjust.
7114 * src/options.c (option_table): Create from longopts and percent_table.
7115 * src/getargs.c (longopts): Delete.
7116 * src/lex.c (struct percent_table_struct): Delete.
7117 (percent_table): Delete.
7118 (options.h): Include it.
7119 * src/options.c: Create.
7120 * src/options.h: Create.
7121 Declare enum opt_access_e.
7122 Define struct option_table_struct.
7124 2001-09-20 Marc Autret <autret_m@epita.fr>
7126 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
7129 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
7131 * src/bison.simple: s/%%filename/%%skeleton.
7132 * src/muscle_tab.c (getargs.h): Include it.
7133 (muscle_init): Insert new muscle skeleton.
7135 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
7137 * src/output.c (output_parser): Delete unused variable actions_dumped.
7139 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
7141 * src/output.c (output): Delete call to reader_output_yylsp.
7142 * src/reader.c (reader): Likewise.
7143 * src/reader.h: Delete declaration of reader_output_yylsp.
7145 2001-09-02 Marc Autret <autret_m@epita.fr>
7147 * src/reader.c: Include muscle_tab.h.
7148 (parse_union_decl): Update.
7149 (parse_macro_decl): Rename parse_muscle_decl.
7150 Update to use renamed functions and variable.
7151 (read_declarations, copy_action, read_additionnal_code, : Updated
7152 with correct variables and functions names.
7153 (packsymbols, reader): Likewise.
7155 * src/reader.h (muscle_obstack): Extern declaration update.
7157 * src/output.c: Include muscle_tab.h
7158 In all functions using macro_insert, change by using muscle_insert ().
7159 (macro_obstack): Rename muscle_obstack.
7160 Echo modifications in the whole file.
7161 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
7162 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
7163 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
7165 * src/muscle_tab.h: Update double inclusion macros.
7166 (macro_entry_s): Rename muscle_entry_s.
7169 * src/muscle_tab.c: Include muscle_tab.h.
7170 Rename macro_tabble to muscle_table.
7171 (mhash1, mhash2, mcmp): Use muscle_entry.
7172 (macro_init): Rename muscle_init. Update.
7173 (macro_insert): Rename muscle_insert. Update.
7174 (macro_find): Rename muscle_find. Update.
7176 * src/main.c: Include muscle_tab.h.
7177 (main): Call muscle_init ().
7178 * src/Makefile.am (bison_SOURCES): Echo modifications.
7180 2001-09-02 Marc Autret <autret_m@epita.fr>
7182 Now the files macro_tab.[ch] are named muscle_tab.[ch].
7184 * src/muscle_tab.c, src/muscle_tab.h: Add files.
7186 2001-09-02 Marc Autret <autret_m@epita.fr>
7188 * src/macrotab.c, src/macrotab.h: Remove.
7190 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
7192 * src/reader.c (copy_guard): Use muscle to specify the `#line'
7195 2001-09-01 Marc Autret <autret_m@epita.fr>
7197 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
7198 to an explicit value to activate the feature. We do it here.
7200 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
7202 * src/output.c (prepare): Delete the `filename' muscule insertion.
7203 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
7204 (parse_union_decl): Likewise.
7205 * src/macrotab.c (macro_init): Initialize filename by infile.
7207 2001-08-31 Marc Autret <autret_m@epita.fr>
7209 * src/bison.simple (YYLSP_NEEDED): New definition.
7210 * src/output.c (prepare): Add macro insertion of `locations_flag'
7212 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
7214 * src/output.c (prepare): Delete insertion of previous muscles,
7215 and insert the `prefix' muscles.
7216 * src/macrotab.c (macro_init): Likewise.
7217 (macro_init): Initialization prefix directive by `yy'.
7218 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
7219 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
7220 yylval, yydebug, yyerror, yynerrs and yyparse.
7221 New directive `#define' to substitute yydebug, ... with option
7224 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
7226 * src/main.c (main): Standardize.
7227 * src/output.c (output_table_data, output_parser): Likewise.
7228 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
7230 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
7232 * src/reader.c (read_additionnal_code): Rename %%user_code to
7234 * src/output.c (output): Rename %%declarations to %%prologue.
7235 * src/bison.simple: Echo modifications.
7237 2001-08-31 Marc Autret <autret_m@epita.fr>
7239 * src/reader.c (readgram): CleanUp.
7240 (output_token_defines): Likewise.
7241 (packsymbols): Likewise.
7243 * src/output.c (output): CPP-out useless code.
7245 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
7247 * src/reader.c (reader): Delete obsolete call to function
7248 output_trailers and output_headers.
7249 * src/output.h: Remove obsolete functions prototypes of output_headers
7250 and output_trailers.
7252 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
7254 * src/main.c: Include macrotab.h.
7255 * src/macrotab.h (macro_entry_s): Constify fields.
7256 Adjust functions prototypes.
7257 * src/macrotab.c (macro_insert): Constify key and value.
7258 (macro_find): Constify key.
7259 (macro_insert): Include 'xalloc.h'
7260 (macro_insert): Use XMALLOC.
7261 (macro_find): Constify return value.
7262 * src/output.c (output_table_data): Rename table to table_data.
7263 (output_parser): Constify macro_key, macro_value.
7265 2001-08-30 Marc Autret <autret_m@epita.fr>
7267 * src/reader.c (parse_skel_decl): New.
7268 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
7269 * src/lex.h (token_t): New token `tok_skel'.
7270 * src/lex.c (percent_table): Add skeleton option entry.
7273 2001-08-29 Marc Autret <autret_m@epita.fr>
7275 * src/bison.simple: Add %%user_code directive at the end.
7276 * src/reader.c (read_additionnal_code): New.
7278 * src/output.c (output_program): Remove.
7281 2001-08-28 Marc Autret <autret_m@epita.fr>
7283 * src/output.c (output_actions): Clean up.
7284 (output_gram): CPP-out useless code.
7285 * src/reader.c (reader): Clean up, CPP-out useless code.
7287 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
7289 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
7291 * src/bison.simple: Add `%%definitions'.
7293 2001-08-28 Marc Autret <autret_m@epita.fr>
7295 * config/depcomp: New file.
7297 2001-08-27 Paul Eggert <eggert@twinsun.com>
7299 * src/bison.simple (yyparse): Don't take the address of an
7300 item before the start of an array, as that doesn't conform to
7303 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
7305 * src/output.c (output): Remove the initialization of the macro
7306 obstack. It was done too late here.
7308 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
7310 (reader): Initialize the macro obstack here, since we need it to grow
7311 '%define' directives.
7313 * src/reader.h: Declare the macro obstack as extern.
7315 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
7317 * src/output.c (output_parser): Fix. Store single '%' characters in
7318 the output obstack instead of throwing them away.
7320 2001-08-27 Akim Demaille <akim@epita.fr>
7322 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
7324 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7326 * lib/Makefile.am: Adjust.
7328 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7330 * src/bison.simple: Update and add '%%' directives.
7332 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7334 * src/reader.c (reader): Remove calls to 'output_headers' and
7335 'output_trailers'. Remove some C output.
7336 (readgram): Disable a piece of code that was writing a default
7337 definition for 'YYSTYPE'.
7338 (reader_output_yylsp): Remove.
7339 (packsymbols): Output token defintions to a macro.
7340 (copy_definition): Disable C output.
7342 * src/reader.c (parse_macro_decl): New function used to parse macro
7344 (copy_string2): Put the body of copy_string into this new function.
7345 Add a parameter to let the caller choose whether he wants to copy the
7346 string delimiters or not.
7347 (copy_string): Be a simple call to copy_string2 with the last argument
7349 (read_declarations): Add case for macro definition.
7350 (copy_identifier): New.
7351 (parse_macro_decl): Read macro identifiers using copy_identifier
7354 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7356 * src/output.c (prepare): Add prefixed names.
7357 (output_parser): Output semantic actions.
7358 (output_parser): Fix bug on '%%line' directives.
7360 * src/output.c (output_headers): Remove. The C code printed by this
7361 function should now be in the skeletons.
7362 (output_trailers): Remove.
7363 (output): Disable call to 'reader_output_yylsp'.
7364 (output_rule_data): Do not output tables to the table obstack.
7366 * src/output.c: Remove some C dedicated output.
7367 Improve the use of macro and output obstacks.
7368 (output_defines): Remove.
7370 * src/output.c (output_token_translations): Associate 'translate'
7371 table with a macro. No output to the table obstack.
7372 (output_gram): Same for 'rhs' and 'prhs'.
7373 (output_stos): Same for 'stos'.
7374 (output_rule_data): Same for 'r1' and 'r2'.
7375 (token_actions): Same for 'defact'.
7376 (goto_actions): Same for 'defgoto'.
7377 (output_base): Same for 'pact' and 'pgoto'.
7378 (output_table): Same for 'table'.
7379 (output_check): Same for 'check'.
7381 * src/output.c (output_table_data): New function.
7382 (output_short_table): Remove.
7383 (output_short_or_char_table): Remove.
7385 * src/output.c (output_parser): Replace most of the skeleton copy code
7386 with something new. Skeletons are now processed character by character
7387 rather than line by line, and Bison looks for '%%' macros. This is the
7388 first step in making Bison's output process (a lot) more flexible.
7389 (output_parser): Use the macro table.
7391 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7393 * src/main.c (main): Initialize the macro table.
7395 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7397 * src/lex.c (percent_table): Add tok_define.
7398 * src/lex.h: Add tok_define.
7400 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7402 * src/macrotab.c: New file.
7403 * src/macrotab.h: New file.
7404 * src/Makefile.am: Update.
7406 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
7408 * lib/hash.c: New file.
7409 * lib/hash.h: New file.
7410 * lib/Makefile.am: Update.
7412 2001-08-15 Akim Demaille <akim@epita.fr>
7416 2001-08-15 Marc Autret <autret_m@epita.fr>
7418 * src/reader.c (readgram): Indent output macro YYSTYPE.
7419 (packsymbols): Likewise.
7420 (output_token_defines): Likewise.
7421 * src/files.c: Standardize.
7422 (compute_header_macro): New.
7423 (defines_obstack_save): New. Use compute_header_macro.
7424 (output_files): Update. Use defines_obstack_save.
7426 2001-08-15 Akim Demaille <akim@epita.fr>
7428 * doc/bison.texinfo (Table of Symbols): Document
7431 2001-08-15 Akim Demaille <akim@epita.fr>
7433 * missing: Update from CVS Automake.
7434 * config/config.guess, config/config.sub, config/texinfo.tex:
7435 Update from gnu.org.
7437 2001-08-15 Akim Demaille <akim@epita.fr>
7439 * Makefile.maint: Sync with CVS Autoconf.
7441 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
7443 * doc/bison.texinfo: Include GNU Free Documentation License from
7445 * doc/fdl.texi: Add to package.
7447 2001-08-14 Marc Autret <autret_m@epita.fr>
7449 Turn on %{source,header}_extension features.
7451 * src/lex.c (percent_table): Un-CPP out header_extension and
7453 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
7454 (compute_exts_from_src): Remove conditions. It restores priorities
7457 2001-08-14 Marc Autret <autret_m@epita.fr>
7459 * src/files.c (compute_base_names): Add extensions computing when
7460 `--file-prefix' used.
7461 Standardize function calls.
7463 2001-08-13 Marc Autret <autret_m@epita.fr>
7465 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
7466 defining it (defined but null disables alloca).
7468 2001-08-13 Marc Autret <autret_m@epita.fr>
7470 * src/bison.simple (_yy_memcpy): CPP reformat.
7472 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
7474 * tests/atconfig.in (CPPFLAGS): Fix.
7476 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
7478 * doc/bison.texinfo: Include GNU General Public License from
7480 * doc/gpl.texi: Add to package.
7482 2001-08-10 Marc Autret <autret_m@epita.fr>
7484 * src/print_graph.h: Fix.
7485 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
7487 2001-08-10 Akim Demaille <akim@epita.fr>
7489 * src/system.h: Provide default declarations for stpcpy, strndup,
7492 2001-08-10 Robert Anisko <anisko_r@epita.fr>
7494 * doc/bison.texinfo (Locations): Update @$ stuff.
7496 2001-08-09 Robert Anisko <anisko_r@epita.fr>
7498 * src/bison.simple (YYLLOC_DEFAULT): Update.
7501 2001-08-08 Marc Autret <autret_m@epita.fr>
7503 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
7504 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
7505 Reported by Fabrice Bauzac.
7507 2001-08-08 Marc Autret <autret_m@epita.fr>
7509 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
7510 * src/vcg.c (output_node): Fix.
7511 * src/vcg.h: Cleanup.
7512 * src/print_graph.c: Add comments.
7513 (node_output_size): New global variable. Simplify the formatting of
7514 the VCG graph output.
7515 (print_actions): Unused code is now used. It notifies the final state
7516 and no action states in the VCG graph. It also give the reduce actions.
7517 The `shift and goto' edges are red and the `go to state' edges are
7519 Get the current node name and node_obstack by argument.
7520 (node_obstack): New variable.
7521 (print_state): Manage node_obstack.
7522 (print_core): Use node_obstack given by argument.
7523 A node is not only computed here but in print_actions also.
7524 (print_graph): CPP out useless code instead of commenting it.
7526 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
7528 * tests/atconfig.in (CPPFLAGS): Fix.
7530 2001-08-07 Akim Demaille <akim@epita.fr>
7532 * src/print_graph.c (quote): New.
7533 (print_core): Use it.
7535 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
7537 * src/vcg.c (complain.h): Include it.
7538 Unepitaize `return' invocations.
7539 [NDEBUG] (main): Remove.
7540 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
7541 * src/files.c (open_files): Initialize graph_obstack.
7542 * src/print_graph.c (print_actions): CPP out useless code.
7543 (print_core): Don't output the last `\n' in labels.
7545 * src/files.c (output_files): Output the VCG file.
7546 * src/main.c (main): Invoke print_graph ();
7548 2001-08-06 Marc Autret <autret_m@epita.fr>
7550 Automaton VCG graph output.
7551 Using option ``-g'' or long option ``--graph'', you can generate
7552 a gram_filename.vcg file containing a VCG description of the LALR (1)
7553 automaton of your grammar.
7555 * src/main.c: Call to print_graph() function.
7556 * src/getargs.h: Update.
7557 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
7558 (graph_flag): New flag.
7560 (getargs): Add case `g'.
7561 * src/files.c (graph_obstack): New obstack struct.
7562 (open_files): Initialize new obstack.
7563 (output_files): Saves graph_obstack if required.
7564 * src/files.h (graph_obstack): New extern declaration.
7565 * src/Makefile.am: Add new source files.
7567 2001-08-06 Marc Autret <autret_m@epita.fr>
7569 * src/print_graph.c, src/print_graph.h (graph): New.
7570 * src/vcg.h: New file.
7571 * src/vcg.c: New file, VCG graph handling.
7573 2001-08-06 Marc Autret <autret_m@epita.fr>
7575 Add of %source_extension and %header_extension which specify
7576 the source or/and the header output file extension.
7578 * src/files.c (compute_base_names): Remove initialisation of
7579 src_extension and header_extension.
7580 (compute_exts_from_gf): Update.
7581 (compute_exts_from_src): Update.
7582 (output_files): Update.
7583 * src/reader.c (parse_header_extension_decl): New.
7584 (parse_source_extension_decl): New.
7585 (read_declarations): New case statements for the new tokens.
7586 * src/lex.c (percent_table): Add entries for %source_extension
7587 and %header_extension.
7588 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
7590 2001-08-06 Marc Autret <autret_m@epita.fr>
7592 * configure.in: Bump to 1.28c.
7593 * doc/bison.texinfo: Texinfo thingies.
7595 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
7597 * tests/atconfig.in (CPPFLAGS): Add.
7598 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
7600 2001-08-03 Akim Demaille <akim@epita.fr>
7604 2001-08-03 Akim Demaille <akim@epita.fr>
7606 * tests/Makefile.am (check-local): Ship testsuite.
7607 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
7610 2001-08-03 Akim Demaille <akim@epita.fr>
7612 * configure.in: Try using -Wformat when compiling.
7614 2001-08-03 Akim Demaille <akim@epita.fr>
7616 * configure.in: Bump to 1.28b.
7618 2001-08-03 Akim Demaille <akim@epita.fr>
7620 * src/complain.c: Adjust strerror_r portability issues.
7622 2001-08-03 Akim Demaille <akim@epita.fr>
7626 2001-08-03 Akim Demaille <akim@epita.fr>
7628 * src/getargs.c, src/getarg.h (skeleton)): Constify.
7629 * src/lex.c (literalchar): Avoid name clashes on `buf'.
7630 * src/getargs.c: Include complain.h.
7631 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
7632 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
7634 2001-08-03 Akim Demaille <akim@epita.fr>
7636 * src/reader.c (readgram): Display hidden chars in error messages.
7638 2001-08-03 Akim Demaille <akim@epita.fr>
7640 Update to gettext 0.10.39.
7642 2001-08-03 Akim Demaille <akim@epita.fr>
7644 * lib/strspn.c: New.
7646 2001-08-01 Marc Autret <autret_m@epita.fr>
7648 * doc/bison.texinfo: Update.
7649 * doc/bison.1 (mandoc): Update.
7650 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
7651 * src/files.c: Support output files extensions computing.
7652 (src_extension): New static variable.
7653 (header_extension): New static variable.
7655 (get_extension_index): New function, gets the index of an extension
7656 filename in a string.
7657 (compute_exts_from_gf): New function, computes extensions from the
7658 grammar file extension.
7659 (compute_exts_from_src): New functions, computes extensions from the
7660 C source file extension, file given by ``-o'' option.
7661 (compute_base_names): Update.
7662 (output_files): Update.
7664 2001-08-01 Robert Anisko <anisko_r@epita.fr>
7666 * doc/bison.texi: Document @$.
7667 (Locations): New section.
7669 2001-07-18 Akim Demaille <akim@epita.fr>
7671 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
7672 * config/prev-version.txt, config/move-if-change: New.
7673 * Makefile.am: Adjust.
7675 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
7677 * src/bison.simple (yyparse): Suppress warning `comparaison
7678 between signed and unsigned'.
7680 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
7682 * src/getargs.h (raw_flag): Remove.
7683 * src/getargs.c: Die on `-r'/`--raw'.
7684 * src/lex.c (parse_percent_token): Die on `%raw'.
7685 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
7686 * tests/calc.at: Suppress test with option `--raw'.
7688 2001-07-14 Akim Demaille <akim@epita.fr>
7691 * configure.in: Require Autoconf 2.50.
7692 Update to gettext 0.10.38.
7694 2001-03-16 Akim Demaille <akim@epita.fr>
7696 * doc/bison.texinfo: ANSIfy the examples.
7698 2001-03-16 Akim Demaille <akim@epita.fr>
7700 * getargs.c (skeleton): New variable.
7701 (longopts): --skeleton is a new option.
7702 (shortopts, getargs): -S is a new option.
7703 * getargs.h: Declare skeleton.
7704 * output.c (output_parser): Use it.
7706 2001-03-16 Akim Demaille <akim@epita.fr>
7708 * m4/strerror_r.m4: New.
7709 * m4/error.m4: Run AC_FUNC_STRERROR_R.
7710 * lib/error.h, lib/error.c: Update.
7712 2001-03-16 Akim Demaille <akim@epita.fr>
7714 * src/getargs.c (longopts): Clean up.
7716 2001-02-21 Akim Demaille <akim@epita.fr>
7718 * src/reader.c (gensym): `gensym_count' is your own.
7719 Use a static buf to create the symbol name, as token_buffer is no
7722 2001-02-08 Akim Demaille <akim@epita.fr>
7724 * src/conflicts.c (conflict_report): Be sure not to append to res
7725 between two calls, which could happen if both first sprintf were
7726 skipped, but not the first cp += strlen.
7728 2001-02-08 Akim Demaille <akim@epita.fr>
7730 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
7731 New, from fileutils 4.0.37.
7732 * configure.in: Require Autoconf 2.49c. I took some time before
7733 making this decision. This is the only way out for portability
7734 issues in Bison, it would mean way too much duplicate effort to
7735 import in Bison features implemented in 2.49c since 2.13.
7736 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
7738 2001-02-02 Akim Demaille <akim@epita.fr>
7740 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
7741 * lib/xalloc.h, lib/xmalloc.c: Update.
7743 2001-01-19 Akim Demaille <akim@epita.fr>
7745 Get rid of the ad hoc handling of token_buffer in the scanner: use
7748 * src/lex.c (token_obstack): New.
7749 (init_lex): Initialize it. No longer call...
7750 (grow_token_buffer): this. Remove it.
7751 Adjust all the places which used it to use the obstack.
7753 2001-01-19 Akim Demaille <akim@epita.fr>
7755 * src/lex.h: Rename all the tokens:
7756 s/\bENDFILE\b/tok_eof/g;
7757 s/\bIDENTIFIER\b/tok_identifier/g;
7759 Let them be enums, not #define, to ease debugging.
7760 Adjust all the code.
7762 2001-01-18 Akim Demaille <akim@epita.fr>
7764 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
7765 * src/lex.c (maxtoken, grow_token_buffer): Static.
7767 2001-01-18 Akim Demaille <akim@epita.fr>
7769 Since we now use obstacks, more % directives can be enabled.
7771 * src/lex.c (percent_table): Also accept `%yacc',
7772 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
7774 Handle the actions for `%semantic_parser' and `%pure_parser' here,
7775 instead of returning a token.
7776 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
7777 * src/reader.c (read_declarations): Adjust.
7778 * src/files.c (open_files): Don't call `compute_base_names', don't
7779 compute `attrsfile' since they depend upon data which might be
7780 *in* the input file now.
7781 (output_files): Do it here.
7782 * src/output.c (output_headers): Document the fact that this patch
7783 introduces a guaranteed SEGV for semantic parsers.
7784 * doc/bison.texinfo: Document them.
7785 * tests/suite.at: Exercise these %options.
7787 2000-12-20 Akim Demaille <akim@epita.fr>
7789 Also handle the output file (--verbose) with obstacks.
7791 * files.c (foutput): Remove.
7792 (output_obstack): New.
7793 Adjust all dependencies.
7794 * src/conflicts.c: Return a string.
7795 * src/system.h (obstack_grow_string): Rename as...
7796 (obstack_sgrow): this. Be ready to work with non literals.
7797 (obstack_fgrow4): New.
7799 2000-12-20 Akim Demaille <akim@epita.fr>
7801 * src/files.c (open_files): Fix the computation of short_base_name
7802 in the case of `-o foo.tab.c'.
7804 2000-12-20 Akim Demaille <akim@epita.fr>
7806 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
7807 (copy_dollar): Now that everything uses obstacks, get rid of the
7810 2000-12-20 Akim Demaille <akim@epita.fr>
7812 * src/files.c (open_files): Actually the `.output' file is based
7813 on the short_base_name, not base_name.
7814 * tests/suite.at (Checking output file names): Adjust.
7816 2000-12-20 Akim Demaille <akim@epita.fr>
7818 * src/bison.s1: Remove, we now use directly...
7819 * src/bison.simple: this.
7820 * src/Makefile.am: Use pkgdata instead of data.
7822 2000-12-20 Akim Demaille <akim@epita.fr>
7824 * src/files.c (guard_obstack): New.
7825 (open_files): Initialize it.
7826 (output_files): Dump it...
7827 * src/files.h: Export it.
7828 * src/reader.c (copy_guard): Use it.
7830 2000-12-19 Akim Demaille <akim@epita.fr>
7832 * src/files.c (outfile, defsfile, actfile): Removed as global
7834 (open_files): Don't compute them.
7835 (output_files): Adjust.
7836 (base_name, short_base_name): Be global.
7837 Adjust dependencies.
7839 2000-12-19 Akim Demaille <akim@epita.fr>
7841 * src/files.c (strsuffix): New.
7842 (stringappend): Be just like strcat but allocate.
7843 (base_names): Eve out from open_files.
7844 Try to simplify the rather hairy computation of base_name and
7846 (open_files): Use it.
7847 * tests/suite.at (Checking output file names): New test.
7849 2000-12-19 Akim Demaille <akim@epita.fr>
7851 * src/system.h (obstack_grow_literal_string): Rename as...
7852 (obstack_grow_string): this.
7853 * src/output.c (output_parser): Recognize `%% actions' instead of
7855 * src/bison.s1: s/$/%% actions/.
7856 * src/bison.hairy: Likewise.
7858 2000-12-19 Akim Demaille <akim@epita.fr>
7860 * src/output.c (output_parser): Compute the `#line' lines when
7862 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
7863 Suggested by Hans Aberg.
7865 2000-12-19 Akim Demaille <akim@epita.fr>
7867 Let the handling of the skeleton files be local to the procedures
7870 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
7872 (fparser, open_extra_files): Remove.
7873 (open_files, output_files): Don't take care of fparser.
7874 * src/files.h: Adjust.
7875 * src/output.c (output_parser): Open and close the file to the
7877 * src/reader.c (read_declarations): When %semantic_parser, open
7880 2000-12-19 Akim Demaille <akim@epita.fr>
7882 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
7883 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
7885 2000-12-19 Akim Demaille <akim@epita.fr>
7887 * src/files.c (open_files): Yipee! We no longer need all the code
7888 looking for `/tmp' since we have no tmp file.
7890 2000-12-19 Akim Demaille <akim@epita.fr>
7892 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
7894 * src/files.c (open_files): Less dependency on MSDOS etc.
7896 2000-12-14 Akim Demaille <akim@epita.fr>
7898 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
7899 Provide a default definition.
7900 Use it when executing the default @ action.
7901 * src/reader.c (reader_output_yylsp): No longer include
7902 `timestamp' and `text' in the default YYLTYPE.
7904 2000-12-12 Akim Demaille <akim@epita.fr>
7906 * src/reader.c (copy_definition, parse_union_decl, copy_action)
7907 (copy_guard): Quote the file names.
7908 Reported by Laurent Mascherpa.
7910 2000-12-12 Akim Demaille <akim@epita.fr>
7912 * src/output.c (output_headers, output_program, output): Be sure
7913 to escape special characters when outputting filenames.
7914 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
7915 (output_headers): Don't depend on them, Use ACTSTR.
7917 2000-11-17 Akim Demaille <akim@epita.fr>
7919 * lib/obstack.h: Formatting changes.
7920 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
7921 prevents type checking.
7922 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
7923 cast the value to (void *): assigning a `foo *' to a `void *'
7925 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
7926 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
7929 2000-11-17 Akim Demaille <akim@epita.fr>
7931 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
7933 (suite.m4, regression.m4, calc.m4): these.
7934 * tests/atgeneral.m4: Update from CVS Autoconf.
7936 2000-11-17 Akim Demaille <akim@epita.fr>
7938 * tests/regression.m4 (%union and --defines): New test,
7939 demonstrating a current bug in the obstack implementation.
7941 2000-11-17 Akim Demaille <akim@epita.fr>
7943 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
7945 Use them to declare the variables which are global or local to
7948 2000-11-17 Akim Demaille <akim@epita.fr>
7950 * acconfig.h: Remove, no longer used.
7952 2000-11-07 Akim Demaille <akim@epita.fr>
7954 * src: s/Copyright (C)/Copyright/g.
7956 2000-11-07 Akim Demaille <akim@epita.fr>
7958 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
7960 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
7962 2000-11-07 Akim Demaille <akim@epita.fr>
7964 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
7965 Merge in a single CPP if/else.
7967 2000-11-07 Akim Demaille <akim@epita.fr>
7969 * src/output.c (output): Remove useless variables.
7970 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
7971 argument `data' for consistency with the prototypes.
7973 (obstack_copy, obstack_copy0): Rename the second argument as
7974 `address' for consistency. Qualify it `const'.
7975 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
7976 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
7977 `const' their input argument (`data' or `address').
7978 Adjust the corresponding macros to include `const' in casts.
7980 2000-11-03 Akim Demaille <akim@epita.fr>
7982 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
7983 s/PFILE1/BISON_HAIRY/.
7984 Adjust dependencies.
7986 2000-11-03 Akim Demaille <akim@epita.fr>
7988 For some reason, this was not applied.
7990 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
7991 `unlink': it's no longer used.
7993 2000-11-03 Akim Demaille <akim@epita.fr>
7995 * src/files.c (skeleton_find): New function, eved out of...
7996 (open_files, open_extra_files): here.
7998 2000-11-03 Akim Demaille <akim@epita.fr>
8002 * src/files.c (obstack_save): New function.
8003 (done): Rename as...
8004 (output_files): this.
8006 * src/main.c (main): Don't use `atexit' to register `done', since
8007 it no longer has to remove tmp files, just call `output_files'
8008 when there are no errors.
8010 2000-11-02 Akim Demaille <akim@epita.fr>
8012 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
8013 `unlink': it's no longer used.
8014 * src/files.h: Formatting changes.
8016 2000-11-02 Akim Demaille <akim@epita.fr>
8018 Remove the last uses of mktemp and unlink/delete.
8020 * src/files.c (fdefines, ftable): Removed.
8021 (defines_ostack, table_obstack): New.
8022 Adjust dependencies of the former into uses of the latter.
8023 * src/output.c (output_short_or_char_table, output_short_table):
8024 Convert to using obstacks.
8025 * src/reader.c (copy_comment2): Accept one FILE * and two
8027 (output_token_defines, reader_output_yylsp): Use obstacks.
8028 * src/system.h (obstack_fgrow3): New.
8030 2000-11-01 Akim Demaille <akim@epita.fr>
8032 Change each use of `fattrs' into a use of `attrs_obstack'.
8034 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
8035 * src/files.c (fattrs): Remove.
8036 (attrs_obstack): New.
8037 Adjust all dependencies.
8038 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
8040 2000-11-01 Akim Demaille <akim@epita.fr>
8043 Change each use of `faction' into a use of `action_obstack'.
8045 * lib/obstack.h, lib/obstack.c: New files.
8046 * src/files.c (faction): Remove.
8047 (action_obstack): New.
8048 Adjust all dependencies.
8050 2000-10-20 Akim Demaille <akim@epita.fr>
8052 * lib/quote.h (PARAMS): New macro. Use it.
8054 2000-10-16 Akim Demaille <akim@epita.fr>
8056 * src/output.c (output_short_or_char_table): New function.
8057 (output_short_table, output_token_translations): Use it.
8058 (goto_actions): Use output_short_table.
8060 2000-10-16 Akim Demaille <akim@epita.fr>
8062 * src/symtab.c (bucket_new): New function.
8065 * src/output.c (output_short_table): New argument to display the
8066 comment associated with the table.
8067 Adjust dependencies.
8068 (output_gram): Use it.
8069 (output_rule_data): Nicer output layout for YYTNAME.
8071 2000-10-16 Akim Demaille <akim@epita.fr>
8073 * src/lex.c (read_typename): New function.
8075 * src/reader.c (copy_dollar): Likewise.
8077 2000-10-16 Akim Demaille <akim@epita.fr>
8079 * src/reader.c (copy_comment2): Expect the input stream to be on
8080 the `/' which is suspected to open a comment, instead of being
8081 called after `//' or `/*' was read.
8082 (copy_comment, copy_definition, parse_union_decl, copy_action)
8083 (copy_guard): Adjust.
8085 2000-10-16 Akim Demaille <akim@epita.fr>
8087 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
8088 `read_signed_integer'.
8090 2000-10-16 Akim Demaille <akim@epita.fr>
8092 * src/reader.c (copy_dollar): New function.
8093 (copy_guard, copy_action): Use it.
8095 2000-10-16 Akim Demaille <akim@epita.fr>
8097 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
8098 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
8099 New files, from Fileutils 4.0.27.
8100 * src/main.c (printable_version): Remove.
8101 * src/lex.c, src/reader.c: Use `quote'.
8103 2000-10-04 Akim Demaille <akim@epita.fr>
8105 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
8107 2000-10-04 Akim Demaille <akim@epita.fr>
8109 * doc/bison.texinfo: Various typos spotted by Neil Booth.
8111 2000-10-04 Akim Demaille <akim@epita.fr>
8113 When a literal string is used to define two different tokens,
8114 `bison -v' segfaults.
8115 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
8117 * tests/regression.m4: New file.
8118 Include the core of the sample provided by Piotr Gackiewicz.
8119 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
8122 2000-10-04 Akim Demaille <akim@epita.fr>
8124 * src/reader.c (parse_expect_decl): Keep `count' within the size
8128 2000-10-02 Paul Eggert <eggert@twinsun.com>
8130 * bison.s1 (yyparse): Assign the default value
8131 unconditionally, to avoid a GCC warning and make the parser a
8134 2000-10-02 Akim Demaille <akim@epita.fr>
8136 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
8139 2000-10-02 Akim Demaille <akim@epita.fr>
8141 * src/derives.c, src/print.c, src/reduce.c: To ease the
8142 translation, move some `\n' out of the translated strings.
8144 2000-10-02 Akim Demaille <akim@epita.fr>
8146 The location tracking mechanism is precious for parse error
8147 messages. Nevertheless, it is enabled only when `@n' is used in
8148 the grammar, which is a different issue (you can use it in error
8149 message, but not in the grammar per se). Therefore, there should
8150 be another means to enable it.
8152 * src/getargs.c (getargs): Support `--locations'.
8154 * src/getargs.h (locationsflag): Export it.
8155 * src/lex.c (percent_table): Support `%locations'.
8156 * src/reader.c (yylsp_needed): Remove this variable, now replaced
8157 with `locationsflag'.
8158 * doc/bison.texinfo: Document `--locations' and `%locations'.
8160 * tests/calc.m4: Test it.
8162 For regularity of the names, replace each
8163 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
8164 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
8165 In addition replace each `flag' with `_flag'.
8167 2000-10-02 Akim Demaille <akim@epita.fr>
8169 Also test parse error messages, including with YYERROR_VERBOSE.
8171 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
8173 Use it to check the computations.
8174 Use it to check `nonassoc' is honored.
8175 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
8176 `--yyerror-verbose'.
8177 (_AT_CHECK_CALC): Adjust to this option.
8178 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
8180 2000-10-02 Akim Demaille <akim@epita.fr>
8182 Test also `--verbose', `--defines' and `--name-prefix'. Testing
8183 the latter demonstrates a flaw in the handling of non debugging
8184 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
8185 was used in order to simplify:
8201 unfortunately this leads to a CPP conflict when
8202 `--name-prefix=foo' is used since it produces `#define yydebug
8205 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
8206 (YYDPRINTF): New macro.
8208 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
8210 Also test `--verbose', `--defines' and `--name-prefix'.
8212 2000-10-02 Akim Demaille <akim@epita.fr>
8214 Improve the readability of the produced parsers.
8216 * src/bison.s1: Formatting changes.
8217 Improve the comment related to the `$' mark.
8218 (yydefault): Don't fall through to `yyresume': `goto' there.
8219 * src/output.c (output_parser): When the `$' is met, skip the end
8221 New variable, `number_of_dollar_signs', to check there's exactly
8222 one `$' in the parser skeleton.
8224 2000-10-02 Akim Demaille <akim@epita.fr>
8226 * lib/xstrdup.c: New file, from the fileutils.
8227 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
8228 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
8229 instead of strlen + xmalloc + strcpy.
8230 * src/symtab.c (copys): Remove, use xstrdup instead.
8232 2000-10-02 Akim Demaille <akim@epita.fr>
8234 * src/gram.h (associativity): New enum type which replaces the
8235 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
8236 `right_assoc', `left_assoc' and `non_assoc'.
8237 Adjust all dependencies.
8238 * src/reader.c: Formatting changes.
8239 (LTYPESTR): Don't define it, use it as a literal in
8240 `reader_output_yylsp'.
8241 * src/symtab.h (symbol_class): New enum type which replaces the
8242 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
8243 `sunknown', `stoken and `snterm'.
8245 2000-10-02 Akim Demaille <akim@epita.fr>
8247 * src/getargs.c (fixed_outfiles): Rename as...
8248 (yaccflag): for consistency and accuracy.
8249 Adjust dependencies.
8251 2000-10-02 Akim Demaille <akim@epita.fr>
8253 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
8254 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
8255 difficult and introduced a lot of core dump. It turns out that
8256 Bison used an implementation of `xmalloc' based on `calloc', and
8257 at various places it does depend upon the initialization to 0. I
8258 have not tried to isolate the pertinent places, and all the former
8259 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
8260 someone should address this issue.
8262 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
8263 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
8265 Adjust dependencies.
8266 * src/warshall.h: New file.
8269 2000-10-02 Akim Demaille <akim@epita.fr>
8271 Various anti-`extern in *.c' changes.
8273 * src/system.h: Include `assert.h'.
8275 2000-10-02 Akim Demaille <akim@epita.fr>
8277 * src/state.h (nstates, final_state, first_state, first_shift)
8278 (first_reduction): Move their exportation from here...
8279 * src/LR0.h: to here.
8280 Adjust dependencies.
8281 * src/getargs.c (statisticsflag): New variable.
8282 Add support for `--statistics'.
8283 Adjust dependencies.
8285 Remove a lot of now useless `extern' statements in most files.
8287 2000-10-02 Akim Demaille <akim@epita.fr>
8289 * src/LR0.h: New file.
8292 2000-10-02 Akim Demaille <akim@epita.fr>
8294 * src/print.h: New file.
8296 * src/print.c: Formatting and ordering changes.
8297 (verbose, terse): Replace with...
8298 (print_results): this new function.
8299 Adjust dependencies.
8301 2000-10-02 Akim Demaille <akim@epita.fr>
8303 * src/conflicts.c (conflict_report): New function.
8304 (conflict_log, verbose_conflict_log): Replace with...
8305 (print_conflicts): this function.
8306 Adjust dependencies.
8307 * src/conflicts.h: New file.
8308 Propagate its inclusion.
8310 2000-10-02 Akim Demaille <akim@epita.fr>
8312 * src/nullable.h: New file.
8313 Propagate its inclusion.
8314 * src/nullable.c: Formatting changes.
8316 2000-10-02 Akim Demaille <akim@epita.fr>
8318 * src/reduce.h: New file.
8319 Propagate its inclusion.
8320 * src/reduce.c: Topological sort and other formatting changes.
8321 (bool, TRUE, FALSE): Move their definition to...
8322 * src/system.h: here.
8324 2000-10-02 Akim Demaille <akim@epita.fr>
8326 * src/files.c: Formatting changes.
8327 (tryopen, tryclose, openfiles): Rename as...
8328 (xfopen, xfclose, open_files): this.
8329 (stringappend): static.
8330 * src/files.h: Complete the list of exported symbols.
8333 2000-10-02 Akim Demaille <akim@epita.fr>
8335 * src/reader.h: New file.
8336 Propagate its use instead of tedious list of `extern' and
8338 * src/reader.c: Formatting changes, topological sort,
8341 2000-10-02 Akim Demaille <akim@epita.fr>
8343 * src/lex.h: Prototype `lex.c' exported functions.
8344 * src/reader.c: Adjust.
8345 * src/lex.c: Formatting changes.
8346 (safegetc): Rename as...
8349 2000-10-02 Akim Demaille <akim@epita.fr>
8351 * src/lalr.h: New file.
8352 Propagate its inclusion instead of prototypes and `extern'.
8353 * src/lalr.c: Formatting changes, topological sorting etc.
8355 2000-10-02 Akim Demaille <akim@epita.fr>
8357 * src/output.c (token_actions): Introduce a temporary array,
8358 YYDEFACT, that makes it possible for this function to use
8361 2000-10-02 Akim Demaille <akim@epita.fr>
8363 `user_toknums' is output as a `short[]' in `output.c', while it is
8364 defined as a `int[]' in `reader.c'. For consistency with the
8365 other output tables, `user_toknums' is now defined as a table of
8368 * src/reader.c (user_toknums): Be a short table instead of an int
8370 Adjust dependencies.
8372 Factor the short table outputs.
8374 * src/output.c (output_short_table): New function.
8375 * src/output.c (output_gram, output_stos, output_rule_data)
8376 (output_base, output_table, output_check): Use it.
8378 2000-10-02 Akim Demaille <akim@epita.fr>
8380 * src/output.c (output): Topological sort of the functions, in
8381 order to get rid of the `static' prototypes.
8382 No longer use `register'.
8383 * src/output.h: New file.
8384 Propagate its inclusion in files explicitly prototyping functions
8387 2000-09-21 Akim Demaille <akim@epita.fr>
8389 * src/atgeneral.m4: Update from Autoconf.
8391 2000-09-21 Akim Demaille <akim@epita.fr>
8393 * src/closure.h: New file.
8394 * src/closure.c: Formatting changes, topological sort over the
8395 functions, use of closure.h.
8396 (initialize_closure, finalize_closure): Rename as...
8397 (new_closure, free_closure): these. Adjust dependencies.
8398 * src/LR0.c: Formatting changes, topological sort, use of
8400 (initialize_states): Rename as...
8402 * src/Makefile.am (noinst_HEADERS): Adjust.
8404 2000-09-20 Akim Demaille <akim@epita.fr>
8406 * src/acconfig.h: Don't protect config.h against multiple
8408 Don't define PARAMS.
8409 * src/system.h: Define PARAMS.
8410 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
8411 purpose of config.h. system.h must not try to fix wrong
8412 definitions in config.h.
8414 2000-09-20 Akim Demaille <akim@epita.fr>
8416 * src/derives.h: New file.
8417 * src/main.c, src/derives.h: Use it.
8419 * src/Makefile.am (noinst_HEADERS): Adjust.
8421 2000-09-20 Akim Demaille <akim@epita.fr>
8423 * tests/atgeneral.m4: Update from Autoconf.
8424 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
8425 (AT_CHECK_CALC): New macros.
8426 Use these macros to test bison with options `', `--raw',
8427 `--debug', `--yacc', `--yacc --debug'.
8429 2000-09-19 Akim Demaille <akim@epita.fr>
8431 * src/output.c: Formatting changes.
8432 * src/machine.h: Remove, leaving its contents in...
8433 * src/system.h: here.
8435 Adjust all dependencies on stdio.h and machine.h.
8436 * src/getargs.h: New file.
8437 Let all `extern' declarations about getargs.c be replaced with
8438 inclusion of `getargs.h'.
8439 * src/Makefile.am (noinst_HEADERS): Adjust.
8441 * tests/calc.m4 (yyin): Be initialized in main, not on the global
8443 (yyerror): Returns void, not int.
8444 * doc/bison.texinfo: Formatting changes.
8446 2000-09-19 Akim Demaille <akim@epita.fr>
8448 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
8451 2000-09-18 Akim Demaille <akim@epita.fr>
8453 * configure.in: Append WARNING_CFLAGS to CFLAGS.
8454 * src/Makefile.am (INCLUDES): Don't.
8455 Be ready to fetch headers in lib/.
8457 2000-09-18 Akim Demaille <akim@epita.fr>
8459 * doc/bison.texinfo: Update the copyright.
8460 ANSIfy and GNUify the examples.
8461 Remove the old menu.
8463 2000-09-18 Akim Demaille <akim@epita.fr>
8465 First set of tests: use the `calc' example from the documentation.
8467 * src/bison.s1 (yyparse): Condition the code using `yytname' which
8468 is defined only when YYDEBUG is.
8469 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
8470 * src/files.c (tryopen, tryclose): Formatting changes.
8471 Move to the top and be static.
8472 * src/reader.c (read_signed_integer): Likewise.
8473 * tests/calc.m4: New file.
8474 * Makefile.am, suite.m4: Adjust.
8475 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
8477 2000-09-18 Akim Demaille <akim@epita.fr>
8479 Add support for an Autotest test suite for Bison.
8481 * m4/m4.m4, m4/atconfig.m4: New files.
8482 * m4/Makefile.am (EXTRA_DIST): Adjust.
8483 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
8485 * src/getargs.c: Display a more standard --version message.
8486 * src/reader.c (reader): Formatting changes.
8487 No longer depend upon VERSION_STRING.
8488 * configure.in: No longer use `dnl'.
8489 Set up the test suite and the new directory `tests/.
8490 (VERSION_STRING): Remove.
8492 2000-04-14 Akim Demaille <akim@epita.fr>
8494 * src/reader.c (copy_comment2): New function, same as former
8495 `copy_comment', but outputs into two FILE *.
8496 (copy_comment): Use it.
8497 (parse_union_decl): Use it.
8498 (get_type, parse_start_decl): Use the same `invalid' message.
8499 (parse_start_decl, parse_union_decl): Use the same `multiple'
8501 (parse_union_decl, copy_guard, copy_action): Use the same
8502 `unmatched' message.
8503 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
8505 2000-03-31 Akim Demaille <akim@epita.fr>
8507 * src/files.c (tryopen, tryclose): Move to the top.
8510 2000-03-31 Akim Demaille <akim@epita.fr>
8512 * src/main.c (main): Don't call `done', exit does it.
8514 2000-03-31 Akim Demaille <akim@epita.fr>
8516 * allocate.c: s/return (foo)/return foo/.
8519 * output.c: Likewise.
8520 * reader.c: Likewise.
8521 * symtab.c: Likewise.
8522 * vmsgetargs.c: Likewise.
8524 2000-03-31 Akim Demaille <akim@epita.fr>
8526 Clean up the error reporting functions.
8528 * src/report.c: New file.
8529 * src/report.h: Likewise.
8530 * src/Makefile.am: Adjust.
8531 * m4/error.m4: New file.
8532 * m4/Makefile.am: Adjust.
8533 * configure.in (jm_PREREQ_ERROR): Call it.
8534 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
8536 (fatal, fatals): Remove. All callers use complain.c::fatal.
8537 (warn, warni, warns, warnss, warnss): Remove. All callers use
8538 complain.c::complain.
8539 (toomany): Remove, use fatal instead.
8540 * src/files.c (done): No argument, use complain_message_count.
8541 * src/main.c (main): Register `done' to `atexit'.
8543 * src/getargs.c (usage): More `fputs', less `fprintf'.
8545 2000-03-28 Akim Demaille <akim@epita.fr>
8547 * lib/: New directory.
8548 * Makefile.am (SUBDIRS): Adjust.
8549 * configure.in: Adjust.
8550 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
8552 * src/alloca.c: Moved to lib/.
8553 * src/getopt.c: Likewise.
8554 * src/getopt1.c: Likewise.
8555 * src/getopt.h: Likewise.
8556 * src/ansi2knr.c: Likewise.
8557 * src/ansi2knr.1: Likewise.
8558 * src/Makefile.am: Adjust.
8559 * lib/Makefile.am: New file.
8561 2000-03-28 Akim Demaille <akim@epita.fr>
8563 * src/getargs.c (usage): Refresh the help message.
8565 2000-03-17 Akim Demaille <akim@epita.fr>
8567 * src/getopt1.c: Updated from textutils 2.0e
8568 * src/getopt.c: Likewise.
8569 * src/getopt.h: Likewise.
8571 2000-03-17 Akim Demaille <akim@epita.fr>
8573 * src/Makefile.am (bison.simple): Fix the awk program: quote only
8574 the file name, not the whole `#line LINE FILE'.
8576 2000-03-17 Akim Demaille <akim@epita.fr>
8578 On syntax errors, report the token on which we choked.
8580 * src/bison.s1 (yyparse): In the label yyerrlab, when
8581 YYERROR_VERBOSE, add yychar in msg.
8583 2000-03-17 Akim Demaille <akim@epita.fr>
8585 * src/reader.c (copy_at): New function.
8586 (copy_guard): Use it.
8587 (copy_action): Use it.
8589 2000-03-17 Akim Demaille <akim@epita.fr>
8591 Be kind to translators, save some useless translations.
8593 * src/main.c (banner): New function.
8594 (fatal_banner): Use it.
8595 (warn_banner): Use it.
8597 2000-03-17 Akim Demaille <akim@epita.fr>
8599 * src/reader.c (copy_definition): Use copy_string and
8600 copy_comment. Removed now unused `match', `ended',
8602 (copy_comment, copy_string): Moved, to be visible from
8605 2000-03-17 Akim Demaille <akim@epita.fr>
8607 * src/reader.c (copy_string): Declare `static inline'. No
8608 problems with inline, since it is checked by configure.
8609 (copy_comment): Likewise.
8611 2000-03-17 Akim Demaille <akim@epita.fr>
8613 * src/reader.c (packsymbols): Formatting changes.
8615 2000-03-17 Akim Demaille <akim@epita.fr>
8617 * src/reader.c (copy_comment): New function, factored out from:
8618 (copy_action): Use it. Removed now unused `match', `ended',
8620 (copy_guard): Likewise.
8622 2000-03-17 Akim Demaille <akim@epita.fr>
8624 * src/reader.c (copy_string): New function, factored out from:
8625 (copy_action): Use it.
8626 (copy_guard): Likewise.
8628 2000-03-17 Akim Demaille <akim@epita.fr>
8630 Change the handling of @s so that they behave exactly like $s.
8631 There is now a pseudo variable @$ (readble and writable), location
8632 of the lhs of the rule (by default ranging from the location of
8633 the first symbol of the rhs, to the location of the last symbol,
8634 or, if the rhs is empty, YYLLOC).
8636 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
8638 (yyparse): When providing a default semantic action, provide a
8639 default location action.
8640 (after the $): No longer change `*YYLSP', just stack YYLOC the
8641 same way you stack YYVAL.
8642 * src/reader.c (read_declarations): Use warns.
8643 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
8644 (copy_action, case '@'): Likewise.
8645 Use a standard error message, to save useless work from
8648 2000-03-17 Akim Demaille <akim@epita.fr>
8650 * src/bison.s1: Formatting and cosmetics changes.
8651 * src/reader.c: Likewise.
8652 Update the Copyright notice.
8654 2000-03-17 Akim Demaille <akim@epita.fr>
8656 * src/bison.s1 (#line): All set to `#line' only, since the
8657 Makefile now handles them.
8659 2000-03-16 Akim Demaille <akim@epita.fr>
8661 * src/output.c (output_rule_data): Output the documentation of
8663 (Copyright notice): Update.
8666 2000-03-16 Akim Demaille <akim@epita.fr>
8668 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
8669 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
8670 One `#if YYDEBUG' remains, since it uses variables which are
8671 defined only if `YYDEBUG != 0'.
8673 2000-03-16 Akim Demaille <akim@epita.fr>
8675 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
8676 and related variables so that the similarities are highlighted.
8678 2000-03-16 Akim Demaille <akim@epita.fr>
8680 * src/bison.s1: Properly indent CPP directives.
8682 2000-03-16 Akim Demaille <akim@epita.fr>
8684 * src/bison.s1: Properly indent the `alloca' CPP section.
8686 2000-03-16 Akim Demaille <akim@epita.fr>
8688 Do not hard code values of directories in `configure.in'.
8689 Update the `configure' tool chain.
8691 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
8693 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
8694 (AC_OUTPUT): Add m4/Makefile.
8695 Bump to bison 1.28a, 1.29 has never been released.
8696 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
8697 handled via src/Makefile.am.
8698 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
8699 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
8701 * Makefile.am (SUBDIRS): Add m4.
8702 (ACLOCAL_AM_FLAGS): New variable.
8703 (AUTOMAKE_OPTIONS): Add check-news.
8704 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
8705 the proper line number and file name.
8706 (DEFS): Propagate the location of bison library files and of the
8708 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
8710 * acinclude.m4: Remove, replaced by the directory m4.
8711 * m4/Makefile.am (EXTRA_DIST): New variable.
8712 * m4/gettext.m4: New file, from the fileutils.
8713 * m4/lcmessage.m4: Likewise
8714 * m4/progtest.m4: Likewise.
8715 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
8717 2000-03-10 Akim Demaille <akim@epita.fr>
8720 Formatting changes of various comments.
8721 Respect the GNU coding standards at various places.
8722 Don't use `_()' when no translation is needed.
8724 1999-12-13 Jesse Thilo <jthilo@gnu.org>
8727 OS/2 honors TMPDIR environment variable.
8729 1999-12-13 Jesse Thilo <jthilo@gnu.org>
8731 * doc/bison.texinfo: Tweaked spelling and grammar.
8733 Removed reference to price of printed copy.
8734 Mention BISON_SIMPLE and BISON_HAIRY.
8736 1999-12-13 Jesse Thilo <jthilo@gnu.org>
8738 * configure.in, NEWS:
8739 Bison 1.29 released.
8741 1999-10-27 Jesse Thilo <jthilo@gnu.org>
8743 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
8744 Added reference card.
8746 1999-07-26 Jesse Thilo <jthilo@gnu.org>
8748 * po/ru.po: Added Russian translation.
8750 1999-07-26 Jesse Thilo <jthilo@gnu.org>
8752 * configure.in: Added Russian translation.
8754 1999-07-06 Jesse Thilo <jthilo@gnu.org>
8756 * configure.in, NEWS, README:
8757 Released version 1.28.
8759 1999-06-14 Jesse Thilo <jthilo@gnu.org>
8762 Squashed redefinition warning on some systems.
8764 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
8765 Have configure build version string instead of relying on ANSI string
8768 1999-06-14 Jesse Thilo <jthilo@gnu.org>
8770 * po/POTFILES.in: Got rid of version.c.
8772 1999-06-14 Jesse Thilo <jthilo@gnu.org>
8774 * acconfig.h, configure.in:
8775 Have configure build version string instead of relying on ANSI string
8778 1999-06-08 Jesse Thilo <jthilo@gnu.org>
8781 Dropped mention of `+' for long-named options.
8783 1999-05-30 Jesse Thilo <jthilo@gnu.org>
8785 * src/files.c: Added <unistd.h> for unlink().
8787 * src/Makefile.am, src/system.h:
8790 1999-05-30 Jesse Thilo <jthilo@gnu.org>
8792 * README: Added a FAQ list.
8794 * configure.in, acconfig.h:
8797 1999-05-30 Jesse Thilo <jthilo@gnu.org>
8799 * doc/FAQ, doc/Makefile.am:
8802 1999-05-19 Jesse Thilo <jthilo@gnu.org>
8804 * src/alloc.h, src/symtab.h, src/version.c:
8805 Protected inclusion of "config.h" with HAVE_CONFIG_H.
8807 1999-04-18 Jesse Thilo <jthilo@gnu.org>
8809 * src/.cvsignore, src/Makefile.am:
8810 Reorganized: sources in `src', documentation in `doc'.
8812 * src/lex.c (literalchar):
8813 fixed the code for escaping double quotes (thanks
8816 1999-04-18 Jesse Thilo <jthilo@gnu.org>
8818 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
8819 Adjusted paths to reflect directory reorganization.
8821 1999-04-18 Jesse Thilo <jthilo@gnu.org>
8823 * doc/.cvsignore, doc/Makefile.am:
8824 Reorganized: sources in `src', documentation in `doc'.
8826 1999-04-18 Jesse Thilo <jthilo@gnu.org>
8829 Updated AC_INIT file to reflect directory reorganization.
8831 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
8832 Reorganized: sources in `src', documentation in `doc'.
8834 1999-04-13 Jesse Thilo <jthilo@gnu.org>
8837 Don't declare calloc() and realloc() if not necessary.
8839 1999-04-13 Jesse Thilo <jthilo@gnu.org>
8841 * configure.in, acconfig.h, acinclude.m4:
8842 Don't declare calloc() and realloc() if not necessary.
8844 1999-03-23 Jesse Thilo <jthilo@gnu.org>
8846 * po/.cvsignore: Added i18n support.
8848 1999-03-23 Jesse Thilo <jthilo@gnu.org>
8850 * acconfig.h, configure.in, Makefile.am:
8853 1999-03-22 Jesse Thilo <jthilo@gnu.org>
8855 * src/bison.s1: Fixed #line numbers.
8857 1999-03-15 Jesse Thilo <jthilo@gnu.org>
8859 * po/es.po, po/fr.po, po/nl.po, po/de.po:
8860 Added PO files from Translation Project.
8862 1999-03-03 Jesse Thilo <jthilo@gnu.org>
8865 Added support for non-ANSI compilers (ansi2knr).
8867 1999-02-16 Jesse Thilo <jthilo@gnu.org>
8869 * configure.in: Bumped version number to 1.27.
8872 Added `bison.simple' to list of files removed by `make distclean'.
8874 1999-02-12 Jesse Thilo <jthilo@gnu.org>
8876 * src/files.c, src/files.h:
8877 Defined locations of parser files in config.h instead of Makefile.
8879 1999-02-12 Jesse Thilo <jthilo@gnu.org>
8881 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
8882 Defined locations of parser files in config.h instead of Makefile.
8884 1999-02-09 Jesse Thilo <jthilo@gnu.org>
8887 Removed inappropriate use of $< macro.
8889 1999-02-05 Jesse Thilo <jthilo@gnu.org>
8891 * po/Makefile.in.in, po/POTFILES.in:
8892 Add `po' directory skeleton.
8894 1999-01-27 Jesse Thilo <jthilo@gnu.org>
8896 * README: Document help-bison list.
8898 * configure.in: Add check for mkstemp().
8900 1999-01-20 Jesse Thilo <jthilo@gnu.org>
8902 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
8903 Hush a few compiler warnings.
8906 Add tryclose(), which verifies that fclose was successful.
8907 Hush a couple of compiler warnings.
8909 1999-01-20 Jesse Thilo <jthilo@gnu.org>
8911 * Makefile.am, OChangeLog:
8912 ChangeLog is now automatically generated. Include the old version as
8915 1999-01-14 Jesse Thilo <jthilo@gnu.org>
8917 * 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:
8920 1999-01-14 Jesse Thilo <jthilo@gnu.org>
8922 * doc/bison.texinfo: Fix formatting glitch.
8924 * doc/bison.texinfo: Update FSF address.
8926 1999-01-14 Jesse Thilo <jthilo@gnu.org>
8928 * acconfig.h: Update FSF address.
8930 1999-01-08 Jesse Thilo <jthilo@gnu.org>
8933 Don't define PACKAGE here, since config.h defines it.
8935 1998-12-30 Jesse Thilo <jthilo@gnu.org>
8937 * src/reader.c: Update copyright date.
8940 Ditch sprintf to statically-sized buffers in fatal/warn functions in
8941 favor of output directly to stderr (avoids buffer overruns).
8943 * src/reader.c: Some checks for premature EOF.
8945 * 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:
8946 Use prototypes if the compiler understands them.
8948 * src/files.c: Honor TMPDIR on Unix hosts.
8949 Use prototypes if the compiler understands them.
8952 Fix a couple of buffer overrun bugs.
8953 Use prototypes if the compiler understands them.
8955 * src/system.h: Include unistd.h and ctype.h.
8956 Use #ifdef instead of #if for NLS symbols.
8958 1998-12-30 Jesse Thilo <jthilo@gnu.org>
8960 * doc/bison.texinfo:
8961 Delete comment "consider using @set for edition number, etc..." since
8962 we now are doing so.
8964 1998-12-30 Jesse Thilo <jthilo@gnu.org>
8967 Use prototypes if the compiler understands them.
8969 * NEWS: Document 1.26 highlights.
8971 * Makefile.am: Require Automake 1.3 or later.
8974 Use prototypes if the compiler understands them.
8976 1998-12-29 Jesse Thilo <jthilo@gnu.org>
8979 Use VERSION symbol from automake for version number.
8981 1998-12-29 Jesse Thilo <jthilo@gnu.org>
8983 * acconfig.h, configure.in, version.cin:
8984 Use VERSION symbol from automake for version number.
8986 1998-11-28 Jesse Thilo <jthilo@gnu.org>
8989 Distribute original version of simple parser (bison.s1), not built
8990 version (bison.simple).
8992 1998-11-28 Jesse Thilo <jthilo@gnu.org>
8994 * doc/bison.texinfo: Add info dir entry.
8996 * doc/bison.texinfo:
8997 Let automake put version number into documentation.
8999 1998-11-26 Jesse Thilo <jthilo@gnu.org>
9001 * src/bison.cld, src/build.com, src/vmshlp.mar:
9002 Add non-RCS files from /gd/gnu/bison.
9004 1998-11-26 Jesse Thilo <jthilo@gnu.org>
9007 Document the BISON_HAIRY and BISON_SIMPLE variables.
9009 1998-11-25 Jesse Thilo <jthilo@gnu.org>
9011 * src/version.c: Build version.c automatically.
9014 Fix token numbering (used to start at 258, not 257).
9016 * src/system.h: Include config.h.
9018 * src/getargs.c: Update bug report address.
9020 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
9021 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
9023 1998-11-25 Jesse Thilo <jthilo@gnu.org>
9026 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
9028 * configure.in, version.cin:
9029 Build version.c automatically.
9031 * AUTHORS: Add AUTHORS file.
9033 * README: Update bug report address.
9036 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
9038 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
9041 1998-11-25 Jesse Thilo <jthilo@gnu.org>
9043 * doc/bison.texinfo: Clean up some formatting.
9045 1998-05-05 Richard Stallman <rms@gnu.org>
9047 * doc/bison.texinfo:
9048 Explain better why to make a pure parser.
9050 1998-01-05 Richard Stallman <rms@gnu.org>
9052 * src/files.c (openfiles):
9053 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
9054 find a temporary directory, if possible. Do not unlink files while
9057 1997-08-25 Richard Stallman <rms@gnu.org>
9059 * src/reader.c (stack_offset;):
9060 Change some warni to warns.
9062 * src/lex.c (literalchar): Use warns, not warni.
9064 1997-06-28 Richard Stallman <rms@gnu.org>
9066 * src/bison.s1: Add a Bison version comment.
9068 * src/main.c (fatal, warn, berror):
9071 1997-06-28 Richard Stallman <rms@gnu.org>
9073 * Makefile.in (bison_version): New variable.
9074 (dist): Use that variable.
9075 (bison.s1): Substitute the Bison version into bison.simple.
9077 * bison.simple: Add a Bison version comment.
9079 1997-06-18 Richard Stallman <rms@gnu.org>
9081 * src/main.c (fatal, warn, berror):
9082 Make error messages standard.
9083 (toomany): Improve error message text.
9085 * 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:
9086 new.h renamed to alloc.h.
9088 1997-06-18 Richard Stallman <rms@gnu.org>
9090 * Makefile.in: new.h renamed to alloc.h.
9092 1997-05-24 Richard Stallman <rms@gnu.org>
9094 * src/lex.c (literalchar):
9095 Fix the code for escaping \, " and '.
9097 (lex): Avoid trouble when there are many chars
9098 to discard in a char literal with just several chars in it.
9100 1997-05-17 Richard Stallman <rms@gnu.org>
9103 Use malloc, if using alloca is troublesome.
9104 (YYSTACK_USE_ALLOCA): New flag macro.
9105 Define it for some systems and compilers.
9106 (YYSTACK_ALLOC): New macro.
9107 (yyparse): Use YYSTACK_ALLOC to allocate stack.
9108 If it was malloc'd, free it.
9110 1997-05-17 Richard Stallman <rms@gnu.org>
9113 Use malloc, if using alloca is troublesome.
9114 (YYSTACK_USE_ALLOCA): New flag macro.
9115 Define it for some systems and compilers.
9116 (YYSTACK_ALLOC): New macro.
9117 (yyparse): Use YYSTACK_ALLOC to allocate stack.
9118 If it was malloc'd, free it.
9120 1997-04-23 Richard Stallman <rms@gnu.org>
9123 (alloca) [__hpux]: Always define as __builtin_alloca.
9125 1997-04-23 Richard Stallman <rms@gnu.org>
9128 (alloca) [__hpux]: Always define as __builtin_alloca.
9130 1997-04-22 Richard Stallman <rms@gnu.org>
9133 [__hpux]: Include alloca.h (right for HPUX 10)
9134 instead of declaring alloca (right for HPUX 9).
9136 * src/bison.s1 (__yy_memcpy):
9137 Declare arg `count' as unsigned int.
9138 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
9140 1997-04-22 Richard Stallman <rms@gnu.org>
9143 [__hpux]: Include alloca.h (right for HPUX 10)
9144 instead of declaring alloca (right for HPUX 9).
9146 * bison.simple (__yy_memcpy):
9147 Declare arg `count' as unsigned int.
9148 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
9150 1997-01-03 Richard Stallman <rms@gnu.org>
9152 * src/allocate.c: [__STDC__ or _MSC_VER]:
9153 Declare calloc and realloc to return void *.
9155 1997-01-02 Richard Stallman <rms@gnu.org>
9158 [_MSC_VER]: Include stdlib.h and process.h.
9159 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
9161 * src/main.c (main): Return FAILURE as a value.
9162 (printable_version): Declare arg as int, not char.
9164 1997-01-02 Richard Stallman <rms@gnu.org>
9166 * Makefile.in (dist):
9167 Explicitly check for symlinks, and copy them.
9169 1996-12-19 Richard Stallman <rms@gnu.org>
9172 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
9174 1996-12-18 Paul Eggert <eggert@gnu.org>
9176 * src/bison.s1 (yyparse):
9177 If __GNUC__ and YYPARSE_PARAM are both defined,
9178 declare yyparse to have a void * argument.
9180 1996-12-18 Paul Eggert <eggert@gnu.org>
9182 * bison.simple (yyparse):
9183 If __GNUC__ and YYPARSE_PARAM are both defined,
9184 declare yyparse to have a void * argument.
9186 1996-12-17 Richard Stallman <rms@gnu.org>
9188 * src/reduce.c (nbits): Add some casts.
9190 1996-08-12 Richard Stallman <rms@gnu.org>
9192 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
9194 1996-08-12 Richard Stallman <rms@gnu.org>
9196 * bison.simple: Test _MSDOS as well as _MSDOS_.
9198 1996-07-31 Richard Stallman <rms@gnu.org>
9201 [__sun && __i386]: Include alloca.h.
9203 1996-07-31 Richard Stallman <rms@gnu.org>
9206 [__sun && __i386]: Include alloca.h.
9208 1996-07-30 Richard Stallman <rms@gnu.org>
9210 * src/bison.s1: Comment change.
9212 * src/bison.s1: Test _MSDOS_, not MSDOS.
9214 1996-07-30 Richard Stallman <rms@gnu.org>
9216 * bison.simple: Comment change.
9218 * bison.simple: Test _MSDOS_, not MSDOS.
9220 1996-06-01 Richard Stallman <rms@gnu.org>
9222 * 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:
9223 Insert `_' macro around many string constants.
9226 Insert `_' macro around many string constants.
9228 (main): Call setlocale, bindtextdomain and textdomain.
9230 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
9231 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
9232 [ENABLE_NLS]: Include libintl.h.
9233 [ENABLE_NLS] (gettext): Define.
9234 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
9235 (N_, PACKAGE, LOCALEDIR): New macros.
9237 1996-06-01 Richard Stallman <rms@gnu.org>
9239 * POTFILES.in: New file.
9241 * Makefile.in (allocate.o):
9242 Define target explicitly.
9244 * Makefile.in (CFLAGS): Set to @CFLAGS@.
9245 (LDFLAGS): Set to @LDFLAGS@.
9246 (configure): Run autoconf only if preceding `cd' succeeds.
9247 (bison.s1): Redirect output to temporary file then move the
9248 temporary to the target, rather than redirecting directly to bison.s1.
9249 (clean): Remove config.status and config.log.
9250 (distclean): Don't remove config.status here.
9252 1996-05-12 Richard Stallman <rms@gnu.org>
9255 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
9257 1996-05-12 Richard Stallman <rms@gnu.org>
9260 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
9262 1996-05-11 Richard Stallman <rms@gnu.org>
9264 * src/bison.s1 (__yy_memcpy):
9265 Really reorder the args, as was supposedly done on Feb 14 1995.
9266 (yyparse): Calls changed accordingly.
9268 1996-05-11 Richard Stallman <rms@gnu.org>
9270 * Makefile.in (dist): Don't use $(srcdir).
9272 * bison.simple (__yy_memcpy):
9273 Really reorder the args, as was supposedly done on Feb 14 1995.
9274 (yyparse): Calls changed accordingly.
9276 1996-01-27 Richard Stallman <rms@gnu.org>
9278 * src/output.c (output_rule_data):
9279 Test YYERROR_VERBOSE in the conditional
9280 around the definition of ttyname.
9282 1995-12-29 Richard Stallman <rms@gnu.org>
9285 Fix line numbers in #line commands.
9287 1995-12-29 Richard Stallman <rms@gnu.org>
9290 Fix line numbers in #line commands.
9292 1995-12-27 Richard Stallman <rms@gnu.org>
9294 * src/bison.s1 (YYPARSE_PARAM_DECL):
9295 In C++, make it always null.
9296 (YYPARSE_PARAM_ARG): New macro.
9297 (yyparse): Use YYPARSE_PARAM_ARG.
9299 1995-12-27 Richard Stallman <rms@gnu.org>
9301 * bison.simple (YYPARSE_PARAM_DECL):
9302 In C++, make it always null.
9303 (YYPARSE_PARAM_ARG): New macro.
9304 (yyparse): Use YYPARSE_PARAM_ARG.
9306 1995-11-29 Richard Stallman <rms@gnu.org>
9308 * doc/bison.texinfo:
9309 Describe literal string tokens, %raw, %no_lines, %token_table.
9311 1995-11-29 Daniel Hagerty <hag@gnu.org>
9313 * doc/bison.texinfo: Fixed update date
9315 1995-10-16 Richard Stallman <rms@gnu.org>
9317 * src/version.c: Version 1.25.
9319 1995-10-16 Richard Stallman <rms@gnu.org>
9321 * NEWS: *** empty log message ***
9323 1995-10-16 Richard Stallman <rms@gnu.org>
9325 * doc/bison.1, doc/bison.rnh:
9328 1995-10-15 Richard Stallman <rms@gnu.org>
9330 * src/vmsgetargs.c, src/getargs.c:
9331 Added -n, -k, and -raw switches.
9332 (noparserflag, toknumflag, rawtoknumflag): New variables.
9334 * src/symtab.h (SALIAS):
9335 New #define for adding aliases to %token.
9336 (struct bucket): Added `alias' field.
9338 * src/reduce.c (reduce_grammar):
9339 Revise error message.
9340 (print_notices): Remove final `.' from error message.
9342 * src/reader.c (reader_output_yylsp):
9344 (readgram): Use `#if 0' around code that accepted %command
9345 inside grammar rules: The documentation doesn't allow it,
9346 and it will fail since the %command processors scan for the next %.
9347 (parse_token_decl): Extended the %token
9348 declaration to allow a multi-character symbol as an alias.
9349 (parse_thong_decl): New function.
9350 (read_declarations): Added %thong declarations.
9351 (read_declarations): Handle NOOP to deal with allowing
9352 % declarations as another means to specify the flags.
9353 (readgram): Allow %prec prior to semantics embedded in a rule.
9354 (skip_to_char, read_declarations, copy_definition)
9355 (parse_token_decl, parse_start_decl, parse_type_decl)
9356 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
9357 (get_type_name, copy_guard, copy_action, readgram)
9358 (get_type, packsymbols): Revised most error messages.
9359 Changed `fatal' to `warnxxx' to avoid aborting for error.
9360 Revised and use multiple warnxxx functions to avoid using VARARGS1.
9361 (read_declarations): Improve the error message for
9362 an invalid character. Do not abort.
9363 (read_declarations, copy_guard, copy_action): Use
9364 printable_version to avoid unprintable characters in printed output.
9365 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
9366 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
9367 Allow the type of a non-terminal can be given
9368 more than once, as long as all specifications give the same type.
9371 (output_headers, output_trailers, output, output_gram)
9372 (output_rule_data): Implement noparserflag variable.
9373 Implement toknumflag variable.
9374 (output): Call reader_output_yylsp to output LTYPESTR.
9376 * src/main.c (main):
9377 If reader sees an error, don't process the grammar.
9378 (fatals): Updated to not use VARARGS1.
9379 (printable_version, int_to_string, warn, warni, warns, warnss)
9380 (warnsss): New error reporting functions. Avoid abort for error.
9383 Added THONG and NOOP for alias processing.
9384 Added SETOPT for the new code that allows setting options with %flags.
9387 Include getopt.h. Add some extern decls.
9388 (safegetc): New function to deal with EOF gracefully.
9389 (literalchar); new function to deal with reading \ escapes.
9390 (lex): Use literalchar.
9391 (lex): Implemented "..." tokens.
9392 (literalchar, lex, parse_percent_token): Made tokenbuffer
9393 always contain the token. This includes growing the token
9394 buffer while reading an integer.
9395 (parse_percent_token): Replaced if-else statement with percent_table.
9396 (parse_percent_token): Added % declarations as another
9397 way to specify the flags -n, -l, and -r. Also added hooks for
9398 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
9399 major changes to files.c.
9400 (lex) Retain in the incoming stream a character following
9402 (skip_white_space, lex): Revised most error messages
9403 and changed fatal to warn to avoid aborting.
9404 (percent_table): Added %thong declarations.
9406 * src/gram.h: Comment changes.
9408 * src/files.c (openfiles, open_extra_files, done):
9410 and actfile file. Handle noparserflag. Both for -n switch.
9412 * src/conflicts.c (resolve_sr_conflict):
9413 Remove use of alloca.
9415 1995-06-01 Jim Meyering <meyering@gnu.org>
9417 * doc/bison.texinfo: *** empty log message ***
9419 1995-05-06 Richard Stallman <rms@gnu.org>
9421 * src/bison.s1: Comment change.
9423 1995-05-06 Richard Stallman <rms@gnu.org>
9425 * bison.simple: Comment change.
9427 1995-05-03 Richard Stallman <rms@gnu.org>
9429 * src/version.c: Version now 1.24.
9431 * src/bison.s1: Change distribution terms.
9433 * src/version.c: Version now 1.23.
9435 1995-05-03 Richard Stallman <rms@gnu.org>
9437 * doc/bison.texinfo:
9438 Rewrite "Conditions for Using Bison".
9439 Update version to 1.24.
9441 1995-05-03 Richard Stallman <rms@gnu.org>
9443 * bison.simple: Change distribution terms.
9445 1995-02-23 Richard Stallman <rms@gnu.org>
9447 * src/files.c: Test __VMS_POSIX as well as VMS.
9449 1995-02-14 Jim Meyering <meyering@gnu.org>
9451 * src/bison.s1 (__yy_memcpy):
9452 Renamed from __yy_bcopy to avoid
9453 confusion. Reverse FROM and TO arguments to be consistent with
9456 1995-02-14 Jim Meyering <meyering@gnu.org>
9458 * bison.simple (__yy_memcpy):
9459 Renamed from __yy_bcopy to avoid
9460 confusion. Reverse FROM and TO arguments to be consistent with
9463 1994-11-10 David J. MacKenzie <djm@gnu.org>
9469 * Makefile.in (DISTFILES): Include NEWS.
9471 * Makefile.in (DISTFILES):
9472 Include install-sh, not install.sh.
9474 * configure.in: Update to Autoconf v2 macro names.
9476 1994-10-05 David J. MacKenzie <djm@gnu.org>
9478 * Makefile.in: fix typo
9480 * Makefile.in (prefix, exec_prefix):
9481 Let configure set them.
9483 1994-09-28 David J. MacKenzie <djm@gnu.org>
9485 * Makefile.in: Set datadir to $(prefix)/share.
9487 1994-09-15 Richard Stallman <rms@gnu.org>
9490 Update copyright notice and GPL version.
9492 1994-09-15 Richard Stallman <rms@gnu.org>
9495 Update copyright notice and GPL version.
9497 1994-07-12 Richard Stallman <rms@gnu.org>
9499 * src/reduce.c, src/reader.c:
9502 1994-05-05 David J. MacKenzie <djm@gnu.org>
9504 * Makefile.in: entered into RCS
9506 1994-03-26 Richard Stallman <rms@gnu.org>
9508 * src/bison.s1: entered into RCS
9510 1994-03-26 Richard Stallman <rms@gnu.org>
9512 * bison.simple: entered into RCS
9514 1994-03-25 Richard Stallman <rms@gnu.org>
9516 * src/main.c: entered into RCS
9518 1994-03-24 Richard Stallman <rms@gnu.org>
9520 * src/conflicts.c: entered into RCS
9522 1994-01-02 Richard Stallman <rms@gnu.org>
9524 * Makefile.in: *** empty log message ***
9526 1993-11-21 Richard Stallman <rms@gnu.org>
9528 * src/bison.s1: *** empty log message ***
9530 1993-11-21 Richard Stallman <rms@gnu.org>
9532 * doc/bison.texinfo: entered into RCS
9534 * doc/bison.texinfo: *** empty log message ***
9536 1993-11-21 Richard Stallman <rms@gnu.org>
9538 * bison.simple: *** empty log message ***
9540 1993-10-25 David J. MacKenzie <djm@gnu.org>
9542 * doc/bison.texinfo: *** empty log message ***
9544 1993-10-19 Richard Stallman <rms@gnu.org>
9546 * src/bison.s1: *** empty log message ***
9548 1993-10-19 Richard Stallman <rms@gnu.org>
9550 * bison.simple: *** empty log message ***
9552 1993-10-14 Richard Stallman <rms@gnu.org>
9554 * src/bison.s1: *** empty log message ***
9556 1993-10-14 Richard Stallman <rms@gnu.org>
9558 * bison.simple: *** empty log message ***
9560 1993-09-14 David J. MacKenzie <djm@gnu.org>
9562 * doc/bison.texinfo: *** empty log message ***
9564 1993-09-13 Noah Friedman <friedman@gnu.org>
9566 * Makefile.in: *** empty log message ***
9568 1993-09-10 Richard Stallman <rms@gnu.org>
9570 * src/conflicts.c: *** empty log message ***
9572 * src/system.h: entered into RCS
9574 1993-09-10 Richard Stallman <rms@gnu.org>
9576 * doc/bison.1: entered into RCS
9578 1993-09-06 Noah Friedman <friedman@gnu.org>
9580 * src/version.c: entered into RCS
9582 1993-09-06 Noah Friedman <friedman@gnu.org>
9584 * Makefile.in: *** empty log message ***
9586 1993-07-30 David J. MacKenzie <djm@gnu.org>
9588 * Makefile.in: *** empty log message ***
9590 1993-07-24 Richard Stallman <rms@gnu.org>
9592 * src/bison.s1: *** empty log message ***
9594 1993-07-24 Richard Stallman <rms@gnu.org>
9596 * bison.simple: *** empty log message ***
9598 1993-07-08 David J. MacKenzie <djm@gnu.org>
9600 * Makefile.in: *** empty log message ***
9602 1993-07-04 Richard Stallman <rms@gnu.org>
9604 * src/bison.s1: *** empty log message ***
9606 1993-07-04 Richard Stallman <rms@gnu.org>
9608 * bison.simple: *** empty log message ***
9610 1993-06-26 David J. MacKenzie <djm@gnu.org>
9612 * src/getargs.c: entered into RCS
9614 1993-06-26 David J. MacKenzie <djm@gnu.org>
9616 * doc/bison.texinfo: *** empty log message ***
9618 * doc/bison.1: New file.
9620 1993-06-25 Richard Stallman <rms@gnu.org>
9622 * src/getargs.c: New file.
9624 1993-06-16 Richard Stallman <rms@gnu.org>
9626 * src/bison.s1: *** empty log message ***
9628 1993-06-16 Richard Stallman <rms@gnu.org>
9630 * bison.simple: *** empty log message ***
9632 1993-06-03 Richard Stallman <rms@gnu.org>
9634 * src/bison.s1: New file.
9636 1993-06-03 Richard Stallman <rms@gnu.org>
9638 * doc/bison.texinfo: *** empty log message ***
9640 1993-06-03 Richard Stallman <rms@gnu.org>
9642 * bison.simple: New file.
9644 1993-05-19 Richard Stallman <rms@gnu.org>
9646 * doc/bison.texinfo: New file.
9648 1993-05-07 Noah Friedman <friedman@gnu.org>
9650 * Makefile.in: *** empty log message ***
9652 1993-04-28 Noah Friedman <friedman@gnu.org>
9654 * src/reader.c: *** empty log message ***
9656 1993-04-23 Noah Friedman <friedman@gnu.org>
9658 * src/alloc.h: entered into RCS
9660 1993-04-20 David J. MacKenzie <djm@gnu.org>
9662 * src/version.c: *** empty log message ***
9664 * src/files.c, src/allocate.c:
9667 * src/reader.c: *** empty log message ***
9669 * src/lex.c: entered into RCS
9671 * src/conflicts.c: New file.
9673 * src/symtab.c: entered into RCS
9675 * src/alloc.h: New file.
9677 * src/LR0.c: entered into RCS
9679 1993-04-18 Noah Friedman <friedman@gnu.org>
9681 * src/reader.c: New file.
9683 * src/version.c: *** empty log message ***
9685 1993-04-18 Noah Friedman <friedman@gnu.org>
9687 * Makefile.in: *** empty log message ***
9689 1993-04-17 Noah Friedman <friedman@gnu.org>
9691 * Makefile.in: *** empty log message ***
9693 1993-04-15 Richard Stallman <rms@gnu.org>
9695 * src/main.c, src/files.c:
9698 1993-04-15 Noah Friedman <friedman@gnu.org>
9700 * configure.in: entered into RCS
9702 * configure.in: *** empty log message ***
9704 * configure.in: New file.
9706 1993-04-14 Richard Stallman <rms@gnu.org>
9708 * Makefile.in: New file.
9710 1993-04-13 Richard Stallman <rms@gnu.org>
9712 * src/version.c: New file.
9714 1993-03-25 Richard Stallman <rms@gnu.org>
9716 * src/output.c: entered into RCS
9718 1992-09-25 Richard Stallman <rms@gnu.org>
9720 * configure.bat: entered into RCS
9722 1992-06-22 Richard Stallman <rms@gnu.org>
9724 * src/vmsgetargs.c: entered into RCS
9726 1992-06-22 Richard Stallman <rms@gnu.org>
9728 * doc/bison.rnh: entered into RCS
9730 1992-04-20 David J. MacKenzie <djm@gnu.org>
9732 * README: entered into RCS
9734 1992-01-22 Richard Stallman <rms@gnu.org>
9736 * src/machine.h: entered into RCS
9738 1991-12-21 Richard Stallman <rms@gnu.org>
9740 * src/lalr.c, src/closure.c:
9743 1991-12-20 Richard Stallman <rms@gnu.org>
9745 * src/state.h: entered into RCS
9747 1991-12-18 Richard Stallman <rms@gnu.org>
9749 * src/print.c, src/nullable.c, src/derives.c:
9752 1991-11-03 David J. MacKenzie <djm@gnu.org>
9754 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
9757 1988-09-09 Richard Stallman <rms@gnu.org>
9759 * src/bison.hairy: entered into RCS
9761 1987-12-16 Richard Stallman <rms@gnu.org>
9763 * REFERENCES: entered into RCS
9766 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
9768 This file is part of GNU Bison.
9770 GNU Bison is free software; you can redistribute it and/or modify
9771 it under the terms of the GNU General Public License as published by
9772 the Free Software Foundation; either version 2, or (at your option)
9775 GNU Bison is distributed in the hope that it will be useful,
9776 but WITHOUT ANY WARRANTY; without even the implied warranty of
9777 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9778 GNU General Public License for more details.
9780 You should have received a copy of the GNU General Public License
9781 along with GNU Bison; see the file COPYING. If not, write to
9782 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
9783 Boston, MA 02111-1307, USA.