]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
Regen.
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-03-04 Akim Demaille <akim@epita.fr>
2
3 * tests/sets.at (Broken Closure): Add the ending `;'.
4 * src/reader.at (readgram): Complain if a rule is not ended with a
5 semi-colon.
6
72002-03-04 Akim Demaille <akim@epita.fr>
8
9 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
10 (count_sr_conflicts): Use bitset_count.
11 * src/reduce.c (inaccessable_symbols): Ditto.
12 (bits_size): Remove.
13 * src/warshall.h, src/warshall.c: Convert to bitsetv.
14
152002-03-04 Akim Demaille <akim@epita.fr>
16
17 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18 * src/reduce.c: Remove the `bitset_zero's following the
19 `bitset_create's, as now it is performed by the latter.
20
212002-03-04 Akim Demaille <akim@epita.fr>
22
23 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
24 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
25 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
26 latest sources from Michael.
27
282002-03-04 Akim Demaille <akim@epita.fr>
29
30 * src/output.c (output): Don't free the grammar.
31 * src/reader.c (grammar_free): New.
32 * src/main.c (main): Call it and don't free symtab here.
33
342002-03-04 Akim Demaille <akim@epita.fr>
35
36 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
37 before returning.
38 Reported by Benoit Perrot.
39
402002-03-04 Akim Demaille <akim@epita.fr>
41
42 Use bitset operations when possible, not loops over bits.
43
44 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
45 bitset_or.
46 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
47 * src/reduce.c (useless_nonterminals): Formatting changes.
48 * src/warshall.c (TC): Use bitset_or.
49
502002-03-04 Akim Demaille <akim@epita.fr>
51
52 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
53 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
54 Ditto.
55
562002-03-04 Akim Demaille <akim@epita.fr>
57
58 * src/lalr.c (F): Now a bitset*.
59 Adjust all dependencies.
60
612002-03-04 Akim Demaille <akim@epita.fr>
62
63 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
64 Adjust all dependencies.
65
662002-03-04 Akim Demaille <akim@epita.fr>
67
68 * src/L0.c, src/LR0.h (nstates): Be size_t.
69 Adjust comparisons (signed vs unsigned).
70 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
71 bitset*.
72 Adjust all dependencies.
73
742002-03-04 Akim Demaille <akim@epita.fr>
75
76 * src/closure.c (firsts): Now, also a bitset.
77 Adjust all dependencies.
78 (varsetsize): Remove, now unused.
79 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
80
812002-03-04 Akim Demaille <akim@epita.fr>
82
83 * src/print.c: Convert to use bitset.h, not hand coded iterations
84 over ints.
85
862002-03-04 Akim Demaille <akim@epita.fr>
87
88 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
89
902002-03-04 Akim Demaille <akim@epita.fr>
91
92 * src/closure.c (ruleset): Be a bitset.
93 (rulesetsize): Remove.
94
952002-03-04 Akim Demaille <akim@epita.fr>
96
97 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
98 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
99 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
100 * src/closure.c (fderives): Be an array of bitsets.
101
1022002-02-28 Robert Anisko <robert@lrde.epita.fr>
103
104 * data/bison.c++: Merge the two generated headers. Insert a copyright
105 notice in each output file.
106
1072002-02-28 Akim Demaille <akim@epita.fr>
108
109 * data/bison.c++: Copy the prologue of bison.simple to fetch
110 useful M4 definitions, such as b4_header_guard.
111
1122002-02-25 Akim Demaille <akim@epita.fr>
113
114 * src/getargs.c (version): Give the name of the authors, and use a
115 translator friendly scheme for the bgr
116 copyright notice.
117
1182002-02-25 Akim Demaille <akim@epita.fr>
119
120 * src/output.c (header_output): Remove, now handled completely via
121 M4.
122
1232002-02-25 Akim Demaille <akim@epita.fr>
124
125 * m4/m4.m4: New, from CVS Autoconf.
126 * configure.in: Invoke it.
127 * src/output.c (output_skeleton): Use its result instead of the
128 hard coded name.
129
1302002-02-25 Akim Demaille <akim@epita.fr>
131
132 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
133 Fileutils 4.1.5.
134 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
135 * src/output.c (output_skeleton): Use mkstemp to create a real
136 temporary file.
137 Move the filling of `skeleton' and its muscle to...
138 (prepare): here.
139 (output): Move the definition of the prologue muscle to...
140 (prepare): here.
141 * src/system.h (DEFAULT_TMPDIR): New.
142
1432002-02-14 Paul Eggert <eggert@twinsun.com>
144
145 Remove the support for C++ namespace cleanliness; it was
146 causing more problems than it was curing, since it didn't work
147 properly on some nonstandard C++ compilers. This can wait
148 for a proper C++ parser.
149
150 * NEWS: Document this.
151 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
152 of C++, as it's treated like C now.
153 * src/bison.simple (YYSTD): Remove.
154 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
155 Treat C++ just like Standard C instead of trying to support
156 namespace cleanliness.
157
1582002-02-14 Akim Demaille <akim@epita.fr>
159
160 * tests/regression.at (else): Adjust to Andreas' change.
161
1622002-02-14 Akim Demaille <akim@epita.fr>
163
164 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
165
1662002-02-13 Andreas Schwab <schwab@suse.de>
167
168 * src/output.c (output_rule_data): Don't output NULL, it might
169 not be defined yet.
170
1712002-02-11 Robert Anisko <robert@lrde.epita.fr>
172
173 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
174 (Copyright notice): Update.
175
1762002-02-11 Akim Demaille <akim@epita.fr>
177
178 * tests/regression.at (%nonassoc and eof): Don't include
179 nonportable headers.
180
1812002-02-08 Robert Anisko <robert@lrde.epita.fr>
182
183 * data/bison.c++: Correct error recovery. Make the user able to
184 initialize the starting location.
185
1862002-02-07 Akim Demaille <akim@epita.fr>
187
188 * tests/input.at: New.
189
1902002-02-07 Robert Anisko <robert@lrde.epita.fr>
191
192 * data/bison.c++: Replace some direct m4 expansions by constants. Be
193 more consistent when naming methods and variables. Put preprocessor
194 directives around tables only needed for debugging.
195
1962002-02-07 Robert Anisko <robert@lrde.epita.fr>
197
198 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
199 C++ parsers.
200 (yy::b4_name::parse): Use print_.
201
2022002-02-07 Robert Anisko <robert@lrde.epita.fr>
203
204 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
205
2062002-02-07 Robert Anisko <robert@lrde.epita.fr>
207
208 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
209 C++ parsers.
210 (yy::b4_name::parse): Build verbose error messages, and use error_.
211
2122002-02-06 Robert Anisko <robert@lrde.epita.fr>
213
214 * data/bison.c++: Fix m4 quoting in comments.
215
2162002-02-06 Robert Anisko <robert@lrde.epita.fr>
217
218 * data/bison.c++: Adjust the parser code. Fix some muscles that were
219 not expanded by m4.
220
2212002-02-05 Akim Demaille <akim@epita.fr>
222
223 * data/bison.c++: Adjust to the M4 back end.
224 More is certainly needed.
225
2262002-02-05 Akim Demaille <akim@epita.fr>
227
228 Give a try to M4 as a back end.
229
230 * lib/readpipe.c: New, from wdiff.
231 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
232 BISON_HAIRY.
233 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
234 specific values. Now it is m4 that performs the lookup.
235 * src/parse-skel.y: Remove.
236 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
237 * src/output.c (actions_output, guards_output)
238 (token_definitions_output): No longer keeps track of the output
239 line number, hence remove the second argument.
240 (guards_output): Check against the guard member of a rule, not the
241 action member.
242 Adjust callers.
243 (output_skeleton): Don't look for the skeleton location, let m4 do
244 that.
245 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
246 file will be used.
247 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
248 (prepare): Given that for the time being changesyntax is not
249 usable in M4, rename the muscles using `-' to `_'.
250 Define `defines_flag', `output_parser_name' and `output_header_name'.
251 * src/output.h (actions_output, guards_output)
252 (token_definitions_output): Adjust prototypes.
253 * src/scan-skel.l: Instead of scanning the skeletons, it now
254 processes the output of m4: `__oline__' and `#output'.
255 * data/bison.simple: Adjust to be used by M4(sugar).
256 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
257 to date.
258 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
259 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
260 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
261 shamelessly stolen from CVS Autoconf.
262
2632002-02-05 Akim Demaille <akim@epita.fr>
264
265 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
266 * configure.in: Check for the declarations of free and malloc.
267 * src/muscle_tab.c: Adjust.
268
2692002-02-05 Akim Demaille <akim@epita.fr>
270
271 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
272 which have no values.
273
2742002-02-05 Akim Demaille <akim@epita.fr>
275
276 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
277 * data/: here.
278
2792002-01-29 Paul Eggert <eggert@twinsun.com>
280
281 * src/bison.simple (YYSIZE_T): Do not define merely because
282 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
283 On some platforms, <alloca.h> does not declare YYSTD (size_t).
284
2852002-01-27 Akim Demaille <akim@epita.fr>
286
287 Fix `%nonassoc and eof'.
288
289 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
290 which were not properly copied! Replace
291 memcpy (res->errs, src->errs, src->nerrs);
292 with
293 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
294 !!!
295 * tests/regression.at (%nonassoc and eof): Adjust to newest
296 Autotest: `.' is not in the PATH.
297
2982002-01-27 Akim Demaille <akim@epita.fr>
299
300 * tests/sets.at (AT_EXTRACT_SETS): New.
301 (Nullable): Use it.
302 (Firsts): New.
303
3042002-01-26 Akim Demaille <akim@epita.fr>
305
306 * tests/actions.at, tests/calc.at, tests/headers.at,
307 * tests/torture.at: Adjust to the newest Autotest which no longer
308 forces `.' in the PATH.
309
3102002-01-25 Akim Demaille <akim@epita.fr>
311
312 * tests/regression.at (%nonassoc and eof): New.
313 Suggested by Robert Anisko.
314
3152002-01-24 Akim Demaille <akim@epita.fr>
316
317 Bison dumps core when trying to complain about broken input files.
318 Reported by Cris van Pelt.
319
320 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
321 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
322 into...
323 (Invalid inputs): Strengthen: exercise parse_percent_token.
324
3252002-01-24 Robert Anisko <robert.anisko@epita.fr>
326
327 * src/Makefile.am: Add bison.c++.
328 * src/bison.c++: New skeleton.
329
3302002-01-21 Paolo Bonzini <bonzini@gnu.org>
331
332 * po/it.po: New.
333
3342002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
335
336 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
337
3382002-01-20 Marc Autret <marc@gnu.org>
339
340 * src/files.c (compute_output_file_names): Fix
341
3422002-01-20 Marc Autret <marc@gnu.org>
343
344 * tests/output.at: New test.
345 * src/files.c (compute_base_names): Don't map extensions when
346 the YACC flag is set, use defaults.
347 Reported by Evgeny Stambulchik.
348
3492002-01-20 Marc Autret <marc@gnu.org>
350
351 * src/system.h: Need to define __attribute__ away for non-GCC
352 compilers as well (i.e. the vendor C compiler).
353 Suggested by Albert Chin-A-Young.
354
3552002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
356
357 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
358 canonical definition.
359 * src/system.h: Use the canonical definition for PARAMS (avoids
360 a conflict with the macro from lib/hash.h).
361
3622002-01-11 Akim Demaille <akim@epita.fr>
363
364 * configure.in: Use AC_FUNC_STRNLEN.
365 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
366
3672002-01-09 Akim Demaille <akim@epita.fr>
368
369 * src/files.c, src/files.h (output_infix): New.
370 (tab_extension): Remove.
371 (compute_base_names): Compute the former, drop the latter.
372 * src/output.c (prepare): Insert the muscles `output-infix', and
373 `output-suffix'.
374 * src/parse-skel.y (string, string.1): New.
375 (section.header): Use it.
376 (section.yacc): Remove.
377 (prefix): Remove too.
378 * src/scan-skel.l: Adjust.
379 * src/bison.simple, src/bison.hairy: Adjust.
380
3812002-01-09 Akim Demaille <akim@epita.fr>
382
383 * configure.in (WERROR_CFLAGS): Compute it.
384 * src/Makefile.am (CFLAGS): Pass it.
385 * tests/atlocal.in (CFLAGS): Idem.
386 * src/files.c: Fix a few warnings.
387 (get_extension_index): Remove, unused.
388
3892002-01-08 Akim Demaille <akim@epita.fr>
390
391 * src/getargs.c (AS_FILE_NAME): New.
392 (getargs): Use it to convert DOSish file names.
393 * src/files.c (base_name): Rename as full_base_name to avoid
394 clashes with `base_name ()'.
395 (filename_split): New.
396 (compute_base_names): N-th rewrite, using filename_split.
397
3982002-01-08 Akim Demaille <akim@epita.fr>
399
400 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
401 New, stolen from the Fileutils 4.1.
402 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
403 * configure.in: Check for the presence of memrchr, and of its
404 prototype.
405
4062002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
407
408 * lib/hash.h (__P): Added definition for this macro.
409 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
410 BUILT_SOURCES, to ensure they are generated first.
411 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
412 %error-verbose to allow bootstrapping with bison 1.30x.
413
4142002-01-06 Akim Demaille <akim@epita.fr>
415
416 * src/reader.c (parse_braces): Don't fetch the next char, the
417 convention is to fetch on entry.
418 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
419 'switch' without a following semicolon.
420 * tests/regression.at (braces parsing): New.
421
4222002-01-06 Akim Demaille <akim@epita.fr>
423
424 Bison is dead wrong in its RR conflict reports.
425
426 * tests/torture.at (GNU Cim Grammar): New.
427 * src/conflicts.c (count_rr_conflicts): Fix.
428
4292002-01-06 Akim Demaille <akim@epita.fr>
430
431 Creating package.m4 from configure.ac causes too many problems.
432
433 * tests/Makefile.am (package.m4): Create it by hand,
434 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
435
4362002-01-06 Akim Demaille <akim@epita.fr>
437
438 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
439 skeleton.h.
440
4412002-01-04 Paul Eggert <eggert@twinsun.com>
442
443 * doc/bison.texinfo (Debugging):
444 Remove YYSTDERR; it's no longer defined or used.
445 Also, s/cstdio.h/cstdio/.
446
4472002-01-03 Akim Demaille <akim@epita.fr>
448
449 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
450
4512002-01-03 Akim Demaille <akim@epita.fr>
452
453 * src/parse-skel.y (process_skeleton): Don't bind the parser's
454 tracing code to --trace, wait for a better --trace option, with
455 args.
456
4572002-01-03 Akim Demaille <akim@epita.fr>
458
459 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
460 The ISO C++ standard is extremely clear about it: stderr is
461 considered a macro, not a regular symbol (see table 94 `Header
462 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
463 Therefore std:: does not apply to it. It still does with fprintf.
464 Also, s/cstdio.h/cstdio/.
465
4662002-01-03 Akim Demaille <akim@epita.fr>
467
468 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
469 for non system headers.
470
4712002-01-02 Akim Demaille <akim@epita.fr>
472
473 Equip the skeleton chain with location tracking, runtime trace,
474 pure parser and scanner.
475
476 * src/parse-skel.y: Request a pure parser, locations, and prefix
477 renaming.
478 (%union): Having several members with the same type does not help
479 type mismatches, simplify.
480 (YYPRINT, yyprint): New.
481 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
482 (skel_error): this.
483 Handle locations.
484 * src/scan-skel.l: Adjust to these changes.
485 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
486 (LOCATION_PRINT, skel_control_t): New.
487
4882001-12-30 Akim Demaille <akim@epita.fr>
489
490 * src/parse-skel.y: Get rid of the shift/reduce conflict:
491 replace `gb' with BLANKS.
492 * src/scan-skel.l: Adjust.
493
4942001-12-30 Akim Demaille <akim@epita.fr>
495
496 * src/system.h: We don't need nor want bcopy.
497 Throw away MS-DOS crap: we don't need getpid.
498 * configure.in: We don't need strndup. It was even causing
499 problems: because Flex includes the headers *before* us,
500 _GNU_SOURCE is not defined by config.h, and therefore strndup was
501 not visible.
502 * lib/xstrndup.c: New.
503 * src/scan-skel.l: Use it.
504 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
505 * src/parse-skel.y: Use %directives instead of #defines.
506
5072001-12-30 Akim Demaille <akim@epita.fr>
508
509 * src/skeleton.h: New.
510 * src/output.c (output_parser, output_master_parser): Remove, dead
511 code.
512 * src/output.h (get_lines_number, actions_output, guards_output)
513 (token_definitions_output): Prototype them.
514 * src/parse-skel.y: Add the license notice.
515 Include output.h and skeleton.h.
516 (process_skeleton): Returns void, and takes a single parameter.
517 * src/scan-skel.l: Add the license notice.
518 Include skeleton.h.
519 Don't use %option yylineno: it seems that then Flex imagines
520 REJECT has been used, and therefore it won't reallocate its
521 buffers (which makes no other sense to me than a bug). It results
522 in warnings for `unused: yy_flex_realloc'.
523
5242001-12-30 Robert Anisko <robert.anisko@epita.fr>
525
526 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
527 (MUSCLE_INSERT_PREFIX): ...to there.
528 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
529 (MUSCLE_INSERT_PREFIX): Move from here...
530
531 * src/bison.hairy: Add a section directive. Put braces around muscle
532 names. This parser skeleton is still broken, but Bison should not
533 choke on a bad muscle 'syntax'.
534 * src/bison.simple: Add a section directive. Put braces around muscle
535 names.
536
537 * src/files.h (strsuffix, stringappend): Add declarations.
538 (tab_extension): Add declaration.
539 (short_base_name): Add declaration.
540
541 * src/files.c (strsuffix, stringappend): No longer static. These
542 functions are used in the skeleton parser.
543 (tab_extension): New.
544 (compute_base_names): Use the computations done in this function
545 to guess if the generated parsers should have '.tab' in their
546 names.
547 (short_base_name): No longer static.
548
549 * src/output.c (output_skeleton): New.
550 (output): Disable call to output_master_parser, and give a try to
551 a new skeleton handling system.
552 (guards_output, actions_output): No longer static.
553 (token_definitions_output, get_lines_number): No longer static.
554
555 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
556
557 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
558 parse-skel.y.
559
560 * src/parse-skel.y: New file.
561 * src/scan-skel.l: New file.
562
5632001-12-29 Akim Demaille <akim@epita.fr>
564
565 %name-prefix is broken.
566
567 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
568 Adjust all dependencies.
569 * tests/headers.at (export YYLTYPE): Strengthen this test: use
570 %name-prefix.
571
572 Renaming yylval but not yylloc is not consistent. Now we do.
573
574 * src/bison.simple: Prefix yylloc if used.
575 * doc/bison.texinfo (Decl Summary): Document that.
576
5772001-12-29 Akim Demaille <akim@epita.fr>
578
579 * doc/bison.texinfo: Promote `%long-directive' over
580 `%long_directive'.
581 Remove all references to fixed-output-files, yacc is enough.
582
5832001-12-29 Akim Demaille <akim@epita.fr>
584
585 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
586 user prologue. These are defaults.
587 * tests/actions.at (Mid-rule actions): Make sure the user can
588 define YYDEBUG and YYERROR_VERBOSE.
589
5902001-12-29 Akim Demaille <akim@epita.fr>
591
592 * src/output.c (header_output): Don't forget to export YYLTYPE and
593 yylloc.
594 * tests/headers.at (export YYLTYPE): New, make sure it does.
595 * tests/regression.at (%union and --defines, Invalid CPP headers):
596 Move to...
597 * tests/headers.at: here.
598
5992001-12-29 Akim Demaille <akim@epita.fr>
600
601 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
602
6032001-12-29 Akim Demaille <akim@epita.fr>
604
605 * tests/actions.at (Mid-rule actions): Output on a single line
606 instead of several.
607
6082001-12-29 Akim Demaille <akim@epita.fr>
609
610 * doc/bison.texinfo: Formatting changes.
611
6122001-12-29 Akim Demaille <akim@epita.fr>
613
614 Don't store the token defs in a muscle, just be ready to output it
615 on command. Now possible via `symbols'. Fixes a memory leak.
616
617 * src/output.c (token_definitions_output): New.
618 (output_parser, header_output): Use it.
619 * src/reader.c (symbols_save): Remove.
620
6212001-12-29 Akim Demaille <akim@epita.fr>
622
623 * src/bison.simple: Do not provide a default for YYSTYPE and
624 YYLTYPE before the user's prologue. Otherwise it's hardly... a
625 default.
626
6272001-12-29 Akim Demaille <akim@epita.fr>
628
629 Mid-rule actions are simply... ignored!
630
631 * src/reader.c (readgram): Be sure to attach mid-rule actions to
632 the empty-rule associated to the dummy symbol, not to the host
633 rule.
634 * tests/actions.at (Mid-rule actions): New.
635
6362001-12-29 Akim Demaille <akim@epita.fr>
637
638 Memory leak.
639
640 * src/reader.c (reader): Free grammar.
641
6422001-12-29 Akim Demaille <akim@epita.fr>
643
644 Memory leak.
645
646 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
647 since it allocates it for each state, although only one is needed.
648 (allocate_storage): Do it here.
649
6502001-12-29 Akim Demaille <akim@epita.fr>
651
652 * src/options.h, src/options.c (create_long_option_table): Rename
653 as...
654 (long_option_table_new): this, with a clearer prototype.
655 (percent_table): Remove, unused,
656 * src/getargs.c (getargs): Adjust.
657
6582001-12-29 Akim Demaille <akim@epita.fr>
659
660 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
661 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
662 as states.
663
6642001-12-29 Akim Demaille <akim@epita.fr>
665
666 * src/lalr.c (build_relations): Rename `states' as `states1'.
667 Sorry, I don't understand exactly what it is, no better name...
668
6692001-12-29 Akim Demaille <akim@epita.fr>
670
671 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
672 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
673 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
674 as rules.
675
6762001-12-29 Akim Demaille <akim@epita.fr>
677
678 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
679 ago.
680
6812001-12-29 Akim Demaille <akim@epita.fr>
682
683 * src/reader.c, src/reader.h (user_toknums): Remove.
684 Adjust all users to use symbols[i]->user_token_number.
685
6862001-12-29 Akim Demaille <akim@epita.fr>
687
688 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
689 Adjust all users to use symbols[i]->prec or ->assoc.
690
6912001-12-29 Akim Demaille <akim@epita.fr>
692
693 * src/reader.c, src/reader.h (tags): Remove.
694 Adjust all users to use symbols[i]->tag.
695
6962001-12-29 Akim Demaille <akim@epita.fr>
697
698 * src/gram.h, src/gram.c (symbols): New, similar to state_table
699 and rule_table.
700 * src/reader.c (packsymbols): Fill this table.
701 Drop sprec.
702 * src/conflicts.c (resolve_sr_conflict): Adjust.
703 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
704 single table.
705 Use symbols[i]->tag instead of tags[i].
706
7072001-12-29 Akim Demaille <akim@epita.fr>
708
709 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
710 In addition, put a comment in there, to replace...
711 * tests/regression.at (%union and C comments): Remove.
712
7132001-12-29 Akim Demaille <akim@epita.fr>
714
715 * tests/regression.at (Web2c Actions): Blindly move the actual
716 output as expected output. The contents *seem* right to me, but I
717 can't pretend reading perfectly parser tables... Nonetheless, all
718 the other tests pass correctly, the table look OK, even though the
719 presence of `$axiom' is to be noted: AFAICS it is useless (but
720 harmless).
721
7222001-12-29 Akim Demaille <akim@epita.fr>
723
724 * src/reader.c (readgram): Don't add the rule 0 if there were no
725 rules read. In other words, add it _after_ having performed
726 grammar sanity checks.
727 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
728
7292001-12-29 Akim Demaille <akim@epita.fr>
730
731 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
732 visible, and some states have now a different number.
733
7342001-12-29 Akim Demaille <akim@epita.fr>
735
736 * src/reader.c (readgram): Bind the initial rule's lineno to that
737 of the first rule.
738 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
739 (Solved SR Conflicts): Adjust rule 0's line number.
740
7412001-12-29 Akim Demaille <akim@epita.fr>
742
743 Fix the `GAWK Grammar' failure.
744
745 * src/LR0.c (final_state): Initialize to -1 so that we do compute
746 the reductions of the first state which was mistakenly confused
747 with the final state because precisely final_state was initialized
748 to 0.
749 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
750 now noticed by Bison.
751 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
752 have a reduction on $default.
753
7542001-12-29 Akim Demaille <akim@epita.fr>
755
756 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
757 rule line numbers.
758 * src/closure.c (print_closure): Likewise.
759 * src/derives.c (print_derives): Likewise.
760 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
761 now.
762
7632001-12-29 Akim Demaille <akim@epita.fr>
764
765 * src/lalr.c (lookaheads_print): New.
766 (lalr): Call it when --trace-flag.
767 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
768 are dumped.
769
7702001-12-29 Akim Demaille <akim@epita.fr>
771
772 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
773 when walking through ritem, even via rule->rhs.
774 * src/reduce.c (dump_grammar, useful_production, reduce_output)
775 (useful_production, useless_nonterminals): Likewise.
776 (reduce_grammar_tables): Likewise, plus update nritems.
777 * src/nullable.c (set_nullable): Likewise.
778 * src/lalr.c (build_relations): Likewise.
779 * tests/sets.at (Nullable): Adjust.
780 Fortunately, now, the $axiom is no longer nullable.
781
7822001-12-29 Akim Demaille <akim@epita.fr>
783
784 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
785 the 0-sentinel.
786 * src/gram.c (ritem_longest_rhs): Likewise.
787 * src/reduce.c (nonterminals_reduce): Likewise.
788 * src/print_graph.c (print_graph): Likewise.
789 * src/output.c (output_rule_data): Likewise.
790 * src/nullable.c (set_nullable): Likewise.
791
7922001-12-29 Akim Demaille <akim@epita.fr>
793
794 * src/output.c: Comment changes.
795
7962001-12-27 Paul Eggert <eggert@twinsun.com>
797
798 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
799 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
800 Sparc, as they were causing more porting problems than the
801 (minor) performance improvement was worth.
802
803 Also, catch up with 1.31's YYSTD.
804
8052001-12-27 Akim Demaille <akim@epita.fr>
806
807 * src/output.c (output_gram): Rely on nritems, not the
808 0-sentinel. See below.
809 Use -1 as separator, not 0.
810 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
811 Rely on -1 as separator in yyrhs, instead of 0.
812 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
813 twice `Now at end of input', therefore there are two lines less to
814 expect.
815
8162001-12-27 Akim Demaille <akim@epita.fr>
817
818 * tests/regression.at (Unresolved SR Conflicts):
819 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
820 below.
821
8222001-12-27 Akim Demaille <akim@epita.fr>
823
824 * src/LR0.c (new_state): Recognize the final state by the fact it
825 is reached by eoftoken.
826 (insert_start_shifting_state, insert_eof_shifting_state)
827 (insert_accepting_state, augment_automaton): Remove, since now
828 these states are automatically computed from the initial state.
829 (generate_states): Adjust.
830 * src/print.c: When reporting a rule number to the user, substract
831 1, so that the axiom rule is rule 0, and the first user rule is 1.
832 * src/reduce.c: Likewise.
833 * src/print_graph.c (print_core): For the time being, just as for
834 the report, depend upon --trace-flags to dump the full set of
835 items.
836 * src/reader.c (readgram): Once the grammar read, insert the rule
837 0: `$axiom: START-SYMBOL $'.
838 * tests/set.at: Adjust: rule 0 is now displayed, and since the
839 number of the states has changed (the final state is no longer
840 necessarily the last), catch up.
841
8422001-12-27 Akim Demaille <akim@epita.fr>
843
844 Try to make the use of the eoftoken valid. Given that its value
845 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
846 is used instead of > 0 where appropriate, (ii), depend upon nritems
847 instead of the 0-sentinel.
848
849 * src/gram.h, src/gram.c (nritems): New.
850 Expected to be duplication of nitems, but for the time being...
851 * src/reader.c (packgram): Assert nritems and nitems are equal.
852 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
853 * src/closure.c (print_closure, print_fderives): Likewise.
854 * src/gram.c (ritem_print): Likewise.
855 * src/print.c (print_core, print_grammar): Likewise.
856 * src/print_graph.c: Likewise.
857
8582001-12-27 Akim Demaille <akim@epita.fr>
859
860 * src/main.c (main): If there are complains after grammar
861 reductions, then output the report anyway if requested, then die.
862 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
863 * src/reader.c (eoftoken): New.
864 (parse_token_decl): If the token being defined has value `0', it
865 is the eoftoken.
866 (packsymbols): No longer hack `tags' to insert `$' by hand.
867 Be sure to preserve the value of the eoftoken.
868 (reader): Make sure eoftoken is defined.
869 Initialize nsyms to 0: now eoftoken is created just like the others.
870 * src/print.c (print_grammar): Don't special case the eof token.
871 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
872 lie anyway, albeit pleasant.
873 * tests/calc.at: Exercise error messages with eoftoken.
874 Change the grammar so that empty input is invalid.
875 Adjust expectations.
876 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
877
8782001-12-27 Akim Demaille <akim@epita.fr>
879
880 * configure.in: Check the protos of strchr ans strspn.
881 Replace strchr if needed.
882 * src/system.h: Provide the protos of strchr, strspn and memchr if
883 missing.
884 * lib/strchr.c: New.
885 * src/reader.c (symbols_save): Use strchr.
886
8872001-12-27 Akim Demaille <akim@epita.fr>
888
889 * src/print.c, src/print_graph.c (escape): New.
890 Use it to quote the TAGS outputs.
891 * src/print_graph.c (print_state): Now errors are in red, and
892 reductions in green.
893 Prefer high to wide: output the state number on a line of its own.
894
8952001-12-27 Akim Demaille <akim@epita.fr>
896
897 * src/state.h, src/state.c (reductions_new): New.
898 * src/LR0.c (set_state_table): Let all the states have a
899 `reductions', even if reduced to 0.
900 (save_reductions): Adjust.
901 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
902 * src/print.c (print_reductions, print_actions): Adjust.
903 * src/output.c (action_row): Adjust.
904
9052001-12-27 Akim Demaille <akim@epita.fr>
906
907 * src/state.h, src/state.c (errs_new, errs_dup): New.
908 * src/LR0.c (set_state_table): Let all the states have an errs,
909 even if reduced to 0.
910 * src/print.c (print_errs, print_reductions): Adjust.
911 * src/output.c (output_actions, action_row): Adjust.
912 * src/conflicts.c (resolve_sr_conflict): Adjust.
913
9142001-12-27 Akim Demaille <akim@epita.fr>
915
916 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
917
9182001-12-27 Akim Demaille <akim@epita.fr>
919
920 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
921 * src/print.c: here.
922 (lookaheadset, shiftset): New, used as additional storage by
923 print_reductions.
924 (print_results): Adjust.
925 (print_shifts, print_gotos, print_errs): New, extracted from...
926 (print_actions): here.
927 * src/print_graph.c (print_actions): Remove dead code.
928
9292001-12-27 Akim Demaille <akim@epita.fr>
930
931 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
932 `$n' and `@n'.
933
9342001-12-27 Akim Demaille <akim@epita.fr>
935
936 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
937 (build_relations): Adjust.
938
9392001-12-27 Akim Demaille <akim@epita.fr>
940
941 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
942 duplication.
943
9442001-12-27 Akim Demaille <akim@epita.fr>
945
946 * src/reader.c (packgram): Catch nitems overflows.
947
9482001-12-27 Akim Demaille <akim@epita.fr>
949
950 * src/files.c, src/files.h (guard_obstack): Remove.
951 * src/output.c (output): Adjust.
952 * src/reader.c (parse_braces): New, factoring...
953 (copy_action, copy_guard): these two which are renamed as...
954 (parse_action, parse_guard): these.
955 As a voluntary consequence, using braces around guards is now
956 mandatory.
957
9582001-12-27 Akim Demaille <akim@epita.fr>
959
960 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
961 * src/reader.c (symbol_list): `guard' and `guard_line' are new
962 members.
963 (symbol_list_new): Adjust.
964 (copy_action): action_line is the first line, not the last.
965 (copy_guard): Just as for actions, store the `action' only, not
966 the switch/case/break flesh.
967 Don't parse the user action that might follow the guard, let...
968 (readgram): do it, i.e., now, there can be an action after a
969 guard.
970 In other words the guard is just explicitly optional.
971 (packgram): Adjust.
972 * src/output.c (guards_output): New.
973 (output_parser): Call it when needed.
974 (output): Also free the guard and attrs obstacks.
975 * src/files.c, src/files.h (obstack_save): Remove.
976 (output_files): Remove.
977 As a result, if one needs the former `.act' file, using an
978 appropriate skeleton which requires actions and guards is now
979 required.
980 * src/main.c (main): Adjust.
981 * tests/semantic.at: New.
982 * tests/regression.at: Use `input.y' as input file name.
983 Avoid 8+3 problems by requiring input.c when the test needs the
984 parser.
985
9862001-12-27 Akim Demaille <akim@epita.fr>
987
988 * src/reader.c (symbol_list_new): Be sure to initialize all the
989 fields.
990
9912001-12-27 Akim Demaille <akim@epita.fr>
992
993 All the hacks using a final pseudo state are now useless.
994
995 * src/LR0.c (set_state_table): state_table holds exactly nstates.
996 * src/lalr.c (nLA): New.
997 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
998 instead of lookaheadsp from the pseudo state (nstate + 1).
999
10002001-12-27 Akim Demaille <akim@epita.fr>
1001
1002 * src/output.c (action_row, token_actions): Use a state_t instead
1003 of a integer, and nlookaheads instead of the following state's
1004 lookaheadsp.
1005
10062001-12-27 Akim Demaille <akim@epita.fr>
1007
1008 * src/conflicts.c (log_resolution, flush_shift)
1009 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1010 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1011 (conflicts_print, print_reductions): Use a state_t instead of an
1012 integer when referring to a state.
1013 As much as possible, depend upon nlookaheads, instead of the
1014 `lookaheadsp' member of the following state (since lookaheads of
1015 successive states are successive, the difference between state n + 1
1016 and n served as the number of lookaheads for state n).
1017 * src/lalr.c (add_lookback_edge): Likewise.
1018 * src/print.c (print_core, print_actions, print_state)
1019 (print_results): Likewise.
1020 * src/print_graph.c (print_core, print_actions, print_state)
1021 (print_graph): Likewise.
1022 * src/conflicts.h: Adjust.
1023
10242001-12-27 Akim Demaille <akim@epita.fr>
1025
1026 * src/bison.hairy: Formatting/comment changes.
1027 ANSIfy.
1028 Remove `register' indications.
1029 Add plenty of `static'.
1030
10312001-12-27 Akim Demaille <akim@epita.fr>
1032
1033 * src/output.c (prepare): Drop the muscle `ntbase' which
1034 duplicates ntokens.
1035 * src/bison.simple: Formatting/comment changes.
1036 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1037 is an undocumented synonym.
1038
10392001-12-22 Akim Demaille <akim@epita.fr>
1040
1041 * src/output.c (output_table_data): Change the prototype to use
1042 `int' for array ranges: some invocations do pass an int, not a
1043 short.
1044 Reported by Wayne Green.
1045
10462001-12-22 Akim Demaille <akim@epita.fr>
1047
1048 Some actions of web2c.y are improperly triggered.
1049 Reported by Mike Castle.
1050
1051 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1052 * tests/regression.at (Web2c): Rename as...
1053 (Web2c Report): this.
1054 (Web2c Actions): New.
1055
10562001-12-22 Akim Demaille <akim@epita.fr>
1057
1058 Reductions in web2c.y are improperly reported.
1059 Reported by Mike Castle.
1060
1061 * src/conflicts.c (print_reductions): Fix.
1062 * tests/regression.at (Web2c): New.
1063
10642001-12-18 Akim Demaille <akim@epita.fr>
1065
1066 Some host fail on `assert (!"foo")', which expands to
1067 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1068 Reported by Nelson Beebee.
1069
1070 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1071 `#define it_succeeded 0' and `assert (it_succeeded)'.
1072
10732001-12-17 Marc Autret <autret_m@epita.fr>
1074
1075 * src/bison.simple: Don't hard code the skeleton line and filename.
1076 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1077 New line counter 'skeleton_line' (skeleton-line muscle).
1078
10792001-12-17 Paul Eggert <eggert@twinsun.com>
1080
1081 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1082 YYDEBUG must be defined to a nonzero value.
1083
1084 * src/bison.simple (yytname): Do not assume that the user defines
1085 YYDEBUG to a properly parenthesized expression.
1086
10872001-12-17 Akim Demaille <akim@epita.fr>
1088
1089 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1090 nlookaheads is a new member.
1091 Adjust all users.
1092 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1093 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1094 state.
1095
10962001-12-17 Akim Demaille <akim@epita.fr>
1097
1098 * src/files.h, src/files.c (open_files, close_files): Remove.
1099 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1100 let...
1101 * src/reader.c (reader): Do it.
1102
11032001-12-17 Akim Demaille <akim@epita.fr>
1104
1105 * src/conflicts.c (print_reductions): Formatting changes.
1106
11072001-12-17 Akim Demaille <akim@epita.fr>
1108
1109 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1110 (flush_reduce): New.
1111 (resolve_sr_conflict): Adjust.
1112
11132001-12-17 Akim Demaille <akim@epita.fr>
1114
1115 * src/output.c (output_obstack): Be static and rename as...
1116 (format_obstack): this, to avoid any confusion with files.c's
1117 output_obstack.
1118 * src/reader.h (muscle_obstack): Move to...
1119 * src/output.h: here, since it's defined in output.c.
1120
11212001-12-17 Akim Demaille <akim@epita.fr>
1122
1123 * src/output.c (action_row, save_column, default_goto)
1124 (sort_actions, matching_state, pack_vector): Better variable
1125 locality.
1126
11272001-12-17 Akim Demaille <akim@epita.fr>
1128
1129 * src/output.c: Various formatting changes.
1130
11312001-12-17 Akim Demaille <akim@epita.fr>
1132
1133 * src/files.c (output_files): Free the output_obstack.
1134 * src/main.c (main): Call print and print_graph conditionally.
1135 * src/print.c (print): Work unconditionally.
1136 * src/print_graph.c (print_graph): Work unconditionally.
1137 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1138
11392001-12-16 Marc Autret <autret_m@epita.fr>
1140
1141 * src/output.c (actions_output): Fix. When we use %no-lines,
1142 there is one less line per action.
1143
11442001-12-16 Marc Autret <autret_m@epita.fr>
1145
1146 * src/bison.simple: Remove a useless #line directive.
1147 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1148 * src/output.c (get_lines_number): New.
1149 (output_parser): Adjust, now takes care about the lines of a
1150 output muscles.
1151 Fix line numbering.
1152 (actions_output): Computes the number of lines taken by actions.
1153 (output_master_parser): Insert new skeleton which is the name of
1154 the output parser file name.
1155
11562001-12-15 Marc Autret <autret_m@epita.fr>
1157
1158 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1159
11602001-12-15 Marc Autret <autret_m@epita.fr>
1161
1162 * src/output.c (output_gram): Keep track of the hairy one.
1163
11642001-12-15 Akim Demaille <akim@epita.fr>
1165
1166 Make `make distcheck' work.
1167
1168 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1169 system.h which uses libgettext.h.
1170
11712001-12-15 Akim Demaille <akim@epita.fr>
1172
1173 * src/nullable.c (set_nullable): Useless rules must be skipped,
1174 otherwise, since we range over their symbols, we might look at a
1175 nonterminal which no longer ``exists'', i.e., it is not counted in
1176 `nvars', hence we overflow our arrays.
1177
11782001-12-15 Akim Demaille <akim@epita.fr>
1179
1180 The header can also be produced directly, without any obstack!
1181 Yahoo!
1182
1183 * src/files.c, src/files.h (defines_obstack): Remove.
1184 (compute_header_macro): Global.
1185 (defines_obstack_save): Remove.
1186 * src/reader.c (parse_union_decl): No longer output to
1187 defines_obstack: its content can be found in the `stype' muscle
1188 anyway.
1189 (output_token_translations): Merge into...
1190 (symbols_output): this.
1191 Rename as...
1192 (symbols_save): this.
1193 (reader): Adjust.
1194 * src/output.c (header_output): New.
1195 (output): Call it.
1196
11972001-12-15 Akim Demaille <akim@epita.fr>
1198
1199 * src/reader.c (parse_union_decl): Instead of handling two obstack
1200 simultaneously, use one to define the `stype' muscle, and use the
1201 value of the latter to fill defines_obstack.
1202 (copy_comment): Remove.
1203 (copy_comment2): Work for a single obstack.
1204 Rename as...
1205 (copy_comment): this.
1206
12072001-12-15 Akim Demaille <akim@epita.fr>
1208
1209 * src/lex.c, src/lex.h (xgetc): No longer static.
1210 * src/reader.c (parse_union_decl): Revamp.
1211
12122001-12-15 Akim Demaille <akim@epita.fr>
1213
1214 Still making progress in separating Bison into (i) input, (ii)
1215 process, (iii) output: now we can directly output the parser file
1216 without using table_obstack at all.
1217
1218 * src/files.c, src/files.h (table_obstack): Bye bye.
1219 (parser_file_name): New.
1220 * src/files.c (compute_output_file_names): Compute it.
1221 * src/output.c (actions_output, output_parser)
1222 (output_master_parser): To a file instead of an obstack.
1223
12242001-12-15 Akim Demaille <akim@epita.fr>
1225
1226 Attach actions to rules, instead of pre-outputting them to
1227 actions_obstack.
1228
1229 * src/gram.h (rule_t): action and action_line are new members.
1230 * src/reader.c (symbol_list): Likewise.
1231 (copy_action): Save the actions within the rule.
1232 (packgram): Save them in rule_table.
1233 * src/output.c (actions_output): New.
1234 (output_parser): Use it on `%%actions'.
1235 (output_rule_data): Don't free rule_table.
1236 (output): Do it.
1237 (prepare): Don't save the `action' muscle.
1238 * src/bison.simple: s/%%action/%%actions/.
1239
12402001-12-15 Akim Demaille <akim@epita.fr>
1241
1242 * src/reader.c (copy_action): When --yacc, don't append a `;'
1243 to the user action: let it fail if lacking.
1244 Suggested by Arnold Robbins and Tom Tromey.
1245
12462001-12-14 Akim Demaille <akim@epita.fr>
1247
1248 * src/lex.c (literalchar): Simply return the char you decoded, non
1249 longer mess around with obstacks and int pointers.
1250 Adjust all callers.
1251
12522001-12-14 Akim Demaille <akim@epita.fr>
1253
1254 * src/lex.c (literalchar): Don't escape the special characters,
1255 just decode them, and keep them as char (before, eol was output as
1256 the 2 char string `\n' etc.).
1257 * src/output.c (output_rule_data): Use quotearg to output the
1258 token strings.
1259
12602001-12-13 Paul Eggert <eggert@twinsun.com>
1261
1262 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1263 Do not infringe on the global user namespace when using C++.
1264 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1265 All uses of `fprintf' and `stderr' changed.
1266
1267 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1268
12692001-12-13 Akim Demaille <akim@epita.fr>
1270
1271 The computation of nullable is broken: it doesn't handle empty
1272 RHS's properly.
1273
1274 * tests/torture.at (GNU AWK Grammar): New.
1275 * tests/sets.at (Nullable): New.
1276 * src/nullable.c (set_nullable): Instead of blindly looping over
1277 `ritems', loop over the rules, and then over their rhs's.
1278
1279 Work around Autotest bugs.
1280
1281 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1282 frame, because Autotest understand lines starting with a `+' as
1283 traces from the shell. Then, they are not processed properly.
1284 Admittedly an Autotest bug, but we don't have time to wait for
1285 Autotest to catch up.
1286 * tests/regression.at (Broken Closure): Adjust to the new table
1287 frames.
1288 Move to...
1289 * tests/sets.at: here.
1290
12912001-12-13 Akim Demaille <akim@epita.fr>
1292
1293 * src/closure.c (closure): Use nrules instead of playing tricks
1294 with BITS_PER_WORD.
1295
12962001-12-13 Akim Demaille <akim@epita.fr>
1297
1298 * src/print.c (print_actions): Output the handling of `$' as the
1299 traces do: shifting the token EOF. Before EOF was treated as a
1300 nonterminal.
1301 * tests/regression.at: Adjust some tests.
1302 * src/print_graph.c (print_core): Complete the set of items via
1303 closure. The next-to-final and final states are still unsatisfying,
1304 but that's to be addressed elsewhere.
1305 No longer output the rule numbers, but do output the state number.
1306 A single loop for the shifts + gotos is enough, but picked a
1307 distinct color for each.
1308 (print_graph): Initialize and finalize closure.
1309
13102001-12-13 Akim Demaille <akim@epita.fr>
1311
1312 * src/reader.c (readgram): Remove dead code, an strip useless
1313 braces.
1314 (get_type): Remove, unused.
1315
13162001-12-12 Akim Demaille <akim@epita.fr>
1317
1318 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1319 on that of lib/error.c.
1320
13212001-12-12 Akim Demaille <akim@epita.fr>
1322
1323 Some hosts don't like `/' in includes.
1324
1325 * src/system.h: Include libgettext.h without qualifying the path.
1326 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1327 $(top_srcdir).
1328
13292001-12-11 Marc Autret <autret_m@epita.fr>
1330
1331 * src/output.c (output_parser): Remove useless muscle.
1332
13332001-12-11 Marc Autret <autret_m@epita.fr>
1334
1335 * src/bison.simple: Remove #line just before %%epilogue. It
1336 is now handled in ...
1337 * src/reader.c (read_additionnal_code): Add the output of a
1338 #line for the epilogue.
1339
13402001-12-10 Marc Autret <autret_m@epita.fr>
1341
1342 * src/reader.c (copy_definition): Re-use CPP-outed code which
1343 replace precedent remove.
1344 * src/bison.simple: Remove #line before %%prologue because
1345 %%input-line is wrong at this time.
1346
13472001-12-10 Marc Autret <autret_m@epita.fr>
1348
1349 * src/reader.c (symbols_output): Clean up.
1350 * src/output.c (output_gram, output): Clean up.
1351
13522001-12-10 Akim Demaille <akim@epita.fr>
1353
1354 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1355 * src/LR0.c (set_state_table): here.
1356 * src/lalr.c (lalr): Call it.
1357
13582001-12-10 Akim Demaille <akim@epita.fr>
1359
1360 * src/state.h (shifts): Remove the `number' member: shifts are
1361 attached to state, hence no longer need to be labelled with a
1362 state number.
1363
13642001-12-10 Akim Demaille <akim@epita.fr>
1365
1366 Now that states have a complete set of members, the linked list of
1367 shifts is useless: just fill directly the state's shifts member.
1368
1369 * src/state.h (shifts): Remove the `next' member.
1370 * src/LR0.c (first_state, last_state): Remove.
1371 Adjust the callers.
1372 (augment_automaton): Don't look for the shifts that must be added
1373 a shift on EOF: it is those of the state we looked for! But now,
1374 since shifts are attached, it is no longer needed to looking
1375 merely by its id: its number.
1376
13772001-12-10 Akim Demaille <akim@epita.fr>
1378
1379 * src/LR0.c (augment_automaton): Better variable locality.
1380 Remove an impossible branch: if there is a state corresponding to
1381 the start symbol being shifted, then there is shift for the start
1382 symbol from the initial state.
1383
13842001-12-10 Akim Demaille <akim@epita.fr>
1385
1386 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1387 only when appropriate: when insert_start_shifting_state' is not
1388 invoked.
1389 * tests/regression.at (Rule Line Numbers): Adjust.
1390
13912001-12-10 Akim Demaille <akim@epita.fr>
1392
1393 * src/LR0.c (augment_automaton): Now that all states have shifts,
1394 merge the two cases addition shifts to the initial state.
1395
13962001-12-10 Akim Demaille <akim@epita.fr>
1397
1398 * src/lalr.c (set_state_table): Move to...
1399 * src/LR0.c: here.
1400 * src/lalr.c (lalr): Don't call it...
1401 * src/LR0.c (generate_states): do it.
1402 * src/LR0.h (first_state): Remove, only the table is used.
1403
14042001-12-10 Akim Demaille <akim@epita.fr>
1405
1406 * src/LR0.h (first_shift, first_reduction): Remove.
1407 * src/lalr.c: Don't use first_shift: find shifts through the
1408 states.
1409
14102001-12-10 Akim Demaille <akim@epita.fr>
1411
1412 * src/LR0.c: Attach shifts to states as soon as they are
1413 computed.
1414 * src/lalr.c (set_state_table): Instead of assigning shifts to
1415 state, just assert that the mapping was properly done.
1416
14172001-12-10 Akim Demaille <akim@epita.fr>
1418
1419 * src/LR0.c (insert_start_shift): Rename as...
1420 (insert_start_shifting_state): this.
1421 (insert_eof_shifting_state, insert_accepting_state): New.
1422 (augment_automaton): Adjust.
1423 Better locality of the variables.
1424 When looking if the start_symbol is shifted from the initial
1425 state, using `while (... symbol != start_symbol ...)' sounds
1426 better than `while (... symbol < start_symbol ...)': If fail
1427 to see how the order between symbols could be relevant!
1428
14292001-12-10 Akim Demaille <akim@epita.fr>
1430
1431 * src/getargs.h: Don't declare `spec_name_prefix' and
1432 `spec_file_prefix', declared by src/files.h.
1433 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1434 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1435 * src/output.c (prepare): Adjust.
1436 * src/reader.c (symbols_output): Likewise.
1437 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1438
14392001-12-10 Akim Demaille <akim@epita.fr>
1440
1441 * src/muscle_tab.c (muscle_init): NULL is a better default than
1442 `"0"'.
1443
14442001-12-10 Akim Demaille <akim@epita.fr>
1445
1446 * src/reader.c (reader): Calling symbols_output once is enough.
1447
14482001-12-10 Akim Demaille <akim@epita.fr>
1449
1450 Now that states have a complete set of members, the linked list of
1451 reductions is useless: just fill directly the state's reductions
1452 member.
1453
1454 * src/state.h (struct reductions): Remove member `number' and
1455 `next'.
1456 * src/LR0.c (first_reduction, last_reduction): Remove.
1457 (save_reductions): Don't link the new reductions, store them in
1458 this_state.
1459 * src/lalr.c (set_state_table): No need to attach reductions to
1460 states, it's already done.
1461 * src/output.c (output_actions): No longer free the shifts, then
1462 the reductions, then the states: free all the states and their
1463 members.
1464
14652001-12-10 Akim Demaille <akim@epita.fr>
1466
1467 * src/options.c (OPTN, DRTV, BOTH): New.
1468 (option_table): Use them.
1469
1470 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1471 the job of system.h.
1472 * src/options.c: Don't include stdio.h and xalloc.h for the same
1473 reasons.
1474
14752001-12-10 Akim Demaille <akim@epita.fr>
1476
1477 * src/output.c (output, prepare): Make sure the values of the
1478 muscles `action' and `prologue' are 0-terminated.
1479
14802001-12-10 Akim Demaille <akim@epita.fr>
1481
1482 Clean up GCC warnings.
1483
1484 * src/reader.c (copy_action): `buf' is not used.
1485 (parse_skel_decl): Be static.
1486 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1487 * src/options.h (create_long_option_table): Have a real prototype.
1488 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1489 (hash_delete_at): Return const void *.
1490 Adjust casts to preserve the const.
1491
14922001-12-10 Akim Demaille <akim@epita.fr>
1493
1494 * configure.in: Require 2.52g.
1495 M4 is not needed, but AUTOM4TE is.
1496 * m4/m4.m4: Remove.
1497 * tests/Makefile.am: Adjust.
1498
14992001-12-10 Akim Demaille <akim@epita.fr>
1500
1501 One structure for states is enough, even though theoretically
1502 there are LR(0) states and LALR(1) states.
1503
1504 * src/lalr.h (state_t): Remove.
1505 (state_table): Be state_t **, not state_t *.
1506 * src/state.h (core, CORE_ALLOC): Rename as...
1507 (state_t, STATE_ALLOC): this.
1508 Add the LALR(1) members: shifts, reductions, errs.
1509 * src/LR0.c (state_table): Rename as...
1510 (state_hash): this, to avoid name clashes with the global
1511 `state_table'.
1512 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1513 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1514
15152001-12-10 Akim Demaille <akim@epita.fr>
1516
1517 Bison dumps core on bash.y.
1518 Reported by Pascal Bart.
1519
1520 * src/warshall.c (bitmatrix_print): New.
1521 (TC): Use it.
1522 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1523 j must be the outer loop.
1524 * tests/regression.at (Broken Closure): New.
1525
15262001-12-05 Akim Demaille <akim@epita.fr>
1527
1528 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1529 its argument.
1530