]> git.saurik.com Git - bison.git/blame - ChangeLog
Fix the previous test.
[bison.git] / ChangeLog
CommitLineData
9b2d0677
AD
12002-02-07 Akim Demaille <akim@epita.fr>
2
3 * tests/input.at: New.
4
69e2658b
RA
52002-02-07 Robert Anisko <robert@lrde.epita.fr>
6
7 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 8 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
9 directives around tables only needed for debugging.
10
4aacc3a7
RA
112002-02-07 Robert Anisko <robert@lrde.epita.fr>
12
13 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
14 C++ parsers.
15 (yy::b4_name::parse): Use print_.
16
762a801e
RA
172002-02-07 Robert Anisko <robert@lrde.epita.fr>
18
19 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
20
4bb2bc3f
RA
212002-02-07 Robert Anisko <robert@lrde.epita.fr>
22
23 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
24 C++ parsers.
25 (yy::b4_name::parse): Build verbose error messages, and use error_.
26
6b45a3ca
RA
272002-02-06 Robert Anisko <robert@lrde.epita.fr>
28
29 * data/bison.c++: Fix m4 quoting in comments.
30
50997c6e
RA
312002-02-06 Robert Anisko <robert@lrde.epita.fr>
32
33 * data/bison.c++: Adjust the parser code. Fix some muscles that were
34 not expanded by m4.
35
3f3eed27
AD
362002-02-05 Akim Demaille <akim@epita.fr>
37
38 * data/bison.c++: Adjust to the M4 back end.
39 More is certainly needed.
40
be2a1a68
AD
412002-02-05 Akim Demaille <akim@epita.fr>
42
43 Give a try to M4 as a back end.
44
45 * lib/readpipe.c: New, from wdiff.
46 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
47 BISON_HAIRY.
48 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
49 specific values. Now it is m4 that performs the lookup.
50 * src/parse-skel.y: Remove.
51 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
52 * src/output.c (actions_output, guards_output)
53 (token_definitions_output): No longer keeps track of the output
54 line number, hence remove the second argument.
55 (guards_output): Check against the guard member of a rule, not the
56 action member.
57 Adjust callers.
58 (output_skeleton): Don't look for the skeleton location, let m4 do
59 that.
60 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
61 file will be used.
62 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
63 (prepare): Given that for the time being changesyntax is not
64 usable in M4, rename the muscles using `-' to `_'.
65 Define `defines_flag', `output_parser_name' and `output_header_name'.
66 * src/output.h (actions_output, guards_output)
67 (token_definitions_output): Adjust prototypes.
68 * src/scan-skel.l: Instead of scanning the skeletons, it now
69 processes the output of m4: `__oline__' and `#output'.
70 * data/bison.simple: Adjust to be used by M4(sugar).
71 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
72 to date.
73 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
74 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
75 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
76 shamelessly stolen from CVS Autoconf.
77
beda758b
AD
782002-02-05 Akim Demaille <akim@epita.fr>
79
80 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
81 * configure.in: Check for the declarations of free and malloc.
82 * src/muscle_tab.c: Adjust.
83
5ece6d43
AD
842002-02-05 Akim Demaille <akim@epita.fr>
85
86 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
87 which have no values.
88
5bb18f9a
AD
892002-02-05 Akim Demaille <akim@epita.fr>
90
91 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
92 * data/: here.
93
894dd62e
PE
942002-01-29 Paul Eggert <eggert@twinsun.com>
95
96 * src/bison.simple (YYSIZE_T): Do not define merely because
97 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
98 On some platforms, <alloca.h> does not declare YYSTD (size_t).
99
82841af7
AD
1002002-01-27 Akim Demaille <akim@epita.fr>
101
102 Fix `%nonassoc and eof'.
103
104 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
105 which were not properly copied! Replace
106 memcpy (res->errs, src->errs, src->nerrs);
107 with
108 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
109 !!!
110 * tests/regression.at (%nonassoc and eof): Adjust to newest
111 Autotest: `.' is not in the PATH.
112
318b76e9
AD
1132002-01-27 Akim Demaille <akim@epita.fr>
114
115 * tests/sets.at (AT_EXTRACT_SETS): New.
116 (Nullable): Use it.
117 (Firsts): New.
118
30d2f3d5
AD
1192002-01-26 Akim Demaille <akim@epita.fr>
120
121 * tests/actions.at, tests/calc.at, tests/headers.at,
122 * tests/torture.at: Adjust to the newest Autotest which no longer
123 forces `.' in the PATH.
124
30f8c395
AD
1252002-01-25 Akim Demaille <akim@epita.fr>
126
127 * tests/regression.at (%nonassoc and eof): New.
128 Suggested by Robert Anisko.
129
29ae55f1
AD
1302002-01-24 Akim Demaille <akim@epita.fr>
131
132 Bison dumps core when trying to complain about broken input files.
133 Reported by Cris van Pelt.
134
135 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
136 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
137 into...
138 (Invalid inputs): Strengthen: exercise parse_percent_token.
139
2b548aa6
RA
1402002-01-24 Robert Anisko <robert.anisko@epita.fr>
141
142 * src/Makefile.am: Add bison.c++.
143 * src/bison.c++: New skeleton.
144
bb0146c2
AD
1452002-01-21 Paolo Bonzini <bonzini@gnu.org>
146
147 * po/it.po: New.
148
bec30531
AD
1492002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
150
151 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
152
fc6edc45
MA
1532002-01-20 Marc Autret <marc@gnu.org>
154
155 * src/files.c (compute_output_file_names): Fix
156
5e5d5415
MA
1572002-01-20 Marc Autret <marc@gnu.org>
158
159 * tests/output.at: New test.
160 * src/files.c (compute_base_names): Don't map extensions when
161 the YACC flag is set, use defaults.
162 Reported by Evgeny Stambulchik.
163
44ea3fbd
MA
1642002-01-20 Marc Autret <marc@gnu.org>
165
bb0146c2 166 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
167 compilers as well (i.e. the vendor C compiler).
168 Suggested by Albert Chin-A-Young.
169
338963d1
TVH
1702002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
171
172 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
173 canonical definition.
174 * src/system.h: Use the canonical definition for PARAMS (avoids
175 a conflict with the macro from lib/hash.h).
176
c57b2479
AD
1772002-01-11 Akim Demaille <akim@epita.fr>
178
179 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 180 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 181
b85810ae
AD
1822002-01-09 Akim Demaille <akim@epita.fr>
183
184 * src/files.c, src/files.h (output_infix): New.
185 (tab_extension): Remove.
186 (compute_base_names): Compute the former, drop the latter.
187 * src/output.c (prepare): Insert the muscles `output-infix', and
188 `output-suffix'.
189 * src/parse-skel.y (string, string.1): New.
190 (section.header): Use it.
191 (section.yacc): Remove.
192 (prefix): Remove too.
193 * src/scan-skel.l: Adjust.
194 * src/bison.simple, src/bison.hairy: Adjust.
195
cae60122
AD
1962002-01-09 Akim Demaille <akim@epita.fr>
197
198 * configure.in (WERROR_CFLAGS): Compute it.
199 * src/Makefile.am (CFLAGS): Pass it.
200 * tests/atlocal.in (CFLAGS): Idem.
201 * src/files.c: Fix a few warnings.
202 (get_extension_index): Remove, unused.
203
ae404801
AD
2042002-01-08 Akim Demaille <akim@epita.fr>
205
206 * src/getargs.c (AS_FILE_NAME): New.
207 (getargs): Use it to convert DOSish file names.
208 * src/files.c (base_name): Rename as full_base_name to avoid
209 clashes with `base_name ()'.
210 (filename_split): New.
211 (compute_base_names): N-th rewrite, using filename_split.
212
22312b71
AD
2132002-01-08 Akim Demaille <akim@epita.fr>
214
215 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
216 New, stolen from the Fileutils 4.1.
217 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
218 * configure.in: Check for the presence of memrchr, and of its
219 prototype.
220
a67cef01
TVH
2212002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
222
223 * lib/hash.h (__P): Added definition for this macro.
224 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
225 BUILT_SOURCES, to ensure they are generated first.
226 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
227 %error-verbose to allow bootstrapping with bison 1.30x.
228
2b25d624
AD
2292002-01-06 Akim Demaille <akim@epita.fr>
230
231 * src/reader.c (parse_braces): Don't fetch the next char, the
232 convention is to fetch on entry.
233 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
234 'switch' without a following semicolon.
235 * tests/regression.at (braces parsing): New.
236
3460813b
AD
2372002-01-06 Akim Demaille <akim@epita.fr>
238
239 Bison is dead wrong in its RR conflict reports.
240
241 * tests/torture.at (GNU Cim Grammar): New.
242 * src/conflicts.c (count_rr_conflicts): Fix.
243
73784c64
AD
2442002-01-06 Akim Demaille <akim@epita.fr>
245
246 Creating package.m4 from configure.ac causes too many problems.
247
248 * tests/Makefile.am (package.m4): Create it by hand,
249 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
250
25d81090
AD
2512002-01-06 Akim Demaille <akim@epita.fr>
252
253 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
254 skeleton.h.
255
a9b8959e
PE
2562002-01-04 Paul Eggert <eggert@twinsun.com>
257
258 * doc/bison.texinfo (Debugging):
259 Remove YYSTDERR; it's no longer defined or used.
260 Also, s/cstdio.h/cstdio/.
261
25d81090
AD
2622002-01-03 Akim Demaille <akim@epita.fr>
263
264 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
265
1109455c
AD
2662002-01-03 Akim Demaille <akim@epita.fr>
267
268 * src/parse-skel.y (process_skeleton): Don't bind the parser's
269 tracing code to --trace, wait for a better --trace option, with
270 args.
271
7ea5e977
AD
2722002-01-03 Akim Demaille <akim@epita.fr>
273
274 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
275 The ISO C++ standard is extremely clear about it: stderr is
276 considered a macro, not a regular symbol (see table 94 `Header
277 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
278 Therefore std:: does not apply to it. It still does with fprintf.
279 Also, s/cstdio.h/cstdio/.
280
fab5b110
AD
2812002-01-03 Akim Demaille <akim@epita.fr>
282
283 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
284 for non system headers.
285
aed7fd9b
AD
2862002-01-02 Akim Demaille <akim@epita.fr>
287
288 Equip the skeleton chain with location tracking, runtime trace,
289 pure parser and scanner.
290
291 * src/parse-skel.y: Request a pure parser, locations, and prefix
292 renaming.
293 (%union): Having several members with the same type does not help
294 type mismatches, simplify.
295 (YYPRINT, yyprint): New.
296 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
297 (skel_error): this.
298 Handle locations.
299 * src/scan-skel.l: Adjust to these changes.
300 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
301 (LOCATION_PRINT, skel_control_t): New.
302
24fad99e
AD
3032001-12-30 Akim Demaille <akim@epita.fr>
304
305 * src/parse-skel.y: Get rid of the shift/reduce conflict:
306 replace `gb' with BLANKS.
307 * src/scan-skel.l: Adjust.
308
a4b36db4
AD
3092001-12-30 Akim Demaille <akim@epita.fr>
310
311 * src/system.h: We don't need nor want bcopy.
312 Throw away MS-DOS crap: we don't need getpid.
313 * configure.in: We don't need strndup. It was even causing
314 problems: because Flex includes the headers *before* us,
315 _GNU_SOURCE is not defined by config.h, and therefore strndup was
316 not visible.
317 * lib/xstrndup.c: New.
318 * src/scan-skel.l: Use it.
319 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
320 * src/parse-skel.y: Use %directives instead of #defines.
321
1239777d
AD
3222001-12-30 Akim Demaille <akim@epita.fr>
323
324 * src/skeleton.h: New.
325 * src/output.c (output_parser, output_master_parser): Remove, dead
326 code.
327 * src/output.h (get_lines_number, actions_output, guards_output)
328 (token_definitions_output): Prototype them.
329 * src/parse-skel.y: Add the license notice.
330 Include output.h and skeleton.h.
331 (process_skeleton): Returns void, and takes a single parameter.
332 * src/scan-skel.l: Add the license notice.
333 Include skeleton.h.
334 Don't use %option yylineno: it seems that then Flex imagines
335 REJECT has been used, and therefore it won't reallocate its
336 buffers (which makes no other sense to me than a bug). It results
337 in warnings for `unused: yy_flex_realloc'.
338
9b3add5b
RA
3392001-12-30 Robert Anisko <robert.anisko@epita.fr>
340
341 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
342 (MUSCLE_INSERT_PREFIX): ...to there.
343 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
344 (MUSCLE_INSERT_PREFIX): Move from here...
345
346 * src/bison.hairy: Add a section directive. Put braces around muscle
347 names. This parser skeleton is still broken, but Bison should not
348 choke on a bad muscle 'syntax'.
349 * src/bison.simple: Add a section directive. Put braces around muscle
350 names.
351
352 * src/files.h (strsuffix, stringappend): Add declarations.
353 (tab_extension): Add declaration.
354 (short_base_name): Add declaration.
355
356 * src/files.c (strsuffix, stringappend): No longer static. These
357 functions are used in the skeleton parser.
358 (tab_extension): New.
359 (compute_base_names): Use the computations done in this function
fab5b110 360 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
361 names.
362 (short_base_name): No longer static.
363
364 * src/output.c (output_skeleton): New.
365 (output): Disable call to output_master_parser, and give a try to
366 a new skeleton handling system.
367 (guards_output, actions_output): No longer static.
368 (token_definitions_output, get_lines_number): No longer static.
369
370 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
371
fab5b110 372 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
373 parse-skel.y.
374
375 * src/parse-skel.y: New file.
376 * src/scan-skel.l: New file.
377
b5b61c61
AD
3782001-12-29 Akim Demaille <akim@epita.fr>
379
380 %name-prefix is broken.
381
382 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
383 Adjust all dependencies.
384 * tests/headers.at (export YYLTYPE): Strengthen this test: use
385 %name-prefix.
386
387 Renaming yylval but not yylloc is not consistent. Now we do.
388
389 * src/bison.simple: Prefix yylloc if used.
390 * doc/bison.texinfo (Decl Summary): Document that.
391
8c9a50be
AD
3922001-12-29 Akim Demaille <akim@epita.fr>
393
394 * doc/bison.texinfo: Promote `%long-directive' over
395 `%long_directive'.
396 Remove all references to fixed-output-files, yacc is enough.
397
d99361e6
AD
3982001-12-29 Akim Demaille <akim@epita.fr>
399
400 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
401 user prologue. These are defaults.
402 * tests/actions.at (Mid-rule actions): Make sure the user can
403 define YYDEBUG and YYERROR_VERBOSE.
404
b9cecb91
AD
4052001-12-29 Akim Demaille <akim@epita.fr>
406
407 * src/output.c (header_output): Don't forget to export YYLTYPE and
408 yylloc.
409 * tests/headers.at (export YYLTYPE): New, make sure it does.
410 * tests/regression.at (%union and --defines, Invalid CPP headers):
411 Move to...
412 * tests/headers.at: here.
413
aea13e97
AD
4142001-12-29 Akim Demaille <akim@epita.fr>
415
416 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
417
931394cb
AD
4182001-12-29 Akim Demaille <akim@epita.fr>
419
420 * tests/actions.at (Mid-rule actions): Output on a single line
421 instead of several.
422
704a47c4
AD
4232001-12-29 Akim Demaille <akim@epita.fr>
424
425 * doc/bison.texinfo: Formatting changes.
426
091e20bb
AD
4272001-12-29 Akim Demaille <akim@epita.fr>
428
429 Don't store the token defs in a muscle, just be ready to output it
430 on command. Now possible via `symbols'. Fixes a memory leak.
431
432 * src/output.c (token_definitions_output): New.
433 (output_parser, header_output): Use it.
434 * src/reader.c (symbols_save): Remove.
435
cce71710
AD
4362001-12-29 Akim Demaille <akim@epita.fr>
437
438 * src/bison.simple: Do not provide a default for YYSTYPE and
439 YYLTYPE before the user's prologue. Otherwise it's hardly... a
440 default.
441
82c035a8
AD
4422001-12-29 Akim Demaille <akim@epita.fr>
443
444 Mid-rule actions are simply... ignored!
445
446 * src/reader.c (readgram): Be sure to attach mid-rule actions to
447 the empty-rule associated to the dummy symbol, not to the host
448 rule.
449 * tests/actions.at (Mid-rule actions): New.
450
8419d367
AD
4512001-12-29 Akim Demaille <akim@epita.fr>
452
453 Memory leak.
454
455 * src/reader.c (reader): Free grammar.
456
375d5806
AD
4572001-12-29 Akim Demaille <akim@epita.fr>
458
459 Memory leak.
460
461 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
462 since it allocates it for each state, although only one is needed.
463 (allocate_storage): Do it here.
464
f51cb8ff
AD
4652001-12-29 Akim Demaille <akim@epita.fr>
466
467 * src/options.h, src/options.c (create_long_option_table): Rename
468 as...
469 (long_option_table_new): this, with a clearer prototype.
470 (percent_table): Remove, unused,
471 * src/getargs.c (getargs): Adjust.
472
29e88316
AD
4732001-12-29 Akim Demaille <akim@epita.fr>
474
475 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
476 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
477 as states.
478
b9f71f19
AD
4792001-12-29 Akim Demaille <akim@epita.fr>
480
481 * src/lalr.c (build_relations): Rename `states' as `states1'.
482 Sorry, I don't understand exactly what it is, no better name...
483
1a2b5d37
AD
4842001-12-29 Akim Demaille <akim@epita.fr>
485
486 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
487 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
488 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
489 as rules.
490
1cca533e
AD
4912001-12-29 Akim Demaille <akim@epita.fr>
492
493 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
494 ago.
495
c03ae966
AD
4962001-12-29 Akim Demaille <akim@epita.fr>
497
498 * src/reader.c, src/reader.h (user_toknums): Remove.
499 Adjust all users to use symbols[i]->user_token_number.
500
5a670b1e
AD
5012001-12-29 Akim Demaille <akim@epita.fr>
502
503 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
504 Adjust all users to use symbols[i]->prec or ->assoc.
505
ad949da9
AD
5062001-12-29 Akim Demaille <akim@epita.fr>
507
508 * src/reader.c, src/reader.h (tags): Remove.
509 Adjust all users to use symbols[i]->tag.
510
0e78e603
AD
5112001-12-29 Akim Demaille <akim@epita.fr>
512
513 * src/gram.h, src/gram.c (symbols): New, similar to state_table
514 and rule_table.
515 * src/reader.c (packsymbols): Fill this table.
516 Drop sprec.
517 * src/conflicts.c (resolve_sr_conflict): Adjust.
518 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
519 single table.
520 Use symbols[i]->tag instead of tags[i].
521
213e640e
AD
5222001-12-29 Akim Demaille <akim@epita.fr>
523
524 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
525 In addition, put a comment in there, to replace...
526 * tests/regression.at (%union and C comments): Remove.
527
e7b8bef1
AD
5282001-12-29 Akim Demaille <akim@epita.fr>
529
530 * tests/regression.at (Web2c Actions): Blindly move the actual
531 output as expected output. The contents *seem* right to me, but I
532 can't pretend reading perfectly parser tables... Nonetheless, all
533 the other tests pass correctly, the table look OK, even though the
534 presence of `$axiom' is to be noted: AFAICS it is useless (but
535 harmless).
536
b68e7744
AD
5372001-12-29 Akim Demaille <akim@epita.fr>
538
539 * src/reader.c (readgram): Don't add the rule 0 if there were no
540 rules read. In other words, add it _after_ having performed
541 grammar sanity checks.
542 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
543
78d5bae9
AD
5442001-12-29 Akim Demaille <akim@epita.fr>
545
546 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
547 visible, and some states have now a different number.
548
ff442794
AD
5492001-12-29 Akim Demaille <akim@epita.fr>
550
551 * src/reader.c (readgram): Bind the initial rule's lineno to that
552 of the first rule.
553 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
554 (Solved SR Conflicts): Adjust rule 0's line number.
555
610ab194
AD
5562001-12-29 Akim Demaille <akim@epita.fr>
557
558 Fix the `GAWK Grammar' failure.
559
560 * src/LR0.c (final_state): Initialize to -1 so that we do compute
561 the reductions of the first state which was mistakenly confused
562 with the final state because precisely final_state was initialized
563 to 0.
564 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
565 now noticed by Bison.
566 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
567 have a reduction on $default.
568
29d29c8f
AD
5692001-12-29 Akim Demaille <akim@epita.fr>
570
571 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
572 rule line numbers.
573 * src/closure.c (print_closure): Likewise.
574 * src/derives.c (print_derives): Likewise.
575 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
576 now.
577
7c6b64d0
AD
5782001-12-29 Akim Demaille <akim@epita.fr>
579
580 * src/lalr.c (lookaheads_print): New.
581 (lalr): Call it when --trace-flag.
582 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
583 are dumped.
584
3d4daee3
AD
5852001-12-29 Akim Demaille <akim@epita.fr>
586
587 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
588 when walking through ritem, even via rule->rhs.
589 * src/reduce.c (dump_grammar, useful_production, reduce_output)
590 (useful_production, useless_nonterminals): Likewise.
591 (reduce_grammar_tables): Likewise, plus update nritems.
592 * src/nullable.c (set_nullable): Likewise.
593 * src/lalr.c (build_relations): Likewise.
594 * tests/sets.at (Nullable): Adjust.
595 Fortunately, now, the $axiom is no longer nullable.
596
9e7f6bbd
AD
5972001-12-29 Akim Demaille <akim@epita.fr>
598
599 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
600 the 0-sentinel.
601 * src/gram.c (ritem_longest_rhs): Likewise.
602 * src/reduce.c (nonterminals_reduce): Likewise.
603 * src/print_graph.c (print_graph): Likewise.
604 * src/output.c (output_rule_data): Likewise.
605 * src/nullable.c (set_nullable): Likewise.
606
255ef638
AD
6072001-12-29 Akim Demaille <akim@epita.fr>
608
609 * src/output.c: Comment changes.
610
0d8a7363
AD
6112001-12-27 Paul Eggert <eggert@twinsun.com>
612
613 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
614 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
615 Sparc, as they were causing more porting problems than the
616 (minor) performance improvement was worth.
617
618 Also, catch up with 1.31's YYSTD.
619
3db472b9
AD
6202001-12-27 Akim Demaille <akim@epita.fr>
621
622 * src/output.c (output_gram): Rely on nritems, not the
623 0-sentinel. See below.
624 Use -1 as separator, not 0.
625 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
626 Rely on -1 as separator in yyrhs, instead of 0.
627 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
628 twice `Now at end of input', therefore there are two lines less to
629 expect.
630
b365aa05
AD
6312001-12-27 Akim Demaille <akim@epita.fr>
632
633 * tests/regression.at (Unresolved SR Conflicts):
634 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
635 below.
636
30171f79
AD
6372001-12-27 Akim Demaille <akim@epita.fr>
638
639 * src/LR0.c (new_state): Recognize the final state by the fact it
640 is reached by eoftoken.
641 (insert_start_shifting_state, insert_eof_shifting_state)
642 (insert_accepting_state, augment_automaton): Remove, since now
643 these states are automatically computed from the initial state.
644 (generate_states): Adjust.
645 * src/print.c: When reporting a rule number to the user, substract
646 1, so that the axiom rule is rule 0, and the first user rule is 1.
647 * src/reduce.c: Likewise.
648 * src/print_graph.c (print_core): For the time being, just as for
649 the report, depend upon --trace-flags to dump the full set of
650 items.
651 * src/reader.c (readgram): Once the grammar read, insert the rule
652 0: `$axiom: START-SYMBOL $'.
653 * tests/set.at: Adjust: rule 0 is now displayed, and since the
654 number of the states has changed (the final state is no longer
655 necessarily the last), catch up.
656
75142d45
AD
6572001-12-27 Akim Demaille <akim@epita.fr>
658
659 Try to make the use of the eoftoken valid. Given that its value
660 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
661 is used instead of > 0 where appropriate, (ii), depend upon nritems
662 instead of the 0-sentinel.
663
664 * src/gram.h, src/gram.c (nritems): New.
665 Expected to be duplication of nitems, but for the time being...
666 * src/reader.c (packgram): Assert nritems and nitems are equal.
667 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
668 * src/closure.c (print_closure, print_fderives): Likewise.
669 * src/gram.c (ritem_print): Likewise.
670 * src/print.c (print_core, print_grammar): Likewise.
671 * src/print_graph.c: Likewise.
672
b7c49edf
AD
6732001-12-27 Akim Demaille <akim@epita.fr>
674
675 * src/main.c (main): If there are complains after grammar
676 reductions, then output the report anyway if requested, then die.
677 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
678 * src/reader.c (eoftoken): New.
679 (parse_token_decl): If the token being defined has value `0', it
680 is the eoftoken.
681 (packsymbols): No longer hack `tags' to insert `$' by hand.
682 Be sure to preserve the value of the eoftoken.
683 (reader): Make sure eoftoken is defined.
684 Initialize nsyms to 0: now eoftoken is created just like the others.
685 * src/print.c (print_grammar): Don't special case the eof token.
686 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
687 lie anyway, albeit pleasant.
688 * tests/calc.at: Exercise error messages with eoftoken.
689 Change the grammar so that empty input is invalid.
690 Adjust expectations.
691 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
692
ec2da99f
AD
6932001-12-27 Akim Demaille <akim@epita.fr>
694
695 * configure.in: Check the protos of strchr ans strspn.
696 Replace strchr if needed.
697 * src/system.h: Provide the protos of strchr, strspn and memchr if
698 missing.
699 * lib/strchr.c: New.
700 * src/reader.c (symbols_save): Use strchr.
701
8adfa272
AD
7022001-12-27 Akim Demaille <akim@epita.fr>
703
704 * src/print.c, src/print_graph.c (escape): New.
705 Use it to quote the TAGS outputs.
706 * src/print_graph.c (print_state): Now errors are in red, and
707 reductions in green.
708 Prefer high to wide: output the state number on a line of its own.
709
80dac38c
AD
7102001-12-27 Akim Demaille <akim@epita.fr>
711
712 * src/state.h, src/state.c (reductions_new): New.
713 * src/LR0.c (set_state_table): Let all the states have a
714 `reductions', even if reduced to 0.
715 (save_reductions): Adjust.
716 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
717 * src/print.c (print_reductions, print_actions): Adjust.
718 * src/output.c (action_row): Adjust.
719
2cec70b9
AD
7202001-12-27 Akim Demaille <akim@epita.fr>
721
722 * src/state.h, src/state.c (errs_new, errs_dup): New.
723 * src/LR0.c (set_state_table): Let all the states have an errs,
724 even if reduced to 0.
725 * src/print.c (print_errs, print_reductions): Adjust.
726 * src/output.c (output_actions, action_row): Adjust.
727 * src/conflicts.c (resolve_sr_conflict): Adjust.
728
13ca549a
AD
7292001-12-27 Akim Demaille <akim@epita.fr>
730
731 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
732
5092aba5
AD
7332001-12-27 Akim Demaille <akim@epita.fr>
734
735 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
736 * src/print.c: here.
737 (lookaheadset, shiftset): New, used as additional storage by
738 print_reductions.
739 (print_results): Adjust.
740 (print_shifts, print_gotos, print_errs): New, extracted from...
741 (print_actions): here.
742 * src/print_graph.c (print_actions): Remove dead code.
743
11e2beca
AD
7442001-12-27 Akim Demaille <akim@epita.fr>
745
746 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
747 `$n' and `@n'.
748
dac3c910
AD
7492001-12-27 Akim Demaille <akim@epita.fr>
750
751 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
752 (build_relations): Adjust.
753
d0b0fefa
AD
7542001-12-27 Akim Demaille <akim@epita.fr>
755
756 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
757 duplication.
758
adc8c848
AD
7592001-12-27 Akim Demaille <akim@epita.fr>
760
761 * src/reader.c (packgram): Catch nitems overflows.
762
14d293ac
AD
7632001-12-27 Akim Demaille <akim@epita.fr>
764
765 * src/files.c, src/files.h (guard_obstack): Remove.
766 * src/output.c (output): Adjust.
767 * src/reader.c (parse_braces): New, factoring...
768 (copy_action, copy_guard): these two which are renamed as...
769 (parse_action, parse_guard): these.
770 As a voluntary consequence, using braces around guards is now
771 mandatory.
772
f499b062
AD
7732001-12-27 Akim Demaille <akim@epita.fr>
774
775 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
776 * src/reader.c (symbol_list): `guard' and `guard_line' are new
777 members.
778 (symbol_list_new): Adjust.
779 (copy_action): action_line is the first line, not the last.
780 (copy_guard): Just as for actions, store the `action' only, not
781 the switch/case/break flesh.
782 Don't parse the user action that might follow the guard, let...
783 (readgram): do it, i.e., now, there can be an action after a
784 guard.
785 In other words the guard is just explicitly optional.
786 (packgram): Adjust.
787 * src/output.c (guards_output): New.
788 (output_parser): Call it when needed.
789 (output): Also free the guard and attrs obstacks.
790 * src/files.c, src/files.h (obstack_save): Remove.
791 (output_files): Remove.
792 As a result, if one needs the former `.act' file, using an
793 appropriate skeleton which requires actions and guards is now
794 required.
795 * src/main.c (main): Adjust.
796 * tests/semantic.at: New.
797 * tests/regression.at: Use `input.y' as input file name.
798 Avoid 8+3 problems by requiring input.c when the test needs the
799 parser.
800
d945f5cd
AD
8012001-12-27 Akim Demaille <akim@epita.fr>
802
803 * src/reader.c (symbol_list_new): Be sure to initialize all the
804 fields.
805
d200e455
AD
8062001-12-27 Akim Demaille <akim@epita.fr>
807
808 All the hacks using a final pseudo state are now useless.
809
810 * src/LR0.c (set_state_table): state_table holds exactly nstates.
811 * src/lalr.c (nLA): New.
812 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
813 instead of lookaheadsp from the pseudo state (nstate + 1).
814
f9507c28
AD
8152001-12-27 Akim Demaille <akim@epita.fr>
816
817 * src/output.c (action_row, token_actions): Use a state_t instead
818 of a integer, and nlookaheads instead of the following state's
819 lookaheadsp.
820
065fbd27
AD
8212001-12-27 Akim Demaille <akim@epita.fr>
822
823 * src/conflicts.c (log_resolution, flush_shift)
824 (resolve_sr_conflict, set_conflicts, solve_conflicts)
825 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
826 (conflicts_print, print_reductions): Use a state_t instead of an
827 integer when referring to a state.
828 As much as possible, depend upon nlookaheads, instead of the
829 `lookaheadsp' member of the following state (since lookaheads of
830 successive states are successive, the difference between state n + 1
831 and n served as the number of lookaheads for state n).
832 * src/lalr.c (add_lookback_edge): Likewise.
833 * src/print.c (print_core, print_actions, print_state)
834 (print_results): Likewise.
835 * src/print_graph.c (print_core, print_actions, print_state)
836 (print_graph): Likewise.
837 * src/conflicts.h: Adjust.
838
1b177bd7
AD
8392001-12-27 Akim Demaille <akim@epita.fr>
840
841 * src/bison.hairy: Formatting/comment changes.
842 ANSIfy.
843 Remove `register' indications.
844 Add plenty of `static'.
845
7742ddeb
AD
8462001-12-27 Akim Demaille <akim@epita.fr>
847
848 * src/output.c (prepare): Drop the muscle `ntbase' which
849 duplicates ntokens.
850 * src/bison.simple: Formatting/comment changes.
851 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
852 is an undocumented synonym.
853
1fa14068
AD
8542001-12-22 Akim Demaille <akim@epita.fr>
855
856 * src/output.c (output_table_data): Change the prototype to use
857 `int' for array ranges: some invocations do pass an int, not a
858 short.
859 Reported by Wayne Green.
860
b9752825
AD
8612001-12-22 Akim Demaille <akim@epita.fr>
862
863 Some actions of web2c.y are improperly triggered.
864 Reported by Mike Castle.
865
866 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
867 * tests/regression.at (Web2c): Rename as...
868 (Web2c Report): this.
869 (Web2c Actions): New.
870
776209d6
AD
8712001-12-22 Akim Demaille <akim@epita.fr>
872
873 Reductions in web2c.y are improperly reported.
874 Reported by Mike Castle.
875
876 * src/conflicts.c (print_reductions): Fix.
877 * tests/regression.at (Web2c): New.
878
275fc3ad
AD
8792001-12-18 Akim Demaille <akim@epita.fr>
880
881 Some host fail on `assert (!"foo")', which expands to
882 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
883 Reported by Nelson Beebee.
884
885 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
886 `#define it_succeeded 0' and `assert (it_succeeded)'.
887
897668ee
MA
8882001-12-17 Marc Autret <autret_m@epita.fr>
889
890 * src/bison.simple: Don't hard code the skeleton line and filename.
891 * src/output.c (output_parser): Rename 'line' as 'output_line'.
892 New line counter 'skeleton_line' (skeleton-line muscle).
893
ab3399e0
PE
8942001-12-17 Paul Eggert <eggert@twinsun.com>
895
896 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
897 YYDEBUG must be defined to a nonzero value.
898
899 * src/bison.simple (yytname): Do not assume that the user defines
900 YYDEBUG to a properly parenthesized expression.
901
3877f72b
AD
9022001-12-17 Akim Demaille <akim@epita.fr>
903
904 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
905 nlookaheads is a new member.
906 Adjust all users.
907 * src/lalr.h (nlookaheads): Remove this orphan declaration.
908 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
909 state.
776209d6 910
331dbc1b
AD
9112001-12-17 Akim Demaille <akim@epita.fr>
912
913 * src/files.h, src/files.c (open_files, close_files): Remove.
914 * src/main.c (main): Don't open/close files, nor invoke lex_free,
915 let...
916 * src/reader.c (reader): Do it.
776209d6 917
be750e4c
AD
9182001-12-17 Akim Demaille <akim@epita.fr>
919
920 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 921
709ae8c6
AD
9222001-12-17 Akim Demaille <akim@epita.fr>
923
924 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
925 (flush_reduce): New.
926 (resolve_sr_conflict): Adjust.
776209d6 927
f87685c3
AD
9282001-12-17 Akim Demaille <akim@epita.fr>
929
930 * src/output.c (output_obstack): Be static and rename as...
931 (format_obstack): this, to avoid any confusion with files.c's
932 output_obstack.
933 * src/reader.h (muscle_obstack): Move to...
934 * src/output.h: here, since it's defined in output.c.
935
837491d8
AD
9362001-12-17 Akim Demaille <akim@epita.fr>
937
938 * src/output.c (action_row, save_column, default_goto)
939 (sort_actions, matching_state, pack_vector): Better variable
940 locality.
941
796d61fb
AD
9422001-12-17 Akim Demaille <akim@epita.fr>
943
944 * src/output.c: Various formatting changes.
776209d6 945
64d15509
AD
9462001-12-17 Akim Demaille <akim@epita.fr>
947
948 * src/files.c (output_files): Free the output_obstack.
949 * src/main.c (main): Call print and print_graph conditionally.
950 * src/print.c (print): Work unconditionally.
951 * src/print_graph.c (print_graph): Work unconditionally.
952 * src/conflicts.c (log_resolution): Output only if verbose_flag.
953
fbc8ecb7
MA
9542001-12-16 Marc Autret <autret_m@epita.fr>
955
956 * src/output.c (actions_output): Fix. When we use %no-lines,
957 there is one less line per action.
958
f0440388
MA
9592001-12-16 Marc Autret <autret_m@epita.fr>
960
961 * src/bison.simple: Remove a useless #line directive.
962 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
963 * src/output.c (get_lines_number): New.
776209d6 964 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
965 output muscles.
966 Fix line numbering.
967 (actions_output): Computes the number of lines taken by actions.
968 (output_master_parser): Insert new skeleton which is the name of
969 the output parser file name.
970
a79986b8
MA
9712001-12-15 Marc Autret <autret_m@epita.fr>
972
973 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
974
4ec8e00f
MA
9752001-12-15 Marc Autret <autret_m@epita.fr>
976
977 * src/output.c (output_gram): Keep track of the hairy one.
978
1a4648ff
AD
9792001-12-15 Akim Demaille <akim@epita.fr>
980
981 Make `make distcheck' work.
982
983 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
984 system.h which uses libgettext.h.
985
9c2c67e6
AD
9862001-12-15 Akim Demaille <akim@epita.fr>
987
988 * src/nullable.c (set_nullable): Useless rules must be skipped,
989 otherwise, since we range over their symbols, we might look at a
990 nonterminal which no longer ``exists'', i.e., it is not counted in
991 `nvars', hence we overflow our arrays.
992
93ede233
AD
9932001-12-15 Akim Demaille <akim@epita.fr>
994
995 The header can also be produced directly, without any obstack!
996 Yahoo!
997
998 * src/files.c, src/files.h (defines_obstack): Remove.
999 (compute_header_macro): Global.
1000 (defines_obstack_save): Remove.
1001 * src/reader.c (parse_union_decl): No longer output to
1002 defines_obstack: its content can be found in the `stype' muscle
1003 anyway.
1004 (output_token_translations): Merge into...
1005 (symbols_output): this.
1006 Rename as...
1007 (symbols_save): this.
1008 (reader): Adjust.
1009 * src/output.c (header_output): New.
1010 (output): Call it.
1011
2666f928
AD
10122001-12-15 Akim Demaille <akim@epita.fr>
1013
1014 * src/reader.c (parse_union_decl): Instead of handling two obstack
1015 simultaneously, use one to define the `stype' muscle, and use the
1016 value of the latter to fill defines_obstack.
1017 (copy_comment): Remove.
1018 (copy_comment2): Work for a single obstack.
1019 Rename as...
1020 (copy_comment): this.
1021
428046f8
AD
10222001-12-15 Akim Demaille <akim@epita.fr>
1023
1024 * src/lex.c, src/lex.h (xgetc): No longer static.
1025 * src/reader.c (parse_union_decl): Revamp.
1026
ea52d706
AD
10272001-12-15 Akim Demaille <akim@epita.fr>
1028
1029 Still making progress in separating Bison into (i) input, (ii)
1030 process, (iii) output: now we can directly output the parser file
1031 without using table_obstack at all.
1032
1033 * src/files.c, src/files.h (table_obstack): Bye bye.
1034 (parser_file_name): New.
1035 * src/files.c (compute_output_file_names): Compute it.
1036 * src/output.c (actions_output, output_parser)
1037 (output_master_parser): To a file instead of an obstack.
1038
3f96f4dc
AD
10392001-12-15 Akim Demaille <akim@epita.fr>
1040
1041 Attach actions to rules, instead of pre-outputting them to
1042 actions_obstack.
1043
1044 * src/gram.h (rule_t): action and action_line are new members.
1045 * src/reader.c (symbol_list): Likewise.
1046 (copy_action): Save the actions within the rule.
1047 (packgram): Save them in rule_table.
1048 * src/output.c (actions_output): New.
1049 (output_parser): Use it on `%%actions'.
1050 (output_rule_data): Don't free rule_table.
1051 (output): Do it.
1052 (prepare): Don't save the `action' muscle.
1053 * src/bison.simple: s/%%action/%%actions/.
1054
51576fb3
AD
10552001-12-15 Akim Demaille <akim@epita.fr>
1056
1057 * src/reader.c (copy_action): When --yacc, don't append a `;'
1058 to the user action: let it fail if lacking.
dee049eb 1059 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 1060
2648a72d
AD
10612001-12-14 Akim Demaille <akim@epita.fr>
1062
1063 * src/lex.c (literalchar): Simply return the char you decoded, non
1064 longer mess around with obstacks and int pointers.
1065 Adjust all callers.
1066
92790e5b
AD
10672001-12-14 Akim Demaille <akim@epita.fr>
1068
1069 * src/lex.c (literalchar): Don't escape the special characters,
1070 just decode them, and keep them as char (before, eol was output as
1071 the 2 char string `\n' etc.).
1072 * src/output.c (output_rule_data): Use quotearg to output the
1073 token strings.
1074
927c1557
PE
10752001-12-13 Paul Eggert <eggert@twinsun.com>
1076
1077 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
1078 Do not infringe on the global user namespace when using C++.
1079 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
1080 All uses of `fprintf' and `stderr' changed.
1081
1082 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
1083
ed8e1f68
AD
10842001-12-13 Akim Demaille <akim@epita.fr>
1085
1086 The computation of nullable is broken: it doesn't handle empty
1087 RHS's properly.
1088
1089 * tests/torture.at (GNU AWK Grammar): New.
1090 * tests/sets.at (Nullable): New.
1091 * src/nullable.c (set_nullable): Instead of blindly looping over
1092 `ritems', loop over the rules, and then over their rhs's.
1093
1094 Work around Autotest bugs.
1095
1096 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1097 frame, because Autotest understand lines starting with a `+' as
1098 traces from the shell. Then, they are not processed properly.
1099 Admittedly an Autotest bug, but we don't have time to wait for
1100 Autotest to catch up.
1101 * tests/regression.at (Broken Closure): Adjust to the new table
1102 frames.
1103 Move to...
1104 * tests/sets.at: here.
1105
cb581495
AD
11062001-12-13 Akim Demaille <akim@epita.fr>
1107
1108 * src/closure.c (closure): Use nrules instead of playing tricks
1109 with BITS_PER_WORD.
1110
2e729273
AD
11112001-12-13 Akim Demaille <akim@epita.fr>
1112
1113 * src/print.c (print_actions): Output the handling of `$' as the
1114 traces do: shifting the token EOF. Before EOF was treated as a
1115 nonterminal.
1116 * tests/regression.at: Adjust some tests.
1117 * src/print_graph.c (print_core): Complete the set of items via
1118 closure. The next-to-final and final states are still unsatisfying,
1119 but that's to be addressed elsewhere.
1120 No longer output the rule numbers, but do output the state number.
1121 A single loop for the shifts + gotos is enough, but picked a
1122 distinct color for each.
1123 (print_graph): Initialize and finalize closure.
1124
107f7dfb
AD
11252001-12-13 Akim Demaille <akim@epita.fr>
1126
1127 * src/reader.c (readgram): Remove dead code, an strip useless
1128 braces.
1129 (get_type): Remove, unused.
1130
9b53a24f
AD
11312001-12-12 Akim Demaille <akim@epita.fr>
1132
1133 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1134 on that of lib/error.c.
1135
dbfb6dcd
AD
11362001-12-12 Akim Demaille <akim@epita.fr>
1137
1138 Some hosts don't like `/' in includes.
1139
1140 * src/system.h: Include libgettext.h without qualifying the path.
1141 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1142 $(top_srcdir).
1143
c25fb648
MA
11442001-12-11 Marc Autret <autret_m@epita.fr>
1145
1146 * src/output.c (output_parser): Remove useless muscle.
1147
710ddc4f
MA
11482001-12-11 Marc Autret <autret_m@epita.fr>
1149
1150 * src/bison.simple: Remove #line just before %%epilogue. It
1151 is now handled in ...
1152 * src/reader.c (read_additionnal_code): Add the output of a
1153 #line for the epilogue.
1154
e83d80b8
MA
11552001-12-10 Marc Autret <autret_m@epita.fr>
1156
927c1557 1157 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
1158 replace precedent remove.
1159 * src/bison.simple: Remove #line before %%prologue because
1160 %%input-line is wrong at this time.
1161
971d5158
MA
11622001-12-10 Marc Autret <autret_m@epita.fr>
1163
1164 * src/reader.c (symbols_output): Clean up.
927c1557 1165 * src/output.c (output_gram, output): Clean up.
971d5158 1166
5edafffd
AD
11672001-12-10 Akim Demaille <akim@epita.fr>
1168
1169 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1170 * src/LR0.c (set_state_table): here.
1171 * src/lalr.c (lalr): Call it.
1172
0279f8e9
AD
11732001-12-10 Akim Demaille <akim@epita.fr>
1174
1175 * src/state.h (shifts): Remove the `number' member: shifts are
1176 attached to state, hence no longer need to be labelled with a
1177 state number.
1178
190c4f5f
AD
11792001-12-10 Akim Demaille <akim@epita.fr>
1180
1181 Now that states have a complete set of members, the linked list of
1182 shifts is useless: just fill directly the state's shifts member.
1183
1184 * src/state.h (shifts): Remove the `next' member.
1185 * src/LR0.c (first_state, last_state): Remove.
1186 Adjust the callers.
1187 (augment_automaton): Don't look for the shifts that must be added
1188 a shift on EOF: it is those of the state we looked for! But now,
1189 since shifts are attached, it is no longer needed to looking
1190 merely by its id: its number.
1191
2a73b93d
AD
11922001-12-10 Akim Demaille <akim@epita.fr>
1193
1194 * src/LR0.c (augment_automaton): Better variable locality.
1195 Remove an impossible branch: if there is a state corresponding to
1196 the start symbol being shifted, then there is shift for the start
1197 symbol from the initial state.
1198
74392f6a
AD
11992001-12-10 Akim Demaille <akim@epita.fr>
1200
1201 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1202 only when appropriate: when insert_start_shifting_state' is not
1203 invoked.
1204 * tests/regression.at (Rule Line Numbers): Adjust.
1205
37c82725
AD
12062001-12-10 Akim Demaille <akim@epita.fr>
1207
1208 * src/LR0.c (augment_automaton): Now that all states have shifts,
1209 merge the two cases addition shifts to the initial state.
1210
6a164e0c
AD
12112001-12-10 Akim Demaille <akim@epita.fr>
1212
1213 * src/lalr.c (set_state_table): Move to...
1214 * src/LR0.c: here.
1215 * src/lalr.c (lalr): Don't call it...
1216 * src/LR0.c (generate_states): do it.
1217 * src/LR0.h (first_state): Remove, only the table is used.
1218
7215de24
AD
12192001-12-10 Akim Demaille <akim@epita.fr>
1220
1221 * src/LR0.h (first_shift, first_reduction): Remove.
1222 * src/lalr.c: Don't use first_shift: find shifts through the
1223 states.
1224
80e25d4d
AD
12252001-12-10 Akim Demaille <akim@epita.fr>
1226
1227 * src/LR0.c: Attach shifts to states as soon as they are
1228 computed.
1229 * src/lalr.c (set_state_table): Instead of assigning shifts to
1230 state, just assert that the mapping was properly done.
1231
0ab3728b
AD
12322001-12-10 Akim Demaille <akim@epita.fr>
1233
1234 * src/LR0.c (insert_start_shift): Rename as...
1235 (insert_start_shifting_state): this.
1236 (insert_eof_shifting_state, insert_accepting_state): New.
1237 (augment_automaton): Adjust.
1238 Better locality of the variables.
1239 When looking if the start_symbol is shifted from the initial
1240 state, using `while (... symbol != start_symbol ...)' sounds
1241 better than `while (... symbol < start_symbol ...)': If fail
1242 to see how the order between symbols could be relevant!
1243
78af9bbc
AD
12442001-12-10 Akim Demaille <akim@epita.fr>
1245
1246 * src/getargs.h: Don't declare `spec_name_prefix' and
1247 `spec_file_prefix', declared by src/files.h.
1248 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1249 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1250 * src/output.c (prepare): Adjust.
1251 * src/reader.c (symbols_output): Likewise.
1252 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1253
bdef2a41
AD
12542001-12-10 Akim Demaille <akim@epita.fr>
1255
1256 * src/muscle_tab.c (muscle_init): NULL is a better default than
1257 `"0"'.
1258
3735969c
AD
12592001-12-10 Akim Demaille <akim@epita.fr>
1260
1261 * src/reader.c (reader): Calling symbols_output once is enough.
1262
49701457
AD
12632001-12-10 Akim Demaille <akim@epita.fr>
1264
1265 Now that states have a complete set of members, the linked list of
1266 reductions is useless: just fill directly the state's reductions
1267 member.
1268
1269 * src/state.h (struct reductions): Remove member `number' and
1270 `next'.
1271 * src/LR0.c (first_reduction, last_reduction): Remove.
1272 (save_reductions): Don't link the new reductions, store them in
1273 this_state.
1274 * src/lalr.c (set_state_table): No need to attach reductions to
1275 states, it's already done.
1276 * src/output.c (output_actions): No longer free the shifts, then
1277 the reductions, then the states: free all the states and their
1278 members.
1279
0edad749
AD
12802001-12-10 Akim Demaille <akim@epita.fr>
1281
1282 * src/options.c (OPTN, DRTV, BOTH): New.
1283 (option_table): Use them.
1284
0edad749
AD
1285 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1286 the job of system.h.
1287 * src/options.c: Don't include stdio.h and xalloc.h for the same
1288 reasons.
1289
5449dd0f
AD
12902001-12-10 Akim Demaille <akim@epita.fr>
1291
1292 * src/output.c (output, prepare): Make sure the values of the
1293 muscles `action' and `prologue' are 0-terminated.
1294
a870c567
AD
12952001-12-10 Akim Demaille <akim@epita.fr>
1296
1297 Clean up GCC warnings.
1298
1299 * src/reader.c (copy_action): `buf' is not used.
1300 (parse_skel_decl): Be static.
1301 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1302 * src/options.h (create_long_option_table): Have a real prototype.
1303 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1304 (hash_delete_at): Return const void *.
1305 Adjust casts to preserve the const.
1306
80df8768
AD
13072001-12-10 Akim Demaille <akim@epita.fr>
1308
1309 * configure.in: Require 2.52g.
1310 M4 is not needed, but AUTOM4TE is.
1311 * m4/m4.m4: Remove.
1312 * tests/Makefile.am: Adjust.
1313
f693ad14
AD
13142001-12-10 Akim Demaille <akim@epita.fr>
1315
1316 One structure for states is enough, even though theoretically
1317 there are LR(0) states and LALR(1) states.
1318
1319 * src/lalr.h (state_t): Remove.
1320 (state_table): Be state_t **, not state_t *.
1321 * src/state.h (core, CORE_ALLOC): Rename as...
1322 (state_t, STATE_ALLOC): this.
1323 Add the LALR(1) members: shifts, reductions, errs.
1324 * src/LR0.c (state_table): Rename as...
1325 (state_hash): this, to avoid name clashes with the global
1326 `state_table'.
1327 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1328 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1329
74ffbcb6
AD
13302001-12-10 Akim Demaille <akim@epita.fr>
1331
1332 Bison dumps core on bash.y.
1333 Reported by Pascal Bart.
1334
1335 * src/warshall.c (bitmatrix_print): New.
1336 (TC): Use it.
1337 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1338 j must be the outer loop.
1339 * tests/regression.at (Broken Closure): New.
1340
07708e19
AD
13412001-12-05 Akim Demaille <akim@epita.fr>
1342
1343 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1344 its argument.
1345