]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
Fix big patch application problems.
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-04-07 Akim Demaille <akim@epita.fr>
2
3 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
4 lacking `+ 1' to nrules, Bison reported as useless a token if it
5 was used solely to set the precedence of the last rule...
6
72002-04-07 Akim Demaille <akim@epita.fr>
8
9 * data/bison.c++, data/bison.simple: Don't output the current file
10 name in #line, to avoid useless diffs between two identical
11 outputs under different names.
12
132002-04-07 Akim Demaille <akim@epita.fr>
14
15 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
16 Normalize loops to using `< nrules + 1', not `<= nrules'.
17
182002-04-07 Akim Demaille <akim@epita.fr>
19
20 * TODO: Update.
21
222002-04-07 Akim Demaille <akim@epita.fr>
23
24 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
25 bucket.value as bucket.number.
26
272002-04-07 Akim Demaille <akim@epita.fr>
28
29 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
30 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
31 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
32 RHS, instead of being an index in RITEMS.
33
342002-04-04 Paul Eggert <eggert@twinsun.com>
35
36 * doc/bison.texinfo: Update copyright date.
37 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
38 (Symbols): Warn about running Bison in one character set,
39 but compiling and/or running in an incompatible one.
40 Warn about character code 256, too.
41
422002-04-03 Paul Eggert <eggert@twinsun.com>
43
44 * src/bison.data (YYSTACK_ALLOC): Depend on whether
45 YYERROR_VERBOSE is nonzero, not whether it is defined.
46
47 Merge changes from bison-1_29-branch.
48
492002-03-20 Paul Eggert <eggert@twinsun.com>
50
51 Merge fixes from Debian bison_1.34-1.diff.
52
53 * configure.in (AC_PREREQ): 2.53.
54
552002-03-20 Akim Demaille <akim@epita.fr>
56
57 * src/conflicts.c (log_resolution): Argument `resolution' is const.
58
592002-03-19 Paul Eggert <eggert@twinsun.com>
60
61 * src/bison.simple (YYCOPY): New macro.
62 (YYSTACK_RELOCATE): Use it.
63 Remove Type arg; no longer needed. All callers changed.
64 (yymemcpy): Remove; no longer needed.
65
66 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
67 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
68
692002-03-19 Akim Demaille <akim@epita.fr>
70
71 Test and fix the #line outputs.
72
73 * tests/atlocal.at (GCC): New.
74 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
75 (Prologue synch line, ,%union synch line, Postprologue synch line)
76 (Action synch line, Epilogue synch line): New tests.
77 * src/reader.c (parse_union_decl): Define the muscle stype_line.
78 * data/bison.simple, data/bison.c++: Use it.
79
802002-03-19 Akim Demaille <akim@epita.fr>
81
82 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
83 (Solved SR Conflicts, %expect not enough, %expect right)
84 (%expect too much): Move to...
85 * tests/conflicts.at: this new file.
86
872002-03-19 Akim Demaille <akim@epita.fr>
88
89 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
90 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
91 that we can move to enums for instance.
92 * src/output.c (token_definitions_output): Output a list of
93 `token-name, token-number' instead of the #define.
94 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
95
962002-03-14 Akim Demaille <akim@epita.fr>
97
98 Use Gettext 0.11.1.
99
1002002-03-09 Robert Anisko <robert@lrde.epita.fr>
101
102 * data/bison.c++: Make the user able to add members to the generated
103 parser by subclassing.
104
1052002-03-05 Robert Anisko <robert@lrde.epita.fr>
106
107 * src/reader.c (read_additionnal_code): `c' should be an integer, not
108 a character.
109 Reported by Nicolas Tisserand and Nicolas Burrus.
110
1112002-03-04 Robert Anisko <robert@lrde.epita.fr>
112
113 * src/reader.c: Warn about lacking semi-colons, do not complain.
114
1152002-03-04 Robert Anisko <robert@lrde.epita.fr>
116
117 * data/bison.c++: Remove a debug line.
118
1192002-03-04 Robert Anisko <robert@lrde.epita.fr>
120
121 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
122 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
123 provide a default implementation.
124
1252002-03-04 Akim Demaille <akim@epita.fr>
126
127 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
128 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
129 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
130 * tests/semantic.at (Parsing Guards): Similarly.
131 * src/reader.at (readgram): Complain if the last rule is not ended
132 with a semi-colon.
133
1342002-03-04 Akim Demaille <akim@epita.fr>
135
136 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
137 * src/closure.c: here.
138 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
139 RTC.
140 * src/warshall.h, src/warshall.c: Remove.
141 * tests/sets.at (Broken Closure): Adjust.
142
1432002-03-04 Akim Demaille <akim@epita.fr>
144
145 * src/output.c (output_skeleton): tempdir is const.
146 bytes_read is unused.
147
1482002-03-04 Akim Demaille <akim@epita.fr>
149
150 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
151 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
152 Update.
153 From Michael Hayes.
154
1552002-03-04 Akim Demaille <akim@epita.fr>
156
157 * src/closure.c (closure): `r' is unused.
158
1592002-03-04 Akim Demaille <akim@epita.fr>
160
161 * tests/sets.at (Broken Closure): Add the ending `;'.
162 * src/reader.at (readgram): Complain if a rule is not ended with a
163 semi-colon.
164
1652002-03-04 Akim Demaille <akim@epita.fr>
166
167 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
168 (count_sr_conflicts): Use bitset_count.
169 * src/reduce.c (inaccessable_symbols): Ditto.
170 (bits_size): Remove.
171 * src/warshall.h, src/warshall.c: Convert to bitsetv.
172
1732002-03-04 Akim Demaille <akim@epita.fr>
174
175 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
176 * src/reduce.c: Remove the `bitset_zero's following the
177 `bitset_create's, as now it is performed by the latter.
178
1792002-03-04 Akim Demaille <akim@epita.fr>
180
181 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
182 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
183 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
184 latest sources from Michael.
185
1862002-03-04 Akim Demaille <akim@epita.fr>
187
188 * src/output.c (output): Don't free the grammar.
189 * src/reader.c (grammar_free): New.
190 * src/main.c (main): Call it and don't free symtab here.
191
1922002-03-04 Akim Demaille <akim@epita.fr>
193
194 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
195 before returning.
196 Reported by Benoit Perrot.
197
1982002-03-04 Akim Demaille <akim@epita.fr>
199
200 Use bitset operations when possible, not loops over bits.
201
202 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
203 bitset_or.
204 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
205 * src/reduce.c (useless_nonterminals): Formatting changes.
206 * src/warshall.c (TC): Use bitset_or.
207
2082002-03-04 Akim Demaille <akim@epita.fr>
209
210 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
211 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
212 Ditto.
213
2142002-03-04 Akim Demaille <akim@epita.fr>
215
216 * src/lalr.c (F): Now a bitset*.
217 Adjust all dependencies.
218
2192002-03-04 Akim Demaille <akim@epita.fr>
220
221 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
222 Adjust all dependencies.
223
2242002-03-04 Akim Demaille <akim@epita.fr>
225
226 * src/L0.c, src/LR0.h (nstates): Be size_t.
227 Adjust comparisons (signed vs unsigned).
228 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
229 bitset*.
230 Adjust all dependencies.
231
2322002-03-04 Akim Demaille <akim@epita.fr>
233
234 * src/closure.c (firsts): Now, also a bitset.
235 Adjust all dependencies.
236 (varsetsize): Remove, now unused.
237 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
238
2392002-03-04 Akim Demaille <akim@epita.fr>
240
241 * src/print.c: Convert to use bitset.h, not hand coded iterations
242 over ints.
243
2442002-03-04 Akim Demaille <akim@epita.fr>
245
246 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
247
2482002-03-04 Akim Demaille <akim@epita.fr>
249
250 * src/closure.c (ruleset): Be a bitset.
251 (rulesetsize): Remove.
252
2532002-03-04 Akim Demaille <akim@epita.fr>
254
255 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
256 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
257 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
258 * src/closure.c (fderives): Be an array of bitsets.
259
2602002-02-28 Robert Anisko <robert@lrde.epita.fr>
261
262 * data/bison.c++: Merge the two generated headers. Insert a copyright
263 notice in each output file.
264
2652002-02-28 Akim Demaille <akim@epita.fr>
266
267 * data/bison.c++: Copy the prologue of bison.simple to fetch
268 useful M4 definitions, such as b4_header_guard.
269
2702002-02-25 Akim Demaille <akim@epita.fr>
271
272 * src/getargs.c (version): Give the name of the authors, and use a
273 translator friendly scheme for the bgr
274 copyright notice.
275
2762002-02-25 Akim Demaille <akim@epita.fr>
277
278 * src/output.c (header_output): Remove, now handled completely via
279 M4.
280
2812002-02-25 Akim Demaille <akim@epita.fr>
282
283 * m4/m4.m4: New, from CVS Autoconf.
284 * configure.in: Invoke it.
285 * src/output.c (output_skeleton): Use its result instead of the
286 hard coded name.
287
2882002-02-25 Akim Demaille <akim@epita.fr>
289
290 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
291 Fileutils 4.1.5.
292 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
293 * src/output.c (output_skeleton): Use mkstemp to create a real
294 temporary file.
295 Move the filling of `skeleton' and its muscle to...
296 (prepare): here.
297 (output): Move the definition of the prologue muscle to...
298 (prepare): here.
299 * src/system.h (DEFAULT_TMPDIR): New.
300
3012002-02-14 Paul Eggert <eggert@twinsun.com>
302
303 Remove the support for C++ namespace cleanliness; it was
304 causing more problems than it was curing, since it didn't work
305 properly on some nonstandard C++ compilers. This can wait
306 for a proper C++ parser.
307
308 * NEWS: Document this.
309 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
310 of C++, as it's treated like C now.
311 * src/bison.simple (YYSTD): Remove.
312 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
313 Treat C++ just like Standard C instead of trying to support
314 namespace cleanliness.
315
3162002-02-14 Akim Demaille <akim@epita.fr>
317
318 * tests/regression.at (else): Adjust to Andreas' change.
319
3202002-02-14 Akim Demaille <akim@epita.fr>
321
322 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
323
3242002-02-13 Andreas Schwab <schwab@suse.de>
325
326 * src/output.c (output_rule_data): Don't output NULL, it might
327 not be defined yet.
328
3292002-02-11 Robert Anisko <robert@lrde.epita.fr>
330
331 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
332 (Copyright notice): Update.
333
3342002-02-11 Akim Demaille <akim@epita.fr>
335
336 * tests/regression.at (%nonassoc and eof): Don't include
337 nonportable headers.
338
3392002-02-08 Robert Anisko <robert@lrde.epita.fr>
340
341 * data/bison.c++: Correct error recovery. Make the user able to
342 initialize the starting location.
343
3442002-02-07 Akim Demaille <akim@epita.fr>
345
346 * tests/input.at: New.
347
3482002-02-07 Robert Anisko <robert@lrde.epita.fr>
349
350 * data/bison.c++: Replace some direct m4 expansions by constants. Be
351 more consistent when naming methods and variables. Put preprocessor
352 directives around tables only needed for debugging.
353
3542002-02-07 Robert Anisko <robert@lrde.epita.fr>
355
356 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
357 C++ parsers.
358 (yy::b4_name::parse): Use print_.
359
3602002-02-07 Robert Anisko <robert@lrde.epita.fr>
361
362 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
363
3642002-02-07 Robert Anisko <robert@lrde.epita.fr>
365
366 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
367 C++ parsers.
368 (yy::b4_name::parse): Build verbose error messages, and use error_.
369
3702002-02-06 Robert Anisko <robert@lrde.epita.fr>
371
372 * data/bison.c++: Fix m4 quoting in comments.
373
3742002-02-06 Robert Anisko <robert@lrde.epita.fr>
375
376 * data/bison.c++: Adjust the parser code. Fix some muscles that were
377 not expanded by m4.
378
3792002-02-05 Akim Demaille <akim@epita.fr>
380
381 * data/bison.c++: Adjust to the M4 back end.
382 More is certainly needed.
383
3842002-02-05 Akim Demaille <akim@epita.fr>
385
386 Give a try to M4 as a back end.
387
388 * lib/readpipe.c: New, from wdiff.
389 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
390 BISON_HAIRY.
391 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
392 specific values. Now it is m4 that performs the lookup.
393 * src/parse-skel.y: Remove.
394 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
395 * src/output.c (actions_output, guards_output)
396 (token_definitions_output): No longer keeps track of the output
397 line number, hence remove the second argument.
398 (guards_output): Check against the guard member of a rule, not the
399 action member.
400 Adjust callers.
401 (output_skeleton): Don't look for the skeleton location, let m4 do
402 that.
403 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
404 file will be used.
405 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
406 (prepare): Given that for the time being changesyntax is not
407 usable in M4, rename the muscles using `-' to `_'.
408 Define `defines_flag', `output_parser_name' and `output_header_name'.
409 * src/output.h (actions_output, guards_output)
410 (token_definitions_output): Adjust prototypes.
411 * src/scan-skel.l: Instead of scanning the skeletons, it now
412 processes the output of m4: `__oline__' and `#output'.
413 * data/bison.simple: Adjust to be used by M4(sugar).
414 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
415 to date.
416 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
417 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
418 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
419 shamelessly stolen from CVS Autoconf.
420
4212002-02-05 Akim Demaille <akim@epita.fr>
422
423 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
424 * configure.in: Check for the declarations of free and malloc.
425 * src/muscle_tab.c: Adjust.
426
4272002-02-05 Akim Demaille <akim@epita.fr>
428
429 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
430 which have no values.
431
4322002-02-05 Akim Demaille <akim@epita.fr>
433
434 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
435 * data/: here.
436
4372002-01-29 Paul Eggert <eggert@twinsun.com>
438
439 * src/bison.simple (YYSIZE_T): Do not define merely because
440 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
441 On some platforms, <alloca.h> does not declare YYSTD (size_t).
442
4432002-01-27 Akim Demaille <akim@epita.fr>
444
445 Fix `%nonassoc and eof'.
446
447 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
448 which were not properly copied! Replace
449 memcpy (res->errs, src->errs, src->nerrs);
450 with
451 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
452 !!!
453 * tests/regression.at (%nonassoc and eof): Adjust to newest
454 Autotest: `.' is not in the PATH.
455
4562002-01-27 Akim Demaille <akim@epita.fr>
457
458 * tests/sets.at (AT_EXTRACT_SETS): New.
459 (Nullable): Use it.
460 (Firsts): New.
461
4622002-01-26 Akim Demaille <akim@epita.fr>
463
464 * tests/actions.at, tests/calc.at, tests/headers.at,
465 * tests/torture.at: Adjust to the newest Autotest which no longer
466 forces `.' in the PATH.
467
4682002-01-25 Akim Demaille <akim@epita.fr>
469
470 * tests/regression.at (%nonassoc and eof): New.
471 Suggested by Robert Anisko.
472
4732002-01-24 Akim Demaille <akim@epita.fr>
474
475 Bison dumps core when trying to complain about broken input files.
476 Reported by Cris van Pelt.
477
478 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
479 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
480 into...
481 (Invalid inputs): Strengthen: exercise parse_percent_token.
482
4832002-01-24 Robert Anisko <robert.anisko@epita.fr>
484
485 * src/Makefile.am: Add bison.c++.
486 * src/bison.c++: New skeleton.
487
4882002-01-21 Paolo Bonzini <bonzini@gnu.org>
489
490 * po/it.po: New.
491
4922002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
493
494 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
495
4962002-01-20 Marc Autret <marc@gnu.org>
497
498 * src/files.c (compute_output_file_names): Fix
499
5002002-01-20 Marc Autret <marc@gnu.org>
501
502 * tests/output.at: New test.
503 * src/files.c (compute_base_names): Don't map extensions when
504 the YACC flag is set, use defaults.
505 Reported by Evgeny Stambulchik.
506
5072002-01-20 Marc Autret <marc@gnu.org>
508
509 * src/system.h: Need to define __attribute__ away for non-GCC
510 compilers as well (i.e. the vendor C compiler).
511 Suggested by Albert Chin-A-Young.
512
5132002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
514
515 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
516 canonical definition.
517 * src/system.h: Use the canonical definition for PARAMS (avoids
518 a conflict with the macro from lib/hash.h).
519
5202002-01-11 Akim Demaille <akim@epita.fr>
521
522 * configure.in: Use AC_FUNC_STRNLEN.
523 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
524
5252002-01-09 Akim Demaille <akim@epita.fr>
526
527 * src/files.c, src/files.h (output_infix): New.
528 (tab_extension): Remove.
529 (compute_base_names): Compute the former, drop the latter.
530 * src/output.c (prepare): Insert the muscles `output-infix', and
531 `output-suffix'.
532 * src/parse-skel.y (string, string.1): New.
533 (section.header): Use it.
534 (section.yacc): Remove.
535 (prefix): Remove too.
536 * src/scan-skel.l: Adjust.
537 * src/bison.simple, src/bison.hairy: Adjust.
538
5392002-01-09 Akim Demaille <akim@epita.fr>
540
541 * configure.in (WERROR_CFLAGS): Compute it.
542 * src/Makefile.am (CFLAGS): Pass it.
543 * tests/atlocal.in (CFLAGS): Idem.
544 * src/files.c: Fix a few warnings.
545 (get_extension_index): Remove, unused.
546
5472002-01-08 Akim Demaille <akim@epita.fr>
548
549 * src/getargs.c (AS_FILE_NAME): New.
550 (getargs): Use it to convert DOSish file names.
551 * src/files.c (base_name): Rename as full_base_name to avoid
552 clashes with `base_name ()'.
553 (filename_split): New.
554 (compute_base_names): N-th rewrite, using filename_split.
555
5562002-01-08 Akim Demaille <akim@epita.fr>
557
558 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
559 New, stolen from the Fileutils 4.1.
560 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
561 * configure.in: Check for the presence of memrchr, and of its
562 prototype.
563
5642002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
565
566 * lib/hash.h (__P): Added definition for this macro.
567 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
568 BUILT_SOURCES, to ensure they are generated first.
569 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
570 %error-verbose to allow bootstrapping with bison 1.30x.
571
5722002-01-06 Akim Demaille <akim@epita.fr>
573
574 * src/reader.c (parse_braces): Don't fetch the next char, the
575 convention is to fetch on entry.
576 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
577 'switch' without a following semicolon.
578 * tests/regression.at (braces parsing): New.
579
5802002-01-06 Akim Demaille <akim@epita.fr>
581
582 Bison is dead wrong in its RR conflict reports.
583
584 * tests/torture.at (GNU Cim Grammar): New.
585 * src/conflicts.c (count_rr_conflicts): Fix.
586
5872002-01-06 Akim Demaille <akim@epita.fr>
588
589 Creating package.m4 from configure.ac causes too many problems.
590
591 * tests/Makefile.am (package.m4): Create it by hand,
592 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
593
5942002-01-06 Akim Demaille <akim@epita.fr>
595
596 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
597 skeleton.h.
598
5992002-01-04 Paul Eggert <eggert@twinsun.com>
600
601 * doc/bison.texinfo (Debugging):
602 Remove YYSTDERR; it's no longer defined or used.
603 Also, s/cstdio.h/cstdio/.
604
6052002-01-03 Akim Demaille <akim@epita.fr>
606
607 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
608
6092002-01-03 Akim Demaille <akim@epita.fr>
610
611 * src/parse-skel.y (process_skeleton): Don't bind the parser's
612 tracing code to --trace, wait for a better --trace option, with
613 args.
614
6152002-01-03 Akim Demaille <akim@epita.fr>
616
617 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
618 The ISO C++ standard is extremely clear about it: stderr is
619 considered a macro, not a regular symbol (see table 94 `Header
620 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
621 Therefore std:: does not apply to it. It still does with fprintf.
622 Also, s/cstdio.h/cstdio/.
623
6242002-01-03 Akim Demaille <akim@epita.fr>
625
626 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
627 for non system headers.
628
6292002-01-02 Akim Demaille <akim@epita.fr>
630
631 Equip the skeleton chain with location tracking, runtime trace,
632 pure parser and scanner.
633
634 * src/parse-skel.y: Request a pure parser, locations, and prefix
635 renaming.
636 (%union): Having several members with the same type does not help
637 type mismatches, simplify.
638 (YYPRINT, yyprint): New.
639 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
640 (skel_error): this.
641 Handle locations.
642 * src/scan-skel.l: Adjust to these changes.
643 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
644 (LOCATION_PRINT, skel_control_t): New.
645
6462001-12-30 Akim Demaille <akim@epita.fr>
647
648 * src/parse-skel.y: Get rid of the shift/reduce conflict:
649 replace `gb' with BLANKS.
650 * src/scan-skel.l: Adjust.
651
6522001-12-30 Akim Demaille <akim@epita.fr>
653
654 * src/system.h: We don't need nor want bcopy.
655 Throw away MS-DOS crap: we don't need getpid.
656 * configure.in: We don't need strndup. It was even causing
657 problems: because Flex includes the headers *before* us,
658 _GNU_SOURCE is not defined by config.h, and therefore strndup was
659 not visible.
660 * lib/xstrndup.c: New.
661 * src/scan-skel.l: Use it.
662 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
663 * src/parse-skel.y: Use %directives instead of #defines.
664
6652001-12-30 Akim Demaille <akim@epita.fr>
666
667 * src/skeleton.h: New.
668 * src/output.c (output_parser, output_master_parser): Remove, dead
669 code.
670 * src/output.h (get_lines_number, actions_output, guards_output)
671 (token_definitions_output): Prototype them.
672 * src/parse-skel.y: Add the license notice.
673 Include output.h and skeleton.h.
674 (process_skeleton): Returns void, and takes a single parameter.
675 * src/scan-skel.l: Add the license notice.
676 Include skeleton.h.
677 Don't use %option yylineno: it seems that then Flex imagines
678 REJECT has been used, and therefore it won't reallocate its
679 buffers (which makes no other sense to me than a bug). It results
680 in warnings for `unused: yy_flex_realloc'.
681
6822001-12-30 Robert Anisko <robert.anisko@epita.fr>
683
684 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
685 (MUSCLE_INSERT_PREFIX): ...to there.
686 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
687 (MUSCLE_INSERT_PREFIX): Move from here...
688
689 * src/bison.hairy: Add a section directive. Put braces around muscle
690 names. This parser skeleton is still broken, but Bison should not
691 choke on a bad muscle 'syntax'.
692 * src/bison.simple: Add a section directive. Put braces around muscle
693 names.
694
695 * src/files.h (strsuffix, stringappend): Add declarations.
696 (tab_extension): Add declaration.
697 (short_base_name): Add declaration.
698
699 * src/files.c (strsuffix, stringappend): No longer static. These
700 functions are used in the skeleton parser.
701 (tab_extension): New.
702 (compute_base_names): Use the computations done in this function
703 to guess if the generated parsers should have '.tab' in their
704 names.
705 (short_base_name): No longer static.
706
707 * src/output.c (output_skeleton): New.
708 (output): Disable call to output_master_parser, and give a try to
709 a new skeleton handling system.
710 (guards_output, actions_output): No longer static.
711 (token_definitions_output, get_lines_number): No longer static.
712
713 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
714
715 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
716 parse-skel.y.
717
718 * src/parse-skel.y: New file.
719 * src/scan-skel.l: New file.
720
7212001-12-29 Akim Demaille <akim@epita.fr>
722
723 %name-prefix is broken.
724
725 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
726 Adjust all dependencies.
727 * tests/headers.at (export YYLTYPE): Strengthen this test: use
728 %name-prefix.
729
730 Renaming yylval but not yylloc is not consistent. Now we do.
731
732 * src/bison.simple: Prefix yylloc if used.
733 * doc/bison.texinfo (Decl Summary): Document that.
734
7352001-12-29 Akim Demaille <akim@epita.fr>
736
737 * doc/bison.texinfo: Promote `%long-directive' over
738 `%long_directive'.
739 Remove all references to fixed-output-files, yacc is enough.
740
7412001-12-29 Akim Demaille <akim@epita.fr>
742
743 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
744 user prologue. These are defaults.
745 * tests/actions.at (Mid-rule actions): Make sure the user can
746 define YYDEBUG and YYERROR_VERBOSE.
747
7482001-12-29 Akim Demaille <akim@epita.fr>
749
750 * src/output.c (header_output): Don't forget to export YYLTYPE and
751 yylloc.
752 * tests/headers.at (export YYLTYPE): New, make sure it does.
753 * tests/regression.at (%union and --defines, Invalid CPP headers):
754 Move to...
755 * tests/headers.at: here.
756
7572001-12-29 Akim Demaille <akim@epita.fr>
758
759 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
760
7612001-12-29 Akim Demaille <akim@epita.fr>
762
763 * tests/actions.at (Mid-rule actions): Output on a single line
764 instead of several.
765
7662001-12-29 Akim Demaille <akim@epita.fr>
767
768 * doc/bison.texinfo: Formatting changes.
769
7702001-12-29 Akim Demaille <akim@epita.fr>
771
772 Don't store the token defs in a muscle, just be ready to output it
773 on command. Now possible via `symbols'. Fixes a memory leak.
774
775 * src/output.c (token_definitions_output): New.
776 (output_parser, header_output): Use it.
777 * src/reader.c (symbols_save): Remove.
778
7792001-12-29 Akim Demaille <akim@epita.fr>
780
781 * src/bison.simple: Do not provide a default for YYSTYPE and
782 YYLTYPE before the user's prologue. Otherwise it's hardly... a
783 default.
784
7852001-12-29 Akim Demaille <akim@epita.fr>
786
787 Mid-rule actions are simply... ignored!
788
789 * src/reader.c (readgram): Be sure to attach mid-rule actions to
790 the empty-rule associated to the dummy symbol, not to the host
791 rule.
792 * tests/actions.at (Mid-rule actions): New.
793
7942001-12-29 Akim Demaille <akim@epita.fr>
795
796 Memory leak.
797
798 * src/reader.c (reader): Free grammar.
799
8002001-12-29 Akim Demaille <akim@epita.fr>
801
802 Memory leak.
803
804 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
805 since it allocates it for each state, although only one is needed.
806 (allocate_storage): Do it here.
807
8082001-12-29 Akim Demaille <akim@epita.fr>
809
810 * src/options.h, src/options.c (create_long_option_table): Rename
811 as...
812 (long_option_table_new): this, with a clearer prototype.
813 (percent_table): Remove, unused,
814 * src/getargs.c (getargs): Adjust.
815
8162001-12-29 Akim Demaille <akim@epita.fr>
817
818 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
819 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
820 as states.
821
8222001-12-29 Akim Demaille <akim@epita.fr>
823
824 * src/lalr.c (build_relations): Rename `states' as `states1'.
825 Sorry, I don't understand exactly what it is, no better name...
826
8272001-12-29 Akim Demaille <akim@epita.fr>
828
829 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
830 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
831 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
832 as rules.
833
8342001-12-29 Akim Demaille <akim@epita.fr>
835
836 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
837 ago.
838
8392001-12-29 Akim Demaille <akim@epita.fr>
840
841 * src/reader.c, src/reader.h (user_toknums): Remove.
842 Adjust all users to use symbols[i]->user_token_number.
843
8442001-12-29 Akim Demaille <akim@epita.fr>
845
846 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
847 Adjust all users to use symbols[i]->prec or ->assoc.
848
8492001-12-29 Akim Demaille <akim@epita.fr>
850
851 * src/reader.c, src/reader.h (tags): Remove.
852 Adjust all users to use symbols[i]->tag.
853
8542001-12-29 Akim Demaille <akim@epita.fr>
855
856 * src/gram.h, src/gram.c (symbols): New, similar to state_table
857 and rule_table.
858 * src/reader.c (packsymbols): Fill this table.
859 Drop sprec.
860 * src/conflicts.c (resolve_sr_conflict): Adjust.
861 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
862 single table.
863 Use symbols[i]->tag instead of tags[i].
864
8652001-12-29 Akim Demaille <akim@epita.fr>
866
867 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
868 In addition, put a comment in there, to replace...
869 * tests/regression.at (%union and C comments): Remove.
870
8712001-12-29 Akim Demaille <akim@epita.fr>
872
873 * tests/regression.at (Web2c Actions): Blindly move the actual
874 output as expected output. The contents *seem* right to me, but I
875 can't pretend reading perfectly parser tables... Nonetheless, all
876 the other tests pass correctly, the table look OK, even though the
877 presence of `$axiom' is to be noted: AFAICS it is useless (but
878 harmless).
879
8802001-12-29 Akim Demaille <akim@epita.fr>
881
882 * src/reader.c (readgram): Don't add the rule 0 if there were no
883 rules read. In other words, add it _after_ having performed
884 grammar sanity checks.
885 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
886
8872001-12-29 Akim Demaille <akim@epita.fr>
888
889 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
890 visible, and some states have now a different number.
891
8922001-12-29 Akim Demaille <akim@epita.fr>
893
894 * src/reader.c (readgram): Bind the initial rule's lineno to that
895 of the first rule.
896 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
897 (Solved SR Conflicts): Adjust rule 0's line number.
898
8992001-12-29 Akim Demaille <akim@epita.fr>
900
901 Fix the `GAWK Grammar' failure.
902
903 * src/LR0.c (final_state): Initialize to -1 so that we do compute
904 the reductions of the first state which was mistakenly confused
905 with the final state because precisely final_state was initialized
906 to 0.
907 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
908 now noticed by Bison.
909 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
910 have a reduction on $default.
911
9122001-12-29 Akim Demaille <akim@epita.fr>
913
914 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
915 rule line numbers.
916 * src/closure.c (print_closure): Likewise.
917 * src/derives.c (print_derives): Likewise.
918 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
919 now.
920
9212001-12-29 Akim Demaille <akim@epita.fr>
922
923 * src/lalr.c (lookaheads_print): New.
924 (lalr): Call it when --trace-flag.
925 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
926 are dumped.
927
9282001-12-29 Akim Demaille <akim@epita.fr>
929
930 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
931 when walking through ritem, even via rule->rhs.
932 * src/reduce.c (dump_grammar, useful_production, reduce_output)
933 (useful_production, useless_nonterminals): Likewise.
934 (reduce_grammar_tables): Likewise, plus update nritems.
935 * src/nullable.c (set_nullable): Likewise.
936 * src/lalr.c (build_relations): Likewise.
937 * tests/sets.at (Nullable): Adjust.
938 Fortunately, now, the $axiom is no longer nullable.
939
9402001-12-29 Akim Demaille <akim@epita.fr>
941
942 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
943 the 0-sentinel.
944 * src/gram.c (ritem_longest_rhs): Likewise.
945 * src/reduce.c (nonterminals_reduce): Likewise.
946 * src/print_graph.c (print_graph): Likewise.
947 * src/output.c (output_rule_data): Likewise.
948 * src/nullable.c (set_nullable): Likewise.
949
9502001-12-29 Akim Demaille <akim@epita.fr>
951
952 * src/output.c: Comment changes.
953
9542001-12-27 Paul Eggert <eggert@twinsun.com>
955
956 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
957 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
958 Sparc, as they were causing more porting problems than the
959 (minor) performance improvement was worth.
960
961 Also, catch up with 1.31's YYSTD.
962
9632001-12-27 Akim Demaille <akim@epita.fr>
964
965 * src/output.c (output_gram): Rely on nritems, not the
966 0-sentinel. See below.
967 Use -1 as separator, not 0.
968 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
969 Rely on -1 as separator in yyrhs, instead of 0.
970 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
971 twice `Now at end of input', therefore there are two lines less to
972 expect.
973
9742001-12-27 Akim Demaille <akim@epita.fr>
975
976 * tests/regression.at (Unresolved SR Conflicts):
977 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
978 below.
979
9802001-12-27 Akim Demaille <akim@epita.fr>
981
982 * src/LR0.c (new_state): Recognize the final state by the fact it
983 is reached by eoftoken.
984 (insert_start_shifting_state, insert_eof_shifting_state)
985 (insert_accepting_state, augment_automaton): Remove, since now
986 these states are automatically computed from the initial state.
987 (generate_states): Adjust.
988 * src/print.c: When reporting a rule number to the user, substract
989 1, so that the axiom rule is rule 0, and the first user rule is 1.
990 * src/reduce.c: Likewise.
991 * src/print_graph.c (print_core): For the time being, just as for
992 the report, depend upon --trace-flags to dump the full set of
993 items.
994 * src/reader.c (readgram): Once the grammar read, insert the rule
995 0: `$axiom: START-SYMBOL $'.
996 * tests/set.at: Adjust: rule 0 is now displayed, and since the
997 number of the states has changed (the final state is no longer
998 necessarily the last), catch up.
999
10002001-12-27 Akim Demaille <akim@epita.fr>
1001
1002 Try to make the use of the eoftoken valid. Given that its value
1003 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
1004 is used instead of > 0 where appropriate, (ii), depend upon nritems
1005 instead of the 0-sentinel.
1006
1007 * src/gram.h, src/gram.c (nritems): New.
1008 Expected to be duplication of nitems, but for the time being...
1009 * src/reader.c (packgram): Assert nritems and nitems are equal.
1010 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
1011 * src/closure.c (print_closure, print_fderives): Likewise.
1012 * src/gram.c (ritem_print): Likewise.
1013 * src/print.c (print_core, print_grammar): Likewise.
1014 * src/print_graph.c: Likewise.
1015
10162001-12-27 Akim Demaille <akim@epita.fr>
1017
1018 * src/main.c (main): If there are complains after grammar
1019 reductions, then output the report anyway if requested, then die.
1020 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
1021 * src/reader.c (eoftoken): New.
1022 (parse_token_decl): If the token being defined has value `0', it
1023 is the eoftoken.
1024 (packsymbols): No longer hack `tags' to insert `$' by hand.
1025 Be sure to preserve the value of the eoftoken.
1026 (reader): Make sure eoftoken is defined.
1027 Initialize nsyms to 0: now eoftoken is created just like the others.
1028 * src/print.c (print_grammar): Don't special case the eof token.
1029 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
1030 lie anyway, albeit pleasant.
1031 * tests/calc.at: Exercise error messages with eoftoken.
1032 Change the grammar so that empty input is invalid.
1033 Adjust expectations.
1034 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
1035
10362001-12-27 Akim Demaille <akim@epita.fr>
1037
1038 * configure.in: Check the protos of strchr ans strspn.
1039 Replace strchr if needed.
1040 * src/system.h: Provide the protos of strchr, strspn and memchr if
1041 missing.
1042 * lib/strchr.c: New.
1043 * src/reader.c (symbols_save): Use strchr.
1044
10452001-12-27 Akim Demaille <akim@epita.fr>
1046
1047 * src/print.c, src/print_graph.c (escape): New.
1048 Use it to quote the TAGS outputs.
1049 * src/print_graph.c (print_state): Now errors are in red, and
1050 reductions in green.
1051 Prefer high to wide: output the state number on a line of its own.
1052
10532001-12-27 Akim Demaille <akim@epita.fr>
1054
1055 * src/state.h, src/state.c (reductions_new): New.
1056 * src/LR0.c (set_state_table): Let all the states have a
1057 `reductions', even if reduced to 0.
1058 (save_reductions): Adjust.
1059 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
1060 * src/print.c (print_reductions, print_actions): Adjust.
1061 * src/output.c (action_row): Adjust.
1062
10632001-12-27 Akim Demaille <akim@epita.fr>
1064
1065 * src/state.h, src/state.c (errs_new, errs_dup): New.
1066 * src/LR0.c (set_state_table): Let all the states have an errs,
1067 even if reduced to 0.
1068 * src/print.c (print_errs, print_reductions): Adjust.
1069 * src/output.c (output_actions, action_row): Adjust.
1070 * src/conflicts.c (resolve_sr_conflict): Adjust.
1071
10722001-12-27 Akim Demaille <akim@epita.fr>
1073
1074 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
1075
10762001-12-27 Akim Demaille <akim@epita.fr>
1077
1078 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
1079 * src/print.c: here.
1080 (lookaheadset, shiftset): New, used as additional storage by
1081 print_reductions.
1082 (print_results): Adjust.
1083 (print_shifts, print_gotos, print_errs): New, extracted from...
1084 (print_actions): here.
1085 * src/print_graph.c (print_actions): Remove dead code.
1086
10872001-12-27 Akim Demaille <akim@epita.fr>
1088
1089 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
1090 `$n' and `@n'.
1091
10922001-12-27 Akim Demaille <akim@epita.fr>
1093
1094 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
1095 (build_relations): Adjust.
1096
10972001-12-27 Akim Demaille <akim@epita.fr>
1098
1099 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
1100 duplication.
1101
11022001-12-27 Akim Demaille <akim@epita.fr>
1103
1104 * src/reader.c (packgram): Catch nitems overflows.
1105
11062001-12-27 Akim Demaille <akim@epita.fr>
1107
1108 * src/files.c, src/files.h (guard_obstack): Remove.
1109 * src/output.c (output): Adjust.
1110 * src/reader.c (parse_braces): New, factoring...
1111 (copy_action, copy_guard): these two which are renamed as...
1112 (parse_action, parse_guard): these.
1113 As a voluntary consequence, using braces around guards is now
1114 mandatory.
1115
11162001-12-27 Akim Demaille <akim@epita.fr>
1117
1118 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1119 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1120 members.
1121 (symbol_list_new): Adjust.
1122 (copy_action): action_line is the first line, not the last.
1123 (copy_guard): Just as for actions, store the `action' only, not
1124 the switch/case/break flesh.
1125 Don't parse the user action that might follow the guard, let...
1126 (readgram): do it, i.e., now, there can be an action after a
1127 guard.
1128 In other words the guard is just explicitly optional.
1129 (packgram): Adjust.
1130 * src/output.c (guards_output): New.
1131 (output_parser): Call it when needed.
1132 (output): Also free the guard and attrs obstacks.
1133 * src/files.c, src/files.h (obstack_save): Remove.
1134 (output_files): Remove.
1135 As a result, if one needs the former `.act' file, using an
1136 appropriate skeleton which requires actions and guards is now
1137 required.
1138 * src/main.c (main): Adjust.
1139 * tests/semantic.at: New.
1140 * tests/regression.at: Use `input.y' as input file name.
1141 Avoid 8+3 problems by requiring input.c when the test needs the
1142 parser.
1143
11442001-12-27 Akim Demaille <akim@epita.fr>
1145
1146 * src/reader.c (symbol_list_new): Be sure to initialize all the
1147 fields.
1148
11492001-12-27 Akim Demaille <akim@epita.fr>
1150
1151 All the hacks using a final pseudo state are now useless.
1152
1153 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1154 * src/lalr.c (nLA): New.
1155 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1156 instead of lookaheadsp from the pseudo state (nstate + 1).
1157
11582001-12-27 Akim Demaille <akim@epita.fr>
1159
1160 * src/output.c (action_row, token_actions): Use a state_t instead
1161 of a integer, and nlookaheads instead of the following state's
1162 lookaheadsp.
1163
11642001-12-27 Akim Demaille <akim@epita.fr>
1165
1166 * src/conflicts.c (log_resolution, flush_shift)
1167 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1168 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1169 (conflicts_print, print_reductions): Use a state_t instead of an
1170 integer when referring to a state.
1171 As much as possible, depend upon nlookaheads, instead of the
1172 `lookaheadsp' member of the following state (since lookaheads of
1173 successive states are successive, the difference between state n + 1
1174 and n served as the number of lookaheads for state n).
1175 * src/lalr.c (add_lookback_edge): Likewise.
1176 * src/print.c (print_core, print_actions, print_state)
1177 (print_results): Likewise.
1178 * src/print_graph.c (print_core, print_actions, print_state)
1179 (print_graph): Likewise.
1180 * src/conflicts.h: Adjust.
1181
11822001-12-27 Akim Demaille <akim@epita.fr>
1183
1184 * src/bison.hairy: Formatting/comment changes.
1185 ANSIfy.
1186 Remove `register' indications.
1187 Add plenty of `static'.
1188
11892001-12-27 Akim Demaille <akim@epita.fr>
1190
1191 * src/output.c (prepare): Drop the muscle `ntbase' which
1192 duplicates ntokens.
1193 * src/bison.simple: Formatting/comment changes.
1194 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1195 is an undocumented synonym.
1196
11972001-12-22 Akim Demaille <akim@epita.fr>
1198
1199 * src/output.c (output_table_data): Change the prototype to use
1200 `int' for array ranges: some invocations do pass an int, not a
1201 short.
1202 Reported by Wayne Green.
1203
12042001-12-22 Akim Demaille <akim@epita.fr>
1205
1206 Some actions of web2c.y are improperly triggered.
1207 Reported by Mike Castle.
1208
1209 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1210 * tests/regression.at (Web2c): Rename as...
1211 (Web2c Report): this.
1212 (Web2c Actions): New.
1213
12142001-12-22 Akim Demaille <akim@epita.fr>
1215
1216 Reductions in web2c.y are improperly reported.
1217 Reported by Mike Castle.
1218
1219 * src/conflicts.c (print_reductions): Fix.
1220 * tests/regression.at (Web2c): New.
1221
12222001-12-18 Akim Demaille <akim@epita.fr>
1223
1224 Some host fail on `assert (!"foo")', which expands to
1225 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1226 Reported by Nelson Beebee.
1227
1228 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1229 `#define it_succeeded 0' and `assert (it_succeeded)'.
1230
12312001-12-17 Marc Autret <autret_m@epita.fr>
1232
1233 * src/bison.simple: Don't hard code the skeleton line and filename.
1234 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1235 New line counter 'skeleton_line' (skeleton-line muscle).
1236
12372001-12-17 Paul Eggert <eggert@twinsun.com>
1238
1239 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1240 YYDEBUG must be defined to a nonzero value.
1241
1242 * src/bison.simple (yytname): Do not assume that the user defines
1243 YYDEBUG to a properly parenthesized expression.
1244
12452001-12-17 Akim Demaille <akim@epita.fr>
1246
1247 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1248 nlookaheads is a new member.
1249 Adjust all users.
1250 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1251 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1252 state.
1253
12542001-12-17 Akim Demaille <akim@epita.fr>
1255
1256 * src/files.h, src/files.c (open_files, close_files): Remove.
1257 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1258 let...
1259 * src/reader.c (reader): Do it.
1260
12612001-12-17 Akim Demaille <akim@epita.fr>
1262
1263 * src/conflicts.c (print_reductions): Formatting changes.
1264
12652001-12-17 Akim Demaille <akim@epita.fr>
1266
1267 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1268 (flush_reduce): New.
1269 (resolve_sr_conflict): Adjust.
1270
12712001-12-17 Akim Demaille <akim@epita.fr>
1272
1273 * src/output.c (output_obstack): Be static and rename as...
1274 (format_obstack): this, to avoid any confusion with files.c's
1275 output_obstack.
1276 * src/reader.h (muscle_obstack): Move to...
1277 * src/output.h: here, since it's defined in output.c.
1278
12792001-12-17 Akim Demaille <akim@epita.fr>
1280
1281 * src/output.c (action_row, save_column, default_goto)
1282 (sort_actions, matching_state, pack_vector): Better variable
1283 locality.
1284
12852001-12-17 Akim Demaille <akim@epita.fr>
1286
1287 * src/output.c: Various formatting changes.
1288
12892001-12-17 Akim Demaille <akim@epita.fr>
1290
1291 * src/files.c (output_files): Free the output_obstack.
1292 * src/main.c (main): Call print and print_graph conditionally.
1293 * src/print.c (print): Work unconditionally.
1294 * src/print_graph.c (print_graph): Work unconditionally.
1295 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1296
12972001-12-16 Marc Autret <autret_m@epita.fr>
1298
1299 * src/output.c (actions_output): Fix. When we use %no-lines,
1300 there is one less line per action.
1301
13022001-12-16 Marc Autret <autret_m@epita.fr>
1303
1304 * src/bison.simple: Remove a useless #line directive.
1305 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1306 * src/output.c (get_lines_number): New.
1307 (output_parser): Adjust, now takes care about the lines of a
1308 output muscles.
1309 Fix line numbering.
1310 (actions_output): Computes the number of lines taken by actions.
1311 (output_master_parser): Insert new skeleton which is the name of
1312 the output parser file name.
1313
13142001-12-15 Marc Autret <autret_m@epita.fr>
1315
1316 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1317
13182001-12-15 Marc Autret <autret_m@epita.fr>
1319
1320 * src/output.c (output_gram): Keep track of the hairy one.
1321
13222001-12-15 Akim Demaille <akim@epita.fr>
1323
1324 Make `make distcheck' work.
1325
1326 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1327 system.h which uses libgettext.h.
1328
13292001-12-15 Akim Demaille <akim@epita.fr>
1330
1331 * src/nullable.c (set_nullable): Useless rules must be skipped,
1332 otherwise, since we range over their symbols, we might look at a
1333 nonterminal which no longer ``exists'', i.e., it is not counted in
1334 `nvars', hence we overflow our arrays.
1335
13362001-12-15 Akim Demaille <akim@epita.fr>
1337
1338 The header can also be produced directly, without any obstack!
1339 Yahoo!
1340
1341 * src/files.c, src/files.h (defines_obstack): Remove.
1342 (compute_header_macro): Global.
1343 (defines_obstack_save): Remove.
1344 * src/reader.c (parse_union_decl): No longer output to
1345 defines_obstack: its content can be found in the `stype' muscle
1346 anyway.
1347 (output_token_translations): Merge into...
1348 (symbols_output): this.
1349 Rename as...
1350 (symbols_save): this.
1351 (reader): Adjust.
1352 * src/output.c (header_output): New.
1353 (output): Call it.
1354
13552001-12-15 Akim Demaille <akim@epita.fr>
1356
1357 * src/reader.c (parse_union_decl): Instead of handling two obstack
1358 simultaneously, use one to define the `stype' muscle, and use the
1359 value of the latter to fill defines_obstack.
1360 (copy_comment): Remove.
1361 (copy_comment2): Work for a single obstack.
1362 Rename as...
1363 (copy_comment): this.
1364
13652001-12-15 Akim Demaille <akim@epita.fr>
1366
1367 * src/lex.c, src/lex.h (xgetc): No longer static.
1368 * src/reader.c (parse_union_decl): Revamp.
1369
13702001-12-15 Akim Demaille <akim@epita.fr>
1371
1372 Still making progress in separating Bison into (i) input, (ii)
1373 process, (iii) output: now we can directly output the parser file
1374 without using table_obstack at all.
1375
1376 * src/files.c, src/files.h (table_obstack): Bye bye.
1377 (parser_file_name): New.
1378 * src/files.c (compute_output_file_names): Compute it.
1379 * src/output.c (actions_output, output_parser)
1380 (output_master_parser): To a file instead of an obstack.
1381
13822001-12-15 Akim Demaille <akim@epita.fr>
1383
1384 Attach actions to rules, instead of pre-outputting them to
1385 actions_obstack.
1386
1387 * src/gram.h (rule_t): action and action_line are new members.
1388 * src/reader.c (symbol_list): Likewise.
1389 (copy_action): Save the actions within the rule.
1390 (packgram): Save them in rule_table.
1391 * src/output.c (actions_output): New.
1392 (output_parser): Use it on `%%actions'.
1393 (output_rule_data): Don't free rule_table.
1394 (output): Do it.
1395 (prepare): Don't save the `action' muscle.
1396 * src/bison.simple: s/%%action/%%actions/.
1397
13982001-12-15 Akim Demaille <akim@epita.fr>
1399
1400 * src/reader.c (copy_action): When --yacc, don't append a `;'
1401 to the user action: let it fail if lacking.
1402 Suggested by Arnold Robbins and Tom Tromey.
1403
14042001-12-14 Akim Demaille <akim@epita.fr>
1405
1406 * src/lex.c (literalchar): Simply return the char you decoded, non
1407 longer mess around with obstacks and int pointers.
1408 Adjust all callers.
1409
14102001-12-14 Akim Demaille <akim@epita.fr>
1411
1412 * src/lex.c (literalchar): Don't escape the special characters,
1413 just decode them, and keep them as char (before, eol was output as
1414 the 2 char string `\n' etc.).
1415 * src/output.c (output_rule_data): Use quotearg to output the
1416 token strings.
1417
14182001-12-13 Paul Eggert <eggert@twinsun.com>
1419
1420 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1421 Do not infringe on the global user namespace when using C++.
1422 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1423 All uses of `fprintf' and `stderr' changed.
1424
1425 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1426
14272001-12-13 Akim Demaille <akim@epita.fr>
1428
1429 The computation of nullable is broken: it doesn't handle empty
1430 RHS's properly.
1431
1432 * tests/torture.at (GNU AWK Grammar): New.
1433 * tests/sets.at (Nullable): New.
1434 * src/nullable.c (set_nullable): Instead of blindly looping over
1435 `ritems', loop over the rules, and then over their rhs's.
1436
1437 Work around Autotest bugs.
1438
1439 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1440 frame, because Autotest understand lines starting with a `+' as
1441 traces from the shell. Then, they are not processed properly.
1442 Admittedly an Autotest bug, but we don't have time to wait for
1443 Autotest to catch up.
1444 * tests/regression.at (Broken Closure): Adjust to the new table
1445 frames.
1446 Move to...
1447 * tests/sets.at: here.
1448
14492001-12-13 Akim Demaille <akim@epita.fr>
1450
1451 * src/closure.c (closure): Use nrules instead of playing tricks
1452 with BITS_PER_WORD.
1453
14542001-12-13 Akim Demaille <akim@epita.fr>
1455
1456 * src/print.c (print_actions): Output the handling of `$' as the
1457 traces do: shifting the token EOF. Before EOF was treated as a
1458 nonterminal.
1459 * tests/regression.at: Adjust some tests.
1460 * src/print_graph.c (print_core): Complete the set of items via
1461 closure. The next-to-final and final states are still unsatisfying,
1462 but that's to be addressed elsewhere.
1463 No longer output the rule numbers, but do output the state number.
1464 A single loop for the shifts + gotos is enough, but picked a
1465 distinct color for each.
1466 (print_graph): Initialize and finalize closure.
1467
14682001-12-13 Akim Demaille <akim@epita.fr>
1469
1470 * src/reader.c (readgram): Remove dead code, an strip useless
1471 braces.
1472 (get_type): Remove, unused.
1473
14742001-12-12 Akim Demaille <akim@epita.fr>
1475
1476 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1477 on that of lib/error.c.
1478
14792001-12-12 Akim Demaille <akim@epita.fr>
1480
1481 Some hosts don't like `/' in includes.
1482
1483 * src/system.h: Include libgettext.h without qualifying the path.
1484 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1485 $(top_srcdir).
1486
14872001-12-11 Marc Autret <autret_m@epita.fr>
1488
1489 * src/output.c (output_parser): Remove useless muscle.
1490
14912001-12-11 Marc Autret <autret_m@epita.fr>
1492
1493 * src/bison.simple: Remove #line just before %%epilogue. It
1494 is now handled in ...
1495 * src/reader.c (read_additionnal_code): Add the output of a
1496 #line for the epilogue.
1497
14982001-12-10 Marc Autret <autret_m@epita.fr>
1499
1500 * src/reader.c (copy_definition): Re-use CPP-outed code which
1501 replace precedent remove.
1502 * src/bison.simple: Remove #line before %%prologue because
1503 %%input-line is wrong at this time.
1504
15052001-12-10 Marc Autret <autret_m@epita.fr>
1506
1507 * src/reader.c (symbols_output): Clean up.
1508 * src/output.c (output_gram, output): Clean up.
1509
15102001-12-10 Akim Demaille <akim@epita.fr>
1511
1512 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1513 * src/LR0.c (set_state_table): here.
1514 * src/lalr.c (lalr): Call it.
1515
15162001-12-10 Akim Demaille <akim@epita.fr>
1517
1518 * src/state.h (shifts): Remove the `number' member: shifts are
1519 attached to state, hence no longer need to be labelled with a
1520 state number.
1521
15222001-12-10 Akim Demaille <akim@epita.fr>
1523
1524 Now that states have a complete set of members, the linked list of
1525 shifts is useless: just fill directly the state's shifts member.
1526
1527 * src/state.h (shifts): Remove the `next' member.
1528 * src/LR0.c (first_state, last_state): Remove.
1529 Adjust the callers.
1530 (augment_automaton): Don't look for the shifts that must be added
1531 a shift on EOF: it is those of the state we looked for! But now,
1532 since shifts are attached, it is no longer needed to looking
1533 merely by its id: its number.
1534
15352001-12-10 Akim Demaille <akim@epita.fr>
1536
1537 * src/LR0.c (augment_automaton): Better variable locality.
1538 Remove an impossible branch: if there is a state corresponding to
1539 the start symbol being shifted, then there is shift for the start
1540 symbol from the initial state.
1541
15422001-12-10 Akim Demaille <akim@epita.fr>
1543
1544 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1545 only when appropriate: when insert_start_shifting_state' is not
1546 invoked.
1547 * tests/regression.at (Rule Line Numbers): Adjust.
1548
15492001-12-10 Akim Demaille <akim@epita.fr>
1550
1551 * src/LR0.c (augment_automaton): Now that all states have shifts,
1552 merge the two cases addition shifts to the initial state.
1553
15542001-12-10 Akim Demaille <akim@epita.fr>
1555
1556 * src/lalr.c (set_state_table): Move to...
1557 * src/LR0.c: here.
1558 * src/lalr.c (lalr): Don't call it...
1559 * src/LR0.c (generate_states): do it.
1560 * src/LR0.h (first_state): Remove, only the table is used.
1561
15622001-12-10 Akim Demaille <akim@epita.fr>
1563
1564 * src/LR0.h (first_shift, first_reduction): Remove.
1565 * src/lalr.c: Don't use first_shift: find shifts through the
1566 states.
1567
15682001-12-10 Akim Demaille <akim@epita.fr>
1569
1570 * src/LR0.c: Attach shifts to states as soon as they are
1571 computed.
1572 * src/lalr.c (set_state_table): Instead of assigning shifts to
1573 state, just assert that the mapping was properly done.
1574
15752001-12-10 Akim Demaille <akim@epita.fr>
1576
1577 * src/LR0.c (insert_start_shift): Rename as...
1578 (insert_start_shifting_state): this.
1579 (insert_eof_shifting_state, insert_accepting_state): New.
1580 (augment_automaton): Adjust.
1581 Better locality of the variables.
1582 When looking if the start_symbol is shifted from the initial
1583 state, using `while (... symbol != start_symbol ...)' sounds
1584 better than `while (... symbol < start_symbol ...)': If fail
1585 to see how the order between symbols could be relevant!
1586
15872001-12-10 Akim Demaille <akim@epita.fr>
1588
1589 * src/getargs.h: Don't declare `spec_name_prefix' and
1590 `spec_file_prefix', declared by src/files.h.
1591 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1592 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1593 * src/output.c (prepare): Adjust.
1594 * src/reader.c (symbols_output): Likewise.
1595 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1596
15972001-12-10 Akim Demaille <akim@epita.fr>
1598
1599 * src/muscle_tab.c (muscle_init): NULL is a better default than
1600 `"0"'.
1601
16022001-12-10 Akim Demaille <akim@epita.fr>
1603
1604 * src/reader.c (reader): Calling symbols_output once is enough.
1605
16062001-12-10 Akim Demaille <akim@epita.fr>
1607
1608 Now that states have a complete set of members, the linked list of
1609 reductions is useless: just fill directly the state's reductions
1610 member.
1611
1612 * src/state.h (struct reductions): Remove member `number' and
1613 `next'.
1614 * src/LR0.c (first_reduction, last_reduction): Remove.
1615 (save_reductions): Don't link the new reductions, store them in
1616 this_state.
1617 * src/lalr.c (set_state_table): No need to attach reductions to
1618 states, it's already done.
1619 * src/output.c (output_actions): No longer free the shifts, then
1620 the reductions, then the states: free all the states and their
1621 members.
1622
16232001-12-10 Akim Demaille <akim@epita.fr>
1624
1625 * src/options.c (OPTN, DRTV, BOTH): New.
1626 (option_table): Use them.
1627
1628 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1629 the job of system.h.
1630 * src/options.c: Don't include stdio.h and xalloc.h for the same
1631 reasons.
1632
16332001-12-10 Akim Demaille <akim@epita.fr>
1634
1635 * src/output.c (output, prepare): Make sure the values of the
1636 muscles `action' and `prologue' are 0-terminated.
1637
16382001-12-10 Akim Demaille <akim@epita.fr>
1639
1640 Clean up GCC warnings.
1641
1642 * src/reader.c (copy_action): `buf' is not used.
1643 (parse_skel_decl): Be static.
1644 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1645 * src/options.h (create_long_option_table): Have a real prototype.
1646 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1647 (hash_delete_at): Return const void *.
1648 Adjust casts to preserve the const.
1649
16502001-12-10 Akim Demaille <akim@epita.fr>
1651
1652 * configure.in: Require 2.52g.
1653 M4 is not needed, but AUTOM4TE is.
1654 * m4/m4.m4: Remove.
1655 * tests/Makefile.am: Adjust.
1656
16572001-12-10 Akim Demaille <akim@epita.fr>
1658
1659 One structure for states is enough, even though theoretically
1660 there are LR(0) states and LALR(1) states.
1661
1662 * src/lalr.h (state_t): Remove.
1663 (state_table): Be state_t **, not state_t *.
1664 * src/state.h (core, CORE_ALLOC): Rename as...
1665 (state_t, STATE_ALLOC): this.
1666 Add the LALR(1) members: shifts, reductions, errs.
1667 * src/LR0.c (state_table): Rename as...
1668 (state_hash): this, to avoid name clashes with the global
1669 `state_table'.
1670 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1671 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1672
16732001-12-10 Akim Demaille <akim@epita.fr>
1674
1675 Bison dumps core on bash.y.
1676 Reported by Pascal Bart.
1677
1678 * src/warshall.c (bitmatrix_print): New.
1679 (TC): Use it.
1680 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1681 j must be the outer loop.
1682 * tests/regression.at (Broken Closure): New.
1683
16842001-12-05 Akim Demaille <akim@epita.fr>
1685
1686 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1687 its argument.
1688