This page contains the following errors:

error on line 4236 at column 130: Premature end of data in tag tr line 4235

Below is a rendering of the page up to the first error.

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