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