]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-03-19 Akim Demaille <akim@epita.fr>
2
3 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
4 (Solved SR Conflicts, %expect not enough, %expect right)
5 (%expect too much): Move to...
6 * tests/conflicts.at: this new file.
7
82002-03-19 Akim Demaille <akim@epita.fr>
9
10 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
11 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
12 that we can move to enums for instance.
13 * src/output.c (token_definitions_output): Output a list of
14 `token-name, token-number' instead of the #define.
15 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
16
172002-03-14 Akim Demaille <akim@epita.fr>
18
19 Use Gettext 0.11.1.
20
212002-03-09 Robert Anisko <robert@lrde.epita.fr>
22
23 * data/bison.c++: Make the user able to add members to the generated
24 parser by subclassing.
25
262002-03-05 Robert Anisko <robert@lrde.epita.fr>
27
28 * src/reader.c (read_additionnal_code): `c' should be an integer, not
29 a character.
30 Reported by Nicolas Tisserand and Nicolas Burrus.
31
322002-03-04 Robert Anisko <robert@lrde.epita.fr>
33
34 * src/reader.c: Warn about lacking semi-colons, do not complain.
35
362002-03-04 Robert Anisko <robert@lrde.epita.fr>
37
38 * data/bison.c++: Remove a debug line.
39
402002-03-04 Robert Anisko <robert@lrde.epita.fr>
41
42 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
43 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
44 provide a default implementation.
45
462002-03-04 Akim Demaille <akim@epita.fr>
47
48 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
49 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
50 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
51 * tests/semantic.at (Parsing Guards): Similarly.
52 * src/reader.at (readgram): Complain if the last rule is not ended
53 with a semi-colon.
54
552002-03-04 Akim Demaille <akim@epita.fr>
56
57 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
58 * src/closure.c: here.
59 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
60 RTC.
61 * src/warshall.h, src/warshall.c: Remove.
62 * tests/sets.at (Broken Closure): Adjust.
63
642002-03-04 Akim Demaille <akim@epita.fr>
65
66 * src/output.c (output_skeleton): tempdir is const.
67 bytes_read is unused.
68
692002-03-04 Akim Demaille <akim@epita.fr>
70
71 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
72 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
73 Update.
74 From Michael Hayes.
75
762002-03-04 Akim Demaille <akim@epita.fr>
77
78 * src/closure.c (closure): `r' is unused.
79
802002-03-04 Akim Demaille <akim@epita.fr>
81
82 * tests/sets.at (Broken Closure): Add the ending `;'.
83 * src/reader.at (readgram): Complain if a rule is not ended with a
84 semi-colon.
85
862002-03-04 Akim Demaille <akim@epita.fr>
87
88 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
89 (count_sr_conflicts): Use bitset_count.
90 * src/reduce.c (inaccessable_symbols): Ditto.
91 (bits_size): Remove.
92 * src/warshall.h, src/warshall.c: Convert to bitsetv.
93
942002-03-04 Akim Demaille <akim@epita.fr>
95
96 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
97 * src/reduce.c: Remove the `bitset_zero's following the
98 `bitset_create's, as now it is performed by the latter.
99
1002002-03-04 Akim Demaille <akim@epita.fr>
101
102 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
103 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
104 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
105 latest sources from Michael.
106
1072002-03-04 Akim Demaille <akim@epita.fr>
108
109 * src/output.c (output): Don't free the grammar.
110 * src/reader.c (grammar_free): New.
111 * src/main.c (main): Call it and don't free symtab here.
112
1132002-03-04 Akim Demaille <akim@epita.fr>
114
115 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
116 before returning.
117 Reported by Benoit Perrot.
118
1192002-03-04 Akim Demaille <akim@epita.fr>
120
121 Use bitset operations when possible, not loops over bits.
122
123 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
124 bitset_or.
125 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
126 * src/reduce.c (useless_nonterminals): Formatting changes.
127 * src/warshall.c (TC): Use bitset_or.
128
1292002-03-04 Akim Demaille <akim@epita.fr>
130
131 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
132 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
133 Ditto.
134
1352002-03-04 Akim Demaille <akim@epita.fr>
136
137 * src/lalr.c (F): Now a bitset*.
138 Adjust all dependencies.
139
1402002-03-04 Akim Demaille <akim@epita.fr>
141
142 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
143 Adjust all dependencies.
144
1452002-03-04 Akim Demaille <akim@epita.fr>
146
147 * src/L0.c, src/LR0.h (nstates): Be size_t.
148 Adjust comparisons (signed vs unsigned).
149 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
150 bitset*.
151 Adjust all dependencies.
152
1532002-03-04 Akim Demaille <akim@epita.fr>
154
155 * src/closure.c (firsts): Now, also a bitset.
156 Adjust all dependencies.
157 (varsetsize): Remove, now unused.
158 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
159
1602002-03-04 Akim Demaille <akim@epita.fr>
161
162 * src/print.c: Convert to use bitset.h, not hand coded iterations
163 over ints.
164
1652002-03-04 Akim Demaille <akim@epita.fr>
166
167 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
168
1692002-03-04 Akim Demaille <akim@epita.fr>
170
171 * src/closure.c (ruleset): Be a bitset.
172 (rulesetsize): Remove.
173
1742002-03-04 Akim Demaille <akim@epita.fr>
175
176 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
177 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
178 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
179 * src/closure.c (fderives): Be an array of bitsets.
180
1812002-02-28 Robert Anisko <robert@lrde.epita.fr>
182
183 * data/bison.c++: Merge the two generated headers. Insert a copyright
184 notice in each output file.
185
1862002-02-28 Akim Demaille <akim@epita.fr>
187
188 * data/bison.c++: Copy the prologue of bison.simple to fetch
189 useful M4 definitions, such as b4_header_guard.
190
1912002-02-25 Akim Demaille <akim@epita.fr>
192
193 * src/getargs.c (version): Give the name of the authors, and use a
194 translator friendly scheme for the bgr
195 copyright notice.
196
1972002-02-25 Akim Demaille <akim@epita.fr>
198
199 * src/output.c (header_output): Remove, now handled completely via
200 M4.
201
2022002-02-25 Akim Demaille <akim@epita.fr>
203
204 * m4/m4.m4: New, from CVS Autoconf.
205 * configure.in: Invoke it.
206 * src/output.c (output_skeleton): Use its result instead of the
207 hard coded name.
208
2092002-02-25 Akim Demaille <akim@epita.fr>
210
211 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
212 Fileutils 4.1.5.
213 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
214 * src/output.c (output_skeleton): Use mkstemp to create a real
215 temporary file.
216 Move the filling of `skeleton' and its muscle to...
217 (prepare): here.
218 (output): Move the definition of the prologue muscle to...
219 (prepare): here.
220 * src/system.h (DEFAULT_TMPDIR): New.
221
2222002-02-14 Paul Eggert <eggert@twinsun.com>
223
224 Remove the support for C++ namespace cleanliness; it was
225 causing more problems than it was curing, since it didn't work
226 properly on some nonstandard C++ compilers. This can wait
227 for a proper C++ parser.
228
229 * NEWS: Document this.
230 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
231 of C++, as it's treated like C now.
232 * src/bison.simple (YYSTD): Remove.
233 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
234 Treat C++ just like Standard C instead of trying to support
235 namespace cleanliness.
236
2372002-02-14 Akim Demaille <akim@epita.fr>
238
239 * tests/regression.at (else): Adjust to Andreas' change.
240
2412002-02-14 Akim Demaille <akim@epita.fr>
242
243 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
244
2452002-02-13 Andreas Schwab <schwab@suse.de>
246
247 * src/output.c (output_rule_data): Don't output NULL, it might
248 not be defined yet.
249
2502002-02-11 Robert Anisko <robert@lrde.epita.fr>
251
252 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
253 (Copyright notice): Update.
254
2552002-02-11 Akim Demaille <akim@epita.fr>
256
257 * tests/regression.at (%nonassoc and eof): Don't include
258 nonportable headers.
259
2602002-02-08 Robert Anisko <robert@lrde.epita.fr>
261
262 * data/bison.c++: Correct error recovery. Make the user able to
263 initialize the starting location.
264
2652002-02-07 Akim Demaille <akim@epita.fr>
266
267 * tests/input.at: New.
268
2692002-02-07 Robert Anisko <robert@lrde.epita.fr>
270
271 * data/bison.c++: Replace some direct m4 expansions by constants. Be
272 more consistent when naming methods and variables. Put preprocessor
273 directives around tables only needed for debugging.
274
2752002-02-07 Robert Anisko <robert@lrde.epita.fr>
276
277 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
278 C++ parsers.
279 (yy::b4_name::parse): Use print_.
280
2812002-02-07 Robert Anisko <robert@lrde.epita.fr>
282
283 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
284
2852002-02-07 Robert Anisko <robert@lrde.epita.fr>
286
287 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
288 C++ parsers.
289 (yy::b4_name::parse): Build verbose error messages, and use error_.
290
2912002-02-06 Robert Anisko <robert@lrde.epita.fr>
292
293 * data/bison.c++: Fix m4 quoting in comments.
294
2952002-02-06 Robert Anisko <robert@lrde.epita.fr>
296
297 * data/bison.c++: Adjust the parser code. Fix some muscles that were
298 not expanded by m4.
299
3002002-02-05 Akim Demaille <akim@epita.fr>
301
302 * data/bison.c++: Adjust to the M4 back end.
303 More is certainly needed.
304
3052002-02-05 Akim Demaille <akim@epita.fr>
306
307 Give a try to M4 as a back end.
308
309 * lib/readpipe.c: New, from wdiff.
310 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
311 BISON_HAIRY.
312 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
313 specific values. Now it is m4 that performs the lookup.
314 * src/parse-skel.y: Remove.
315 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
316 * src/output.c (actions_output, guards_output)
317 (token_definitions_output): No longer keeps track of the output
318 line number, hence remove the second argument.
319 (guards_output): Check against the guard member of a rule, not the
320 action member.
321 Adjust callers.
322 (output_skeleton): Don't look for the skeleton location, let m4 do
323 that.
324 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
325 file will be used.
326 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
327 (prepare): Given that for the time being changesyntax is not
328 usable in M4, rename the muscles using `-' to `_'.
329 Define `defines_flag', `output_parser_name' and `output_header_name'.
330 * src/output.h (actions_output, guards_output)
331 (token_definitions_output): Adjust prototypes.
332 * src/scan-skel.l: Instead of scanning the skeletons, it now
333 processes the output of m4: `__oline__' and `#output'.
334 * data/bison.simple: Adjust to be used by M4(sugar).
335 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
336 to date.
337 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
338 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
339 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
340 shamelessly stolen from CVS Autoconf.
341
3422002-02-05 Akim Demaille <akim@epita.fr>
343
344 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
345 * configure.in: Check for the declarations of free and malloc.
346 * src/muscle_tab.c: Adjust.
347
3482002-02-05 Akim Demaille <akim@epita.fr>
349
350 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
351 which have no values.
352
3532002-02-05 Akim Demaille <akim@epita.fr>
354
355 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
356 * data/: here.
357
3582002-01-29 Paul Eggert <eggert@twinsun.com>
359
360 * src/bison.simple (YYSIZE_T): Do not define merely because
361 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
362 On some platforms, <alloca.h> does not declare YYSTD (size_t).
363
3642002-01-27 Akim Demaille <akim@epita.fr>
365
366 Fix `%nonassoc and eof'.
367
368 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
369 which were not properly copied! Replace
370 memcpy (res->errs, src->errs, src->nerrs);
371 with
372 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
373 !!!
374 * tests/regression.at (%nonassoc and eof): Adjust to newest
375 Autotest: `.' is not in the PATH.
376
3772002-01-27 Akim Demaille <akim@epita.fr>
378
379 * tests/sets.at (AT_EXTRACT_SETS): New.
380 (Nullable): Use it.
381 (Firsts): New.
382
3832002-01-26 Akim Demaille <akim@epita.fr>
384
385 * tests/actions.at, tests/calc.at, tests/headers.at,
386 * tests/torture.at: Adjust to the newest Autotest which no longer
387 forces `.' in the PATH.
388
3892002-01-25 Akim Demaille <akim@epita.fr>
390
391 * tests/regression.at (%nonassoc and eof): New.
392 Suggested by Robert Anisko.
393
3942002-01-24 Akim Demaille <akim@epita.fr>
395
396 Bison dumps core when trying to complain about broken input files.
397 Reported by Cris van Pelt.
398
399 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
400 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
401 into...
402 (Invalid inputs): Strengthen: exercise parse_percent_token.
403
4042002-01-24 Robert Anisko <robert.anisko@epita.fr>
405
406 * src/Makefile.am: Add bison.c++.
407 * src/bison.c++: New skeleton.
408
4092002-01-21 Paolo Bonzini <bonzini@gnu.org>
410
411 * po/it.po: New.
412
4132002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
414
415 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
416
4172002-01-20 Marc Autret <marc@gnu.org>
418
419 * src/files.c (compute_output_file_names): Fix
420
4212002-01-20 Marc Autret <marc@gnu.org>
422
423 * tests/output.at: New test.
424 * src/files.c (compute_base_names): Don't map extensions when
425 the YACC flag is set, use defaults.
426 Reported by Evgeny Stambulchik.
427
4282002-01-20 Marc Autret <marc@gnu.org>
429
430 * src/system.h: Need to define __attribute__ away for non-GCC
431 compilers as well (i.e. the vendor C compiler).
432 Suggested by Albert Chin-A-Young.
433
4342002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
435
436 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
437 canonical definition.
438 * src/system.h: Use the canonical definition for PARAMS (avoids
439 a conflict with the macro from lib/hash.h).
440
4412002-01-11 Akim Demaille <akim@epita.fr>
442
443 * configure.in: Use AC_FUNC_STRNLEN.
444 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
445
4462002-01-09 Akim Demaille <akim@epita.fr>
447
448 * src/files.c, src/files.h (output_infix): New.
449 (tab_extension): Remove.
450 (compute_base_names): Compute the former, drop the latter.
451 * src/output.c (prepare): Insert the muscles `output-infix', and
452 `output-suffix'.
453 * src/parse-skel.y (string, string.1): New.
454 (section.header): Use it.
455 (section.yacc): Remove.
456 (prefix): Remove too.
457 * src/scan-skel.l: Adjust.
458 * src/bison.simple, src/bison.hairy: Adjust.
459
4602002-01-09 Akim Demaille <akim@epita.fr>
461
462 * configure.in (WERROR_CFLAGS): Compute it.
463 * src/Makefile.am (CFLAGS): Pass it.
464 * tests/atlocal.in (CFLAGS): Idem.
465 * src/files.c: Fix a few warnings.
466 (get_extension_index): Remove, unused.
467
4682002-01-08 Akim Demaille <akim@epita.fr>
469
470 * src/getargs.c (AS_FILE_NAME): New.
471 (getargs): Use it to convert DOSish file names.
472 * src/files.c (base_name): Rename as full_base_name to avoid
473 clashes with `base_name ()'.
474 (filename_split): New.
475 (compute_base_names): N-th rewrite, using filename_split.
476
4772002-01-08 Akim Demaille <akim@epita.fr>
478
479 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
480 New, stolen from the Fileutils 4.1.
481 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
482 * configure.in: Check for the presence of memrchr, and of its
483 prototype.
484
4852002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
486
487 * lib/hash.h (__P): Added definition for this macro.
488 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
489 BUILT_SOURCES, to ensure they are generated first.
490 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
491 %error-verbose to allow bootstrapping with bison 1.30x.
492
4932002-01-06 Akim Demaille <akim@epita.fr>
494
495 * src/reader.c (parse_braces): Don't fetch the next char, the
496 convention is to fetch on entry.
497 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
498 'switch' without a following semicolon.
499 * tests/regression.at (braces parsing): New.
500
5012002-01-06 Akim Demaille <akim@epita.fr>
502
503 Bison is dead wrong in its RR conflict reports.
504
505 * tests/torture.at (GNU Cim Grammar): New.
506 * src/conflicts.c (count_rr_conflicts): Fix.
507
5082002-01-06 Akim Demaille <akim@epita.fr>
509
510 Creating package.m4 from configure.ac causes too many problems.
511
512 * tests/Makefile.am (package.m4): Create it by hand,
513 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
514
5152002-01-06 Akim Demaille <akim@epita.fr>
516
517 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
518 skeleton.h.
519
5202002-01-04 Paul Eggert <eggert@twinsun.com>
521
522 * doc/bison.texinfo (Debugging):
523 Remove YYSTDERR; it's no longer defined or used.
524 Also, s/cstdio.h/cstdio/.
525
5262002-01-03 Akim Demaille <akim@epita.fr>
527
528 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
529
5302002-01-03 Akim Demaille <akim@epita.fr>
531
532 * src/parse-skel.y (process_skeleton): Don't bind the parser's
533 tracing code to --trace, wait for a better --trace option, with
534 args.
535
5362002-01-03 Akim Demaille <akim@epita.fr>
537
538 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
539 The ISO C++ standard is extremely clear about it: stderr is
540 considered a macro, not a regular symbol (see table 94 `Header
541 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
542 Therefore std:: does not apply to it. It still does with fprintf.
543 Also, s/cstdio.h/cstdio/.
544
5452002-01-03 Akim Demaille <akim@epita.fr>
546
547 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
548 for non system headers.
549
5502002-01-02 Akim Demaille <akim@epita.fr>
551
552 Equip the skeleton chain with location tracking, runtime trace,
553 pure parser and scanner.
554
555 * src/parse-skel.y: Request a pure parser, locations, and prefix
556 renaming.
557 (%union): Having several members with the same type does not help
558 type mismatches, simplify.
559 (YYPRINT, yyprint): New.
560 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
561 (skel_error): this.
562 Handle locations.
563 * src/scan-skel.l: Adjust to these changes.
564 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
565 (LOCATION_PRINT, skel_control_t): New.
566
5672001-12-30 Akim Demaille <akim@epita.fr>
568
569 * src/parse-skel.y: Get rid of the shift/reduce conflict:
570 replace `gb' with BLANKS.
571 * src/scan-skel.l: Adjust.
572
5732001-12-30 Akim Demaille <akim@epita.fr>
574
575 * src/system.h: We don't need nor want bcopy.
576 Throw away MS-DOS crap: we don't need getpid.
577 * configure.in: We don't need strndup. It was even causing
578 problems: because Flex includes the headers *before* us,
579 _GNU_SOURCE is not defined by config.h, and therefore strndup was
580 not visible.
581 * lib/xstrndup.c: New.
582 * src/scan-skel.l: Use it.
583 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
584 * src/parse-skel.y: Use %directives instead of #defines.
585
5862001-12-30 Akim Demaille <akim@epita.fr>
587
588 * src/skeleton.h: New.
589 * src/output.c (output_parser, output_master_parser): Remove, dead
590 code.
591 * src/output.h (get_lines_number, actions_output, guards_output)
592 (token_definitions_output): Prototype them.
593 * src/parse-skel.y: Add the license notice.
594 Include output.h and skeleton.h.
595 (process_skeleton): Returns void, and takes a single parameter.
596 * src/scan-skel.l: Add the license notice.
597 Include skeleton.h.
598 Don't use %option yylineno: it seems that then Flex imagines
599 REJECT has been used, and therefore it won't reallocate its
600 buffers (which makes no other sense to me than a bug). It results
601 in warnings for `unused: yy_flex_realloc'.
602
6032001-12-30 Robert Anisko <robert.anisko@epita.fr>
604
605 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
606 (MUSCLE_INSERT_PREFIX): ...to there.
607 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
608 (MUSCLE_INSERT_PREFIX): Move from here...
609
610 * src/bison.hairy: Add a section directive. Put braces around muscle
611 names. This parser skeleton is still broken, but Bison should not
612 choke on a bad muscle 'syntax'.
613 * src/bison.simple: Add a section directive. Put braces around muscle
614 names.
615
616 * src/files.h (strsuffix, stringappend): Add declarations.
617 (tab_extension): Add declaration.
618 (short_base_name): Add declaration.
619
620 * src/files.c (strsuffix, stringappend): No longer static. These
621 functions are used in the skeleton parser.
622 (tab_extension): New.
623 (compute_base_names): Use the computations done in this function
624 to guess if the generated parsers should have '.tab' in their
625 names.
626 (short_base_name): No longer static.
627
628 * src/output.c (output_skeleton): New.
629 (output): Disable call to output_master_parser, and give a try to
630 a new skeleton handling system.
631 (guards_output, actions_output): No longer static.
632 (token_definitions_output, get_lines_number): No longer static.
633
634 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
635
636 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
637 parse-skel.y.
638
639 * src/parse-skel.y: New file.
640 * src/scan-skel.l: New file.
641
6422001-12-29 Akim Demaille <akim@epita.fr>
643
644 %name-prefix is broken.
645
646 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
647 Adjust all dependencies.
648 * tests/headers.at (export YYLTYPE): Strengthen this test: use
649 %name-prefix.
650
651 Renaming yylval but not yylloc is not consistent. Now we do.
652
653 * src/bison.simple: Prefix yylloc if used.
654 * doc/bison.texinfo (Decl Summary): Document that.
655
6562001-12-29 Akim Demaille <akim@epita.fr>
657
658 * doc/bison.texinfo: Promote `%long-directive' over
659 `%long_directive'.
660 Remove all references to fixed-output-files, yacc is enough.
661
6622001-12-29 Akim Demaille <akim@epita.fr>
663
664 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
665 user prologue. These are defaults.
666 * tests/actions.at (Mid-rule actions): Make sure the user can
667 define YYDEBUG and YYERROR_VERBOSE.
668
6692001-12-29 Akim Demaille <akim@epita.fr>
670
671 * src/output.c (header_output): Don't forget to export YYLTYPE and
672 yylloc.
673 * tests/headers.at (export YYLTYPE): New, make sure it does.
674 * tests/regression.at (%union and --defines, Invalid CPP headers):
675 Move to...
676 * tests/headers.at: here.
677
6782001-12-29 Akim Demaille <akim@epita.fr>
679
680 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
681
6822001-12-29 Akim Demaille <akim@epita.fr>
683
684 * tests/actions.at (Mid-rule actions): Output on a single line
685 instead of several.
686
6872001-12-29 Akim Demaille <akim@epita.fr>
688
689 * doc/bison.texinfo: Formatting changes.
690
6912001-12-29 Akim Demaille <akim@epita.fr>
692
693 Don't store the token defs in a muscle, just be ready to output it
694 on command. Now possible via `symbols'. Fixes a memory leak.
695
696 * src/output.c (token_definitions_output): New.
697 (output_parser, header_output): Use it.
698 * src/reader.c (symbols_save): Remove.
699
7002001-12-29 Akim Demaille <akim@epita.fr>
701
702 * src/bison.simple: Do not provide a default for YYSTYPE and
703 YYLTYPE before the user's prologue. Otherwise it's hardly... a
704 default.
705
7062001-12-29 Akim Demaille <akim@epita.fr>
707
708 Mid-rule actions are simply... ignored!
709
710 * src/reader.c (readgram): Be sure to attach mid-rule actions to
711 the empty-rule associated to the dummy symbol, not to the host
712 rule.
713 * tests/actions.at (Mid-rule actions): New.
714
7152001-12-29 Akim Demaille <akim@epita.fr>
716
717 Memory leak.
718
719 * src/reader.c (reader): Free grammar.
720
7212001-12-29 Akim Demaille <akim@epita.fr>
722
723 Memory leak.
724
725 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
726 since it allocates it for each state, although only one is needed.
727 (allocate_storage): Do it here.
728
7292001-12-29 Akim Demaille <akim@epita.fr>
730
731 * src/options.h, src/options.c (create_long_option_table): Rename
732 as...
733 (long_option_table_new): this, with a clearer prototype.
734 (percent_table): Remove, unused,
735 * src/getargs.c (getargs): Adjust.
736
7372001-12-29 Akim Demaille <akim@epita.fr>
738
739 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
740 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
741 as states.
742
7432001-12-29 Akim Demaille <akim@epita.fr>
744
745 * src/lalr.c (build_relations): Rename `states' as `states1'.
746 Sorry, I don't understand exactly what it is, no better name...
747
7482001-12-29 Akim Demaille <akim@epita.fr>
749
750 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
751 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
752 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
753 as rules.
754
7552001-12-29 Akim Demaille <akim@epita.fr>
756
757 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
758 ago.
759
7602001-12-29 Akim Demaille <akim@epita.fr>
761
762 * src/reader.c, src/reader.h (user_toknums): Remove.
763 Adjust all users to use symbols[i]->user_token_number.
764
7652001-12-29 Akim Demaille <akim@epita.fr>
766
767 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
768 Adjust all users to use symbols[i]->prec or ->assoc.
769
7702001-12-29 Akim Demaille <akim@epita.fr>
771
772 * src/reader.c, src/reader.h (tags): Remove.
773 Adjust all users to use symbols[i]->tag.
774
7752001-12-29 Akim Demaille <akim@epita.fr>
776
777 * src/gram.h, src/gram.c (symbols): New, similar to state_table
778 and rule_table.
779 * src/reader.c (packsymbols): Fill this table.
780 Drop sprec.
781 * src/conflicts.c (resolve_sr_conflict): Adjust.
782 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
783 single table.
784 Use symbols[i]->tag instead of tags[i].
785
7862001-12-29 Akim Demaille <akim@epita.fr>
787
788 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
789 In addition, put a comment in there, to replace...
790 * tests/regression.at (%union and C comments): Remove.
791
7922001-12-29 Akim Demaille <akim@epita.fr>
793
794 * tests/regression.at (Web2c Actions): Blindly move the actual
795 output as expected output. The contents *seem* right to me, but I
796 can't pretend reading perfectly parser tables... Nonetheless, all
797 the other tests pass correctly, the table look OK, even though the
798 presence of `$axiom' is to be noted: AFAICS it is useless (but
799 harmless).
800
8012001-12-29 Akim Demaille <akim@epita.fr>
802
803 * src/reader.c (readgram): Don't add the rule 0 if there were no
804 rules read. In other words, add it _after_ having performed
805 grammar sanity checks.
806 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
807
8082001-12-29 Akim Demaille <akim@epita.fr>
809
810 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
811 visible, and some states have now a different number.
812
8132001-12-29 Akim Demaille <akim@epita.fr>
814
815 * src/reader.c (readgram): Bind the initial rule's lineno to that
816 of the first rule.
817 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
818 (Solved SR Conflicts): Adjust rule 0's line number.
819
8202001-12-29 Akim Demaille <akim@epita.fr>
821
822 Fix the `GAWK Grammar' failure.
823
824 * src/LR0.c (final_state): Initialize to -1 so that we do compute
825 the reductions of the first state which was mistakenly confused
826 with the final state because precisely final_state was initialized
827 to 0.
828 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
829 now noticed by Bison.
830 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
831 have a reduction on $default.
832
8332001-12-29 Akim Demaille <akim@epita.fr>
834
835 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
836 rule line numbers.
837 * src/closure.c (print_closure): Likewise.
838 * src/derives.c (print_derives): Likewise.
839 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
840 now.
841
8422001-12-29 Akim Demaille <akim@epita.fr>
843
844 * src/lalr.c (lookaheads_print): New.
845 (lalr): Call it when --trace-flag.
846 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
847 are dumped.
848
8492001-12-29 Akim Demaille <akim@epita.fr>
850
851 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
852 when walking through ritem, even via rule->rhs.
853 * src/reduce.c (dump_grammar, useful_production, reduce_output)
854 (useful_production, useless_nonterminals): Likewise.
855 (reduce_grammar_tables): Likewise, plus update nritems.
856 * src/nullable.c (set_nullable): Likewise.
857 * src/lalr.c (build_relations): Likewise.
858 * tests/sets.at (Nullable): Adjust.
859 Fortunately, now, the $axiom is no longer nullable.
860
8612001-12-29 Akim Demaille <akim@epita.fr>
862
863 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
864 the 0-sentinel.
865 * src/gram.c (ritem_longest_rhs): Likewise.
866 * src/reduce.c (nonterminals_reduce): Likewise.
867 * src/print_graph.c (print_graph): Likewise.
868 * src/output.c (output_rule_data): Likewise.
869 * src/nullable.c (set_nullable): Likewise.
870
8712001-12-29 Akim Demaille <akim@epita.fr>
872
873 * src/output.c: Comment changes.
874
8752001-12-27 Paul Eggert <eggert@twinsun.com>
876
877 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
878 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
879 Sparc, as they were causing more porting problems than the
880 (minor) performance improvement was worth.
881
882 Also, catch up with 1.31's YYSTD.
883
8842001-12-27 Akim Demaille <akim@epita.fr>
885
886 * src/output.c (output_gram): Rely on nritems, not the
887 0-sentinel. See below.
888 Use -1 as separator, not 0.
889 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
890 Rely on -1 as separator in yyrhs, instead of 0.
891 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
892 twice `Now at end of input', therefore there are two lines less to
893 expect.
894
8952001-12-27 Akim Demaille <akim@epita.fr>
896
897 * tests/regression.at (Unresolved SR Conflicts):
898 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
899 below.
900
9012001-12-27 Akim Demaille <akim@epita.fr>
902
903 * src/LR0.c (new_state): Recognize the final state by the fact it
904 is reached by eoftoken.
905 (insert_start_shifting_state, insert_eof_shifting_state)
906 (insert_accepting_state, augment_automaton): Remove, since now
907 these states are automatically computed from the initial state.
908 (generate_states): Adjust.
909 * src/print.c: When reporting a rule number to the user, substract
910 1, so that the axiom rule is rule 0, and the first user rule is 1.
911 * src/reduce.c: Likewise.
912 * src/print_graph.c (print_core): For the time being, just as for
913 the report, depend upon --trace-flags to dump the full set of
914 items.
915 * src/reader.c (readgram): Once the grammar read, insert the rule
916 0: `$axiom: START-SYMBOL $'.
917 * tests/set.at: Adjust: rule 0 is now displayed, and since the
918 number of the states has changed (the final state is no longer
919 necessarily the last), catch up.
920
9212001-12-27 Akim Demaille <akim@epita.fr>
922
923 Try to make the use of the eoftoken valid. Given that its value
924 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
925 is used instead of > 0 where appropriate, (ii), depend upon nritems
926 instead of the 0-sentinel.
927
928 * src/gram.h, src/gram.c (nritems): New.
929 Expected to be duplication of nitems, but for the time being...
930 * src/reader.c (packgram): Assert nritems and nitems are equal.
931 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
932 * src/closure.c (print_closure, print_fderives): Likewise.
933 * src/gram.c (ritem_print): Likewise.
934 * src/print.c (print_core, print_grammar): Likewise.
935 * src/print_graph.c: Likewise.
936
9372001-12-27 Akim Demaille <akim@epita.fr>
938
939 * src/main.c (main): If there are complains after grammar
940 reductions, then output the report anyway if requested, then die.
941 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
942 * src/reader.c (eoftoken): New.
943 (parse_token_decl): If the token being defined has value `0', it
944 is the eoftoken.
945 (packsymbols): No longer hack `tags' to insert `$' by hand.
946 Be sure to preserve the value of the eoftoken.
947 (reader): Make sure eoftoken is defined.
948 Initialize nsyms to 0: now eoftoken is created just like the others.
949 * src/print.c (print_grammar): Don't special case the eof token.
950 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
951 lie anyway, albeit pleasant.
952 * tests/calc.at: Exercise error messages with eoftoken.
953 Change the grammar so that empty input is invalid.
954 Adjust expectations.
955 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
956
9572001-12-27 Akim Demaille <akim@epita.fr>
958
959 * configure.in: Check the protos of strchr ans strspn.
960 Replace strchr if needed.
961 * src/system.h: Provide the protos of strchr, strspn and memchr if
962 missing.
963 * lib/strchr.c: New.
964 * src/reader.c (symbols_save): Use strchr.
965
9662001-12-27 Akim Demaille <akim@epita.fr>
967
968 * src/print.c, src/print_graph.c (escape): New.
969 Use it to quote the TAGS outputs.
970 * src/print_graph.c (print_state): Now errors are in red, and
971 reductions in green.
972 Prefer high to wide: output the state number on a line of its own.
973
9742001-12-27 Akim Demaille <akim@epita.fr>
975
976 * src/state.h, src/state.c (reductions_new): New.
977 * src/LR0.c (set_state_table): Let all the states have a
978 `reductions', even if reduced to 0.
979 (save_reductions): Adjust.
980 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
981 * src/print.c (print_reductions, print_actions): Adjust.
982 * src/output.c (action_row): Adjust.
983
9842001-12-27 Akim Demaille <akim@epita.fr>
985
986 * src/state.h, src/state.c (errs_new, errs_dup): New.
987 * src/LR0.c (set_state_table): Let all the states have an errs,
988 even if reduced to 0.
989 * src/print.c (print_errs, print_reductions): Adjust.
990 * src/output.c (output_actions, action_row): Adjust.
991 * src/conflicts.c (resolve_sr_conflict): Adjust.
992
9932001-12-27 Akim Demaille <akim@epita.fr>
994
995 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
996
9972001-12-27 Akim Demaille <akim@epita.fr>
998
999 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1000 * src/print.c: here.
1001 (lookaheadset, shiftset): New, used as additional storage by
1002 print_reductions.
1003 (print_results): Adjust.
1004 (print_shifts, print_gotos, print_errs): New, extracted from...
1005 (print_actions): here.
1006 * src/print_graph.c (print_actions): Remove dead code.
1007
10082001-12-27 Akim Demaille <akim@epita.fr>
1009
1010 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1011 `$n' and `@n'.
1012
10132001-12-27 Akim Demaille <akim@epita.fr>
1014
1015 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1016 (build_relations): Adjust.
1017
10182001-12-27 Akim Demaille <akim@epita.fr>
1019
1020 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1021 duplication.
1022
10232001-12-27 Akim Demaille <akim@epita.fr>
1024
1025 * src/reader.c (packgram): Catch nitems overflows.
1026
10272001-12-27 Akim Demaille <akim@epita.fr>
1028
1029 * src/files.c, src/files.h (guard_obstack): Remove.
1030 * src/output.c (output): Adjust.
1031 * src/reader.c (parse_braces): New, factoring...
1032 (copy_action, copy_guard): these two which are renamed as...
1033 (parse_action, parse_guard): these.
1034 As a voluntary consequence, using braces around guards is now
1035 mandatory.
1036
10372001-12-27 Akim Demaille <akim@epita.fr>
1038
1039 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1040 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1041 members.
1042 (symbol_list_new): Adjust.
1043 (copy_action): action_line is the first line, not the last.
1044 (copy_guard): Just as for actions, store the `action' only, not
1045 the switch/case/break flesh.
1046 Don't parse the user action that might follow the guard, let...
1047 (readgram): do it, i.e., now, there can be an action after a
1048 guard.
1049 In other words the guard is just explicitly optional.
1050 (packgram): Adjust.
1051 * src/output.c (guards_output): New.
1052 (output_parser): Call it when needed.
1053 (output): Also free the guard and attrs obstacks.
1054 * src/files.c, src/files.h (obstack_save): Remove.
1055 (output_files): Remove.
1056 As a result, if one needs the former `.act' file, using an
1057 appropriate skeleton which requires actions and guards is now
1058 required.
1059 * src/main.c (main): Adjust.
1060 * tests/semantic.at: New.
1061 * tests/regression.at: Use `input.y' as input file name.
1062 Avoid 8+3 problems by requiring input.c when the test needs the
1063 parser.
1064
10652001-12-27 Akim Demaille <akim@epita.fr>
1066
1067 * src/reader.c (symbol_list_new): Be sure to initialize all the
1068 fields.
1069
10702001-12-27 Akim Demaille <akim@epita.fr>
1071
1072 All the hacks using a final pseudo state are now useless.
1073
1074 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1075 * src/lalr.c (nLA): New.
1076 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1077 instead of lookaheadsp from the pseudo state (nstate + 1).
1078
10792001-12-27 Akim Demaille <akim@epita.fr>
1080
1081 * src/output.c (action_row, token_actions): Use a state_t instead
1082 of a integer, and nlookaheads instead of the following state's
1083 lookaheadsp.
1084
10852001-12-27 Akim Demaille <akim@epita.fr>
1086
1087 * src/conflicts.c (log_resolution, flush_shift)
1088 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1089 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1090 (conflicts_print, print_reductions): Use a state_t instead of an
1091 integer when referring to a state.
1092 As much as possible, depend upon nlookaheads, instead of the
1093 `lookaheadsp' member of the following state (since lookaheads of
1094 successive states are successive, the difference between state n + 1
1095 and n served as the number of lookaheads for state n).
1096 * src/lalr.c (add_lookback_edge): Likewise.
1097 * src/print.c (print_core, print_actions, print_state)
1098 (print_results): Likewise.
1099 * src/print_graph.c (print_core, print_actions, print_state)
1100 (print_graph): Likewise.
1101 * src/conflicts.h: Adjust.
1102
11032001-12-27 Akim Demaille <akim@epita.fr>
1104
1105 * src/bison.hairy: Formatting/comment changes.
1106 ANSIfy.
1107 Remove `register' indications.
1108 Add plenty of `static'.
1109
11102001-12-27 Akim Demaille <akim@epita.fr>
1111
1112 * src/output.c (prepare): Drop the muscle `ntbase' which
1113 duplicates ntokens.
1114 * src/bison.simple: Formatting/comment changes.
1115 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1116 is an undocumented synonym.
1117
11182001-12-22 Akim Demaille <akim@epita.fr>
1119
1120 * src/output.c (output_table_data): Change the prototype to use
1121 `int' for array ranges: some invocations do pass an int, not a
1122 short.
1123 Reported by Wayne Green.
1124
11252001-12-22 Akim Demaille <akim@epita.fr>
1126
1127 Some actions of web2c.y are improperly triggered.
1128 Reported by Mike Castle.
1129
1130 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1131 * tests/regression.at (Web2c): Rename as...
1132 (Web2c Report): this.
1133 (Web2c Actions): New.
1134
11352001-12-22 Akim Demaille <akim@epita.fr>
1136
1137 Reductions in web2c.y are improperly reported.
1138 Reported by Mike Castle.
1139
1140 * src/conflicts.c (print_reductions): Fix.
1141 * tests/regression.at (Web2c): New.
1142
11432001-12-18 Akim Demaille <akim@epita.fr>
1144
1145 Some host fail on `assert (!"foo")', which expands to
1146 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1147 Reported by Nelson Beebee.
1148
1149 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1150 `#define it_succeeded 0' and `assert (it_succeeded)'.
1151
11522001-12-17 Marc Autret <autret_m@epita.fr>
1153
1154 * src/bison.simple: Don't hard code the skeleton line and filename.
1155 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1156 New line counter 'skeleton_line' (skeleton-line muscle).
1157
11582001-12-17 Paul Eggert <eggert@twinsun.com>
1159
1160 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1161 YYDEBUG must be defined to a nonzero value.
1162
1163 * src/bison.simple (yytname): Do not assume that the user defines
1164 YYDEBUG to a properly parenthesized expression.
1165
11662001-12-17 Akim Demaille <akim@epita.fr>
1167
1168 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1169 nlookaheads is a new member.
1170 Adjust all users.
1171 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1172 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1173 state.
1174
11752001-12-17 Akim Demaille <akim@epita.fr>
1176
1177 * src/files.h, src/files.c (open_files, close_files): Remove.
1178 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1179 let...
1180 * src/reader.c (reader): Do it.
1181
11822001-12-17 Akim Demaille <akim@epita.fr>
1183
1184 * src/conflicts.c (print_reductions): Formatting changes.
1185
11862001-12-17 Akim Demaille <akim@epita.fr>
1187
1188 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1189 (flush_reduce): New.
1190 (resolve_sr_conflict): Adjust.
1191
11922001-12-17 Akim Demaille <akim@epita.fr>
1193
1194 * src/output.c (output_obstack): Be static and rename as...
1195 (format_obstack): this, to avoid any confusion with files.c's
1196 output_obstack.
1197 * src/reader.h (muscle_obstack): Move to...
1198 * src/output.h: here, since it's defined in output.c.
1199
12002001-12-17 Akim Demaille <akim@epita.fr>
1201
1202 * src/output.c (action_row, save_column, default_goto)
1203 (sort_actions, matching_state, pack_vector): Better variable
1204 locality.
1205
12062001-12-17 Akim Demaille <akim@epita.fr>
1207
1208 * src/output.c: Various formatting changes.
1209
12102001-12-17 Akim Demaille <akim@epita.fr>
1211
1212 * src/files.c (output_files): Free the output_obstack.
1213 * src/main.c (main): Call print and print_graph conditionally.
1214 * src/print.c (print): Work unconditionally.
1215 * src/print_graph.c (print_graph): Work unconditionally.
1216 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1217
12182001-12-16 Marc Autret <autret_m@epita.fr>
1219
1220 * src/output.c (actions_output): Fix. When we use %no-lines,
1221 there is one less line per action.
1222
12232001-12-16 Marc Autret <autret_m@epita.fr>
1224
1225 * src/bison.simple: Remove a useless #line directive.
1226 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1227 * src/output.c (get_lines_number): New.
1228 (output_parser): Adjust, now takes care about the lines of a
1229 output muscles.
1230 Fix line numbering.
1231 (actions_output): Computes the number of lines taken by actions.
1232 (output_master_parser): Insert new skeleton which is the name of
1233 the output parser file name.
1234
12352001-12-15 Marc Autret <autret_m@epita.fr>
1236
1237 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1238
12392001-12-15 Marc Autret <autret_m@epita.fr>
1240
1241 * src/output.c (output_gram): Keep track of the hairy one.
1242
12432001-12-15 Akim Demaille <akim@epita.fr>
1244
1245 Make `make distcheck' work.
1246
1247 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1248 system.h which uses libgettext.h.
1249
12502001-12-15 Akim Demaille <akim@epita.fr>
1251
1252 * src/nullable.c (set_nullable): Useless rules must be skipped,
1253 otherwise, since we range over their symbols, we might look at a
1254 nonterminal which no longer ``exists'', i.e., it is not counted in
1255 `nvars', hence we overflow our arrays.
1256
12572001-12-15 Akim Demaille <akim@epita.fr>
1258
1259 The header can also be produced directly, without any obstack!
1260 Yahoo!
1261
1262 * src/files.c, src/files.h (defines_obstack): Remove.
1263 (compute_header_macro): Global.
1264 (defines_obstack_save): Remove.
1265 * src/reader.c (parse_union_decl): No longer output to
1266 defines_obstack: its content can be found in the `stype' muscle
1267 anyway.
1268 (output_token_translations): Merge into...
1269 (symbols_output): this.
1270 Rename as...
1271 (symbols_save): this.
1272 (reader): Adjust.
1273 * src/output.c (header_output): New.
1274 (output): Call it.
1275
12762001-12-15 Akim Demaille <akim@epita.fr>
1277
1278 * src/reader.c (parse_union_decl): Instead of handling two obstack
1279 simultaneously, use one to define the `stype' muscle, and use the
1280 value of the latter to fill defines_obstack.
1281 (copy_comment): Remove.
1282 (copy_comment2): Work for a single obstack.
1283 Rename as...
1284 (copy_comment): this.
1285
12862001-12-15 Akim Demaille <akim@epita.fr>
1287
1288 * src/lex.c, src/lex.h (xgetc): No longer static.
1289 * src/reader.c (parse_union_decl): Revamp.
1290
12912001-12-15 Akim Demaille <akim@epita.fr>
1292
1293 Still making progress in separating Bison into (i) input, (ii)
1294 process, (iii) output: now we can directly output the parser file
1295 without using table_obstack at all.
1296
1297 * src/files.c, src/files.h (table_obstack): Bye bye.
1298 (parser_file_name): New.
1299 * src/files.c (compute_output_file_names): Compute it.
1300 * src/output.c (actions_output, output_parser)
1301 (output_master_parser): To a file instead of an obstack.
1302
13032001-12-15 Akim Demaille <akim@epita.fr>
1304
1305 Attach actions to rules, instead of pre-outputting them to
1306 actions_obstack.
1307
1308 * src/gram.h (rule_t): action and action_line are new members.
1309 * src/reader.c (symbol_list): Likewise.
1310 (copy_action): Save the actions within the rule.
1311 (packgram): Save them in rule_table.
1312 * src/output.c (actions_output): New.
1313 (output_parser): Use it on `%%actions'.
1314 (output_rule_data): Don't free rule_table.
1315 (output): Do it.
1316 (prepare): Don't save the `action' muscle.
1317 * src/bison.simple: s/%%action/%%actions/.
1318
13192001-12-15 Akim Demaille <akim@epita.fr>
1320
1321 * src/reader.c (copy_action): When --yacc, don't append a `;'
1322 to the user action: let it fail if lacking.
1323 Suggested by Arnold Robbins and Tom Tromey.
1324
13252001-12-14 Akim Demaille <akim@epita.fr>
1326
1327 * src/lex.c (literalchar): Simply return the char you decoded, non
1328 longer mess around with obstacks and int pointers.
1329 Adjust all callers.
1330
13312001-12-14 Akim Demaille <akim@epita.fr>
1332
1333 * src/lex.c (literalchar): Don't escape the special characters,
1334 just decode them, and keep them as char (before, eol was output as
1335 the 2 char string `\n' etc.).
1336 * src/output.c (output_rule_data): Use quotearg to output the
1337 token strings.
1338
13392001-12-13 Paul Eggert <eggert@twinsun.com>
1340
1341 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1342 Do not infringe on the global user namespace when using C++.
1343 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1344 All uses of `fprintf' and `stderr' changed.
1345
1346 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1347
13482001-12-13 Akim Demaille <akim@epita.fr>
1349
1350 The computation of nullable is broken: it doesn't handle empty
1351 RHS's properly.
1352
1353 * tests/torture.at (GNU AWK Grammar): New.
1354 * tests/sets.at (Nullable): New.
1355 * src/nullable.c (set_nullable): Instead of blindly looping over
1356 `ritems', loop over the rules, and then over their rhs's.
1357
1358 Work around Autotest bugs.
1359
1360 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1361 frame, because Autotest understand lines starting with a `+' as
1362 traces from the shell. Then, they are not processed properly.
1363 Admittedly an Autotest bug, but we don't have time to wait for
1364 Autotest to catch up.
1365 * tests/regression.at (Broken Closure): Adjust to the new table
1366 frames.
1367 Move to...
1368 * tests/sets.at: here.
1369
13702001-12-13 Akim Demaille <akim@epita.fr>
1371
1372 * src/closure.c (closure): Use nrules instead of playing tricks
1373 with BITS_PER_WORD.
1374
13752001-12-13 Akim Demaille <akim@epita.fr>
1376
1377 * src/print.c (print_actions): Output the handling of `$' as the
1378 traces do: shifting the token EOF. Before EOF was treated as a
1379 nonterminal.
1380 * tests/regression.at: Adjust some tests.
1381 * src/print_graph.c (print_core): Complete the set of items via
1382 closure. The next-to-final and final states are still unsatisfying,
1383 but that's to be addressed elsewhere.
1384 No longer output the rule numbers, but do output the state number.
1385 A single loop for the shifts + gotos is enough, but picked a
1386 distinct color for each.
1387 (print_graph): Initialize and finalize closure.
1388
13892001-12-13 Akim Demaille <akim@epita.fr>
1390
1391 * src/reader.c (readgram): Remove dead code, an strip useless
1392 braces.
1393 (get_type): Remove, unused.
1394
13952001-12-12 Akim Demaille <akim@epita.fr>
1396
1397 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1398 on that of lib/error.c.
1399
14002001-12-12 Akim Demaille <akim@epita.fr>
1401
1402 Some hosts don't like `/' in includes.
1403
1404 * src/system.h: Include libgettext.h without qualifying the path.
1405 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1406 $(top_srcdir).
1407
14082001-12-11 Marc Autret <autret_m@epita.fr>
1409
1410 * src/output.c (output_parser): Remove useless muscle.
1411
14122001-12-11 Marc Autret <autret_m@epita.fr>
1413
1414 * src/bison.simple: Remove #line just before %%epilogue. It
1415 is now handled in ...
1416 * src/reader.c (read_additionnal_code): Add the output of a
1417 #line for the epilogue.
1418
14192001-12-10 Marc Autret <autret_m@epita.fr>
1420
1421 * src/reader.c (copy_definition): Re-use CPP-outed code which
1422 replace precedent remove.
1423 * src/bison.simple: Remove #line before %%prologue because
1424 %%input-line is wrong at this time.
1425
14262001-12-10 Marc Autret <autret_m@epita.fr>
1427
1428 * src/reader.c (symbols_output): Clean up.
1429 * src/output.c (output_gram, output): Clean up.
1430
14312001-12-10 Akim Demaille <akim@epita.fr>
1432
1433 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1434 * src/LR0.c (set_state_table): here.
1435 * src/lalr.c (lalr): Call it.
1436
14372001-12-10 Akim Demaille <akim@epita.fr>
1438
1439 * src/state.h (shifts): Remove the `number' member: shifts are
1440 attached to state, hence no longer need to be labelled with a
1441 state number.
1442
14432001-12-10 Akim Demaille <akim@epita.fr>
1444
1445 Now that states have a complete set of members, the linked list of
1446 shifts is useless: just fill directly the state's shifts member.
1447
1448 * src/state.h (shifts): Remove the `next' member.
1449 * src/LR0.c (first_state, last_state): Remove.
1450 Adjust the callers.
1451 (augment_automaton): Don't look for the shifts that must be added
1452 a shift on EOF: it is those of the state we looked for! But now,
1453 since shifts are attached, it is no longer needed to looking
1454 merely by its id: its number.
1455
14562001-12-10 Akim Demaille <akim@epita.fr>
1457
1458 * src/LR0.c (augment_automaton): Better variable locality.
1459 Remove an impossible branch: if there is a state corresponding to
1460 the start symbol being shifted, then there is shift for the start
1461 symbol from the initial state.
1462
14632001-12-10 Akim Demaille <akim@epita.fr>
1464
1465 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1466 only when appropriate: when insert_start_shifting_state' is not
1467 invoked.
1468 * tests/regression.at (Rule Line Numbers): Adjust.
1469
14702001-12-10 Akim Demaille <akim@epita.fr>
1471
1472 * src/LR0.c (augment_automaton): Now that all states have shifts,
1473 merge the two cases addition shifts to the initial state.
1474
14752001-12-10 Akim Demaille <akim@epita.fr>
1476
1477 * src/lalr.c (set_state_table): Move to...
1478 * src/LR0.c: here.
1479 * src/lalr.c (lalr): Don't call it...
1480 * src/LR0.c (generate_states): do it.
1481 * src/LR0.h (first_state): Remove, only the table is used.
1482
14832001-12-10 Akim Demaille <akim@epita.fr>
1484
1485 * src/LR0.h (first_shift, first_reduction): Remove.
1486 * src/lalr.c: Don't use first_shift: find shifts through the
1487 states.
1488
14892001-12-10 Akim Demaille <akim@epita.fr>
1490
1491 * src/LR0.c: Attach shifts to states as soon as they are
1492 computed.
1493 * src/lalr.c (set_state_table): Instead of assigning shifts to
1494 state, just assert that the mapping was properly done.
1495
14962001-12-10 Akim Demaille <akim@epita.fr>
1497
1498 * src/LR0.c (insert_start_shift): Rename as...
1499 (insert_start_shifting_state): this.
1500 (insert_eof_shifting_state, insert_accepting_state): New.
1501 (augment_automaton): Adjust.
1502 Better locality of the variables.
1503 When looking if the start_symbol is shifted from the initial
1504 state, using `while (... symbol != start_symbol ...)' sounds
1505 better than `while (... symbol < start_symbol ...)': If fail
1506 to see how the order between symbols could be relevant!
1507
15082001-12-10 Akim Demaille <akim@epita.fr>
1509
1510 * src/getargs.h: Don't declare `spec_name_prefix' and
1511 `spec_file_prefix', declared by src/files.h.
1512 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1513 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1514 * src/output.c (prepare): Adjust.
1515 * src/reader.c (symbols_output): Likewise.
1516 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1517
15182001-12-10 Akim Demaille <akim@epita.fr>
1519
1520 * src/muscle_tab.c (muscle_init): NULL is a better default than
1521 `"0"'.
1522
15232001-12-10 Akim Demaille <akim@epita.fr>
1524
1525 * src/reader.c (reader): Calling symbols_output once is enough.
1526
15272001-12-10 Akim Demaille <akim@epita.fr>
1528
1529 Now that states have a complete set of members, the linked list of
1530 reductions is useless: just fill directly the state's reductions
1531 member.
1532
1533 * src/state.h (struct reductions): Remove member `number' and
1534 `next'.
1535 * src/LR0.c (first_reduction, last_reduction): Remove.
1536 (save_reductions): Don't link the new reductions, store them in
1537 this_state.
1538 * src/lalr.c (set_state_table): No need to attach reductions to
1539 states, it's already done.
1540 * src/output.c (output_actions): No longer free the shifts, then
1541 the reductions, then the states: free all the states and their
1542 members.
1543
15442001-12-10 Akim Demaille <akim@epita.fr>
1545
1546 * src/options.c (OPTN, DRTV, BOTH): New.
1547 (option_table): Use them.
1548
1549 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1550 the job of system.h.
1551 * src/options.c: Don't include stdio.h and xalloc.h for the same
1552 reasons.
1553
15542001-12-10 Akim Demaille <akim@epita.fr>
1555
1556 * src/output.c (output, prepare): Make sure the values of the
1557 muscles `action' and `prologue' are 0-terminated.
1558
15592001-12-10 Akim Demaille <akim@epita.fr>
1560
1561 Clean up GCC warnings.
1562
1563 * src/reader.c (copy_action): `buf' is not used.
1564 (parse_skel_decl): Be static.
1565 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1566 * src/options.h (create_long_option_table): Have a real prototype.
1567 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1568 (hash_delete_at): Return const void *.
1569 Adjust casts to preserve the const.
1570
15712001-12-10 Akim Demaille <akim@epita.fr>
1572
1573 * configure.in: Require 2.52g.
1574 M4 is not needed, but AUTOM4TE is.
1575 * m4/m4.m4: Remove.
1576 * tests/Makefile.am: Adjust.
1577
15782001-12-10 Akim Demaille <akim@epita.fr>
1579
1580 One structure for states is enough, even though theoretically
1581 there are LR(0) states and LALR(1) states.
1582
1583 * src/lalr.h (state_t): Remove.
1584 (state_table): Be state_t **, not state_t *.
1585 * src/state.h (core, CORE_ALLOC): Rename as...
1586 (state_t, STATE_ALLOC): this.
1587 Add the LALR(1) members: shifts, reductions, errs.
1588 * src/LR0.c (state_table): Rename as...
1589 (state_hash): this, to avoid name clashes with the global
1590 `state_table'.
1591 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1592 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1593
15942001-12-10 Akim Demaille <akim@epita.fr>
1595
1596 Bison dumps core on bash.y.
1597 Reported by Pascal Bart.
1598
1599 * src/warshall.c (bitmatrix_print): New.
1600 (TC): Use it.
1601 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1602 j must be the outer loop.
1603 * tests/regression.at (Broken Closure): New.
1604
16052001-12-05 Akim Demaille <akim@epita.fr>
1606
1607 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1608 its argument.
1609