]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* src/closure.c, src/print.c, src/reader.c, src/reduce.c:
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-04-07 Akim Demaille <akim@epita.fr>
2
3 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
4 Normalize loops to using `< nrules + 1', not `<= nrules'.
5
6
72002-04-07 Akim Demaille <akim@epita.fr>
8
9 * TODO: Update.
10
11
122002-04-07 Akim Demaille <akim@epita.fr>
13
14 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
15 bucket.value as bucket.number.
16
17
182002-04-07 Akim Demaille <akim@epita.fr>
19
20 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
21 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
22 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
23 RHS, instead of being an index in RITEMS.
24
252002-04-04 Paul Eggert <eggert@twinsun.com>
26
27 * doc/bison.texinfo: Update copyright date.
28 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
29 (Symbols): Warn about running Bison in one character set,
30 but compiling and/or running in an incompatible one.
31 Warn about character code 256, too.
32
332002-04-03 Paul Eggert <eggert@twinsun.com>
34
35 * src/bison.data (YYSTACK_ALLOC): Depend on whether
36 YYERROR_VERBOSE is nonzero, not whether it is defined.
37
38 Merge changes from bison-1_29-branch.
39
402002-03-20 Paul Eggert <eggert@twinsun.com>
41
42 Merge fixes from Debian bison_1.34-1.diff.
43
44 * configure.in (AC_PREREQ): 2.53.
45
462002-03-20 Akim Demaille <akim@epita.fr>
47
48 * src/conflicts.c (log_resolution): Argument `resolution' is const.
49
502002-03-19 Paul Eggert <eggert@twinsun.com>
51
52 * src/bison.simple (YYCOPY): New macro.
53 (YYSTACK_RELOCATE): Use it.
54 Remove Type arg; no longer needed. All callers changed.
55 (yymemcpy): Remove; no longer needed.
56
57 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
58 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
59
602002-03-19 Akim Demaille <akim@epita.fr>
61
62 Test and fix the #line outputs.
63
64 * tests/atlocal.at (GCC): New.
65 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
66 (Prologue synch line, ,%union synch line, Postprologue synch line)
67 (Action synch line, Epilogue synch line): New tests.
68 * src/reader.c (parse_union_decl): Define the muscle stype_line.
69 * data/bison.simple, data/bison.c++: Use it.
70
71
722002-03-19 Akim Demaille <akim@epita.fr>
73
74 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
75 (Solved SR Conflicts, %expect not enough, %expect right)
76 (%expect too much): Move to...
77 * tests/conflicts.at: this new file.
78
792002-03-19 Akim Demaille <akim@epita.fr>
80
81 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
82 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
83 that we can move to enums for instance.
84 * src/output.c (token_definitions_output): Output a list of
85 `token-name, token-number' instead of the #define.
86 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
87
882002-03-14 Akim Demaille <akim@epita.fr>
89
90 Use Gettext 0.11.1.
91
922002-03-09 Robert Anisko <robert@lrde.epita.fr>
93
94 * data/bison.c++: Make the user able to add members to the generated
95 parser by subclassing.
96
972002-03-05 Robert Anisko <robert@lrde.epita.fr>
98
99 * src/reader.c (read_additionnal_code): `c' should be an integer, not
100 a character.
101 Reported by Nicolas Tisserand and Nicolas Burrus.
102
1032002-03-04 Robert Anisko <robert@lrde.epita.fr>
104
105 * src/reader.c: Warn about lacking semi-colons, do not complain.
106
1072002-03-04 Robert Anisko <robert@lrde.epita.fr>
108
109 * data/bison.c++: Remove a debug line.
110
1112002-03-04 Robert Anisko <robert@lrde.epita.fr>
112
113 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
114 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
115 provide a default implementation.
116
1172002-03-04 Akim Demaille <akim@epita.fr>
118
119 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
120 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
121 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
122 * tests/semantic.at (Parsing Guards): Similarly.
123 * src/reader.at (readgram): Complain if the last rule is not ended
124 with a semi-colon.
125
1262002-03-04 Akim Demaille <akim@epita.fr>
127
128 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
129 * src/closure.c: here.
130 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
131 RTC.
132 * src/warshall.h, src/warshall.c: Remove.
133 * tests/sets.at (Broken Closure): Adjust.
134
1352002-03-04 Akim Demaille <akim@epita.fr>
136
137 * src/output.c (output_skeleton): tempdir is const.
138 bytes_read is unused.
139
1402002-03-04 Akim Demaille <akim@epita.fr>
141
142 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
143 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
144 Update.
145 From Michael Hayes.
146
1472002-03-04 Akim Demaille <akim@epita.fr>
148
149 * src/closure.c (closure): `r' is unused.
150
1512002-03-04 Akim Demaille <akim@epita.fr>
152
153 * tests/sets.at (Broken Closure): Add the ending `;'.
154 * src/reader.at (readgram): Complain if a rule is not ended with a
155 semi-colon.
156
1572002-03-04 Akim Demaille <akim@epita.fr>
158
159 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
160 (count_sr_conflicts): Use bitset_count.
161 * src/reduce.c (inaccessable_symbols): Ditto.
162 (bits_size): Remove.
163 * src/warshall.h, src/warshall.c: Convert to bitsetv.
164
1652002-03-04 Akim Demaille <akim@epita.fr>
166
167 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
168 * src/reduce.c: Remove the `bitset_zero's following the
169 `bitset_create's, as now it is performed by the latter.
170
1712002-03-04 Akim Demaille <akim@epita.fr>
172
173 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
174 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
175 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
176 latest sources from Michael.
177
1782002-03-04 Akim Demaille <akim@epita.fr>
179
180 * src/output.c (output): Don't free the grammar.
181 * src/reader.c (grammar_free): New.
182 * src/main.c (main): Call it and don't free symtab here.
183
1842002-03-04 Akim Demaille <akim@epita.fr>
185
186 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
187 before returning.
188 Reported by Benoit Perrot.
189
1902002-03-04 Akim Demaille <akim@epita.fr>
191
192 Use bitset operations when possible, not loops over bits.
193
194 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
195 bitset_or.
196 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
197 * src/reduce.c (useless_nonterminals): Formatting changes.
198 * src/warshall.c (TC): Use bitset_or.
199
2002002-03-04 Akim Demaille <akim@epita.fr>
201
202 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
203 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
204 Ditto.
205
2062002-03-04 Akim Demaille <akim@epita.fr>
207
208 * src/lalr.c (F): Now a bitset*.
209 Adjust all dependencies.
210
2112002-03-04 Akim Demaille <akim@epita.fr>
212
213 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
214 Adjust all dependencies.
215
2162002-03-04 Akim Demaille <akim@epita.fr>
217
218 * src/L0.c, src/LR0.h (nstates): Be size_t.
219 Adjust comparisons (signed vs unsigned).
220 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
221 bitset*.
222 Adjust all dependencies.
223
2242002-03-04 Akim Demaille <akim@epita.fr>
225
226 * src/closure.c (firsts): Now, also a bitset.
227 Adjust all dependencies.
228 (varsetsize): Remove, now unused.
229 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
230
2312002-03-04 Akim Demaille <akim@epita.fr>
232
233 * src/print.c: Convert to use bitset.h, not hand coded iterations
234 over ints.
235
2362002-03-04 Akim Demaille <akim@epita.fr>
237
238 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
239
2402002-03-04 Akim Demaille <akim@epita.fr>
241
242 * src/closure.c (ruleset): Be a bitset.
243 (rulesetsize): Remove.
244
2452002-03-04 Akim Demaille <akim@epita.fr>
246
247 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
248 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
249 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
250 * src/closure.c (fderives): Be an array of bitsets.
251
2522002-02-28 Robert Anisko <robert@lrde.epita.fr>
253
254 * data/bison.c++: Merge the two generated headers. Insert a copyright
255 notice in each output file.
256
2572002-02-28 Akim Demaille <akim@epita.fr>
258
259 * data/bison.c++: Copy the prologue of bison.simple to fetch
260 useful M4 definitions, such as b4_header_guard.
261
2622002-02-25 Akim Demaille <akim@epita.fr>
263
264 * src/getargs.c (version): Give the name of the authors, and use a
265 translator friendly scheme for the bgr
266 copyright notice.
267
2682002-02-25 Akim Demaille <akim@epita.fr>
269
270 * src/output.c (header_output): Remove, now handled completely via
271 M4.
272
2732002-02-25 Akim Demaille <akim@epita.fr>
274
275 * m4/m4.m4: New, from CVS Autoconf.
276 * configure.in: Invoke it.
277 * src/output.c (output_skeleton): Use its result instead of the
278 hard coded name.
279
2802002-02-25 Akim Demaille <akim@epita.fr>
281
282 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
283 Fileutils 4.1.5.
284 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
285 * src/output.c (output_skeleton): Use mkstemp to create a real
286 temporary file.
287 Move the filling of `skeleton' and its muscle to...
288 (prepare): here.
289 (output): Move the definition of the prologue muscle to...
290 (prepare): here.
291 * src/system.h (DEFAULT_TMPDIR): New.
292
2932002-02-14 Paul Eggert <eggert@twinsun.com>
294
295 Remove the support for C++ namespace cleanliness; it was
296 causing more problems than it was curing, since it didn't work
297 properly on some nonstandard C++ compilers. This can wait
298 for a proper C++ parser.
299
300 * NEWS: Document this.
301 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
302 of C++, as it's treated like C now.
303 * src/bison.simple (YYSTD): Remove.
304 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
305 Treat C++ just like Standard C instead of trying to support
306 namespace cleanliness.
307
3082002-02-14 Akim Demaille <akim@epita.fr>
309
310 * tests/regression.at (else): Adjust to Andreas' change.
311
3122002-02-14 Akim Demaille <akim@epita.fr>
313
314 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
315
3162002-02-13 Andreas Schwab <schwab@suse.de>
317
318 * src/output.c (output_rule_data): Don't output NULL, it might
319 not be defined yet.
320
3212002-02-11 Robert Anisko <robert@lrde.epita.fr>
322
323 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
324 (Copyright notice): Update.
325
3262002-02-11 Akim Demaille <akim@epita.fr>
327
328 * tests/regression.at (%nonassoc and eof): Don't include
329 nonportable headers.
330
3312002-02-08 Robert Anisko <robert@lrde.epita.fr>
332
333 * data/bison.c++: Correct error recovery. Make the user able to
334 initialize the starting location.
335
3362002-02-07 Akim Demaille <akim@epita.fr>
337
338 * tests/input.at: New.
339
3402002-02-07 Robert Anisko <robert@lrde.epita.fr>
341
342 * data/bison.c++: Replace some direct m4 expansions by constants. Be
343 more consistent when naming methods and variables. Put preprocessor
344 directives around tables only needed for debugging.
345
3462002-02-07 Robert Anisko <robert@lrde.epita.fr>
347
348 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
349 C++ parsers.
350 (yy::b4_name::parse): Use print_.
351
3522002-02-07 Robert Anisko <robert@lrde.epita.fr>
353
354 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
355
3562002-02-07 Robert Anisko <robert@lrde.epita.fr>
357
358 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
359 C++ parsers.
360 (yy::b4_name::parse): Build verbose error messages, and use error_.
361
3622002-02-06 Robert Anisko <robert@lrde.epita.fr>
363
364 * data/bison.c++: Fix m4 quoting in comments.
365
3662002-02-06 Robert Anisko <robert@lrde.epita.fr>
367
368 * data/bison.c++: Adjust the parser code. Fix some muscles that were
369 not expanded by m4.
370
3712002-02-05 Akim Demaille <akim@epita.fr>
372
373 * data/bison.c++: Adjust to the M4 back end.
374 More is certainly needed.
375
3762002-02-05 Akim Demaille <akim@epita.fr>
377
378 Give a try to M4 as a back end.
379
380 * lib/readpipe.c: New, from wdiff.
381 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
382 BISON_HAIRY.
383 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
384 specific values. Now it is m4 that performs the lookup.
385 * src/parse-skel.y: Remove.
386 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
387 * src/output.c (actions_output, guards_output)
388 (token_definitions_output): No longer keeps track of the output
389 line number, hence remove the second argument.
390 (guards_output): Check against the guard member of a rule, not the
391 action member.
392 Adjust callers.
393 (output_skeleton): Don't look for the skeleton location, let m4 do
394 that.
395 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
396 file will be used.
397 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
398 (prepare): Given that for the time being changesyntax is not
399 usable in M4, rename the muscles using `-' to `_'.
400 Define `defines_flag', `output_parser_name' and `output_header_name'.
401 * src/output.h (actions_output, guards_output)
402 (token_definitions_output): Adjust prototypes.
403 * src/scan-skel.l: Instead of scanning the skeletons, it now
404 processes the output of m4: `__oline__' and `#output'.
405 * data/bison.simple: Adjust to be used by M4(sugar).
406 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
407 to date.
408 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
409 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
410 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
411 shamelessly stolen from CVS Autoconf.
412
4132002-02-05 Akim Demaille <akim@epita.fr>
414
415 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
416 * configure.in: Check for the declarations of free and malloc.
417 * src/muscle_tab.c: Adjust.
418
4192002-02-05 Akim Demaille <akim@epita.fr>
420
421 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
422 which have no values.
423
4242002-02-05 Akim Demaille <akim@epita.fr>
425
426 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
427 * data/: here.
428
4292002-01-29 Paul Eggert <eggert@twinsun.com>
430
431 * src/bison.simple (YYSIZE_T): Do not define merely because
432 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
433 On some platforms, <alloca.h> does not declare YYSTD (size_t).
434
4352002-01-27 Akim Demaille <akim@epita.fr>
436
437 Fix `%nonassoc and eof'.
438
439 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
440 which were not properly copied! Replace
441 memcpy (res->errs, src->errs, src->nerrs);
442 with
443 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
444 !!!
445 * tests/regression.at (%nonassoc and eof): Adjust to newest
446 Autotest: `.' is not in the PATH.
447
4482002-01-27 Akim Demaille <akim@epita.fr>
449
450 * tests/sets.at (AT_EXTRACT_SETS): New.
451 (Nullable): Use it.
452 (Firsts): New.
453
4542002-01-26 Akim Demaille <akim@epita.fr>
455
456 * tests/actions.at, tests/calc.at, tests/headers.at,
457 * tests/torture.at: Adjust to the newest Autotest which no longer
458 forces `.' in the PATH.
459
4602002-01-25 Akim Demaille <akim@epita.fr>
461
462 * tests/regression.at (%nonassoc and eof): New.
463 Suggested by Robert Anisko.
464
4652002-01-24 Akim Demaille <akim@epita.fr>
466
467 Bison dumps core when trying to complain about broken input files.
468 Reported by Cris van Pelt.
469
470 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
471 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
472 into...
473 (Invalid inputs): Strengthen: exercise parse_percent_token.
474
4752002-01-24 Robert Anisko <robert.anisko@epita.fr>
476
477 * src/Makefile.am: Add bison.c++.
478 * src/bison.c++: New skeleton.
479
4802002-01-21 Paolo Bonzini <bonzini@gnu.org>
481
482 * po/it.po: New.
483
4842002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
485
486 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
487
4882002-01-20 Marc Autret <marc@gnu.org>
489
490 * src/files.c (compute_output_file_names): Fix
491
4922002-01-20 Marc Autret <marc@gnu.org>
493
494 * tests/output.at: New test.
495 * src/files.c (compute_base_names): Don't map extensions when
496 the YACC flag is set, use defaults.
497 Reported by Evgeny Stambulchik.
498
4992002-01-20 Marc Autret <marc@gnu.org>
500
501 * src/system.h: Need to define __attribute__ away for non-GCC
502 compilers as well (i.e. the vendor C compiler).
503 Suggested by Albert Chin-A-Young.
504
5052002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
506
507 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
508 canonical definition.
509 * src/system.h: Use the canonical definition for PARAMS (avoids
510 a conflict with the macro from lib/hash.h).
511
5122002-01-11 Akim Demaille <akim@epita.fr>
513
514 * configure.in: Use AC_FUNC_STRNLEN.
515 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
516
5172002-01-09 Akim Demaille <akim@epita.fr>
518
519 * src/files.c, src/files.h (output_infix): New.
520 (tab_extension): Remove.
521 (compute_base_names): Compute the former, drop the latter.
522 * src/output.c (prepare): Insert the muscles `output-infix', and
523 `output-suffix'.
524 * src/parse-skel.y (string, string.1): New.
525 (section.header): Use it.
526 (section.yacc): Remove.
527 (prefix): Remove too.
528 * src/scan-skel.l: Adjust.
529 * src/bison.simple, src/bison.hairy: Adjust.
530
5312002-01-09 Akim Demaille <akim@epita.fr>
532
533 * configure.in (WERROR_CFLAGS): Compute it.
534 * src/Makefile.am (CFLAGS): Pass it.
535 * tests/atlocal.in (CFLAGS): Idem.
536 * src/files.c: Fix a few warnings.
537 (get_extension_index): Remove, unused.
538
5392002-01-08 Akim Demaille <akim@epita.fr>
540
541 * src/getargs.c (AS_FILE_NAME): New.
542 (getargs): Use it to convert DOSish file names.
543 * src/files.c (base_name): Rename as full_base_name to avoid
544 clashes with `base_name ()'.
545 (filename_split): New.
546 (compute_base_names): N-th rewrite, using filename_split.
547
5482002-01-08 Akim Demaille <akim@epita.fr>
549
550 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
551 New, stolen from the Fileutils 4.1.
552 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
553 * configure.in: Check for the presence of memrchr, and of its
554 prototype.
555
5562002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
557
558 * lib/hash.h (__P): Added definition for this macro.
559 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
560 BUILT_SOURCES, to ensure they are generated first.
561 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
562 %error-verbose to allow bootstrapping with bison 1.30x.
563
5642002-01-06 Akim Demaille <akim@epita.fr>
565
566 * src/reader.c (parse_braces): Don't fetch the next char, the
567 convention is to fetch on entry.
568 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
569 'switch' without a following semicolon.
570 * tests/regression.at (braces parsing): New.
571
5722002-01-06 Akim Demaille <akim@epita.fr>
573
574 Bison is dead wrong in its RR conflict reports.
575
576 * tests/torture.at (GNU Cim Grammar): New.
577 * src/conflicts.c (count_rr_conflicts): Fix.
578
5792002-01-06 Akim Demaille <akim@epita.fr>
580
581 Creating package.m4 from configure.ac causes too many problems.
582
583 * tests/Makefile.am (package.m4): Create it by hand,
584 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
585
5862002-01-06 Akim Demaille <akim@epita.fr>
587
588 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
589 skeleton.h.
590
5912002-01-04 Paul Eggert <eggert@twinsun.com>
592
593 * doc/bison.texinfo (Debugging):
594 Remove YYSTDERR; it's no longer defined or used.
595 Also, s/cstdio.h/cstdio/.
596
5972002-01-03 Akim Demaille <akim@epita.fr>
598
599 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
600
6012002-01-03 Akim Demaille <akim@epita.fr>
602
603 * src/parse-skel.y (process_skeleton): Don't bind the parser's
604 tracing code to --trace, wait for a better --trace option, with
605 args.
606
6072002-01-03 Akim Demaille <akim@epita.fr>
608
609 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
610 The ISO C++ standard is extremely clear about it: stderr is
611 considered a macro, not a regular symbol (see table 94 `Header
612 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
613 Therefore std:: does not apply to it. It still does with fprintf.
614 Also, s/cstdio.h/cstdio/.
615
6162002-01-03 Akim Demaille <akim@epita.fr>
617
618 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
619 for non system headers.
620
6212002-01-02 Akim Demaille <akim@epita.fr>
622
623 Equip the skeleton chain with location tracking, runtime trace,
624 pure parser and scanner.
625
626 * src/parse-skel.y: Request a pure parser, locations, and prefix
627 renaming.
628 (%union): Having several members with the same type does not help
629 type mismatches, simplify.
630 (YYPRINT, yyprint): New.
631 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
632 (skel_error): this.
633 Handle locations.
634 * src/scan-skel.l: Adjust to these changes.
635 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
636 (LOCATION_PRINT, skel_control_t): New.
637
6382001-12-30 Akim Demaille <akim@epita.fr>
639
640 * src/parse-skel.y: Get rid of the shift/reduce conflict:
641 replace `gb' with BLANKS.
642 * src/scan-skel.l: Adjust.
643
6442001-12-30 Akim Demaille <akim@epita.fr>
645
646 * src/system.h: We don't need nor want bcopy.
647 Throw away MS-DOS crap: we don't need getpid.
648 * configure.in: We don't need strndup. It was even causing
649 problems: because Flex includes the headers *before* us,
650 _GNU_SOURCE is not defined by config.h, and therefore strndup was
651 not visible.
652 * lib/xstrndup.c: New.
653 * src/scan-skel.l: Use it.
654 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
655 * src/parse-skel.y: Use %directives instead of #defines.
656
6572001-12-30 Akim Demaille <akim@epita.fr>
658
659 * src/skeleton.h: New.
660 * src/output.c (output_parser, output_master_parser): Remove, dead
661 code.
662 * src/output.h (get_lines_number, actions_output, guards_output)
663 (token_definitions_output): Prototype them.
664 * src/parse-skel.y: Add the license notice.
665 Include output.h and skeleton.h.
666 (process_skeleton): Returns void, and takes a single parameter.
667 * src/scan-skel.l: Add the license notice.
668 Include skeleton.h.
669 Don't use %option yylineno: it seems that then Flex imagines
670 REJECT has been used, and therefore it won't reallocate its
671 buffers (which makes no other sense to me than a bug). It results
672 in warnings for `unused: yy_flex_realloc'.
673
6742001-12-30 Robert Anisko <robert.anisko@epita.fr>
675
676 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
677 (MUSCLE_INSERT_PREFIX): ...to there.
678 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
679 (MUSCLE_INSERT_PREFIX): Move from here...
680
681 * src/bison.hairy: Add a section directive. Put braces around muscle
682 names. This parser skeleton is still broken, but Bison should not
683 choke on a bad muscle 'syntax'.
684 * src/bison.simple: Add a section directive. Put braces around muscle
685 names.
686
687 * src/files.h (strsuffix, stringappend): Add declarations.
688 (tab_extension): Add declaration.
689 (short_base_name): Add declaration.
690
691 * src/files.c (strsuffix, stringappend): No longer static. These
692 functions are used in the skeleton parser.
693 (tab_extension): New.
694 (compute_base_names): Use the computations done in this function
695 to guess if the generated parsers should have '.tab' in their
696 names.
697 (short_base_name): No longer static.
698
699 * src/output.c (output_skeleton): New.
700 (output): Disable call to output_master_parser, and give a try to
701 a new skeleton handling system.
702 (guards_output, actions_output): No longer static.
703 (token_definitions_output, get_lines_number): No longer static.
704
705 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
706
707 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
708 parse-skel.y.
709
710 * src/parse-skel.y: New file.
711 * src/scan-skel.l: New file.
712
7132001-12-29 Akim Demaille <akim@epita.fr>
714
715 %name-prefix is broken.
716
717 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
718 Adjust all dependencies.
719 * tests/headers.at (export YYLTYPE): Strengthen this test: use
720 %name-prefix.
721
722 Renaming yylval but not yylloc is not consistent. Now we do.
723
724 * src/bison.simple: Prefix yylloc if used.
725 * doc/bison.texinfo (Decl Summary): Document that.
726
7272001-12-29 Akim Demaille <akim@epita.fr>
728
729 * doc/bison.texinfo: Promote `%long-directive' over
730 `%long_directive'.
731 Remove all references to fixed-output-files, yacc is enough.
732
7332001-12-29 Akim Demaille <akim@epita.fr>
734
735 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
736 user prologue. These are defaults.
737 * tests/actions.at (Mid-rule actions): Make sure the user can
738 define YYDEBUG and YYERROR_VERBOSE.
739
7402001-12-29 Akim Demaille <akim@epita.fr>
741
742 * src/output.c (header_output): Don't forget to export YYLTYPE and
743 yylloc.
744 * tests/headers.at (export YYLTYPE): New, make sure it does.
745 * tests/regression.at (%union and --defines, Invalid CPP headers):
746 Move to...
747 * tests/headers.at: here.
748
7492001-12-29 Akim Demaille <akim@epita.fr>
750
751 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
752
7532001-12-29 Akim Demaille <akim@epita.fr>
754
755 * tests/actions.at (Mid-rule actions): Output on a single line
756 instead of several.
757
7582001-12-29 Akim Demaille <akim@epita.fr>
759
760 * doc/bison.texinfo: Formatting changes.
761
7622001-12-29 Akim Demaille <akim@epita.fr>
763
764 Don't store the token defs in a muscle, just be ready to output it
765 on command. Now possible via `symbols'. Fixes a memory leak.
766
767 * src/output.c (token_definitions_output): New.
768 (output_parser, header_output): Use it.
769 * src/reader.c (symbols_save): Remove.
770
7712001-12-29 Akim Demaille <akim@epita.fr>
772
773 * src/bison.simple: Do not provide a default for YYSTYPE and
774 YYLTYPE before the user's prologue. Otherwise it's hardly... a
775 default.
776
7772001-12-29 Akim Demaille <akim@epita.fr>
778
779 Mid-rule actions are simply... ignored!
780
781 * src/reader.c (readgram): Be sure to attach mid-rule actions to
782 the empty-rule associated to the dummy symbol, not to the host
783 rule.
784 * tests/actions.at (Mid-rule actions): New.
785
7862001-12-29 Akim Demaille <akim@epita.fr>
787
788 Memory leak.
789
790 * src/reader.c (reader): Free grammar.
791
7922001-12-29 Akim Demaille <akim@epita.fr>
793
794 Memory leak.
795
796 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
797 since it allocates it for each state, although only one is needed.
798 (allocate_storage): Do it here.
799
8002001-12-29 Akim Demaille <akim@epita.fr>
801
802 * src/options.h, src/options.c (create_long_option_table): Rename
803 as...
804 (long_option_table_new): this, with a clearer prototype.
805 (percent_table): Remove, unused,
806 * src/getargs.c (getargs): Adjust.
807
8082001-12-29 Akim Demaille <akim@epita.fr>
809
810 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
811 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
812 as states.
813
8142001-12-29 Akim Demaille <akim@epita.fr>
815
816 * src/lalr.c (build_relations): Rename `states' as `states1'.
817 Sorry, I don't understand exactly what it is, no better name...
818
8192001-12-29 Akim Demaille <akim@epita.fr>
820
821 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
822 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
823 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
824 as rules.
825
8262001-12-29 Akim Demaille <akim@epita.fr>
827
828 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
829 ago.
830
8312001-12-29 Akim Demaille <akim@epita.fr>
832
833 * src/reader.c, src/reader.h (user_toknums): Remove.
834 Adjust all users to use symbols[i]->user_token_number.
835
8362001-12-29 Akim Demaille <akim@epita.fr>
837
838 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
839 Adjust all users to use symbols[i]->prec or ->assoc.
840
8412001-12-29 Akim Demaille <akim@epita.fr>
842
843 * src/reader.c, src/reader.h (tags): Remove.
844 Adjust all users to use symbols[i]->tag.
845
8462001-12-29 Akim Demaille <akim@epita.fr>
847
848 * src/gram.h, src/gram.c (symbols): New, similar to state_table
849 and rule_table.
850 * src/reader.c (packsymbols): Fill this table.
851 Drop sprec.
852 * src/conflicts.c (resolve_sr_conflict): Adjust.
853 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
854 single table.
855 Use symbols[i]->tag instead of tags[i].
856
8572001-12-29 Akim Demaille <akim@epita.fr>
858
859 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
860 In addition, put a comment in there, to replace...
861 * tests/regression.at (%union and C comments): Remove.
862
8632001-12-29 Akim Demaille <akim@epita.fr>
864
865 * tests/regression.at (Web2c Actions): Blindly move the actual
866 output as expected output. The contents *seem* right to me, but I
867 can't pretend reading perfectly parser tables... Nonetheless, all
868 the other tests pass correctly, the table look OK, even though the
869 presence of `$axiom' is to be noted: AFAICS it is useless (but
870 harmless).
871
8722001-12-29 Akim Demaille <akim@epita.fr>
873
874 * src/reader.c (readgram): Don't add the rule 0 if there were no
875 rules read. In other words, add it _after_ having performed
876 grammar sanity checks.
877 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
878
8792001-12-29 Akim Demaille <akim@epita.fr>
880
881 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
882 visible, and some states have now a different number.
883
8842001-12-29 Akim Demaille <akim@epita.fr>
885
886 * src/reader.c (readgram): Bind the initial rule's lineno to that
887 of the first rule.
888 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
889 (Solved SR Conflicts): Adjust rule 0's line number.
890
8912001-12-29 Akim Demaille <akim@epita.fr>
892
893 Fix the `GAWK Grammar' failure.
894
895 * src/LR0.c (final_state): Initialize to -1 so that we do compute
896 the reductions of the first state which was mistakenly confused
897 with the final state because precisely final_state was initialized
898 to 0.
899 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
900 now noticed by Bison.
901 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
902 have a reduction on $default.
903
9042001-12-29 Akim Demaille <akim@epita.fr>
905
906 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
907 rule line numbers.
908 * src/closure.c (print_closure): Likewise.
909 * src/derives.c (print_derives): Likewise.
910 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
911 now.
912
9132001-12-29 Akim Demaille <akim@epita.fr>
914
915 * src/lalr.c (lookaheads_print): New.
916 (lalr): Call it when --trace-flag.
917 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
918 are dumped.
919
9202001-12-29 Akim Demaille <akim@epita.fr>
921
922 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
923 when walking through ritem, even via rule->rhs.
924 * src/reduce.c (dump_grammar, useful_production, reduce_output)
925 (useful_production, useless_nonterminals): Likewise.
926 (reduce_grammar_tables): Likewise, plus update nritems.
927 * src/nullable.c (set_nullable): Likewise.
928 * src/lalr.c (build_relations): Likewise.
929 * tests/sets.at (Nullable): Adjust.
930 Fortunately, now, the $axiom is no longer nullable.
931
9322001-12-29 Akim Demaille <akim@epita.fr>
933
934 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
935 the 0-sentinel.
936 * src/gram.c (ritem_longest_rhs): Likewise.
937 * src/reduce.c (nonterminals_reduce): Likewise.
938 * src/print_graph.c (print_graph): Likewise.
939 * src/output.c (output_rule_data): Likewise.
940 * src/nullable.c (set_nullable): Likewise.
941
9422001-12-29 Akim Demaille <akim@epita.fr>
943
944 * src/output.c: Comment changes.
945
9462001-12-27 Paul Eggert <eggert@twinsun.com>
947
948 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
949 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
950 Sparc, as they were causing more porting problems than the
951 (minor) performance improvement was worth.
952
953 Also, catch up with 1.31's YYSTD.
954
9552001-12-27 Akim Demaille <akim@epita.fr>
956
957 * src/output.c (output_gram): Rely on nritems, not the
958 0-sentinel. See below.
959 Use -1 as separator, not 0.
960 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
961 Rely on -1 as separator in yyrhs, instead of 0.
962 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
963 twice `Now at end of input', therefore there are two lines less to
964 expect.
965
9662001-12-27 Akim Demaille <akim@epita.fr>
967
968 * tests/regression.at (Unresolved SR Conflicts):
969 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
970 below.
971
9722001-12-27 Akim Demaille <akim@epita.fr>
973
974 * src/LR0.c (new_state): Recognize the final state by the fact it
975 is reached by eoftoken.
976 (insert_start_shifting_state, insert_eof_shifting_state)
977 (insert_accepting_state, augment_automaton): Remove, since now
978 these states are automatically computed from the initial state.
979 (generate_states): Adjust.
980 * src/print.c: When reporting a rule number to the user, substract
981 1, so that the axiom rule is rule 0, and the first user rule is 1.
982 * src/reduce.c: Likewise.
983 * src/print_graph.c (print_core): For the time being, just as for
984 the report, depend upon --trace-flags to dump the full set of
985 items.
986 * src/reader.c (readgram): Once the grammar read, insert the rule
987 0: `$axiom: START-SYMBOL $'.
988 * tests/set.at: Adjust: rule 0 is now displayed, and since the
989 number of the states has changed (the final state is no longer
990 necessarily the last), catch up.
991
9922001-12-27 Akim Demaille <akim@epita.fr>
993
994 Try to make the use of the eoftoken valid. Given that its value
995 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
996 is used instead of > 0 where appropriate, (ii), depend upon nritems
997 instead of the 0-sentinel.
998
999 * src/gram.h, src/gram.c (nritems): New.
1000 Expected to be duplication of nitems, but for the time being...
1001 * src/reader.c (packgram): Assert nritems and nitems are equal.
1002 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1003 * src/closure.c (print_closure, print_fderives): Likewise.
1004 * src/gram.c (ritem_print): Likewise.
1005 * src/print.c (print_core, print_grammar): Likewise.
1006 * src/print_graph.c: Likewise.
1007
10082001-12-27 Akim Demaille <akim@epita.fr>
1009
1010 * src/main.c (main): If there are complains after grammar
1011 reductions, then output the report anyway if requested, then die.
1012 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1013 * src/reader.c (eoftoken): New.
1014 (parse_token_decl): If the token being defined has value `0', it
1015 is the eoftoken.
1016 (packsymbols): No longer hack `tags' to insert `$' by hand.
1017 Be sure to preserve the value of the eoftoken.
1018 (reader): Make sure eoftoken is defined.
1019 Initialize nsyms to 0: now eoftoken is created just like the others.
1020 * src/print.c (print_grammar): Don't special case the eof token.
1021 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1022 lie anyway, albeit pleasant.
1023 * tests/calc.at: Exercise error messages with eoftoken.
1024 Change the grammar so that empty input is invalid.
1025 Adjust expectations.
1026 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1027
10282001-12-27 Akim Demaille <akim@epita.fr>
1029
1030 * configure.in: Check the protos of strchr ans strspn.
1031 Replace strchr if needed.
1032 * src/system.h: Provide the protos of strchr, strspn and memchr if
1033 missing.
1034 * lib/strchr.c: New.
1035 * src/reader.c (symbols_save): Use strchr.
1036
10372001-12-27 Akim Demaille <akim@epita.fr>
1038
1039 * src/print.c, src/print_graph.c (escape): New.
1040 Use it to quote the TAGS outputs.
1041 * src/print_graph.c (print_state): Now errors are in red, and
1042 reductions in green.
1043 Prefer high to wide: output the state number on a line of its own.
1044
10452001-12-27 Akim Demaille <akim@epita.fr>
1046
1047 * src/state.h, src/state.c (reductions_new): New.
1048 * src/LR0.c (set_state_table): Let all the states have a
1049 `reductions', even if reduced to 0.
1050 (save_reductions): Adjust.
1051 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1052 * src/print.c (print_reductions, print_actions): Adjust.
1053 * src/output.c (action_row): Adjust.
1054
10552001-12-27 Akim Demaille <akim@epita.fr>
1056
1057 * src/state.h, src/state.c (errs_new, errs_dup): New.
1058 * src/LR0.c (set_state_table): Let all the states have an errs,
1059 even if reduced to 0.
1060 * src/print.c (print_errs, print_reductions): Adjust.
1061 * src/output.c (output_actions, action_row): Adjust.
1062 * src/conflicts.c (resolve_sr_conflict): Adjust.
1063
10642001-12-27 Akim Demaille <akim@epita.fr>
1065
1066 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1067
10682001-12-27 Akim Demaille <akim@epita.fr>
1069
1070 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1071 * src/print.c: here.
1072 (lookaheadset, shiftset): New, used as additional storage by
1073 print_reductions.
1074 (print_results): Adjust.
1075 (print_shifts, print_gotos, print_errs): New, extracted from...
1076 (print_actions): here.
1077 * src/print_graph.c (print_actions): Remove dead code.
1078
10792001-12-27 Akim Demaille <akim@epita.fr>
1080
1081 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1082 `$n' and `@n'.
1083
10842001-12-27 Akim Demaille <akim@epita.fr>
1085
1086 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1087 (build_relations): Adjust.
1088
10892001-12-27 Akim Demaille <akim@epita.fr>
1090
1091 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1092 duplication.
1093
10942001-12-27 Akim Demaille <akim@epita.fr>
1095
1096 * src/reader.c (packgram): Catch nitems overflows.
1097
10982001-12-27 Akim Demaille <akim@epita.fr>
1099
1100 * src/files.c, src/files.h (guard_obstack): Remove.
1101 * src/output.c (output): Adjust.
1102 * src/reader.c (parse_braces): New, factoring...
1103 (copy_action, copy_guard): these two which are renamed as...
1104 (parse_action, parse_guard): these.
1105 As a voluntary consequence, using braces around guards is now
1106 mandatory.
1107
11082001-12-27 Akim Demaille <akim@epita.fr>
1109
1110 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1111 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1112 members.
1113 (symbol_list_new): Adjust.
1114 (copy_action): action_line is the first line, not the last.
1115 (copy_guard): Just as for actions, store the `action' only, not
1116 the switch/case/break flesh.
1117 Don't parse the user action that might follow the guard, let...
1118 (readgram): do it, i.e., now, there can be an action after a
1119 guard.
1120 In other words the guard is just explicitly optional.
1121 (packgram): Adjust.
1122 * src/output.c (guards_output): New.
1123 (output_parser): Call it when needed.
1124 (output): Also free the guard and attrs obstacks.
1125 * src/files.c, src/files.h (obstack_save): Remove.
1126 (output_files): Remove.
1127 As a result, if one needs the former `.act' file, using an
1128 appropriate skeleton which requires actions and guards is now
1129 required.
1130 * src/main.c (main): Adjust.
1131 * tests/semantic.at: New.
1132 * tests/regression.at: Use `input.y' as input file name.
1133 Avoid 8+3 problems by requiring input.c when the test needs the
1134 parser.
1135
11362001-12-27 Akim Demaille <akim@epita.fr>
1137
1138 * src/reader.c (symbol_list_new): Be sure to initialize all the
1139 fields.
1140
11412001-12-27 Akim Demaille <akim@epita.fr>
1142
1143 All the hacks using a final pseudo state are now useless.
1144
1145 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1146 * src/lalr.c (nLA): New.
1147 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1148 instead of lookaheadsp from the pseudo state (nstate + 1).
1149
11502001-12-27 Akim Demaille <akim@epita.fr>
1151
1152 * src/output.c (action_row, token_actions): Use a state_t instead
1153 of a integer, and nlookaheads instead of the following state's
1154 lookaheadsp.
1155
11562001-12-27 Akim Demaille <akim@epita.fr>
1157
1158 * src/conflicts.c (log_resolution, flush_shift)
1159 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1160 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1161 (conflicts_print, print_reductions): Use a state_t instead of an
1162 integer when referring to a state.
1163 As much as possible, depend upon nlookaheads, instead of the
1164 `lookaheadsp' member of the following state (since lookaheads of
1165 successive states are successive, the difference between state n + 1
1166 and n served as the number of lookaheads for state n).
1167 * src/lalr.c (add_lookback_edge): Likewise.
1168 * src/print.c (print_core, print_actions, print_state)
1169 (print_results): Likewise.
1170 * src/print_graph.c (print_core, print_actions, print_state)
1171 (print_graph): Likewise.
1172 * src/conflicts.h: Adjust.
1173
11742001-12-27 Akim Demaille <akim@epita.fr>
1175
1176 * src/bison.hairy: Formatting/comment changes.
1177 ANSIfy.
1178 Remove `register' indications.
1179 Add plenty of `static'.
1180
11812001-12-27 Akim Demaille <akim@epita.fr>
1182
1183 * src/output.c (prepare): Drop the muscle `ntbase' which
1184 duplicates ntokens.
1185 * src/bison.simple: Formatting/comment changes.
1186 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1187 is an undocumented synonym.
1188
11892001-12-22 Akim Demaille <akim@epita.fr>
1190
1191 * src/output.c (output_table_data): Change the prototype to use
1192 `int' for array ranges: some invocations do pass an int, not a
1193 short.
1194 Reported by Wayne Green.
1195
11962001-12-22 Akim Demaille <akim@epita.fr>
1197
1198 Some actions of web2c.y are improperly triggered.
1199 Reported by Mike Castle.
1200
1201 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1202 * tests/regression.at (Web2c): Rename as...
1203 (Web2c Report): this.
1204 (Web2c Actions): New.
1205
12062001-12-22 Akim Demaille <akim@epita.fr>
1207
1208 Reductions in web2c.y are improperly reported.
1209 Reported by Mike Castle.
1210
1211 * src/conflicts.c (print_reductions): Fix.
1212 * tests/regression.at (Web2c): New.
1213
12142001-12-18 Akim Demaille <akim@epita.fr>
1215
1216 Some host fail on `assert (!"foo")', which expands to
1217 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1218 Reported by Nelson Beebee.
1219
1220 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1221 `#define it_succeeded 0' and `assert (it_succeeded)'.
1222
12232001-12-17 Marc Autret <autret_m@epita.fr>
1224
1225 * src/bison.simple: Don't hard code the skeleton line and filename.
1226 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1227 New line counter 'skeleton_line' (skeleton-line muscle).
1228
12292001-12-17 Paul Eggert <eggert@twinsun.com>
1230
1231 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1232 YYDEBUG must be defined to a nonzero value.
1233
1234 * src/bison.simple (yytname): Do not assume that the user defines
1235 YYDEBUG to a properly parenthesized expression.
1236
12372001-12-17 Akim Demaille <akim@epita.fr>
1238
1239 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1240 nlookaheads is a new member.
1241 Adjust all users.
1242 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1243 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1244 state.
1245
12462001-12-17 Akim Demaille <akim@epita.fr>
1247
1248 * src/files.h, src/files.c (open_files, close_files): Remove.
1249 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1250 let...
1251 * src/reader.c (reader): Do it.
1252
12532001-12-17 Akim Demaille <akim@epita.fr>
1254
1255 * src/conflicts.c (print_reductions): Formatting changes.
1256
12572001-12-17 Akim Demaille <akim@epita.fr>
1258
1259 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1260 (flush_reduce): New.
1261 (resolve_sr_conflict): Adjust.
1262
12632001-12-17 Akim Demaille <akim@epita.fr>
1264
1265 * src/output.c (output_obstack): Be static and rename as...
1266 (format_obstack): this, to avoid any confusion with files.c's
1267 output_obstack.
1268 * src/reader.h (muscle_obstack): Move to...
1269 * src/output.h: here, since it's defined in output.c.
1270
12712001-12-17 Akim Demaille <akim@epita.fr>
1272
1273 * src/output.c (action_row, save_column, default_goto)
1274 (sort_actions, matching_state, pack_vector): Better variable
1275 locality.
1276
12772001-12-17 Akim Demaille <akim@epita.fr>
1278
1279 * src/output.c: Various formatting changes.
1280
12812001-12-17 Akim Demaille <akim@epita.fr>
1282
1283 * src/files.c (output_files): Free the output_obstack.
1284 * src/main.c (main): Call print and print_graph conditionally.
1285 * src/print.c (print): Work unconditionally.
1286 * src/print_graph.c (print_graph): Work unconditionally.
1287 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1288
12892001-12-16 Marc Autret <autret_m@epita.fr>
1290
1291 * src/output.c (actions_output): Fix. When we use %no-lines,
1292 there is one less line per action.
1293
12942001-12-16 Marc Autret <autret_m@epita.fr>
1295
1296 * src/bison.simple: Remove a useless #line directive.
1297 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1298 * src/output.c (get_lines_number): New.
1299 (output_parser): Adjust, now takes care about the lines of a
1300 output muscles.
1301 Fix line numbering.
1302 (actions_output): Computes the number of lines taken by actions.
1303 (output_master_parser): Insert new skeleton which is the name of
1304 the output parser file name.
1305
13062001-12-15 Marc Autret <autret_m@epita.fr>
1307
1308 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1309
13102001-12-15 Marc Autret <autret_m@epita.fr>
1311
1312 * src/output.c (output_gram): Keep track of the hairy one.
1313
13142001-12-15 Akim Demaille <akim@epita.fr>
1315
1316 Make `make distcheck' work.
1317
1318 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1319 system.h which uses libgettext.h.
1320
13212001-12-15 Akim Demaille <akim@epita.fr>
1322
1323 * src/nullable.c (set_nullable): Useless rules must be skipped,
1324 otherwise, since we range over their symbols, we might look at a
1325 nonterminal which no longer ``exists'', i.e., it is not counted in
1326 `nvars', hence we overflow our arrays.
1327
13282001-12-15 Akim Demaille <akim@epita.fr>
1329
1330 The header can also be produced directly, without any obstack!
1331 Yahoo!
1332
1333 * src/files.c, src/files.h (defines_obstack): Remove.
1334 (compute_header_macro): Global.
1335 (defines_obstack_save): Remove.
1336 * src/reader.c (parse_union_decl): No longer output to
1337 defines_obstack: its content can be found in the `stype' muscle
1338 anyway.
1339 (output_token_translations): Merge into...
1340 (symbols_output): this.
1341 Rename as...
1342 (symbols_save): this.
1343 (reader): Adjust.
1344 * src/output.c (header_output): New.
1345 (output): Call it.
1346
13472001-12-15 Akim Demaille <akim@epita.fr>
1348
1349 * src/reader.c (parse_union_decl): Instead of handling two obstack
1350 simultaneously, use one to define the `stype' muscle, and use the
1351 value of the latter to fill defines_obstack.
1352 (copy_comment): Remove.
1353 (copy_comment2): Work for a single obstack.
1354 Rename as...
1355 (copy_comment): this.
1356
13572001-12-15 Akim Demaille <akim@epita.fr>
1358
1359 * src/lex.c, src/lex.h (xgetc): No longer static.
1360 * src/reader.c (parse_union_decl): Revamp.
1361
13622001-12-15 Akim Demaille <akim@epita.fr>
1363
1364 Still making progress in separating Bison into (i) input, (ii)
1365 process, (iii) output: now we can directly output the parser file
1366 without using table_obstack at all.
1367
1368 * src/files.c, src/files.h (table_obstack): Bye bye.
1369 (parser_file_name): New.
1370 * src/files.c (compute_output_file_names): Compute it.
1371 * src/output.c (actions_output, output_parser)
1372 (output_master_parser): To a file instead of an obstack.
1373
13742001-12-15 Akim Demaille <akim@epita.fr>
1375
1376 Attach actions to rules, instead of pre-outputting them to
1377 actions_obstack.
1378
1379 * src/gram.h (rule_t): action and action_line are new members.
1380 * src/reader.c (symbol_list): Likewise.
1381 (copy_action): Save the actions within the rule.
1382 (packgram): Save them in rule_table.
1383 * src/output.c (actions_output): New.
1384 (output_parser): Use it on `%%actions'.
1385 (output_rule_data): Don't free rule_table.
1386 (output): Do it.
1387 (prepare): Don't save the `action' muscle.
1388 * src/bison.simple: s/%%action/%%actions/.
1389
13902001-12-15 Akim Demaille <akim@epita.fr>
1391
1392 * src/reader.c (copy_action): When --yacc, don't append a `;'
1393 to the user action: let it fail if lacking.
1394 Suggested by Arnold Robbins and Tom Tromey.
1395
13962001-12-14 Akim Demaille <akim@epita.fr>
1397
1398 * src/lex.c (literalchar): Simply return the char you decoded, non
1399 longer mess around with obstacks and int pointers.
1400 Adjust all callers.
1401
14022001-12-14 Akim Demaille <akim@epita.fr>
1403
1404 * src/lex.c (literalchar): Don't escape the special characters,
1405 just decode them, and keep them as char (before, eol was output as
1406 the 2 char string `\n' etc.).
1407 * src/output.c (output_rule_data): Use quotearg to output the
1408 token strings.
1409
14102001-12-13 Paul Eggert <eggert@twinsun.com>
1411
1412 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1413 Do not infringe on the global user namespace when using C++.
1414 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1415 All uses of `fprintf' and `stderr' changed.
1416
1417 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1418
14192001-12-13 Akim Demaille <akim@epita.fr>
1420
1421 The computation of nullable is broken: it doesn't handle empty
1422 RHS's properly.
1423
1424 * tests/torture.at (GNU AWK Grammar): New.
1425 * tests/sets.at (Nullable): New.
1426 * src/nullable.c (set_nullable): Instead of blindly looping over
1427 `ritems', loop over the rules, and then over their rhs's.
1428
1429 Work around Autotest bugs.
1430
1431 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1432 frame, because Autotest understand lines starting with a `+' as
1433 traces from the shell. Then, they are not processed properly.
1434 Admittedly an Autotest bug, but we don't have time to wait for
1435 Autotest to catch up.
1436 * tests/regression.at (Broken Closure): Adjust to the new table
1437 frames.
1438 Move to...
1439 * tests/sets.at: here.
1440
14412001-12-13 Akim Demaille <akim@epita.fr>
1442
1443 * src/closure.c (closure): Use nrules instead of playing tricks
1444 with BITS_PER_WORD.
1445
14462001-12-13 Akim Demaille <akim@epita.fr>
1447
1448 * src/print.c (print_actions): Output the handling of `$' as the
1449 traces do: shifting the token EOF. Before EOF was treated as a
1450 nonterminal.
1451 * tests/regression.at: Adjust some tests.
1452 * src/print_graph.c (print_core): Complete the set of items via
1453 closure. The next-to-final and final states are still unsatisfying,
1454 but that's to be addressed elsewhere.
1455 No longer output the rule numbers, but do output the state number.
1456 A single loop for the shifts + gotos is enough, but picked a
1457 distinct color for each.
1458 (print_graph): Initialize and finalize closure.
1459
14602001-12-13 Akim Demaille <akim@epita.fr>
1461
1462 * src/reader.c (readgram): Remove dead code, an strip useless
1463 braces.
1464 (get_type): Remove, unused.
1465
14662001-12-12 Akim Demaille <akim@epita.fr>
1467
1468 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1469 on that of lib/error.c.
1470
14712001-12-12 Akim Demaille <akim@epita.fr>
1472
1473 Some hosts don't like `/' in includes.
1474
1475 * src/system.h: Include libgettext.h without qualifying the path.
1476 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1477 $(top_srcdir).
1478
14792001-12-11 Marc Autret <autret_m@epita.fr>
1480
1481 * src/output.c (output_parser): Remove useless muscle.
1482
14832001-12-11 Marc Autret <autret_m@epita.fr>
1484
1485 * src/bison.simple: Remove #line just before %%epilogue. It
1486 is now handled in ...
1487 * src/reader.c (read_additionnal_code): Add the output of a
1488 #line for the epilogue.
1489
14902001-12-10 Marc Autret <autret_m@epita.fr>
1491
1492 * src/reader.c (copy_definition): Re-use CPP-outed code which
1493 replace precedent remove.
1494 * src/bison.simple: Remove #line before %%prologue because
1495 %%input-line is wrong at this time.
1496
14972001-12-10 Marc Autret <autret_m@epita.fr>
1498
1499 * src/reader.c (symbols_output): Clean up.
1500 * src/output.c (output_gram, output): Clean up.
1501
15022001-12-10 Akim Demaille <akim@epita.fr>
1503
1504 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1505 * src/LR0.c (set_state_table): here.
1506 * src/lalr.c (lalr): Call it.
1507
15082001-12-10 Akim Demaille <akim@epita.fr>
1509
1510 * src/state.h (shifts): Remove the `number' member: shifts are
1511 attached to state, hence no longer need to be labelled with a
1512 state number.
1513
15142001-12-10 Akim Demaille <akim@epita.fr>
1515
1516 Now that states have a complete set of members, the linked list of
1517 shifts is useless: just fill directly the state's shifts member.
1518
1519 * src/state.h (shifts): Remove the `next' member.
1520 * src/LR0.c (first_state, last_state): Remove.
1521 Adjust the callers.
1522 (augment_automaton): Don't look for the shifts that must be added
1523 a shift on EOF: it is those of the state we looked for! But now,
1524 since shifts are attached, it is no longer needed to looking
1525 merely by its id: its number.
1526
15272001-12-10 Akim Demaille <akim@epita.fr>
1528
1529 * src/LR0.c (augment_automaton): Better variable locality.
1530 Remove an impossible branch: if there is a state corresponding to
1531 the start symbol being shifted, then there is shift for the start
1532 symbol from the initial state.
1533
15342001-12-10 Akim Demaille <akim@epita.fr>
1535
1536 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1537 only when appropriate: when insert_start_shifting_state' is not
1538 invoked.
1539 * tests/regression.at (Rule Line Numbers): Adjust.
1540
15412001-12-10 Akim Demaille <akim@epita.fr>
1542
1543 * src/LR0.c (augment_automaton): Now that all states have shifts,
1544 merge the two cases addition shifts to the initial state.
1545
15462001-12-10 Akim Demaille <akim@epita.fr>
1547
1548 * src/lalr.c (set_state_table): Move to...
1549 * src/LR0.c: here.
1550 * src/lalr.c (lalr): Don't call it...
1551 * src/LR0.c (generate_states): do it.
1552 * src/LR0.h (first_state): Remove, only the table is used.
1553
15542001-12-10 Akim Demaille <akim@epita.fr>
1555
1556 * src/LR0.h (first_shift, first_reduction): Remove.
1557 * src/lalr.c: Don't use first_shift: find shifts through the
1558 states.
1559
15602001-12-10 Akim Demaille <akim@epita.fr>
1561
1562 * src/LR0.c: Attach shifts to states as soon as they are
1563 computed.
1564 * src/lalr.c (set_state_table): Instead of assigning shifts to
1565 state, just assert that the mapping was properly done.
1566
15672001-12-10 Akim Demaille <akim@epita.fr>
1568
1569 * src/LR0.c (insert_start_shift): Rename as...
1570 (insert_start_shifting_state): this.
1571 (insert_eof_shifting_state, insert_accepting_state): New.
1572 (augment_automaton): Adjust.
1573 Better locality of the variables.
1574 When looking if the start_symbol is shifted from the initial
1575 state, using `while (... symbol != start_symbol ...)' sounds
1576 better than `while (... symbol < start_symbol ...)': If fail
1577 to see how the order between symbols could be relevant!
1578
15792001-12-10 Akim Demaille <akim@epita.fr>
1580
1581 * src/getargs.h: Don't declare `spec_name_prefix' and
1582 `spec_file_prefix', declared by src/files.h.
1583 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1584 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1585 * src/output.c (prepare): Adjust.
1586 * src/reader.c (symbols_output): Likewise.
1587 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1588
15892001-12-10 Akim Demaille <akim@epita.fr>
1590
1591 * src/muscle_tab.c (muscle_init): NULL is a better default than
1592 `"0"'.
1593
15942001-12-10 Akim Demaille <akim@epita.fr>
1595
1596 * src/reader.c (reader): Calling symbols_output once is enough.
1597
15982001-12-10 Akim Demaille <akim@epita.fr>
1599
1600 Now that states have a complete set of members, the linked list of
1601 reductions is useless: just fill directly the state's reductions
1602 member.
1603
1604 * src/state.h (struct reductions): Remove member `number' and
1605 `next'.
1606 * src/LR0.c (first_reduction, last_reduction): Remove.
1607 (save_reductions): Don't link the new reductions, store them in
1608 this_state.
1609 * src/lalr.c (set_state_table): No need to attach reductions to
1610 states, it's already done.
1611 * src/output.c (output_actions): No longer free the shifts, then
1612 the reductions, then the states: free all the states and their
1613 members.
1614
16152001-12-10 Akim Demaille <akim@epita.fr>
1616
1617 * src/options.c (OPTN, DRTV, BOTH): New.
1618 (option_table): Use them.
1619
1620 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1621 the job of system.h.
1622 * src/options.c: Don't include stdio.h and xalloc.h for the same
1623 reasons.
1624
16252001-12-10 Akim Demaille <akim@epita.fr>
1626
1627 * src/output.c (output, prepare): Make sure the values of the
1628 muscles `action' and `prologue' are 0-terminated.
1629
16302001-12-10 Akim Demaille <akim@epita.fr>
1631
1632 Clean up GCC warnings.
1633
1634 * src/reader.c (copy_action): `buf' is not used.
1635 (parse_skel_decl): Be static.
1636 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1637 * src/options.h (create_long_option_table): Have a real prototype.
1638 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1639 (hash_delete_at): Return const void *.
1640 Adjust casts to preserve the const.
1641
16422001-12-10 Akim Demaille <akim@epita.fr>
1643
1644 * configure.in: Require 2.52g.
1645 M4 is not needed, but AUTOM4TE is.
1646 * m4/m4.m4: Remove.
1647 * tests/Makefile.am: Adjust.
1648
16492001-12-10 Akim Demaille <akim@epita.fr>
1650
1651 One structure for states is enough, even though theoretically
1652 there are LR(0) states and LALR(1) states.
1653
1654 * src/lalr.h (state_t): Remove.
1655 (state_table): Be state_t **, not state_t *.
1656 * src/state.h (core, CORE_ALLOC): Rename as...
1657 (state_t, STATE_ALLOC): this.
1658 Add the LALR(1) members: shifts, reductions, errs.
1659 * src/LR0.c (state_table): Rename as...
1660 (state_hash): this, to avoid name clashes with the global
1661 `state_table'.
1662 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1663 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1664
16652001-12-10 Akim Demaille <akim@epita.fr>
1666
1667 Bison dumps core on bash.y.
1668 Reported by Pascal Bart.
1669
1670 * src/warshall.c (bitmatrix_print): New.
1671 (TC): Use it.
1672 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1673 j must be the outer loop.
1674 * tests/regression.at (Broken Closure): New.
1675
16762001-12-05 Akim Demaille <akim@epita.fr>
1677
1678 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1679 its argument.
1680