]> git.saurik.com Git - bison.git/blame_incremental - ChangeLog
* data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
[bison.git] / ChangeLog
... / ...
CommitLineData
12002-02-11 Robert Anisko <robert@lrde.epita.fr>
2
3 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
4 (Copyright notice): Update.
5
62002-02-08 Robert Anisko <robert@lrde.epita.fr>
7
8 * data/bison.c++: Correct error recovery. Make the user able to
9 initialize the starting location.
10
112002-02-07 Akim Demaille <akim@epita.fr>
12
13 * tests/input.at: New.
14
152002-02-07 Robert Anisko <robert@lrde.epita.fr>
16
17 * data/bison.c++: Replace some direct m4 expansions by constants. Be
18 more consistent when naming methods and variables. Put preprocessor
19 directives around tables only needed for debugging.
20
212002-02-07 Robert Anisko <robert@lrde.epita.fr>
22
23 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
24 C++ parsers.
25 (yy::b4_name::parse): Use print_.
26
272002-02-07 Robert Anisko <robert@lrde.epita.fr>
28
29 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
30
312002-02-07 Robert Anisko <robert@lrde.epita.fr>
32
33 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
34 C++ parsers.
35 (yy::b4_name::parse): Build verbose error messages, and use error_.
36
372002-02-06 Robert Anisko <robert@lrde.epita.fr>
38
39 * data/bison.c++: Fix m4 quoting in comments.
40
412002-02-06 Robert Anisko <robert@lrde.epita.fr>
42
43 * data/bison.c++: Adjust the parser code. Fix some muscles that were
44 not expanded by m4.
45
462002-02-05 Akim Demaille <akim@epita.fr>
47
48 * data/bison.c++: Adjust to the M4 back end.
49 More is certainly needed.
50
512002-02-05 Akim Demaille <akim@epita.fr>
52
53 Give a try to M4 as a back end.
54
55 * lib/readpipe.c: New, from wdiff.
56 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
57 BISON_HAIRY.
58 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
59 specific values. Now it is m4 that performs the lookup.
60 * src/parse-skel.y: Remove.
61 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
62 * src/output.c (actions_output, guards_output)
63 (token_definitions_output): No longer keeps track of the output
64 line number, hence remove the second argument.
65 (guards_output): Check against the guard member of a rule, not the
66 action member.
67 Adjust callers.
68 (output_skeleton): Don't look for the skeleton location, let m4 do
69 that.
70 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
71 file will be used.
72 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
73 (prepare): Given that for the time being changesyntax is not
74 usable in M4, rename the muscles using `-' to `_'.
75 Define `defines_flag', `output_parser_name' and `output_header_name'.
76 * src/output.h (actions_output, guards_output)
77 (token_definitions_output): Adjust prototypes.
78 * src/scan-skel.l: Instead of scanning the skeletons, it now
79 processes the output of m4: `__oline__' and `#output'.
80 * data/bison.simple: Adjust to be used by M4(sugar).
81 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
82 to date.
83 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
84 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
85 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
86 shamelessly stolen from CVS Autoconf.
87
882002-02-05 Akim Demaille <akim@epita.fr>
89
90 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
91 * configure.in: Check for the declarations of free and malloc.
92 * src/muscle_tab.c: Adjust.
93
942002-02-05 Akim Demaille <akim@epita.fr>
95
96 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
97 which have no values.
98
992002-02-05 Akim Demaille <akim@epita.fr>
100
101 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
102 * data/: here.
103
1042002-01-29 Paul Eggert <eggert@twinsun.com>
105
106 * src/bison.simple (YYSIZE_T): Do not define merely because
107 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
108 On some platforms, <alloca.h> does not declare YYSTD (size_t).
109
1102002-01-27 Akim Demaille <akim@epita.fr>
111
112 Fix `%nonassoc and eof'.
113
114 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
115 which were not properly copied! Replace
116 memcpy (res->errs, src->errs, src->nerrs);
117 with
118 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
119 !!!
120 * tests/regression.at (%nonassoc and eof): Adjust to newest
121 Autotest: `.' is not in the PATH.
122
1232002-01-27 Akim Demaille <akim@epita.fr>
124
125 * tests/sets.at (AT_EXTRACT_SETS): New.
126 (Nullable): Use it.
127 (Firsts): New.
128
1292002-01-26 Akim Demaille <akim@epita.fr>
130
131 * tests/actions.at, tests/calc.at, tests/headers.at,
132 * tests/torture.at: Adjust to the newest Autotest which no longer
133 forces `.' in the PATH.
134
1352002-01-25 Akim Demaille <akim@epita.fr>
136
137 * tests/regression.at (%nonassoc and eof): New.
138 Suggested by Robert Anisko.
139
1402002-01-24 Akim Demaille <akim@epita.fr>
141
142 Bison dumps core when trying to complain about broken input files.
143 Reported by Cris van Pelt.
144
145 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
146 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
147 into...
148 (Invalid inputs): Strengthen: exercise parse_percent_token.
149
1502002-01-24 Robert Anisko <robert.anisko@epita.fr>
151
152 * src/Makefile.am: Add bison.c++.
153 * src/bison.c++: New skeleton.
154
1552002-01-21 Paolo Bonzini <bonzini@gnu.org>
156
157 * po/it.po: New.
158
1592002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
160
161 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
162
1632002-01-20 Marc Autret <marc@gnu.org>
164
165 * src/files.c (compute_output_file_names): Fix
166
1672002-01-20 Marc Autret <marc@gnu.org>
168
169 * tests/output.at: New test.
170 * src/files.c (compute_base_names): Don't map extensions when
171 the YACC flag is set, use defaults.
172 Reported by Evgeny Stambulchik.
173
1742002-01-20 Marc Autret <marc@gnu.org>
175
176 * src/system.h: Need to define __attribute__ away for non-GCC
177 compilers as well (i.e. the vendor C compiler).
178 Suggested by Albert Chin-A-Young.
179
1802002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
181
182 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
183 canonical definition.
184 * src/system.h: Use the canonical definition for PARAMS (avoids
185 a conflict with the macro from lib/hash.h).
186
1872002-01-11 Akim Demaille <akim@epita.fr>
188
189 * configure.in: Use AC_FUNC_STRNLEN.
190 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
191
1922002-01-09 Akim Demaille <akim@epita.fr>
193
194 * src/files.c, src/files.h (output_infix): New.
195 (tab_extension): Remove.
196 (compute_base_names): Compute the former, drop the latter.
197 * src/output.c (prepare): Insert the muscles `output-infix', and
198 `output-suffix'.
199 * src/parse-skel.y (string, string.1): New.
200 (section.header): Use it.
201 (section.yacc): Remove.
202 (prefix): Remove too.
203 * src/scan-skel.l: Adjust.
204 * src/bison.simple, src/bison.hairy: Adjust.
205
2062002-01-09 Akim Demaille <akim@epita.fr>
207
208 * configure.in (WERROR_CFLAGS): Compute it.
209 * src/Makefile.am (CFLAGS): Pass it.
210 * tests/atlocal.in (CFLAGS): Idem.
211 * src/files.c: Fix a few warnings.
212 (get_extension_index): Remove, unused.
213
2142002-01-08 Akim Demaille <akim@epita.fr>
215
216 * src/getargs.c (AS_FILE_NAME): New.
217 (getargs): Use it to convert DOSish file names.
218 * src/files.c (base_name): Rename as full_base_name to avoid
219 clashes with `base_name ()'.
220 (filename_split): New.
221 (compute_base_names): N-th rewrite, using filename_split.
222
2232002-01-08 Akim Demaille <akim@epita.fr>
224
225 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
226 New, stolen from the Fileutils 4.1.
227 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
228 * configure.in: Check for the presence of memrchr, and of its
229 prototype.
230
2312002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
232
233 * lib/hash.h (__P): Added definition for this macro.
234 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
235 BUILT_SOURCES, to ensure they are generated first.
236 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
237 %error-verbose to allow bootstrapping with bison 1.30x.
238
2392002-01-06 Akim Demaille <akim@epita.fr>
240
241 * src/reader.c (parse_braces): Don't fetch the next char, the
242 convention is to fetch on entry.
243 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
244 'switch' without a following semicolon.
245 * tests/regression.at (braces parsing): New.
246
2472002-01-06 Akim Demaille <akim@epita.fr>
248
249 Bison is dead wrong in its RR conflict reports.
250
251 * tests/torture.at (GNU Cim Grammar): New.
252 * src/conflicts.c (count_rr_conflicts): Fix.
253
2542002-01-06 Akim Demaille <akim@epita.fr>
255
256 Creating package.m4 from configure.ac causes too many problems.
257
258 * tests/Makefile.am (package.m4): Create it by hand,
259 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
260
2612002-01-06 Akim Demaille <akim@epita.fr>
262
263 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
264 skeleton.h.
265
2662002-01-04 Paul Eggert <eggert@twinsun.com>
267
268 * doc/bison.texinfo (Debugging):
269 Remove YYSTDERR; it's no longer defined or used.
270 Also, s/cstdio.h/cstdio/.
271
2722002-01-03 Akim Demaille <akim@epita.fr>
273
274 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
275
2762002-01-03 Akim Demaille <akim@epita.fr>
277
278 * src/parse-skel.y (process_skeleton): Don't bind the parser's
279 tracing code to --trace, wait for a better --trace option, with
280 args.
281
2822002-01-03 Akim Demaille <akim@epita.fr>
283
284 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
285 The ISO C++ standard is extremely clear about it: stderr is
286 considered a macro, not a regular symbol (see table 94 `Header
287 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
288 Therefore std:: does not apply to it. It still does with fprintf.
289 Also, s/cstdio.h/cstdio/.
290
2912002-01-03 Akim Demaille <akim@epita.fr>
292
293 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
294 for non system headers.
295
2962002-01-02 Akim Demaille <akim@epita.fr>
297
298 Equip the skeleton chain with location tracking, runtime trace,
299 pure parser and scanner.
300
301 * src/parse-skel.y: Request a pure parser, locations, and prefix
302 renaming.
303 (%union): Having several members with the same type does not help
304 type mismatches, simplify.
305 (YYPRINT, yyprint): New.
306 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
307 (skel_error): this.
308 Handle locations.
309 * src/scan-skel.l: Adjust to these changes.
310 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
311 (LOCATION_PRINT, skel_control_t): New.
312
3132001-12-30 Akim Demaille <akim@epita.fr>
314
315 * src/parse-skel.y: Get rid of the shift/reduce conflict:
316 replace `gb' with BLANKS.
317 * src/scan-skel.l: Adjust.
318
3192001-12-30 Akim Demaille <akim@epita.fr>
320
321 * src/system.h: We don't need nor want bcopy.
322 Throw away MS-DOS crap: we don't need getpid.
323 * configure.in: We don't need strndup. It was even causing
324 problems: because Flex includes the headers *before* us,
325 _GNU_SOURCE is not defined by config.h, and therefore strndup was
326 not visible.
327 * lib/xstrndup.c: New.
328 * src/scan-skel.l: Use it.
329 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
330 * src/parse-skel.y: Use %directives instead of #defines.
331
3322001-12-30 Akim Demaille <akim@epita.fr>
333
334 * src/skeleton.h: New.
335 * src/output.c (output_parser, output_master_parser): Remove, dead
336 code.
337 * src/output.h (get_lines_number, actions_output, guards_output)
338 (token_definitions_output): Prototype them.
339 * src/parse-skel.y: Add the license notice.
340 Include output.h and skeleton.h.
341 (process_skeleton): Returns void, and takes a single parameter.
342 * src/scan-skel.l: Add the license notice.
343 Include skeleton.h.
344 Don't use %option yylineno: it seems that then Flex imagines
345 REJECT has been used, and therefore it won't reallocate its
346 buffers (which makes no other sense to me than a bug). It results
347 in warnings for `unused: yy_flex_realloc'.
348
3492001-12-30 Robert Anisko <robert.anisko@epita.fr>
350
351 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
352 (MUSCLE_INSERT_PREFIX): ...to there.
353 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
354 (MUSCLE_INSERT_PREFIX): Move from here...
355
356 * src/bison.hairy: Add a section directive. Put braces around muscle
357 names. This parser skeleton is still broken, but Bison should not
358 choke on a bad muscle 'syntax'.
359 * src/bison.simple: Add a section directive. Put braces around muscle
360 names.
361
362 * src/files.h (strsuffix, stringappend): Add declarations.
363 (tab_extension): Add declaration.
364 (short_base_name): Add declaration.
365
366 * src/files.c (strsuffix, stringappend): No longer static. These
367 functions are used in the skeleton parser.
368 (tab_extension): New.
369 (compute_base_names): Use the computations done in this function
370 to guess if the generated parsers should have '.tab' in their
371 names.
372 (short_base_name): No longer static.
373
374 * src/output.c (output_skeleton): New.
375 (output): Disable call to output_master_parser, and give a try to
376 a new skeleton handling system.
377 (guards_output, actions_output): No longer static.
378 (token_definitions_output, get_lines_number): No longer static.
379
380 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
381
382 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
383 parse-skel.y.
384
385 * src/parse-skel.y: New file.
386 * src/scan-skel.l: New file.
387
3882001-12-29 Akim Demaille <akim@epita.fr>
389
390 %name-prefix is broken.
391
392 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
393 Adjust all dependencies.
394 * tests/headers.at (export YYLTYPE): Strengthen this test: use
395 %name-prefix.
396
397 Renaming yylval but not yylloc is not consistent. Now we do.
398
399 * src/bison.simple: Prefix yylloc if used.
400 * doc/bison.texinfo (Decl Summary): Document that.
401
4022001-12-29 Akim Demaille <akim@epita.fr>
403
404 * doc/bison.texinfo: Promote `%long-directive' over
405 `%long_directive'.
406 Remove all references to fixed-output-files, yacc is enough.
407
4082001-12-29 Akim Demaille <akim@epita.fr>
409
410 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
411 user prologue. These are defaults.
412 * tests/actions.at (Mid-rule actions): Make sure the user can
413 define YYDEBUG and YYERROR_VERBOSE.
414
4152001-12-29 Akim Demaille <akim@epita.fr>
416
417 * src/output.c (header_output): Don't forget to export YYLTYPE and
418 yylloc.
419 * tests/headers.at (export YYLTYPE): New, make sure it does.
420 * tests/regression.at (%union and --defines, Invalid CPP headers):
421 Move to...
422 * tests/headers.at: here.
423
4242001-12-29 Akim Demaille <akim@epita.fr>
425
426 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
427
4282001-12-29 Akim Demaille <akim@epita.fr>
429
430 * tests/actions.at (Mid-rule actions): Output on a single line
431 instead of several.
432
4332001-12-29 Akim Demaille <akim@epita.fr>
434
435 * doc/bison.texinfo: Formatting changes.
436
4372001-12-29 Akim Demaille <akim@epita.fr>
438
439 Don't store the token defs in a muscle, just be ready to output it
440 on command. Now possible via `symbols'. Fixes a memory leak.
441
442 * src/output.c (token_definitions_output): New.
443 (output_parser, header_output): Use it.
444 * src/reader.c (symbols_save): Remove.
445
4462001-12-29 Akim Demaille <akim@epita.fr>
447
448 * src/bison.simple: Do not provide a default for YYSTYPE and
449 YYLTYPE before the user's prologue. Otherwise it's hardly... a
450 default.
451
4522001-12-29 Akim Demaille <akim@epita.fr>
453
454 Mid-rule actions are simply... ignored!
455
456 * src/reader.c (readgram): Be sure to attach mid-rule actions to
457 the empty-rule associated to the dummy symbol, not to the host
458 rule.
459 * tests/actions.at (Mid-rule actions): New.
460
4612001-12-29 Akim Demaille <akim@epita.fr>
462
463 Memory leak.
464
465 * src/reader.c (reader): Free grammar.
466
4672001-12-29 Akim Demaille <akim@epita.fr>
468
469 Memory leak.
470
471 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
472 since it allocates it for each state, although only one is needed.
473 (allocate_storage): Do it here.
474
4752001-12-29 Akim Demaille <akim@epita.fr>
476
477 * src/options.h, src/options.c (create_long_option_table): Rename
478 as...
479 (long_option_table_new): this, with a clearer prototype.
480 (percent_table): Remove, unused,
481 * src/getargs.c (getargs): Adjust.
482
4832001-12-29 Akim Demaille <akim@epita.fr>
484
485 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
486 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
487 as states.
488
4892001-12-29 Akim Demaille <akim@epita.fr>
490
491 * src/lalr.c (build_relations): Rename `states' as `states1'.
492 Sorry, I don't understand exactly what it is, no better name...
493
4942001-12-29 Akim Demaille <akim@epita.fr>
495
496 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
497 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
498 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
499 as rules.
500
5012001-12-29 Akim Demaille <akim@epita.fr>
502
503 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
504 ago.
505
5062001-12-29 Akim Demaille <akim@epita.fr>
507
508 * src/reader.c, src/reader.h (user_toknums): Remove.
509 Adjust all users to use symbols[i]->user_token_number.
510
5112001-12-29 Akim Demaille <akim@epita.fr>
512
513 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
514 Adjust all users to use symbols[i]->prec or ->assoc.
515
5162001-12-29 Akim Demaille <akim@epita.fr>
517
518 * src/reader.c, src/reader.h (tags): Remove.
519 Adjust all users to use symbols[i]->tag.
520
5212001-12-29 Akim Demaille <akim@epita.fr>
522
523 * src/gram.h, src/gram.c (symbols): New, similar to state_table
524 and rule_table.
525 * src/reader.c (packsymbols): Fill this table.
526 Drop sprec.
527 * src/conflicts.c (resolve_sr_conflict): Adjust.
528 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
529 single table.
530 Use symbols[i]->tag instead of tags[i].
531
5322001-12-29 Akim Demaille <akim@epita.fr>
533
534 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
535 In addition, put a comment in there, to replace...
536 * tests/regression.at (%union and C comments): Remove.
537
5382001-12-29 Akim Demaille <akim@epita.fr>
539
540 * tests/regression.at (Web2c Actions): Blindly move the actual
541 output as expected output. The contents *seem* right to me, but I
542 can't pretend reading perfectly parser tables... Nonetheless, all
543 the other tests pass correctly, the table look OK, even though the
544 presence of `$axiom' is to be noted: AFAICS it is useless (but
545 harmless).
546
5472001-12-29 Akim Demaille <akim@epita.fr>
548
549 * src/reader.c (readgram): Don't add the rule 0 if there were no
550 rules read. In other words, add it _after_ having performed
551 grammar sanity checks.
552 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
553
5542001-12-29 Akim Demaille <akim@epita.fr>
555
556 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
557 visible, and some states have now a different number.
558
5592001-12-29 Akim Demaille <akim@epita.fr>
560
561 * src/reader.c (readgram): Bind the initial rule's lineno to that
562 of the first rule.
563 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
564 (Solved SR Conflicts): Adjust rule 0's line number.
565
5662001-12-29 Akim Demaille <akim@epita.fr>
567
568 Fix the `GAWK Grammar' failure.
569
570 * src/LR0.c (final_state): Initialize to -1 so that we do compute
571 the reductions of the first state which was mistakenly confused
572 with the final state because precisely final_state was initialized
573 to 0.
574 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
575 now noticed by Bison.
576 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
577 have a reduction on $default.
578
5792001-12-29 Akim Demaille <akim@epita.fr>
580
581 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
582 rule line numbers.
583 * src/closure.c (print_closure): Likewise.
584 * src/derives.c (print_derives): Likewise.
585 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
586 now.
587
5882001-12-29 Akim Demaille <akim@epita.fr>
589
590 * src/lalr.c (lookaheads_print): New.
591 (lalr): Call it when --trace-flag.
592 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
593 are dumped.
594
5952001-12-29 Akim Demaille <akim@epita.fr>
596
597 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
598 when walking through ritem, even via rule->rhs.
599 * src/reduce.c (dump_grammar, useful_production, reduce_output)
600 (useful_production, useless_nonterminals): Likewise.
601 (reduce_grammar_tables): Likewise, plus update nritems.
602 * src/nullable.c (set_nullable): Likewise.
603 * src/lalr.c (build_relations): Likewise.
604 * tests/sets.at (Nullable): Adjust.
605 Fortunately, now, the $axiom is no longer nullable.
606
6072001-12-29 Akim Demaille <akim@epita.fr>
608
609 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
610 the 0-sentinel.
611 * src/gram.c (ritem_longest_rhs): Likewise.
612 * src/reduce.c (nonterminals_reduce): Likewise.
613 * src/print_graph.c (print_graph): Likewise.
614 * src/output.c (output_rule_data): Likewise.
615 * src/nullable.c (set_nullable): Likewise.
616
6172001-12-29 Akim Demaille <akim@epita.fr>
618
619 * src/output.c: Comment changes.
620
6212001-12-27 Paul Eggert <eggert@twinsun.com>
622
623 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
624 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
625 Sparc, as they were causing more porting problems than the
626 (minor) performance improvement was worth.
627
628 Also, catch up with 1.31's YYSTD.
629
6302001-12-27 Akim Demaille <akim@epita.fr>
631
632 * src/output.c (output_gram): Rely on nritems, not the
633 0-sentinel. See below.
634 Use -1 as separator, not 0.
635 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
636 Rely on -1 as separator in yyrhs, instead of 0.
637 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
638 twice `Now at end of input', therefore there are two lines less to
639 expect.
640
6412001-12-27 Akim Demaille <akim@epita.fr>
642
643 * tests/regression.at (Unresolved SR Conflicts):
644 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
645 below.
646
6472001-12-27 Akim Demaille <akim@epita.fr>
648
649 * src/LR0.c (new_state): Recognize the final state by the fact it
650 is reached by eoftoken.
651 (insert_start_shifting_state, insert_eof_shifting_state)
652 (insert_accepting_state, augment_automaton): Remove, since now
653 these states are automatically computed from the initial state.
654 (generate_states): Adjust.
655 * src/print.c: When reporting a rule number to the user, substract
656 1, so that the axiom rule is rule 0, and the first user rule is 1.
657 * src/reduce.c: Likewise.
658 * src/print_graph.c (print_core): For the time being, just as for
659 the report, depend upon --trace-flags to dump the full set of
660 items.
661 * src/reader.c (readgram): Once the grammar read, insert the rule
662 0: `$axiom: START-SYMBOL $'.
663 * tests/set.at: Adjust: rule 0 is now displayed, and since the
664 number of the states has changed (the final state is no longer
665 necessarily the last), catch up.
666
6672001-12-27 Akim Demaille <akim@epita.fr>
668
669 Try to make the use of the eoftoken valid. Given that its value
670 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
671 is used instead of > 0 where appropriate, (ii), depend upon nritems
672 instead of the 0-sentinel.
673
674 * src/gram.h, src/gram.c (nritems): New.
675 Expected to be duplication of nitems, but for the time being...
676 * src/reader.c (packgram): Assert nritems and nitems are equal.
677 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
678 * src/closure.c (print_closure, print_fderives): Likewise.
679 * src/gram.c (ritem_print): Likewise.
680 * src/print.c (print_core, print_grammar): Likewise.
681 * src/print_graph.c: Likewise.
682
6832001-12-27 Akim Demaille <akim@epita.fr>
684
685 * src/main.c (main): If there are complains after grammar
686 reductions, then output the report anyway if requested, then die.
687 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
688 * src/reader.c (eoftoken): New.
689 (parse_token_decl): If the token being defined has value `0', it
690 is the eoftoken.
691 (packsymbols): No longer hack `tags' to insert `$' by hand.
692 Be sure to preserve the value of the eoftoken.
693 (reader): Make sure eoftoken is defined.
694 Initialize nsyms to 0: now eoftoken is created just like the others.
695 * src/print.c (print_grammar): Don't special case the eof token.
696 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
697 lie anyway, albeit pleasant.
698 * tests/calc.at: Exercise error messages with eoftoken.
699 Change the grammar so that empty input is invalid.
700 Adjust expectations.
701 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
702
7032001-12-27 Akim Demaille <akim@epita.fr>
704
705 * configure.in: Check the protos of strchr ans strspn.
706 Replace strchr if needed.
707 * src/system.h: Provide the protos of strchr, strspn and memchr if
708 missing.
709 * lib/strchr.c: New.
710 * src/reader.c (symbols_save): Use strchr.
711
7122001-12-27 Akim Demaille <akim@epita.fr>
713
714 * src/print.c, src/print_graph.c (escape): New.
715 Use it to quote the TAGS outputs.
716 * src/print_graph.c (print_state): Now errors are in red, and
717 reductions in green.
718 Prefer high to wide: output the state number on a line of its own.
719
7202001-12-27 Akim Demaille <akim@epita.fr>
721
722 * src/state.h, src/state.c (reductions_new): New.
723 * src/LR0.c (set_state_table): Let all the states have a
724 `reductions', even if reduced to 0.
725 (save_reductions): Adjust.
726 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
727 * src/print.c (print_reductions, print_actions): Adjust.
728 * src/output.c (action_row): Adjust.
729
7302001-12-27 Akim Demaille <akim@epita.fr>
731
732 * src/state.h, src/state.c (errs_new, errs_dup): New.
733 * src/LR0.c (set_state_table): Let all the states have an errs,
734 even if reduced to 0.
735 * src/print.c (print_errs, print_reductions): Adjust.
736 * src/output.c (output_actions, action_row): Adjust.
737 * src/conflicts.c (resolve_sr_conflict): Adjust.
738
7392001-12-27 Akim Demaille <akim@epita.fr>
740
741 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
742
7432001-12-27 Akim Demaille <akim@epita.fr>
744
745 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
746 * src/print.c: here.
747 (lookaheadset, shiftset): New, used as additional storage by
748 print_reductions.
749 (print_results): Adjust.
750 (print_shifts, print_gotos, print_errs): New, extracted from...
751 (print_actions): here.
752 * src/print_graph.c (print_actions): Remove dead code.
753
7542001-12-27 Akim Demaille <akim@epita.fr>
755
756 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
757 `$n' and `@n'.
758
7592001-12-27 Akim Demaille <akim@epita.fr>
760
761 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
762 (build_relations): Adjust.
763
7642001-12-27 Akim Demaille <akim@epita.fr>
765
766 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
767 duplication.
768
7692001-12-27 Akim Demaille <akim@epita.fr>
770
771 * src/reader.c (packgram): Catch nitems overflows.
772
7732001-12-27 Akim Demaille <akim@epita.fr>
774
775 * src/files.c, src/files.h (guard_obstack): Remove.
776 * src/output.c (output): Adjust.
777 * src/reader.c (parse_braces): New, factoring...
778 (copy_action, copy_guard): these two which are renamed as...
779 (parse_action, parse_guard): these.
780 As a voluntary consequence, using braces around guards is now
781 mandatory.
782
7832001-12-27 Akim Demaille <akim@epita.fr>
784
785 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
786 * src/reader.c (symbol_list): `guard' and `guard_line' are new
787 members.
788 (symbol_list_new): Adjust.
789 (copy_action): action_line is the first line, not the last.
790 (copy_guard): Just as for actions, store the `action' only, not
791 the switch/case/break flesh.
792 Don't parse the user action that might follow the guard, let...
793 (readgram): do it, i.e., now, there can be an action after a
794 guard.
795 In other words the guard is just explicitly optional.
796 (packgram): Adjust.
797 * src/output.c (guards_output): New.
798 (output_parser): Call it when needed.
799 (output): Also free the guard and attrs obstacks.
800 * src/files.c, src/files.h (obstack_save): Remove.
801 (output_files): Remove.
802 As a result, if one needs the former `.act' file, using an
803 appropriate skeleton which requires actions and guards is now
804 required.
805 * src/main.c (main): Adjust.
806 * tests/semantic.at: New.
807 * tests/regression.at: Use `input.y' as input file name.
808 Avoid 8+3 problems by requiring input.c when the test needs the
809 parser.
810
8112001-12-27 Akim Demaille <akim@epita.fr>
812
813 * src/reader.c (symbol_list_new): Be sure to initialize all the
814 fields.
815
8162001-12-27 Akim Demaille <akim@epita.fr>
817
818 All the hacks using a final pseudo state are now useless.
819
820 * src/LR0.c (set_state_table): state_table holds exactly nstates.
821 * src/lalr.c (nLA): New.
822 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
823 instead of lookaheadsp from the pseudo state (nstate + 1).
824
8252001-12-27 Akim Demaille <akim@epita.fr>
826
827 * src/output.c (action_row, token_actions): Use a state_t instead
828 of a integer, and nlookaheads instead of the following state's
829 lookaheadsp.
830
8312001-12-27 Akim Demaille <akim@epita.fr>
832
833 * src/conflicts.c (log_resolution, flush_shift)
834 (resolve_sr_conflict, set_conflicts, solve_conflicts)
835 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
836 (conflicts_print, print_reductions): Use a state_t instead of an
837 integer when referring to a state.
838 As much as possible, depend upon nlookaheads, instead of the
839 `lookaheadsp' member of the following state (since lookaheads of
840 successive states are successive, the difference between state n + 1
841 and n served as the number of lookaheads for state n).
842 * src/lalr.c (add_lookback_edge): Likewise.
843 * src/print.c (print_core, print_actions, print_state)
844 (print_results): Likewise.
845 * src/print_graph.c (print_core, print_actions, print_state)
846 (print_graph): Likewise.
847 * src/conflicts.h: Adjust.
848
8492001-12-27 Akim Demaille <akim@epita.fr>
850
851 * src/bison.hairy: Formatting/comment changes.
852 ANSIfy.
853 Remove `register' indications.
854 Add plenty of `static'.
855
8562001-12-27 Akim Demaille <akim@epita.fr>
857
858 * src/output.c (prepare): Drop the muscle `ntbase' which
859 duplicates ntokens.
860 * src/bison.simple: Formatting/comment changes.
861 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
862 is an undocumented synonym.
863
8642001-12-22 Akim Demaille <akim@epita.fr>
865
866 * src/output.c (output_table_data): Change the prototype to use
867 `int' for array ranges: some invocations do pass an int, not a
868 short.
869 Reported by Wayne Green.
870
8712001-12-22 Akim Demaille <akim@epita.fr>
872
873 Some actions of web2c.y are improperly triggered.
874 Reported by Mike Castle.
875
876 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
877 * tests/regression.at (Web2c): Rename as...
878 (Web2c Report): this.
879 (Web2c Actions): New.
880
8812001-12-22 Akim Demaille <akim@epita.fr>
882
883 Reductions in web2c.y are improperly reported.
884 Reported by Mike Castle.
885
886 * src/conflicts.c (print_reductions): Fix.
887 * tests/regression.at (Web2c): New.
888
8892001-12-18 Akim Demaille <akim@epita.fr>
890
891 Some host fail on `assert (!"foo")', which expands to
892 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
893 Reported by Nelson Beebee.
894
895 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
896 `#define it_succeeded 0' and `assert (it_succeeded)'.
897
8982001-12-17 Marc Autret <autret_m@epita.fr>
899
900 * src/bison.simple: Don't hard code the skeleton line and filename.
901 * src/output.c (output_parser): Rename 'line' as 'output_line'.
902 New line counter 'skeleton_line' (skeleton-line muscle).
903
9042001-12-17 Paul Eggert <eggert@twinsun.com>
905
906 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
907 YYDEBUG must be defined to a nonzero value.
908
909 * src/bison.simple (yytname): Do not assume that the user defines
910 YYDEBUG to a properly parenthesized expression.
911
9122001-12-17 Akim Demaille <akim@epita.fr>
913
914 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
915 nlookaheads is a new member.
916 Adjust all users.
917 * src/lalr.h (nlookaheads): Remove this orphan declaration.
918 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
919 state.
920
9212001-12-17 Akim Demaille <akim@epita.fr>
922
923 * src/files.h, src/files.c (open_files, close_files): Remove.
924 * src/main.c (main): Don't open/close files, nor invoke lex_free,
925 let...
926 * src/reader.c (reader): Do it.
927
9282001-12-17 Akim Demaille <akim@epita.fr>
929
930 * src/conflicts.c (print_reductions): Formatting changes.
931
9322001-12-17 Akim Demaille <akim@epita.fr>
933
934 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
935 (flush_reduce): New.
936 (resolve_sr_conflict): Adjust.
937
9382001-12-17 Akim Demaille <akim@epita.fr>
939
940 * src/output.c (output_obstack): Be static and rename as...
941 (format_obstack): this, to avoid any confusion with files.c's
942 output_obstack.
943 * src/reader.h (muscle_obstack): Move to...
944 * src/output.h: here, since it's defined in output.c.
945
9462001-12-17 Akim Demaille <akim@epita.fr>
947
948 * src/output.c (action_row, save_column, default_goto)
949 (sort_actions, matching_state, pack_vector): Better variable
950 locality.
951
9522001-12-17 Akim Demaille <akim@epita.fr>
953
954 * src/output.c: Various formatting changes.
955
9562001-12-17 Akim Demaille <akim@epita.fr>
957
958 * src/files.c (output_files): Free the output_obstack.
959 * src/main.c (main): Call print and print_graph conditionally.
960 * src/print.c (print): Work unconditionally.
961 * src/print_graph.c (print_graph): Work unconditionally.
962 * src/conflicts.c (log_resolution): Output only if verbose_flag.
963
9642001-12-16 Marc Autret <autret_m@epita.fr>
965
966 * src/output.c (actions_output): Fix. When we use %no-lines,
967 there is one less line per action.
968
9692001-12-16 Marc Autret <autret_m@epita.fr>
970
971 * src/bison.simple: Remove a useless #line directive.
972 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
973 * src/output.c (get_lines_number): New.
974 (output_parser): Adjust, now takes care about the lines of a
975 output muscles.
976 Fix line numbering.
977 (actions_output): Computes the number of lines taken by actions.
978 (output_master_parser): Insert new skeleton which is the name of
979 the output parser file name.
980
9812001-12-15 Marc Autret <autret_m@epita.fr>
982
983 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
984
9852001-12-15 Marc Autret <autret_m@epita.fr>
986
987 * src/output.c (output_gram): Keep track of the hairy one.
988
9892001-12-15 Akim Demaille <akim@epita.fr>
990
991 Make `make distcheck' work.
992
993 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
994 system.h which uses libgettext.h.
995
9962001-12-15 Akim Demaille <akim@epita.fr>
997
998 * src/nullable.c (set_nullable): Useless rules must be skipped,
999 otherwise, since we range over their symbols, we might look at a
1000 nonterminal which no longer ``exists'', i.e., it is not counted in
1001 `nvars', hence we overflow our arrays.
1002
10032001-12-15 Akim Demaille <akim@epita.fr>
1004
1005 The header can also be produced directly, without any obstack!
1006 Yahoo!
1007
1008 * src/files.c, src/files.h (defines_obstack): Remove.
1009 (compute_header_macro): Global.
1010 (defines_obstack_save): Remove.
1011 * src/reader.c (parse_union_decl): No longer output to
1012 defines_obstack: its content can be found in the `stype' muscle
1013 anyway.
1014 (output_token_translations): Merge into...
1015 (symbols_output): this.
1016 Rename as...
1017 (symbols_save): this.
1018 (reader): Adjust.
1019 * src/output.c (header_output): New.
1020 (output): Call it.
1021
10222001-12-15 Akim Demaille <akim@epita.fr>
1023
1024 * src/reader.c (parse_union_decl): Instead of handling two obstack
1025 simultaneously, use one to define the `stype' muscle, and use the
1026 value of the latter to fill defines_obstack.
1027 (copy_comment): Remove.
1028 (copy_comment2): Work for a single obstack.
1029 Rename as...
1030 (copy_comment): this.
1031
10322001-12-15 Akim Demaille <akim@epita.fr>
1033
1034 * src/lex.c, src/lex.h (xgetc): No longer static.
1035 * src/reader.c (parse_union_decl): Revamp.
1036
10372001-12-15 Akim Demaille <akim@epita.fr>
1038
1039 Still making progress in separating Bison into (i) input, (ii)
1040 process, (iii) output: now we can directly output the parser file
1041 without using table_obstack at all.
1042
1043 * src/files.c, src/files.h (table_obstack): Bye bye.
1044 (parser_file_name): New.
1045 * src/files.c (compute_output_file_names): Compute it.
1046 * src/output.c (actions_output, output_parser)
1047 (output_master_parser): To a file instead of an obstack.
1048
10492001-12-15 Akim Demaille <akim@epita.fr>
1050
1051 Attach actions to rules, instead of pre-outputting them to
1052 actions_obstack.
1053
1054 * src/gram.h (rule_t): action and action_line are new members.
1055 * src/reader.c (symbol_list): Likewise.
1056 (copy_action): Save the actions within the rule.
1057 (packgram): Save them in rule_table.
1058 * src/output.c (actions_output): New.
1059 (output_parser): Use it on `%%actions'.
1060 (output_rule_data): Don't free rule_table.
1061 (output): Do it.
1062 (prepare): Don't save the `action' muscle.
1063 * src/bison.simple: s/%%action/%%actions/.
1064
10652001-12-15 Akim Demaille <akim@epita.fr>
1066
1067 * src/reader.c (copy_action): When --yacc, don't append a `;'
1068 to the user action: let it fail if lacking.
1069 Suggested by Arnold Robbins and Tom Tromey.
1070
10712001-12-14 Akim Demaille <akim@epita.fr>
1072
1073 * src/lex.c (literalchar): Simply return the char you decoded, non
1074 longer mess around with obstacks and int pointers.
1075 Adjust all callers.
1076
10772001-12-14 Akim Demaille <akim@epita.fr>
1078
1079 * src/lex.c (literalchar): Don't escape the special characters,
1080 just decode them, and keep them as char (before, eol was output as
1081 the 2 char string `\n' etc.).
1082 * src/output.c (output_rule_data): Use quotearg to output the
1083 token strings.
1084
10852001-12-13 Paul Eggert <eggert@twinsun.com>
1086
1087 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1088 Do not infringe on the global user namespace when using C++.
1089 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1090 All uses of `fprintf' and `stderr' changed.
1091
1092 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1093
10942001-12-13 Akim Demaille <akim@epita.fr>
1095
1096 The computation of nullable is broken: it doesn't handle empty
1097 RHS's properly.
1098
1099 * tests/torture.at (GNU AWK Grammar): New.
1100 * tests/sets.at (Nullable): New.
1101 * src/nullable.c (set_nullable): Instead of blindly looping over
1102 `ritems', loop over the rules, and then over their rhs's.
1103
1104 Work around Autotest bugs.
1105
1106 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1107 frame, because Autotest understand lines starting with a `+' as
1108 traces from the shell. Then, they are not processed properly.
1109 Admittedly an Autotest bug, but we don't have time to wait for
1110 Autotest to catch up.
1111 * tests/regression.at (Broken Closure): Adjust to the new table
1112 frames.
1113 Move to...
1114 * tests/sets.at: here.
1115
11162001-12-13 Akim Demaille <akim@epita.fr>
1117
1118 * src/closure.c (closure): Use nrules instead of playing tricks
1119 with BITS_PER_WORD.
1120
11212001-12-13 Akim Demaille <akim@epita.fr>
1122
1123 * src/print.c (print_actions): Output the handling of `$' as the
1124 traces do: shifting the token EOF. Before EOF was treated as a
1125 nonterminal.
1126 * tests/regression.at: Adjust some tests.
1127 * src/print_graph.c (print_core): Complete the set of items via
1128 closure. The next-to-final and final states are still unsatisfying,
1129 but that's to be addressed elsewhere.
1130 No longer output the rule numbers, but do output the state number.
1131 A single loop for the shifts + gotos is enough, but picked a
1132 distinct color for each.
1133 (print_graph): Initialize and finalize closure.
1134
11352001-12-13 Akim Demaille <akim@epita.fr>
1136
1137 * src/reader.c (readgram): Remove dead code, an strip useless
1138 braces.
1139 (get_type): Remove, unused.
1140
11412001-12-12 Akim Demaille <akim@epita.fr>
1142
1143 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1144 on that of lib/error.c.
1145
11462001-12-12 Akim Demaille <akim@epita.fr>
1147
1148 Some hosts don't like `/' in includes.
1149
1150 * src/system.h: Include libgettext.h without qualifying the path.
1151 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1152 $(top_srcdir).
1153
11542001-12-11 Marc Autret <autret_m@epita.fr>
1155
1156 * src/output.c (output_parser): Remove useless muscle.
1157
11582001-12-11 Marc Autret <autret_m@epita.fr>
1159
1160 * src/bison.simple: Remove #line just before %%epilogue. It
1161 is now handled in ...
1162 * src/reader.c (read_additionnal_code): Add the output of a
1163 #line for the epilogue.
1164
11652001-12-10 Marc Autret <autret_m@epita.fr>
1166
1167 * src/reader.c (copy_definition): Re-use CPP-outed code which
1168 replace precedent remove.
1169 * src/bison.simple: Remove #line before %%prologue because
1170 %%input-line is wrong at this time.
1171
11722001-12-10 Marc Autret <autret_m@epita.fr>
1173
1174 * src/reader.c (symbols_output): Clean up.
1175 * src/output.c (output_gram, output): Clean up.
1176
11772001-12-10 Akim Demaille <akim@epita.fr>
1178
1179 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1180 * src/LR0.c (set_state_table): here.
1181 * src/lalr.c (lalr): Call it.
1182
11832001-12-10 Akim Demaille <akim@epita.fr>
1184
1185 * src/state.h (shifts): Remove the `number' member: shifts are
1186 attached to state, hence no longer need to be labelled with a
1187 state number.
1188
11892001-12-10 Akim Demaille <akim@epita.fr>
1190
1191 Now that states have a complete set of members, the linked list of
1192 shifts is useless: just fill directly the state's shifts member.
1193
1194 * src/state.h (shifts): Remove the `next' member.
1195 * src/LR0.c (first_state, last_state): Remove.
1196 Adjust the callers.
1197 (augment_automaton): Don't look for the shifts that must be added
1198 a shift on EOF: it is those of the state we looked for! But now,
1199 since shifts are attached, it is no longer needed to looking
1200 merely by its id: its number.
1201
12022001-12-10 Akim Demaille <akim@epita.fr>
1203
1204 * src/LR0.c (augment_automaton): Better variable locality.
1205 Remove an impossible branch: if there is a state corresponding to
1206 the start symbol being shifted, then there is shift for the start
1207 symbol from the initial state.
1208
12092001-12-10 Akim Demaille <akim@epita.fr>
1210
1211 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1212 only when appropriate: when insert_start_shifting_state' is not
1213 invoked.
1214 * tests/regression.at (Rule Line Numbers): Adjust.
1215
12162001-12-10 Akim Demaille <akim@epita.fr>
1217
1218 * src/LR0.c (augment_automaton): Now that all states have shifts,
1219 merge the two cases addition shifts to the initial state.
1220
12212001-12-10 Akim Demaille <akim@epita.fr>
1222
1223 * src/lalr.c (set_state_table): Move to...
1224 * src/LR0.c: here.
1225 * src/lalr.c (lalr): Don't call it...
1226 * src/LR0.c (generate_states): do it.
1227 * src/LR0.h (first_state): Remove, only the table is used.
1228
12292001-12-10 Akim Demaille <akim@epita.fr>
1230
1231 * src/LR0.h (first_shift, first_reduction): Remove.
1232 * src/lalr.c: Don't use first_shift: find shifts through the
1233 states.
1234
12352001-12-10 Akim Demaille <akim@epita.fr>
1236
1237 * src/LR0.c: Attach shifts to states as soon as they are
1238 computed.
1239 * src/lalr.c (set_state_table): Instead of assigning shifts to
1240 state, just assert that the mapping was properly done.
1241
12422001-12-10 Akim Demaille <akim@epita.fr>
1243
1244 * src/LR0.c (insert_start_shift): Rename as...
1245 (insert_start_shifting_state): this.
1246 (insert_eof_shifting_state, insert_accepting_state): New.
1247 (augment_automaton): Adjust.
1248 Better locality of the variables.
1249 When looking if the start_symbol is shifted from the initial
1250 state, using `while (... symbol != start_symbol ...)' sounds
1251 better than `while (... symbol < start_symbol ...)': If fail
1252 to see how the order between symbols could be relevant!
1253
12542001-12-10 Akim Demaille <akim@epita.fr>
1255
1256 * src/getargs.h: Don't declare `spec_name_prefix' and
1257 `spec_file_prefix', declared by src/files.h.
1258 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1259 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1260 * src/output.c (prepare): Adjust.
1261 * src/reader.c (symbols_output): Likewise.
1262 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1263
12642001-12-10 Akim Demaille <akim@epita.fr>
1265
1266 * src/muscle_tab.c (muscle_init): NULL is a better default than
1267 `"0"'.
1268
12692001-12-10 Akim Demaille <akim@epita.fr>
1270
1271 * src/reader.c (reader): Calling symbols_output once is enough.
1272
12732001-12-10 Akim Demaille <akim@epita.fr>
1274
1275 Now that states have a complete set of members, the linked list of
1276 reductions is useless: just fill directly the state's reductions
1277 member.
1278
1279 * src/state.h (struct reductions): Remove member `number' and
1280 `next'.
1281 * src/LR0.c (first_reduction, last_reduction): Remove.
1282 (save_reductions): Don't link the new reductions, store them in
1283 this_state.
1284 * src/lalr.c (set_state_table): No need to attach reductions to
1285 states, it's already done.
1286 * src/output.c (output_actions): No longer free the shifts, then
1287 the reductions, then the states: free all the states and their
1288 members.
1289
12902001-12-10 Akim Demaille <akim@epita.fr>
1291
1292 * src/options.c (OPTN, DRTV, BOTH): New.
1293 (option_table): Use them.
1294
1295 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1296 the job of system.h.
1297 * src/options.c: Don't include stdio.h and xalloc.h for the same
1298 reasons.
1299
13002001-12-10 Akim Demaille <akim@epita.fr>
1301
1302 * src/output.c (output, prepare): Make sure the values of the
1303 muscles `action' and `prologue' are 0-terminated.
1304
13052001-12-10 Akim Demaille <akim@epita.fr>
1306
1307 Clean up GCC warnings.
1308
1309 * src/reader.c (copy_action): `buf' is not used.
1310 (parse_skel_decl): Be static.
1311 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1312 * src/options.h (create_long_option_table): Have a real prototype.
1313 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1314 (hash_delete_at): Return const void *.
1315 Adjust casts to preserve the const.
1316
13172001-12-10 Akim Demaille <akim@epita.fr>
1318
1319 * configure.in: Require 2.52g.
1320 M4 is not needed, but AUTOM4TE is.
1321 * m4/m4.m4: Remove.
1322 * tests/Makefile.am: Adjust.
1323
13242001-12-10 Akim Demaille <akim@epita.fr>
1325
1326 One structure for states is enough, even though theoretically
1327 there are LR(0) states and LALR(1) states.
1328
1329 * src/lalr.h (state_t): Remove.
1330 (state_table): Be state_t **, not state_t *.
1331 * src/state.h (core, CORE_ALLOC): Rename as...
1332 (state_t, STATE_ALLOC): this.
1333 Add the LALR(1) members: shifts, reductions, errs.
1334 * src/LR0.c (state_table): Rename as...
1335 (state_hash): this, to avoid name clashes with the global
1336 `state_table'.
1337 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1338 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1339
13402001-12-10 Akim Demaille <akim@epita.fr>
1341
1342 Bison dumps core on bash.y.
1343 Reported by Pascal Bart.
1344
1345 * src/warshall.c (bitmatrix_print): New.
1346 (TC): Use it.
1347 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1348 j must be the outer loop.
1349 * tests/regression.at (Broken Closure): New.
1350
13512001-12-05 Akim Demaille <akim@epita.fr>
1352
1353 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1354 its argument.
1355