]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
Regen.
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-03-04 Robert Anisko <robert@lrde.epita.fr>
2
3 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
4 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
5 provide a default implementation.
6
72002-03-04 Akim Demaille <akim@epita.fr>
8
9 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
10 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
11 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
12 * tests/semantic.at (Parsing Guards): Similarly.
13 * src/reader.at (readgram): Complain if the last rule is not ended
14 with a semi-colon.
15
162002-03-04 Akim Demaille <akim@epita.fr>
17
18 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
19 * src/closure.c: here.
20 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
21 RTC.
22 * src/warshall.h, src/warshall.c: Remove.
23 * tests/sets.at (Broken Closure): Adjust.
24
252002-03-04 Akim Demaille <akim@epita.fr>
26
27 * src/output.c (output_skeleton): tempdir is const.
28 bytes_read is unused.
29
302002-03-04 Akim Demaille <akim@epita.fr>
31
32 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
33 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
34 Update.
35 From Michael Hayes.
36
372002-03-04 Akim Demaille <akim@epita.fr>
38
39 * src/closure.c (closure): `r' is unused.
40
412002-03-04 Akim Demaille <akim@epita.fr>
42
43 * tests/sets.at (Broken Closure): Add the ending `;'.
44 * src/reader.at (readgram): Complain if a rule is not ended with a
45 semi-colon.
46
472002-03-04 Akim Demaille <akim@epita.fr>
48
49 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
50 (count_sr_conflicts): Use bitset_count.
51 * src/reduce.c (inaccessable_symbols): Ditto.
52 (bits_size): Remove.
53 * src/warshall.h, src/warshall.c: Convert to bitsetv.
54
552002-03-04 Akim Demaille <akim@epita.fr>
56
57 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
58 * src/reduce.c: Remove the `bitset_zero's following the
59 `bitset_create's, as now it is performed by the latter.
60
612002-03-04 Akim Demaille <akim@epita.fr>
62
63 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
64 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
65 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
66 latest sources from Michael.
67
682002-03-04 Akim Demaille <akim@epita.fr>
69
70 * src/output.c (output): Don't free the grammar.
71 * src/reader.c (grammar_free): New.
72 * src/main.c (main): Call it and don't free symtab here.
73
742002-03-04 Akim Demaille <akim@epita.fr>
75
76 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
77 before returning.
78 Reported by Benoit Perrot.
79
802002-03-04 Akim Demaille <akim@epita.fr>
81
82 Use bitset operations when possible, not loops over bits.
83
84 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
85 bitset_or.
86 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
87 * src/reduce.c (useless_nonterminals): Formatting changes.
88 * src/warshall.c (TC): Use bitset_or.
89
902002-03-04 Akim Demaille <akim@epita.fr>
91
92 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
93 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
94 Ditto.
95
962002-03-04 Akim Demaille <akim@epita.fr>
97
98 * src/lalr.c (F): Now a bitset*.
99 Adjust all dependencies.
100
1012002-03-04 Akim Demaille <akim@epita.fr>
102
103 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
104 Adjust all dependencies.
105
1062002-03-04 Akim Demaille <akim@epita.fr>
107
108 * src/L0.c, src/LR0.h (nstates): Be size_t.
109 Adjust comparisons (signed vs unsigned).
110 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
111 bitset*.
112 Adjust all dependencies.
113
1142002-03-04 Akim Demaille <akim@epita.fr>
115
116 * src/closure.c (firsts): Now, also a bitset.
117 Adjust all dependencies.
118 (varsetsize): Remove, now unused.
119 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
120
1212002-03-04 Akim Demaille <akim@epita.fr>
122
123 * src/print.c: Convert to use bitset.h, not hand coded iterations
124 over ints.
125
1262002-03-04 Akim Demaille <akim@epita.fr>
127
128 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
129
1302002-03-04 Akim Demaille <akim@epita.fr>
131
132 * src/closure.c (ruleset): Be a bitset.
133 (rulesetsize): Remove.
134
1352002-03-04 Akim Demaille <akim@epita.fr>
136
137 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
138 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
139 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
140 * src/closure.c (fderives): Be an array of bitsets.
141
1422002-02-28 Robert Anisko <robert@lrde.epita.fr>
143
144 * data/bison.c++: Merge the two generated headers. Insert a copyright
145 notice in each output file.
146
1472002-02-28 Akim Demaille <akim@epita.fr>
148
149 * data/bison.c++: Copy the prologue of bison.simple to fetch
150 useful M4 definitions, such as b4_header_guard.
151
1522002-02-25 Akim Demaille <akim@epita.fr>
153
154 * src/getargs.c (version): Give the name of the authors, and use a
155 translator friendly scheme for the bgr
156 copyright notice.
157
1582002-02-25 Akim Demaille <akim@epita.fr>
159
160 * src/output.c (header_output): Remove, now handled completely via
161 M4.
162
1632002-02-25 Akim Demaille <akim@epita.fr>
164
165 * m4/m4.m4: New, from CVS Autoconf.
166 * configure.in: Invoke it.
167 * src/output.c (output_skeleton): Use its result instead of the
168 hard coded name.
169
1702002-02-25 Akim Demaille <akim@epita.fr>
171
172 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
173 Fileutils 4.1.5.
174 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
175 * src/output.c (output_skeleton): Use mkstemp to create a real
176 temporary file.
177 Move the filling of `skeleton' and its muscle to...
178 (prepare): here.
179 (output): Move the definition of the prologue muscle to...
180 (prepare): here.
181 * src/system.h (DEFAULT_TMPDIR): New.
182
1832002-02-14 Paul Eggert <eggert@twinsun.com>
184
185 Remove the support for C++ namespace cleanliness; it was
186 causing more problems than it was curing, since it didn't work
187 properly on some nonstandard C++ compilers. This can wait
188 for a proper C++ parser.
189
190 * NEWS: Document this.
191 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
192 of C++, as it's treated like C now.
193 * src/bison.simple (YYSTD): Remove.
194 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
195 Treat C++ just like Standard C instead of trying to support
196 namespace cleanliness.
197
1982002-02-14 Akim Demaille <akim@epita.fr>
199
200 * tests/regression.at (else): Adjust to Andreas' change.
201
2022002-02-14 Akim Demaille <akim@epita.fr>
203
204 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
205
2062002-02-13 Andreas Schwab <schwab@suse.de>
207
208 * src/output.c (output_rule_data): Don't output NULL, it might
209 not be defined yet.
210
2112002-02-11 Robert Anisko <robert@lrde.epita.fr>
212
213 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
214 (Copyright notice): Update.
215
2162002-02-11 Akim Demaille <akim@epita.fr>
217
218 * tests/regression.at (%nonassoc and eof): Don't include
219 nonportable headers.
220
2212002-02-08 Robert Anisko <robert@lrde.epita.fr>
222
223 * data/bison.c++: Correct error recovery. Make the user able to
224 initialize the starting location.
225
2262002-02-07 Akim Demaille <akim@epita.fr>
227
228 * tests/input.at: New.
229
2302002-02-07 Robert Anisko <robert@lrde.epita.fr>
231
232 * data/bison.c++: Replace some direct m4 expansions by constants. Be
233 more consistent when naming methods and variables. Put preprocessor
234 directives around tables only needed for debugging.
235
2362002-02-07 Robert Anisko <robert@lrde.epita.fr>
237
238 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
239 C++ parsers.
240 (yy::b4_name::parse): Use print_.
241
2422002-02-07 Robert Anisko <robert@lrde.epita.fr>
243
244 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
245
2462002-02-07 Robert Anisko <robert@lrde.epita.fr>
247
248 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
249 C++ parsers.
250 (yy::b4_name::parse): Build verbose error messages, and use error_.
251
2522002-02-06 Robert Anisko <robert@lrde.epita.fr>
253
254 * data/bison.c++: Fix m4 quoting in comments.
255
2562002-02-06 Robert Anisko <robert@lrde.epita.fr>
257
258 * data/bison.c++: Adjust the parser code. Fix some muscles that were
259 not expanded by m4.
260
2612002-02-05 Akim Demaille <akim@epita.fr>
262
263 * data/bison.c++: Adjust to the M4 back end.
264 More is certainly needed.
265
2662002-02-05 Akim Demaille <akim@epita.fr>
267
268 Give a try to M4 as a back end.
269
270 * lib/readpipe.c: New, from wdiff.
271 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
272 BISON_HAIRY.
273 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
274 specific values. Now it is m4 that performs the lookup.
275 * src/parse-skel.y: Remove.
276 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
277 * src/output.c (actions_output, guards_output)
278 (token_definitions_output): No longer keeps track of the output
279 line number, hence remove the second argument.
280 (guards_output): Check against the guard member of a rule, not the
281 action member.
282 Adjust callers.
283 (output_skeleton): Don't look for the skeleton location, let m4 do
284 that.
285 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
286 file will be used.
287 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
288 (prepare): Given that for the time being changesyntax is not
289 usable in M4, rename the muscles using `-' to `_'.
290 Define `defines_flag', `output_parser_name' and `output_header_name'.
291 * src/output.h (actions_output, guards_output)
292 (token_definitions_output): Adjust prototypes.
293 * src/scan-skel.l: Instead of scanning the skeletons, it now
294 processes the output of m4: `__oline__' and `#output'.
295 * data/bison.simple: Adjust to be used by M4(sugar).
296 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
297 to date.
298 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
299 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
300 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
301 shamelessly stolen from CVS Autoconf.
302
3032002-02-05 Akim Demaille <akim@epita.fr>
304
305 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
306 * configure.in: Check for the declarations of free and malloc.
307 * src/muscle_tab.c: Adjust.
308
3092002-02-05 Akim Demaille <akim@epita.fr>
310
311 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
312 which have no values.
313
3142002-02-05 Akim Demaille <akim@epita.fr>
315
316 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
317 * data/: here.
318
3192002-01-29 Paul Eggert <eggert@twinsun.com>
320
321 * src/bison.simple (YYSIZE_T): Do not define merely because
322 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
323 On some platforms, <alloca.h> does not declare YYSTD (size_t).
324
3252002-01-27 Akim Demaille <akim@epita.fr>
326
327 Fix `%nonassoc and eof'.
328
329 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
330 which were not properly copied! Replace
331 memcpy (res->errs, src->errs, src->nerrs);
332 with
333 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
334 !!!
335 * tests/regression.at (%nonassoc and eof): Adjust to newest
336 Autotest: `.' is not in the PATH.
337
3382002-01-27 Akim Demaille <akim@epita.fr>
339
340 * tests/sets.at (AT_EXTRACT_SETS): New.
341 (Nullable): Use it.
342 (Firsts): New.
343
3442002-01-26 Akim Demaille <akim@epita.fr>
345
346 * tests/actions.at, tests/calc.at, tests/headers.at,
347 * tests/torture.at: Adjust to the newest Autotest which no longer
348 forces `.' in the PATH.
349
3502002-01-25 Akim Demaille <akim@epita.fr>
351
352 * tests/regression.at (%nonassoc and eof): New.
353 Suggested by Robert Anisko.
354
3552002-01-24 Akim Demaille <akim@epita.fr>
356
357 Bison dumps core when trying to complain about broken input files.
358 Reported by Cris van Pelt.
359
360 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
361 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
362 into...
363 (Invalid inputs): Strengthen: exercise parse_percent_token.
364
3652002-01-24 Robert Anisko <robert.anisko@epita.fr>
366
367 * src/Makefile.am: Add bison.c++.
368 * src/bison.c++: New skeleton.
369
3702002-01-21 Paolo Bonzini <bonzini@gnu.org>
371
372 * po/it.po: New.
373
3742002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
375
376 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
377
3782002-01-20 Marc Autret <marc@gnu.org>
379
380 * src/files.c (compute_output_file_names): Fix
381
3822002-01-20 Marc Autret <marc@gnu.org>
383
384 * tests/output.at: New test.
385 * src/files.c (compute_base_names): Don't map extensions when
386 the YACC flag is set, use defaults.
387 Reported by Evgeny Stambulchik.
388
3892002-01-20 Marc Autret <marc@gnu.org>
390
391 * src/system.h: Need to define __attribute__ away for non-GCC
392 compilers as well (i.e. the vendor C compiler).
393 Suggested by Albert Chin-A-Young.
394
3952002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
396
397 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
398 canonical definition.
399 * src/system.h: Use the canonical definition for PARAMS (avoids
400 a conflict with the macro from lib/hash.h).
401
4022002-01-11 Akim Demaille <akim@epita.fr>
403
404 * configure.in: Use AC_FUNC_STRNLEN.
405 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
406
4072002-01-09 Akim Demaille <akim@epita.fr>
408
409 * src/files.c, src/files.h (output_infix): New.
410 (tab_extension): Remove.
411 (compute_base_names): Compute the former, drop the latter.
412 * src/output.c (prepare): Insert the muscles `output-infix', and
413 `output-suffix'.
414 * src/parse-skel.y (string, string.1): New.
415 (section.header): Use it.
416 (section.yacc): Remove.
417 (prefix): Remove too.
418 * src/scan-skel.l: Adjust.
419 * src/bison.simple, src/bison.hairy: Adjust.
420
4212002-01-09 Akim Demaille <akim@epita.fr>
422
423 * configure.in (WERROR_CFLAGS): Compute it.
424 * src/Makefile.am (CFLAGS): Pass it.
425 * tests/atlocal.in (CFLAGS): Idem.
426 * src/files.c: Fix a few warnings.
427 (get_extension_index): Remove, unused.
428
4292002-01-08 Akim Demaille <akim@epita.fr>
430
431 * src/getargs.c (AS_FILE_NAME): New.
432 (getargs): Use it to convert DOSish file names.
433 * src/files.c (base_name): Rename as full_base_name to avoid
434 clashes with `base_name ()'.
435 (filename_split): New.
436 (compute_base_names): N-th rewrite, using filename_split.
437
4382002-01-08 Akim Demaille <akim@epita.fr>
439
440 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
441 New, stolen from the Fileutils 4.1.
442 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
443 * configure.in: Check for the presence of memrchr, and of its
444 prototype.
445
4462002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
447
448 * lib/hash.h (__P): Added definition for this macro.
449 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
450 BUILT_SOURCES, to ensure they are generated first.
451 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
452 %error-verbose to allow bootstrapping with bison 1.30x.
453
4542002-01-06 Akim Demaille <akim@epita.fr>
455
456 * src/reader.c (parse_braces): Don't fetch the next char, the
457 convention is to fetch on entry.
458 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
459 'switch' without a following semicolon.
460 * tests/regression.at (braces parsing): New.
461
4622002-01-06 Akim Demaille <akim@epita.fr>
463
464 Bison is dead wrong in its RR conflict reports.
465
466 * tests/torture.at (GNU Cim Grammar): New.
467 * src/conflicts.c (count_rr_conflicts): Fix.
468
4692002-01-06 Akim Demaille <akim@epita.fr>
470
471 Creating package.m4 from configure.ac causes too many problems.
472
473 * tests/Makefile.am (package.m4): Create it by hand,
474 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
475
4762002-01-06 Akim Demaille <akim@epita.fr>
477
478 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
479 skeleton.h.
480
4812002-01-04 Paul Eggert <eggert@twinsun.com>
482
483 * doc/bison.texinfo (Debugging):
484 Remove YYSTDERR; it's no longer defined or used.
485 Also, s/cstdio.h/cstdio/.
486
4872002-01-03 Akim Demaille <akim@epita.fr>
488
489 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
490
4912002-01-03 Akim Demaille <akim@epita.fr>
492
493 * src/parse-skel.y (process_skeleton): Don't bind the parser's
494 tracing code to --trace, wait for a better --trace option, with
495 args.
496
4972002-01-03 Akim Demaille <akim@epita.fr>
498
499 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
500 The ISO C++ standard is extremely clear about it: stderr is
501 considered a macro, not a regular symbol (see table 94 `Header
502 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
503 Therefore std:: does not apply to it. It still does with fprintf.
504 Also, s/cstdio.h/cstdio/.
505
5062002-01-03 Akim Demaille <akim@epita.fr>
507
508 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
509 for non system headers.
510
5112002-01-02 Akim Demaille <akim@epita.fr>
512
513 Equip the skeleton chain with location tracking, runtime trace,
514 pure parser and scanner.
515
516 * src/parse-skel.y: Request a pure parser, locations, and prefix
517 renaming.
518 (%union): Having several members with the same type does not help
519 type mismatches, simplify.
520 (YYPRINT, yyprint): New.
521 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
522 (skel_error): this.
523 Handle locations.
524 * src/scan-skel.l: Adjust to these changes.
525 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
526 (LOCATION_PRINT, skel_control_t): New.
527
5282001-12-30 Akim Demaille <akim@epita.fr>
529
530 * src/parse-skel.y: Get rid of the shift/reduce conflict:
531 replace `gb' with BLANKS.
532 * src/scan-skel.l: Adjust.
533
5342001-12-30 Akim Demaille <akim@epita.fr>
535
536 * src/system.h: We don't need nor want bcopy.
537 Throw away MS-DOS crap: we don't need getpid.
538 * configure.in: We don't need strndup. It was even causing
539 problems: because Flex includes the headers *before* us,
540 _GNU_SOURCE is not defined by config.h, and therefore strndup was
541 not visible.
542 * lib/xstrndup.c: New.
543 * src/scan-skel.l: Use it.
544 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
545 * src/parse-skel.y: Use %directives instead of #defines.
546
5472001-12-30 Akim Demaille <akim@epita.fr>
548
549 * src/skeleton.h: New.
550 * src/output.c (output_parser, output_master_parser): Remove, dead
551 code.
552 * src/output.h (get_lines_number, actions_output, guards_output)
553 (token_definitions_output): Prototype them.
554 * src/parse-skel.y: Add the license notice.
555 Include output.h and skeleton.h.
556 (process_skeleton): Returns void, and takes a single parameter.
557 * src/scan-skel.l: Add the license notice.
558 Include skeleton.h.
559 Don't use %option yylineno: it seems that then Flex imagines
560 REJECT has been used, and therefore it won't reallocate its
561 buffers (which makes no other sense to me than a bug). It results
562 in warnings for `unused: yy_flex_realloc'.
563
5642001-12-30 Robert Anisko <robert.anisko@epita.fr>
565
566 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
567 (MUSCLE_INSERT_PREFIX): ...to there.
568 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
569 (MUSCLE_INSERT_PREFIX): Move from here...
570
571 * src/bison.hairy: Add a section directive. Put braces around muscle
572 names. This parser skeleton is still broken, but Bison should not
573 choke on a bad muscle 'syntax'.
574 * src/bison.simple: Add a section directive. Put braces around muscle
575 names.
576
577 * src/files.h (strsuffix, stringappend): Add declarations.
578 (tab_extension): Add declaration.
579 (short_base_name): Add declaration.
580
581 * src/files.c (strsuffix, stringappend): No longer static. These
582 functions are used in the skeleton parser.
583 (tab_extension): New.
584 (compute_base_names): Use the computations done in this function
585 to guess if the generated parsers should have '.tab' in their
586 names.
587 (short_base_name): No longer static.
588
589 * src/output.c (output_skeleton): New.
590 (output): Disable call to output_master_parser, and give a try to
591 a new skeleton handling system.
592 (guards_output, actions_output): No longer static.
593 (token_definitions_output, get_lines_number): No longer static.
594
595 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
596
597 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
598 parse-skel.y.
599
600 * src/parse-skel.y: New file.
601 * src/scan-skel.l: New file.
602
6032001-12-29 Akim Demaille <akim@epita.fr>
604
605 %name-prefix is broken.
606
607 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
608 Adjust all dependencies.
609 * tests/headers.at (export YYLTYPE): Strengthen this test: use
610 %name-prefix.
611
612 Renaming yylval but not yylloc is not consistent. Now we do.
613
614 * src/bison.simple: Prefix yylloc if used.
615 * doc/bison.texinfo (Decl Summary): Document that.
616
6172001-12-29 Akim Demaille <akim@epita.fr>
618
619 * doc/bison.texinfo: Promote `%long-directive' over
620 `%long_directive'.
621 Remove all references to fixed-output-files, yacc is enough.
622
6232001-12-29 Akim Demaille <akim@epita.fr>
624
625 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
626 user prologue. These are defaults.
627 * tests/actions.at (Mid-rule actions): Make sure the user can
628 define YYDEBUG and YYERROR_VERBOSE.
629
6302001-12-29 Akim Demaille <akim@epita.fr>
631
632 * src/output.c (header_output): Don't forget to export YYLTYPE and
633 yylloc.
634 * tests/headers.at (export YYLTYPE): New, make sure it does.
635 * tests/regression.at (%union and --defines, Invalid CPP headers):
636 Move to...
637 * tests/headers.at: here.
638
6392001-12-29 Akim Demaille <akim@epita.fr>
640
641 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
642
6432001-12-29 Akim Demaille <akim@epita.fr>
644
645 * tests/actions.at (Mid-rule actions): Output on a single line
646 instead of several.
647
6482001-12-29 Akim Demaille <akim@epita.fr>
649
650 * doc/bison.texinfo: Formatting changes.
651
6522001-12-29 Akim Demaille <akim@epita.fr>
653
654 Don't store the token defs in a muscle, just be ready to output it
655 on command. Now possible via `symbols'. Fixes a memory leak.
656
657 * src/output.c (token_definitions_output): New.
658 (output_parser, header_output): Use it.
659 * src/reader.c (symbols_save): Remove.
660
6612001-12-29 Akim Demaille <akim@epita.fr>
662
663 * src/bison.simple: Do not provide a default for YYSTYPE and
664 YYLTYPE before the user's prologue. Otherwise it's hardly... a
665 default.
666
6672001-12-29 Akim Demaille <akim@epita.fr>
668
669 Mid-rule actions are simply... ignored!
670
671 * src/reader.c (readgram): Be sure to attach mid-rule actions to
672 the empty-rule associated to the dummy symbol, not to the host
673 rule.
674 * tests/actions.at (Mid-rule actions): New.
675
6762001-12-29 Akim Demaille <akim@epita.fr>
677
678 Memory leak.
679
680 * src/reader.c (reader): Free grammar.
681
6822001-12-29 Akim Demaille <akim@epita.fr>
683
684 Memory leak.
685
686 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
687 since it allocates it for each state, although only one is needed.
688 (allocate_storage): Do it here.
689
6902001-12-29 Akim Demaille <akim@epita.fr>
691
692 * src/options.h, src/options.c (create_long_option_table): Rename
693 as...
694 (long_option_table_new): this, with a clearer prototype.
695 (percent_table): Remove, unused,
696 * src/getargs.c (getargs): Adjust.
697
6982001-12-29 Akim Demaille <akim@epita.fr>
699
700 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
701 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
702 as states.
703
7042001-12-29 Akim Demaille <akim@epita.fr>
705
706 * src/lalr.c (build_relations): Rename `states' as `states1'.
707 Sorry, I don't understand exactly what it is, no better name...
708
7092001-12-29 Akim Demaille <akim@epita.fr>
710
711 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
712 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
713 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
714 as rules.
715
7162001-12-29 Akim Demaille <akim@epita.fr>
717
718 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
719 ago.
720
7212001-12-29 Akim Demaille <akim@epita.fr>
722
723 * src/reader.c, src/reader.h (user_toknums): Remove.
724 Adjust all users to use symbols[i]->user_token_number.
725
7262001-12-29 Akim Demaille <akim@epita.fr>
727
728 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
729 Adjust all users to use symbols[i]->prec or ->assoc.
730
7312001-12-29 Akim Demaille <akim@epita.fr>
732
733 * src/reader.c, src/reader.h (tags): Remove.
734 Adjust all users to use symbols[i]->tag.
735
7362001-12-29 Akim Demaille <akim@epita.fr>
737
738 * src/gram.h, src/gram.c (symbols): New, similar to state_table
739 and rule_table.
740 * src/reader.c (packsymbols): Fill this table.
741 Drop sprec.
742 * src/conflicts.c (resolve_sr_conflict): Adjust.
743 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
744 single table.
745 Use symbols[i]->tag instead of tags[i].
746
7472001-12-29 Akim Demaille <akim@epita.fr>
748
749 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
750 In addition, put a comment in there, to replace...
751 * tests/regression.at (%union and C comments): Remove.
752
7532001-12-29 Akim Demaille <akim@epita.fr>
754
755 * tests/regression.at (Web2c Actions): Blindly move the actual
756 output as expected output. The contents *seem* right to me, but I
757 can't pretend reading perfectly parser tables... Nonetheless, all
758 the other tests pass correctly, the table look OK, even though the
759 presence of `$axiom' is to be noted: AFAICS it is useless (but
760 harmless).
761
7622001-12-29 Akim Demaille <akim@epita.fr>
763
764 * src/reader.c (readgram): Don't add the rule 0 if there were no
765 rules read. In other words, add it _after_ having performed
766 grammar sanity checks.
767 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
768
7692001-12-29 Akim Demaille <akim@epita.fr>
770
771 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
772 visible, and some states have now a different number.
773
7742001-12-29 Akim Demaille <akim@epita.fr>
775
776 * src/reader.c (readgram): Bind the initial rule's lineno to that
777 of the first rule.
778 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
779 (Solved SR Conflicts): Adjust rule 0's line number.
780
7812001-12-29 Akim Demaille <akim@epita.fr>
782
783 Fix the `GAWK Grammar' failure.
784
785 * src/LR0.c (final_state): Initialize to -1 so that we do compute
786 the reductions of the first state which was mistakenly confused
787 with the final state because precisely final_state was initialized
788 to 0.
789 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
790 now noticed by Bison.
791 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
792 have a reduction on $default.
793
7942001-12-29 Akim Demaille <akim@epita.fr>
795
796 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
797 rule line numbers.
798 * src/closure.c (print_closure): Likewise.
799 * src/derives.c (print_derives): Likewise.
800 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
801 now.
802
8032001-12-29 Akim Demaille <akim@epita.fr>
804
805 * src/lalr.c (lookaheads_print): New.
806 (lalr): Call it when --trace-flag.
807 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
808 are dumped.
809
8102001-12-29 Akim Demaille <akim@epita.fr>
811
812 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
813 when walking through ritem, even via rule->rhs.
814 * src/reduce.c (dump_grammar, useful_production, reduce_output)
815 (useful_production, useless_nonterminals): Likewise.
816 (reduce_grammar_tables): Likewise, plus update nritems.
817 * src/nullable.c (set_nullable): Likewise.
818 * src/lalr.c (build_relations): Likewise.
819 * tests/sets.at (Nullable): Adjust.
820 Fortunately, now, the $axiom is no longer nullable.
821
8222001-12-29 Akim Demaille <akim@epita.fr>
823
824 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
825 the 0-sentinel.
826 * src/gram.c (ritem_longest_rhs): Likewise.
827 * src/reduce.c (nonterminals_reduce): Likewise.
828 * src/print_graph.c (print_graph): Likewise.
829 * src/output.c (output_rule_data): Likewise.
830 * src/nullable.c (set_nullable): Likewise.
831
8322001-12-29 Akim Demaille <akim@epita.fr>
833
834 * src/output.c: Comment changes.
835
8362001-12-27 Paul Eggert <eggert@twinsun.com>
837
838 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
839 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
840 Sparc, as they were causing more porting problems than the
841 (minor) performance improvement was worth.
842
843 Also, catch up with 1.31's YYSTD.
844
8452001-12-27 Akim Demaille <akim@epita.fr>
846
847 * src/output.c (output_gram): Rely on nritems, not the
848 0-sentinel. See below.
849 Use -1 as separator, not 0.
850 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
851 Rely on -1 as separator in yyrhs, instead of 0.
852 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
853 twice `Now at end of input', therefore there are two lines less to
854 expect.
855
8562001-12-27 Akim Demaille <akim@epita.fr>
857
858 * tests/regression.at (Unresolved SR Conflicts):
859 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
860 below.
861
8622001-12-27 Akim Demaille <akim@epita.fr>
863
864 * src/LR0.c (new_state): Recognize the final state by the fact it
865 is reached by eoftoken.
866 (insert_start_shifting_state, insert_eof_shifting_state)
867 (insert_accepting_state, augment_automaton): Remove, since now
868 these states are automatically computed from the initial state.
869 (generate_states): Adjust.
870 * src/print.c: When reporting a rule number to the user, substract
871 1, so that the axiom rule is rule 0, and the first user rule is 1.
872 * src/reduce.c: Likewise.
873 * src/print_graph.c (print_core): For the time being, just as for
874 the report, depend upon --trace-flags to dump the full set of
875 items.
876 * src/reader.c (readgram): Once the grammar read, insert the rule
877 0: `$axiom: START-SYMBOL $'.
878 * tests/set.at: Adjust: rule 0 is now displayed, and since the
879 number of the states has changed (the final state is no longer
880 necessarily the last), catch up.
881
8822001-12-27 Akim Demaille <akim@epita.fr>
883
884 Try to make the use of the eoftoken valid. Given that its value
885 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
886 is used instead of > 0 where appropriate, (ii), depend upon nritems
887 instead of the 0-sentinel.
888
889 * src/gram.h, src/gram.c (nritems): New.
890 Expected to be duplication of nitems, but for the time being...
891 * src/reader.c (packgram): Assert nritems and nitems are equal.
892 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
893 * src/closure.c (print_closure, print_fderives): Likewise.
894 * src/gram.c (ritem_print): Likewise.
895 * src/print.c (print_core, print_grammar): Likewise.
896 * src/print_graph.c: Likewise.
897
8982001-12-27 Akim Demaille <akim@epita.fr>
899
900 * src/main.c (main): If there are complains after grammar
901 reductions, then output the report anyway if requested, then die.
902 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
903 * src/reader.c (eoftoken): New.
904 (parse_token_decl): If the token being defined has value `0', it
905 is the eoftoken.
906 (packsymbols): No longer hack `tags' to insert `$' by hand.
907 Be sure to preserve the value of the eoftoken.
908 (reader): Make sure eoftoken is defined.
909 Initialize nsyms to 0: now eoftoken is created just like the others.
910 * src/print.c (print_grammar): Don't special case the eof token.
911 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
912 lie anyway, albeit pleasant.
913 * tests/calc.at: Exercise error messages with eoftoken.
914 Change the grammar so that empty input is invalid.
915 Adjust expectations.
916 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
917
9182001-12-27 Akim Demaille <akim@epita.fr>
919
920 * configure.in: Check the protos of strchr ans strspn.
921 Replace strchr if needed.
922 * src/system.h: Provide the protos of strchr, strspn and memchr if
923 missing.
924 * lib/strchr.c: New.
925 * src/reader.c (symbols_save): Use strchr.
926
9272001-12-27 Akim Demaille <akim@epita.fr>
928
929 * src/print.c, src/print_graph.c (escape): New.
930 Use it to quote the TAGS outputs.
931 * src/print_graph.c (print_state): Now errors are in red, and
932 reductions in green.
933 Prefer high to wide: output the state number on a line of its own.
934
9352001-12-27 Akim Demaille <akim@epita.fr>
936
937 * src/state.h, src/state.c (reductions_new): New.
938 * src/LR0.c (set_state_table): Let all the states have a
939 `reductions', even if reduced to 0.
940 (save_reductions): Adjust.
941 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
942 * src/print.c (print_reductions, print_actions): Adjust.
943 * src/output.c (action_row): Adjust.
944
9452001-12-27 Akim Demaille <akim@epita.fr>
946
947 * src/state.h, src/state.c (errs_new, errs_dup): New.
948 * src/LR0.c (set_state_table): Let all the states have an errs,
949 even if reduced to 0.
950 * src/print.c (print_errs, print_reductions): Adjust.
951 * src/output.c (output_actions, action_row): Adjust.
952 * src/conflicts.c (resolve_sr_conflict): Adjust.
953
9542001-12-27 Akim Demaille <akim@epita.fr>
955
956 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
957
9582001-12-27 Akim Demaille <akim@epita.fr>
959
960 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
961 * src/print.c: here.
962 (lookaheadset, shiftset): New, used as additional storage by
963 print_reductions.
964 (print_results): Adjust.
965 (print_shifts, print_gotos, print_errs): New, extracted from...
966 (print_actions): here.
967 * src/print_graph.c (print_actions): Remove dead code.
968
9692001-12-27 Akim Demaille <akim@epita.fr>
970
971 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
972 `$n' and `@n'.
973
9742001-12-27 Akim Demaille <akim@epita.fr>
975
976 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
977 (build_relations): Adjust.
978
9792001-12-27 Akim Demaille <akim@epita.fr>
980
981 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
982 duplication.
983
9842001-12-27 Akim Demaille <akim@epita.fr>
985
986 * src/reader.c (packgram): Catch nitems overflows.
987
9882001-12-27 Akim Demaille <akim@epita.fr>
989
990 * src/files.c, src/files.h (guard_obstack): Remove.
991 * src/output.c (output): Adjust.
992 * src/reader.c (parse_braces): New, factoring...
993 (copy_action, copy_guard): these two which are renamed as...
994 (parse_action, parse_guard): these.
995 As a voluntary consequence, using braces around guards is now
996 mandatory.
997
9982001-12-27 Akim Demaille <akim@epita.fr>
999
1000 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
1001 * src/reader.c (symbol_list): `guard' and `guard_line' are new
1002 members.
1003 (symbol_list_new): Adjust.
1004 (copy_action): action_line is the first line, not the last.
1005 (copy_guard): Just as for actions, store the `action' only, not
1006 the switch/case/break flesh.
1007 Don't parse the user action that might follow the guard, let...
1008 (readgram): do it, i.e., now, there can be an action after a
1009 guard.
1010 In other words the guard is just explicitly optional.
1011 (packgram): Adjust.
1012 * src/output.c (guards_output): New.
1013 (output_parser): Call it when needed.
1014 (output): Also free the guard and attrs obstacks.
1015 * src/files.c, src/files.h (obstack_save): Remove.
1016 (output_files): Remove.
1017 As a result, if one needs the former `.act' file, using an
1018 appropriate skeleton which requires actions and guards is now
1019 required.
1020 * src/main.c (main): Adjust.
1021 * tests/semantic.at: New.
1022 * tests/regression.at: Use `input.y' as input file name.
1023 Avoid 8+3 problems by requiring input.c when the test needs the
1024 parser.
1025
10262001-12-27 Akim Demaille <akim@epita.fr>
1027
1028 * src/reader.c (symbol_list_new): Be sure to initialize all the
1029 fields.
1030
10312001-12-27 Akim Demaille <akim@epita.fr>
1032
1033 All the hacks using a final pseudo state are now useless.
1034
1035 * src/LR0.c (set_state_table): state_table holds exactly nstates.
1036 * src/lalr.c (nLA): New.
1037 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
1038 instead of lookaheadsp from the pseudo state (nstate + 1).
1039
10402001-12-27 Akim Demaille <akim@epita.fr>
1041
1042 * src/output.c (action_row, token_actions): Use a state_t instead
1043 of a integer, and nlookaheads instead of the following state's
1044 lookaheadsp.
1045
10462001-12-27 Akim Demaille <akim@epita.fr>
1047
1048 * src/conflicts.c (log_resolution, flush_shift)
1049 (resolve_sr_conflict, set_conflicts, solve_conflicts)
1050 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
1051 (conflicts_print, print_reductions): Use a state_t instead of an
1052 integer when referring to a state.
1053 As much as possible, depend upon nlookaheads, instead of the
1054 `lookaheadsp' member of the following state (since lookaheads of
1055 successive states are successive, the difference between state n + 1
1056 and n served as the number of lookaheads for state n).
1057 * src/lalr.c (add_lookback_edge): Likewise.
1058 * src/print.c (print_core, print_actions, print_state)
1059 (print_results): Likewise.
1060 * src/print_graph.c (print_core, print_actions, print_state)
1061 (print_graph): Likewise.
1062 * src/conflicts.h: Adjust.
1063
10642001-12-27 Akim Demaille <akim@epita.fr>
1065
1066 * src/bison.hairy: Formatting/comment changes.
1067 ANSIfy.
1068 Remove `register' indications.
1069 Add plenty of `static'.
1070
10712001-12-27 Akim Demaille <akim@epita.fr>
1072
1073 * src/output.c (prepare): Drop the muscle `ntbase' which
1074 duplicates ntokens.
1075 * src/bison.simple: Formatting/comment changes.
1076 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
1077 is an undocumented synonym.
1078
10792001-12-22 Akim Demaille <akim@epita.fr>
1080
1081 * src/output.c (output_table_data): Change the prototype to use
1082 `int' for array ranges: some invocations do pass an int, not a
1083 short.
1084 Reported by Wayne Green.
1085
10862001-12-22 Akim Demaille <akim@epita.fr>
1087
1088 Some actions of web2c.y are improperly triggered.
1089 Reported by Mike Castle.
1090
1091 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
1092 * tests/regression.at (Web2c): Rename as...
1093 (Web2c Report): this.
1094 (Web2c Actions): New.
1095
10962001-12-22 Akim Demaille <akim@epita.fr>
1097
1098 Reductions in web2c.y are improperly reported.
1099 Reported by Mike Castle.
1100
1101 * src/conflicts.c (print_reductions): Fix.
1102 * tests/regression.at (Web2c): New.
1103
11042001-12-18 Akim Demaille <akim@epita.fr>
1105
1106 Some host fail on `assert (!"foo")', which expands to
1107 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
1108 Reported by Nelson Beebee.
1109
1110 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
1111 `#define it_succeeded 0' and `assert (it_succeeded)'.
1112
11132001-12-17 Marc Autret <autret_m@epita.fr>
1114
1115 * src/bison.simple: Don't hard code the skeleton line and filename.
1116 * src/output.c (output_parser): Rename 'line' as 'output_line'.
1117 New line counter 'skeleton_line' (skeleton-line muscle).
1118
11192001-12-17 Paul Eggert <eggert@twinsun.com>
1120
1121 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
1122 YYDEBUG must be defined to a nonzero value.
1123
1124 * src/bison.simple (yytname): Do not assume that the user defines
1125 YYDEBUG to a properly parenthesized expression.
1126
11272001-12-17 Akim Demaille <akim@epita.fr>
1128
1129 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
1130 nlookaheads is a new member.
1131 Adjust all users.
1132 * src/lalr.h (nlookaheads): Remove this orphan declaration.
1133 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
1134 state.
1135
11362001-12-17 Akim Demaille <akim@epita.fr>
1137
1138 * src/files.h, src/files.c (open_files, close_files): Remove.
1139 * src/main.c (main): Don't open/close files, nor invoke lex_free,
1140 let...
1141 * src/reader.c (reader): Do it.
1142
11432001-12-17 Akim Demaille <akim@epita.fr>
1144
1145 * src/conflicts.c (print_reductions): Formatting changes.
1146
11472001-12-17 Akim Demaille <akim@epita.fr>
1148
1149 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
1150 (flush_reduce): New.
1151 (resolve_sr_conflict): Adjust.
1152
11532001-12-17 Akim Demaille <akim@epita.fr>
1154
1155 * src/output.c (output_obstack): Be static and rename as...
1156 (format_obstack): this, to avoid any confusion with files.c's
1157 output_obstack.
1158 * src/reader.h (muscle_obstack): Move to...
1159 * src/output.h: here, since it's defined in output.c.
1160
11612001-12-17 Akim Demaille <akim@epita.fr>
1162
1163 * src/output.c (action_row, save_column, default_goto)
1164 (sort_actions, matching_state, pack_vector): Better variable
1165 locality.
1166
11672001-12-17 Akim Demaille <akim@epita.fr>
1168
1169 * src/output.c: Various formatting changes.
1170
11712001-12-17 Akim Demaille <akim@epita.fr>
1172
1173 * src/files.c (output_files): Free the output_obstack.
1174 * src/main.c (main): Call print and print_graph conditionally.
1175 * src/print.c (print): Work unconditionally.
1176 * src/print_graph.c (print_graph): Work unconditionally.
1177 * src/conflicts.c (log_resolution): Output only if verbose_flag.
1178
11792001-12-16 Marc Autret <autret_m@epita.fr>
1180
1181 * src/output.c (actions_output): Fix. When we use %no-lines,
1182 there is one less line per action.
1183
11842001-12-16 Marc Autret <autret_m@epita.fr>
1185
1186 * src/bison.simple: Remove a useless #line directive.
1187 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
1188 * src/output.c (get_lines_number): New.
1189 (output_parser): Adjust, now takes care about the lines of a
1190 output muscles.
1191 Fix line numbering.
1192 (actions_output): Computes the number of lines taken by actions.
1193 (output_master_parser): Insert new skeleton which is the name of
1194 the output parser file name.
1195
11962001-12-15 Marc Autret <autret_m@epita.fr>
1197
1198 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
1199
12002001-12-15 Marc Autret <autret_m@epita.fr>
1201
1202 * src/output.c (output_gram): Keep track of the hairy one.
1203
12042001-12-15 Akim Demaille <akim@epita.fr>
1205
1206 Make `make distcheck' work.
1207
1208 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
1209 system.h which uses libgettext.h.
1210
12112001-12-15 Akim Demaille <akim@epita.fr>
1212
1213 * src/nullable.c (set_nullable): Useless rules must be skipped,
1214 otherwise, since we range over their symbols, we might look at a
1215 nonterminal which no longer ``exists'', i.e., it is not counted in
1216 `nvars', hence we overflow our arrays.
1217
12182001-12-15 Akim Demaille <akim@epita.fr>
1219
1220 The header can also be produced directly, without any obstack!
1221 Yahoo!
1222
1223 * src/files.c, src/files.h (defines_obstack): Remove.
1224 (compute_header_macro): Global.
1225 (defines_obstack_save): Remove.
1226 * src/reader.c (parse_union_decl): No longer output to
1227 defines_obstack: its content can be found in the `stype' muscle
1228 anyway.
1229 (output_token_translations): Merge into...
1230 (symbols_output): this.
1231 Rename as...
1232 (symbols_save): this.
1233 (reader): Adjust.
1234 * src/output.c (header_output): New.
1235 (output): Call it.
1236
12372001-12-15 Akim Demaille <akim@epita.fr>
1238
1239 * src/reader.c (parse_union_decl): Instead of handling two obstack
1240 simultaneously, use one to define the `stype' muscle, and use the
1241 value of the latter to fill defines_obstack.
1242 (copy_comment): Remove.
1243 (copy_comment2): Work for a single obstack.
1244 Rename as...
1245 (copy_comment): this.
1246
12472001-12-15 Akim Demaille <akim@epita.fr>
1248
1249 * src/lex.c, src/lex.h (xgetc): No longer static.
1250 * src/reader.c (parse_union_decl): Revamp.
1251
12522001-12-15 Akim Demaille <akim@epita.fr>
1253
1254 Still making progress in separating Bison into (i) input, (ii)
1255 process, (iii) output: now we can directly output the parser file
1256 without using table_obstack at all.
1257
1258 * src/files.c, src/files.h (table_obstack): Bye bye.
1259 (parser_file_name): New.
1260 * src/files.c (compute_output_file_names): Compute it.
1261 * src/output.c (actions_output, output_parser)
1262 (output_master_parser): To a file instead of an obstack.
1263
12642001-12-15 Akim Demaille <akim@epita.fr>
1265
1266 Attach actions to rules, instead of pre-outputting them to
1267 actions_obstack.
1268
1269 * src/gram.h (rule_t): action and action_line are new members.
1270 * src/reader.c (symbol_list): Likewise.
1271 (copy_action): Save the actions within the rule.
1272 (packgram): Save them in rule_table.
1273 * src/output.c (actions_output): New.
1274 (output_parser): Use it on `%%actions'.
1275 (output_rule_data): Don't free rule_table.
1276 (output): Do it.
1277 (prepare): Don't save the `action' muscle.
1278 * src/bison.simple: s/%%action/%%actions/.
1279
12802001-12-15 Akim Demaille <akim@epita.fr>
1281
1282 * src/reader.c (copy_action): When --yacc, don't append a `;'
1283 to the user action: let it fail if lacking.
1284 Suggested by Arnold Robbins and Tom Tromey.
1285
12862001-12-14 Akim Demaille <akim@epita.fr>
1287
1288 * src/lex.c (literalchar): Simply return the char you decoded, non
1289 longer mess around with obstacks and int pointers.
1290 Adjust all callers.
1291
12922001-12-14 Akim Demaille <akim@epita.fr>
1293
1294 * src/lex.c (literalchar): Don't escape the special characters,
1295 just decode them, and keep them as char (before, eol was output as
1296 the 2 char string `\n' etc.).
1297 * src/output.c (output_rule_data): Use quotearg to output the
1298 token strings.
1299
13002001-12-13 Paul Eggert <eggert@twinsun.com>
1301
1302 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1303 Do not infringe on the global user namespace when using C++.
1304 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1305 All uses of `fprintf' and `stderr' changed.
1306
1307 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1308
13092001-12-13 Akim Demaille <akim@epita.fr>
1310
1311 The computation of nullable is broken: it doesn't handle empty
1312 RHS's properly.
1313
1314 * tests/torture.at (GNU AWK Grammar): New.
1315 * tests/sets.at (Nullable): New.
1316 * src/nullable.c (set_nullable): Instead of blindly looping over
1317 `ritems', loop over the rules, and then over their rhs's.
1318
1319 Work around Autotest bugs.
1320
1321 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1322 frame, because Autotest understand lines starting with a `+' as
1323 traces from the shell. Then, they are not processed properly.
1324 Admittedly an Autotest bug, but we don't have time to wait for
1325 Autotest to catch up.
1326 * tests/regression.at (Broken Closure): Adjust to the new table
1327 frames.
1328 Move to...
1329 * tests/sets.at: here.
1330
13312001-12-13 Akim Demaille <akim@epita.fr>
1332
1333 * src/closure.c (closure): Use nrules instead of playing tricks
1334 with BITS_PER_WORD.
1335
13362001-12-13 Akim Demaille <akim@epita.fr>
1337
1338 * src/print.c (print_actions): Output the handling of `$' as the
1339 traces do: shifting the token EOF. Before EOF was treated as a
1340 nonterminal.
1341 * tests/regression.at: Adjust some tests.
1342 * src/print_graph.c (print_core): Complete the set of items via
1343 closure. The next-to-final and final states are still unsatisfying,
1344 but that's to be addressed elsewhere.
1345 No longer output the rule numbers, but do output the state number.
1346 A single loop for the shifts + gotos is enough, but picked a
1347 distinct color for each.
1348 (print_graph): Initialize and finalize closure.
1349
13502001-12-13 Akim Demaille <akim@epita.fr>
1351
1352 * src/reader.c (readgram): Remove dead code, an strip useless
1353 braces.
1354 (get_type): Remove, unused.
1355
13562001-12-12 Akim Demaille <akim@epita.fr>
1357
1358 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1359 on that of lib/error.c.
1360
13612001-12-12 Akim Demaille <akim@epita.fr>
1362
1363 Some hosts don't like `/' in includes.
1364
1365 * src/system.h: Include libgettext.h without qualifying the path.
1366 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1367 $(top_srcdir).
1368
13692001-12-11 Marc Autret <autret_m@epita.fr>
1370
1371 * src/output.c (output_parser): Remove useless muscle.
1372
13732001-12-11 Marc Autret <autret_m@epita.fr>
1374
1375 * src/bison.simple: Remove #line just before %%epilogue. It
1376 is now handled in ...
1377 * src/reader.c (read_additionnal_code): Add the output of a
1378 #line for the epilogue.
1379
13802001-12-10 Marc Autret <autret_m@epita.fr>
1381
1382 * src/reader.c (copy_definition): Re-use CPP-outed code which
1383 replace precedent remove.
1384 * src/bison.simple: Remove #line before %%prologue because
1385 %%input-line is wrong at this time.
1386
13872001-12-10 Marc Autret <autret_m@epita.fr>
1388
1389 * src/reader.c (symbols_output): Clean up.
1390 * src/output.c (output_gram, output): Clean up.
1391
13922001-12-10 Akim Demaille <akim@epita.fr>
1393
1394 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1395 * src/LR0.c (set_state_table): here.
1396 * src/lalr.c (lalr): Call it.
1397
13982001-12-10 Akim Demaille <akim@epita.fr>
1399
1400 * src/state.h (shifts): Remove the `number' member: shifts are
1401 attached to state, hence no longer need to be labelled with a
1402 state number.
1403
14042001-12-10 Akim Demaille <akim@epita.fr>
1405
1406 Now that states have a complete set of members, the linked list of
1407 shifts is useless: just fill directly the state's shifts member.
1408
1409 * src/state.h (shifts): Remove the `next' member.
1410 * src/LR0.c (first_state, last_state): Remove.
1411 Adjust the callers.
1412 (augment_automaton): Don't look for the shifts that must be added
1413 a shift on EOF: it is those of the state we looked for! But now,
1414 since shifts are attached, it is no longer needed to looking
1415 merely by its id: its number.
1416
14172001-12-10 Akim Demaille <akim@epita.fr>
1418
1419 * src/LR0.c (augment_automaton): Better variable locality.
1420 Remove an impossible branch: if there is a state corresponding to
1421 the start symbol being shifted, then there is shift for the start
1422 symbol from the initial state.
1423
14242001-12-10 Akim Demaille <akim@epita.fr>
1425
1426 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1427 only when appropriate: when insert_start_shifting_state' is not
1428 invoked.
1429 * tests/regression.at (Rule Line Numbers): Adjust.
1430
14312001-12-10 Akim Demaille <akim@epita.fr>
1432
1433 * src/LR0.c (augment_automaton): Now that all states have shifts,
1434 merge the two cases addition shifts to the initial state.
1435
14362001-12-10 Akim Demaille <akim@epita.fr>
1437
1438 * src/lalr.c (set_state_table): Move to...
1439 * src/LR0.c: here.
1440 * src/lalr.c (lalr): Don't call it...
1441 * src/LR0.c (generate_states): do it.
1442 * src/LR0.h (first_state): Remove, only the table is used.
1443
14442001-12-10 Akim Demaille <akim@epita.fr>
1445
1446 * src/LR0.h (first_shift, first_reduction): Remove.
1447 * src/lalr.c: Don't use first_shift: find shifts through the
1448 states.
1449
14502001-12-10 Akim Demaille <akim@epita.fr>
1451
1452 * src/LR0.c: Attach shifts to states as soon as they are
1453 computed.
1454 * src/lalr.c (set_state_table): Instead of assigning shifts to
1455 state, just assert that the mapping was properly done.
1456
14572001-12-10 Akim Demaille <akim@epita.fr>
1458
1459 * src/LR0.c (insert_start_shift): Rename as...
1460 (insert_start_shifting_state): this.
1461 (insert_eof_shifting_state, insert_accepting_state): New.
1462 (augment_automaton): Adjust.
1463 Better locality of the variables.
1464 When looking if the start_symbol is shifted from the initial
1465 state, using `while (... symbol != start_symbol ...)' sounds
1466 better than `while (... symbol < start_symbol ...)': If fail
1467 to see how the order between symbols could be relevant!
1468
14692001-12-10 Akim Demaille <akim@epita.fr>
1470
1471 * src/getargs.h: Don't declare `spec_name_prefix' and
1472 `spec_file_prefix', declared by src/files.h.
1473 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1474 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1475 * src/output.c (prepare): Adjust.
1476 * src/reader.c (symbols_output): Likewise.
1477 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1478
14792001-12-10 Akim Demaille <akim@epita.fr>
1480
1481 * src/muscle_tab.c (muscle_init): NULL is a better default than
1482 `"0"'.
1483
14842001-12-10 Akim Demaille <akim@epita.fr>
1485
1486 * src/reader.c (reader): Calling symbols_output once is enough.
1487
14882001-12-10 Akim Demaille <akim@epita.fr>
1489
1490 Now that states have a complete set of members, the linked list of
1491 reductions is useless: just fill directly the state's reductions
1492 member.
1493
1494 * src/state.h (struct reductions): Remove member `number' and
1495 `next'.
1496 * src/LR0.c (first_reduction, last_reduction): Remove.
1497 (save_reductions): Don't link the new reductions, store them in
1498 this_state.
1499 * src/lalr.c (set_state_table): No need to attach reductions to
1500 states, it's already done.
1501 * src/output.c (output_actions): No longer free the shifts, then
1502 the reductions, then the states: free all the states and their
1503 members.
1504
15052001-12-10 Akim Demaille <akim@epita.fr>
1506
1507 * src/options.c (OPTN, DRTV, BOTH): New.
1508 (option_table): Use them.
1509
1510 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1511 the job of system.h.
1512 * src/options.c: Don't include stdio.h and xalloc.h for the same
1513 reasons.
1514
15152001-12-10 Akim Demaille <akim@epita.fr>
1516
1517 * src/output.c (output, prepare): Make sure the values of the
1518 muscles `action' and `prologue' are 0-terminated.
1519
15202001-12-10 Akim Demaille <akim@epita.fr>
1521
1522 Clean up GCC warnings.
1523
1524 * src/reader.c (copy_action): `buf' is not used.
1525 (parse_skel_decl): Be static.
1526 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1527 * src/options.h (create_long_option_table): Have a real prototype.
1528 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1529 (hash_delete_at): Return const void *.
1530 Adjust casts to preserve the const.
1531
15322001-12-10 Akim Demaille <akim@epita.fr>
1533
1534 * configure.in: Require 2.52g.
1535 M4 is not needed, but AUTOM4TE is.
1536 * m4/m4.m4: Remove.
1537 * tests/Makefile.am: Adjust.
1538
15392001-12-10 Akim Demaille <akim@epita.fr>
1540
1541 One structure for states is enough, even though theoretically
1542 there are LR(0) states and LALR(1) states.
1543
1544 * src/lalr.h (state_t): Remove.
1545 (state_table): Be state_t **, not state_t *.
1546 * src/state.h (core, CORE_ALLOC): Rename as...
1547 (state_t, STATE_ALLOC): this.
1548 Add the LALR(1) members: shifts, reductions, errs.
1549 * src/LR0.c (state_table): Rename as...
1550 (state_hash): this, to avoid name clashes with the global
1551 `state_table'.
1552 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1553 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1554
15552001-12-10 Akim Demaille <akim@epita.fr>
1556
1557 Bison dumps core on bash.y.
1558 Reported by Pascal Bart.
1559
1560 * src/warshall.c (bitmatrix_print): New.
1561 (TC): Use it.
1562 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1563 j must be the outer loop.
1564 * tests/regression.at (Broken Closure): New.
1565
15662001-12-05 Akim Demaille <akim@epita.fr>
1567
1568 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1569 its argument.
1570