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