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