]> git.saurik.com Git - bison.git/blame - ChangeLog
* src/bison.simple (YYSIZE_T): Do not define merely because
[bison.git] / ChangeLog
CommitLineData
894dd62e
PE
12002-01-29 Paul Eggert <eggert@twinsun.com>
2
3 * src/bison.simple (YYSIZE_T): Do not define merely because
4 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
5 On some platforms, <alloca.h> does not declare YYSTD (size_t).
6
82841af7
AD
72002-01-27 Akim Demaille <akim@epita.fr>
8
9 Fix `%nonassoc and eof'.
10
11 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
12 which were not properly copied! Replace
13 memcpy (res->errs, src->errs, src->nerrs);
14 with
15 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
16 !!!
17 * tests/regression.at (%nonassoc and eof): Adjust to newest
18 Autotest: `.' is not in the PATH.
19
318b76e9
AD
202002-01-27 Akim Demaille <akim@epita.fr>
21
22 * tests/sets.at (AT_EXTRACT_SETS): New.
23 (Nullable): Use it.
24 (Firsts): New.
25
30d2f3d5
AD
262002-01-26 Akim Demaille <akim@epita.fr>
27
28 * tests/actions.at, tests/calc.at, tests/headers.at,
29 * tests/torture.at: Adjust to the newest Autotest which no longer
30 forces `.' in the PATH.
31
30f8c395
AD
322002-01-25 Akim Demaille <akim@epita.fr>
33
34 * tests/regression.at (%nonassoc and eof): New.
35 Suggested by Robert Anisko.
36
29ae55f1
AD
372002-01-24 Akim Demaille <akim@epita.fr>
38
39 Bison dumps core when trying to complain about broken input files.
40 Reported by Cris van Pelt.
41
42 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
43 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
44 into...
45 (Invalid inputs): Strengthen: exercise parse_percent_token.
46
2b548aa6
RA
472002-01-24 Robert Anisko <robert.anisko@epita.fr>
48
49 * src/Makefile.am: Add bison.c++.
50 * src/bison.c++: New skeleton.
51
bb0146c2
AD
522002-01-21 Paolo Bonzini <bonzini@gnu.org>
53
54 * po/it.po: New.
55
bec30531
AD
562002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
57
58 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
59
fc6edc45
MA
602002-01-20 Marc Autret <marc@gnu.org>
61
62 * src/files.c (compute_output_file_names): Fix
63
5e5d5415
MA
642002-01-20 Marc Autret <marc@gnu.org>
65
66 * tests/output.at: New test.
67 * src/files.c (compute_base_names): Don't map extensions when
68 the YACC flag is set, use defaults.
69 Reported by Evgeny Stambulchik.
70
44ea3fbd
MA
712002-01-20 Marc Autret <marc@gnu.org>
72
bb0146c2 73 * src/system.h: Need to define __attribute__ away for non-GCC
44ea3fbd
MA
74 compilers as well (i.e. the vendor C compiler).
75 Suggested by Albert Chin-A-Young.
76
338963d1
TVH
772002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
78
79 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
80 canonical definition.
81 * src/system.h: Use the canonical definition for PARAMS (avoids
82 a conflict with the macro from lib/hash.h).
83
c57b2479
AD
842002-01-11 Akim Demaille <akim@epita.fr>
85
86 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 87 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 88
b85810ae
AD
892002-01-09 Akim Demaille <akim@epita.fr>
90
91 * src/files.c, src/files.h (output_infix): New.
92 (tab_extension): Remove.
93 (compute_base_names): Compute the former, drop the latter.
94 * src/output.c (prepare): Insert the muscles `output-infix', and
95 `output-suffix'.
96 * src/parse-skel.y (string, string.1): New.
97 (section.header): Use it.
98 (section.yacc): Remove.
99 (prefix): Remove too.
100 * src/scan-skel.l: Adjust.
101 * src/bison.simple, src/bison.hairy: Adjust.
102
cae60122
AD
1032002-01-09 Akim Demaille <akim@epita.fr>
104
105 * configure.in (WERROR_CFLAGS): Compute it.
106 * src/Makefile.am (CFLAGS): Pass it.
107 * tests/atlocal.in (CFLAGS): Idem.
108 * src/files.c: Fix a few warnings.
109 (get_extension_index): Remove, unused.
110
ae404801
AD
1112002-01-08 Akim Demaille <akim@epita.fr>
112
113 * src/getargs.c (AS_FILE_NAME): New.
114 (getargs): Use it to convert DOSish file names.
115 * src/files.c (base_name): Rename as full_base_name to avoid
116 clashes with `base_name ()'.
117 (filename_split): New.
118 (compute_base_names): N-th rewrite, using filename_split.
119
22312b71
AD
1202002-01-08 Akim Demaille <akim@epita.fr>
121
122 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
123 New, stolen from the Fileutils 4.1.
124 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
125 * configure.in: Check for the presence of memrchr, and of its
126 prototype.
127
a67cef01
TVH
1282002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
129
130 * lib/hash.h (__P): Added definition for this macro.
131 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
132 BUILT_SOURCES, to ensure they are generated first.
133 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
134 %error-verbose to allow bootstrapping with bison 1.30x.
135
2b25d624
AD
1362002-01-06 Akim Demaille <akim@epita.fr>
137
138 * src/reader.c (parse_braces): Don't fetch the next char, the
139 convention is to fetch on entry.
140 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
141 'switch' without a following semicolon.
142 * tests/regression.at (braces parsing): New.
143
3460813b
AD
1442002-01-06 Akim Demaille <akim@epita.fr>
145
146 Bison is dead wrong in its RR conflict reports.
147
148 * tests/torture.at (GNU Cim Grammar): New.
149 * src/conflicts.c (count_rr_conflicts): Fix.
150
73784c64
AD
1512002-01-06 Akim Demaille <akim@epita.fr>
152
153 Creating package.m4 from configure.ac causes too many problems.
154
155 * tests/Makefile.am (package.m4): Create it by hand,
156 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
157
25d81090
AD
1582002-01-06 Akim Demaille <akim@epita.fr>
159
160 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
161 skeleton.h.
162
a9b8959e
PE
1632002-01-04 Paul Eggert <eggert@twinsun.com>
164
165 * doc/bison.texinfo (Debugging):
166 Remove YYSTDERR; it's no longer defined or used.
167 Also, s/cstdio.h/cstdio/.
168
25d81090
AD
1692002-01-03 Akim Demaille <akim@epita.fr>
170
171 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
172
1109455c
AD
1732002-01-03 Akim Demaille <akim@epita.fr>
174
175 * src/parse-skel.y (process_skeleton): Don't bind the parser's
176 tracing code to --trace, wait for a better --trace option, with
177 args.
178
7ea5e977
AD
1792002-01-03 Akim Demaille <akim@epita.fr>
180
181 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
182 The ISO C++ standard is extremely clear about it: stderr is
183 considered a macro, not a regular symbol (see table 94 `Header
184 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
185 Therefore std:: does not apply to it. It still does with fprintf.
186 Also, s/cstdio.h/cstdio/.
187
fab5b110
AD
1882002-01-03 Akim Demaille <akim@epita.fr>
189
190 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
191 for non system headers.
192
aed7fd9b
AD
1932002-01-02 Akim Demaille <akim@epita.fr>
194
195 Equip the skeleton chain with location tracking, runtime trace,
196 pure parser and scanner.
197
198 * src/parse-skel.y: Request a pure parser, locations, and prefix
199 renaming.
200 (%union): Having several members with the same type does not help
201 type mismatches, simplify.
202 (YYPRINT, yyprint): New.
203 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
204 (skel_error): this.
205 Handle locations.
206 * src/scan-skel.l: Adjust to these changes.
207 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
208 (LOCATION_PRINT, skel_control_t): New.
209
24fad99e
AD
2102001-12-30 Akim Demaille <akim@epita.fr>
211
212 * src/parse-skel.y: Get rid of the shift/reduce conflict:
213 replace `gb' with BLANKS.
214 * src/scan-skel.l: Adjust.
215
a4b36db4
AD
2162001-12-30 Akim Demaille <akim@epita.fr>
217
218 * src/system.h: We don't need nor want bcopy.
219 Throw away MS-DOS crap: we don't need getpid.
220 * configure.in: We don't need strndup. It was even causing
221 problems: because Flex includes the headers *before* us,
222 _GNU_SOURCE is not defined by config.h, and therefore strndup was
223 not visible.
224 * lib/xstrndup.c: New.
225 * src/scan-skel.l: Use it.
226 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
227 * src/parse-skel.y: Use %directives instead of #defines.
228
1239777d
AD
2292001-12-30 Akim Demaille <akim@epita.fr>
230
231 * src/skeleton.h: New.
232 * src/output.c (output_parser, output_master_parser): Remove, dead
233 code.
234 * src/output.h (get_lines_number, actions_output, guards_output)
235 (token_definitions_output): Prototype them.
236 * src/parse-skel.y: Add the license notice.
237 Include output.h and skeleton.h.
238 (process_skeleton): Returns void, and takes a single parameter.
239 * src/scan-skel.l: Add the license notice.
240 Include skeleton.h.
241 Don't use %option yylineno: it seems that then Flex imagines
242 REJECT has been used, and therefore it won't reallocate its
243 buffers (which makes no other sense to me than a bug). It results
244 in warnings for `unused: yy_flex_realloc'.
245
9b3add5b
RA
2462001-12-30 Robert Anisko <robert.anisko@epita.fr>
247
248 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
249 (MUSCLE_INSERT_PREFIX): ...to there.
250 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
251 (MUSCLE_INSERT_PREFIX): Move from here...
252
253 * src/bison.hairy: Add a section directive. Put braces around muscle
254 names. This parser skeleton is still broken, but Bison should not
255 choke on a bad muscle 'syntax'.
256 * src/bison.simple: Add a section directive. Put braces around muscle
257 names.
258
259 * src/files.h (strsuffix, stringappend): Add declarations.
260 (tab_extension): Add declaration.
261 (short_base_name): Add declaration.
262
263 * src/files.c (strsuffix, stringappend): No longer static. These
264 functions are used in the skeleton parser.
265 (tab_extension): New.
266 (compute_base_names): Use the computations done in this function
fab5b110 267 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
268 names.
269 (short_base_name): No longer static.
270
271 * src/output.c (output_skeleton): New.
272 (output): Disable call to output_master_parser, and give a try to
273 a new skeleton handling system.
274 (guards_output, actions_output): No longer static.
275 (token_definitions_output, get_lines_number): No longer static.
276
277 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
278
fab5b110 279 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
280 parse-skel.y.
281
282 * src/parse-skel.y: New file.
283 * src/scan-skel.l: New file.
284
b5b61c61
AD
2852001-12-29 Akim Demaille <akim@epita.fr>
286
287 %name-prefix is broken.
288
289 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
290 Adjust all dependencies.
291 * tests/headers.at (export YYLTYPE): Strengthen this test: use
292 %name-prefix.
293
294 Renaming yylval but not yylloc is not consistent. Now we do.
295
296 * src/bison.simple: Prefix yylloc if used.
297 * doc/bison.texinfo (Decl Summary): Document that.
298
8c9a50be
AD
2992001-12-29 Akim Demaille <akim@epita.fr>
300
301 * doc/bison.texinfo: Promote `%long-directive' over
302 `%long_directive'.
303 Remove all references to fixed-output-files, yacc is enough.
304
d99361e6
AD
3052001-12-29 Akim Demaille <akim@epita.fr>
306
307 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
308 user prologue. These are defaults.
309 * tests/actions.at (Mid-rule actions): Make sure the user can
310 define YYDEBUG and YYERROR_VERBOSE.
311
b9cecb91
AD
3122001-12-29 Akim Demaille <akim@epita.fr>
313
314 * src/output.c (header_output): Don't forget to export YYLTYPE and
315 yylloc.
316 * tests/headers.at (export YYLTYPE): New, make sure it does.
317 * tests/regression.at (%union and --defines, Invalid CPP headers):
318 Move to...
319 * tests/headers.at: here.
320
aea13e97
AD
3212001-12-29 Akim Demaille <akim@epita.fr>
322
323 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
324
931394cb
AD
3252001-12-29 Akim Demaille <akim@epita.fr>
326
327 * tests/actions.at (Mid-rule actions): Output on a single line
328 instead of several.
329
704a47c4
AD
3302001-12-29 Akim Demaille <akim@epita.fr>
331
332 * doc/bison.texinfo: Formatting changes.
333
091e20bb
AD
3342001-12-29 Akim Demaille <akim@epita.fr>
335
336 Don't store the token defs in a muscle, just be ready to output it
337 on command. Now possible via `symbols'. Fixes a memory leak.
338
339 * src/output.c (token_definitions_output): New.
340 (output_parser, header_output): Use it.
341 * src/reader.c (symbols_save): Remove.
342
cce71710
AD
3432001-12-29 Akim Demaille <akim@epita.fr>
344
345 * src/bison.simple: Do not provide a default for YYSTYPE and
346 YYLTYPE before the user's prologue. Otherwise it's hardly... a
347 default.
348
82c035a8
AD
3492001-12-29 Akim Demaille <akim@epita.fr>
350
351 Mid-rule actions are simply... ignored!
352
353 * src/reader.c (readgram): Be sure to attach mid-rule actions to
354 the empty-rule associated to the dummy symbol, not to the host
355 rule.
356 * tests/actions.at (Mid-rule actions): New.
357
8419d367
AD
3582001-12-29 Akim Demaille <akim@epita.fr>
359
360 Memory leak.
361
362 * src/reader.c (reader): Free grammar.
363
375d5806
AD
3642001-12-29 Akim Demaille <akim@epita.fr>
365
366 Memory leak.
367
368 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
369 since it allocates it for each state, although only one is needed.
370 (allocate_storage): Do it here.
371
f51cb8ff
AD
3722001-12-29 Akim Demaille <akim@epita.fr>
373
374 * src/options.h, src/options.c (create_long_option_table): Rename
375 as...
376 (long_option_table_new): this, with a clearer prototype.
377 (percent_table): Remove, unused,
378 * src/getargs.c (getargs): Adjust.
379
29e88316
AD
3802001-12-29 Akim Demaille <akim@epita.fr>
381
382 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
383 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
384 as states.
385
b9f71f19
AD
3862001-12-29 Akim Demaille <akim@epita.fr>
387
388 * src/lalr.c (build_relations): Rename `states' as `states1'.
389 Sorry, I don't understand exactly what it is, no better name...
390
1a2b5d37
AD
3912001-12-29 Akim Demaille <akim@epita.fr>
392
393 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
394 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
395 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
396 as rules.
397
1cca533e
AD
3982001-12-29 Akim Demaille <akim@epita.fr>
399
400 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
401 ago.
402
c03ae966
AD
4032001-12-29 Akim Demaille <akim@epita.fr>
404
405 * src/reader.c, src/reader.h (user_toknums): Remove.
406 Adjust all users to use symbols[i]->user_token_number.
407
5a670b1e
AD
4082001-12-29 Akim Demaille <akim@epita.fr>
409
410 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
411 Adjust all users to use symbols[i]->prec or ->assoc.
412
ad949da9
AD
4132001-12-29 Akim Demaille <akim@epita.fr>
414
415 * src/reader.c, src/reader.h (tags): Remove.
416 Adjust all users to use symbols[i]->tag.
417
0e78e603
AD
4182001-12-29 Akim Demaille <akim@epita.fr>
419
420 * src/gram.h, src/gram.c (symbols): New, similar to state_table
421 and rule_table.
422 * src/reader.c (packsymbols): Fill this table.
423 Drop sprec.
424 * src/conflicts.c (resolve_sr_conflict): Adjust.
425 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
426 single table.
427 Use symbols[i]->tag instead of tags[i].
428
213e640e
AD
4292001-12-29 Akim Demaille <akim@epita.fr>
430
431 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
432 In addition, put a comment in there, to replace...
433 * tests/regression.at (%union and C comments): Remove.
434
e7b8bef1
AD
4352001-12-29 Akim Demaille <akim@epita.fr>
436
437 * tests/regression.at (Web2c Actions): Blindly move the actual
438 output as expected output. The contents *seem* right to me, but I
439 can't pretend reading perfectly parser tables... Nonetheless, all
440 the other tests pass correctly, the table look OK, even though the
441 presence of `$axiom' is to be noted: AFAICS it is useless (but
442 harmless).
443
b68e7744
AD
4442001-12-29 Akim Demaille <akim@epita.fr>
445
446 * src/reader.c (readgram): Don't add the rule 0 if there were no
447 rules read. In other words, add it _after_ having performed
448 grammar sanity checks.
449 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
450
78d5bae9
AD
4512001-12-29 Akim Demaille <akim@epita.fr>
452
453 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
454 visible, and some states have now a different number.
455
ff442794
AD
4562001-12-29 Akim Demaille <akim@epita.fr>
457
458 * src/reader.c (readgram): Bind the initial rule's lineno to that
459 of the first rule.
460 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
461 (Solved SR Conflicts): Adjust rule 0's line number.
462
610ab194
AD
4632001-12-29 Akim Demaille <akim@epita.fr>
464
465 Fix the `GAWK Grammar' failure.
466
467 * src/LR0.c (final_state): Initialize to -1 so that we do compute
468 the reductions of the first state which was mistakenly confused
469 with the final state because precisely final_state was initialized
470 to 0.
471 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
472 now noticed by Bison.
473 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
474 have a reduction on $default.
475
29d29c8f
AD
4762001-12-29 Akim Demaille <akim@epita.fr>
477
478 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
479 rule line numbers.
480 * src/closure.c (print_closure): Likewise.
481 * src/derives.c (print_derives): Likewise.
482 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
483 now.
484
7c6b64d0
AD
4852001-12-29 Akim Demaille <akim@epita.fr>
486
487 * src/lalr.c (lookaheads_print): New.
488 (lalr): Call it when --trace-flag.
489 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
490 are dumped.
491
3d4daee3
AD
4922001-12-29 Akim Demaille <akim@epita.fr>
493
494 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
495 when walking through ritem, even via rule->rhs.
496 * src/reduce.c (dump_grammar, useful_production, reduce_output)
497 (useful_production, useless_nonterminals): Likewise.
498 (reduce_grammar_tables): Likewise, plus update nritems.
499 * src/nullable.c (set_nullable): Likewise.
500 * src/lalr.c (build_relations): Likewise.
501 * tests/sets.at (Nullable): Adjust.
502 Fortunately, now, the $axiom is no longer nullable.
503
9e7f6bbd
AD
5042001-12-29 Akim Demaille <akim@epita.fr>
505
506 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
507 the 0-sentinel.
508 * src/gram.c (ritem_longest_rhs): Likewise.
509 * src/reduce.c (nonterminals_reduce): Likewise.
510 * src/print_graph.c (print_graph): Likewise.
511 * src/output.c (output_rule_data): Likewise.
512 * src/nullable.c (set_nullable): Likewise.
513
255ef638
AD
5142001-12-29 Akim Demaille <akim@epita.fr>
515
516 * src/output.c: Comment changes.
517
0d8a7363
AD
5182001-12-27 Paul Eggert <eggert@twinsun.com>
519
520 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
521 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
522 Sparc, as they were causing more porting problems than the
523 (minor) performance improvement was worth.
524
525 Also, catch up with 1.31's YYSTD.
526
3db472b9
AD
5272001-12-27 Akim Demaille <akim@epita.fr>
528
529 * src/output.c (output_gram): Rely on nritems, not the
530 0-sentinel. See below.
531 Use -1 as separator, not 0.
532 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
533 Rely on -1 as separator in yyrhs, instead of 0.
534 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
535 twice `Now at end of input', therefore there are two lines less to
536 expect.
537
b365aa05
AD
5382001-12-27 Akim Demaille <akim@epita.fr>
539
540 * tests/regression.at (Unresolved SR Conflicts):
541 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
542 below.
543
30171f79
AD
5442001-12-27 Akim Demaille <akim@epita.fr>
545
546 * src/LR0.c (new_state): Recognize the final state by the fact it
547 is reached by eoftoken.
548 (insert_start_shifting_state, insert_eof_shifting_state)
549 (insert_accepting_state, augment_automaton): Remove, since now
550 these states are automatically computed from the initial state.
551 (generate_states): Adjust.
552 * src/print.c: When reporting a rule number to the user, substract
553 1, so that the axiom rule is rule 0, and the first user rule is 1.
554 * src/reduce.c: Likewise.
555 * src/print_graph.c (print_core): For the time being, just as for
556 the report, depend upon --trace-flags to dump the full set of
557 items.
558 * src/reader.c (readgram): Once the grammar read, insert the rule
559 0: `$axiom: START-SYMBOL $'.
560 * tests/set.at: Adjust: rule 0 is now displayed, and since the
561 number of the states has changed (the final state is no longer
562 necessarily the last), catch up.
563
75142d45
AD
5642001-12-27 Akim Demaille <akim@epita.fr>
565
566 Try to make the use of the eoftoken valid. Given that its value
567 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
568 is used instead of > 0 where appropriate, (ii), depend upon nritems
569 instead of the 0-sentinel.
570
571 * src/gram.h, src/gram.c (nritems): New.
572 Expected to be duplication of nitems, but for the time being...
573 * src/reader.c (packgram): Assert nritems and nitems are equal.
574 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
575 * src/closure.c (print_closure, print_fderives): Likewise.
576 * src/gram.c (ritem_print): Likewise.
577 * src/print.c (print_core, print_grammar): Likewise.
578 * src/print_graph.c: Likewise.
579
b7c49edf
AD
5802001-12-27 Akim Demaille <akim@epita.fr>
581
582 * src/main.c (main): If there are complains after grammar
583 reductions, then output the report anyway if requested, then die.
584 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
585 * src/reader.c (eoftoken): New.
586 (parse_token_decl): If the token being defined has value `0', it
587 is the eoftoken.
588 (packsymbols): No longer hack `tags' to insert `$' by hand.
589 Be sure to preserve the value of the eoftoken.
590 (reader): Make sure eoftoken is defined.
591 Initialize nsyms to 0: now eoftoken is created just like the others.
592 * src/print.c (print_grammar): Don't special case the eof token.
593 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
594 lie anyway, albeit pleasant.
595 * tests/calc.at: Exercise error messages with eoftoken.
596 Change the grammar so that empty input is invalid.
597 Adjust expectations.
598 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
599
ec2da99f
AD
6002001-12-27 Akim Demaille <akim@epita.fr>
601
602 * configure.in: Check the protos of strchr ans strspn.
603 Replace strchr if needed.
604 * src/system.h: Provide the protos of strchr, strspn and memchr if
605 missing.
606 * lib/strchr.c: New.
607 * src/reader.c (symbols_save): Use strchr.
608
8adfa272
AD
6092001-12-27 Akim Demaille <akim@epita.fr>
610
611 * src/print.c, src/print_graph.c (escape): New.
612 Use it to quote the TAGS outputs.
613 * src/print_graph.c (print_state): Now errors are in red, and
614 reductions in green.
615 Prefer high to wide: output the state number on a line of its own.
616
80dac38c
AD
6172001-12-27 Akim Demaille <akim@epita.fr>
618
619 * src/state.h, src/state.c (reductions_new): New.
620 * src/LR0.c (set_state_table): Let all the states have a
621 `reductions', even if reduced to 0.
622 (save_reductions): Adjust.
623 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
624 * src/print.c (print_reductions, print_actions): Adjust.
625 * src/output.c (action_row): Adjust.
626
2cec70b9
AD
6272001-12-27 Akim Demaille <akim@epita.fr>
628
629 * src/state.h, src/state.c (errs_new, errs_dup): New.
630 * src/LR0.c (set_state_table): Let all the states have an errs,
631 even if reduced to 0.
632 * src/print.c (print_errs, print_reductions): Adjust.
633 * src/output.c (output_actions, action_row): Adjust.
634 * src/conflicts.c (resolve_sr_conflict): Adjust.
635
13ca549a
AD
6362001-12-27 Akim Demaille <akim@epita.fr>
637
638 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
639
5092aba5
AD
6402001-12-27 Akim Demaille <akim@epita.fr>
641
642 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
643 * src/print.c: here.
644 (lookaheadset, shiftset): New, used as additional storage by
645 print_reductions.
646 (print_results): Adjust.
647 (print_shifts, print_gotos, print_errs): New, extracted from...
648 (print_actions): here.
649 * src/print_graph.c (print_actions): Remove dead code.
650
11e2beca
AD
6512001-12-27 Akim Demaille <akim@epita.fr>
652
653 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
654 `$n' and `@n'.
655
dac3c910
AD
6562001-12-27 Akim Demaille <akim@epita.fr>
657
658 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
659 (build_relations): Adjust.
660
d0b0fefa
AD
6612001-12-27 Akim Demaille <akim@epita.fr>
662
663 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
664 duplication.
665
adc8c848
AD
6662001-12-27 Akim Demaille <akim@epita.fr>
667
668 * src/reader.c (packgram): Catch nitems overflows.
669
14d293ac
AD
6702001-12-27 Akim Demaille <akim@epita.fr>
671
672 * src/files.c, src/files.h (guard_obstack): Remove.
673 * src/output.c (output): Adjust.
674 * src/reader.c (parse_braces): New, factoring...
675 (copy_action, copy_guard): these two which are renamed as...
676 (parse_action, parse_guard): these.
677 As a voluntary consequence, using braces around guards is now
678 mandatory.
679
f499b062
AD
6802001-12-27 Akim Demaille <akim@epita.fr>
681
682 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
683 * src/reader.c (symbol_list): `guard' and `guard_line' are new
684 members.
685 (symbol_list_new): Adjust.
686 (copy_action): action_line is the first line, not the last.
687 (copy_guard): Just as for actions, store the `action' only, not
688 the switch/case/break flesh.
689 Don't parse the user action that might follow the guard, let...
690 (readgram): do it, i.e., now, there can be an action after a
691 guard.
692 In other words the guard is just explicitly optional.
693 (packgram): Adjust.
694 * src/output.c (guards_output): New.
695 (output_parser): Call it when needed.
696 (output): Also free the guard and attrs obstacks.
697 * src/files.c, src/files.h (obstack_save): Remove.
698 (output_files): Remove.
699 As a result, if one needs the former `.act' file, using an
700 appropriate skeleton which requires actions and guards is now
701 required.
702 * src/main.c (main): Adjust.
703 * tests/semantic.at: New.
704 * tests/regression.at: Use `input.y' as input file name.
705 Avoid 8+3 problems by requiring input.c when the test needs the
706 parser.
707
d945f5cd
AD
7082001-12-27 Akim Demaille <akim@epita.fr>
709
710 * src/reader.c (symbol_list_new): Be sure to initialize all the
711 fields.
712
d200e455
AD
7132001-12-27 Akim Demaille <akim@epita.fr>
714
715 All the hacks using a final pseudo state are now useless.
716
717 * src/LR0.c (set_state_table): state_table holds exactly nstates.
718 * src/lalr.c (nLA): New.
719 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
720 instead of lookaheadsp from the pseudo state (nstate + 1).
721
f9507c28
AD
7222001-12-27 Akim Demaille <akim@epita.fr>
723
724 * src/output.c (action_row, token_actions): Use a state_t instead
725 of a integer, and nlookaheads instead of the following state's
726 lookaheadsp.
727
065fbd27
AD
7282001-12-27 Akim Demaille <akim@epita.fr>
729
730 * src/conflicts.c (log_resolution, flush_shift)
731 (resolve_sr_conflict, set_conflicts, solve_conflicts)
732 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
733 (conflicts_print, print_reductions): Use a state_t instead of an
734 integer when referring to a state.
735 As much as possible, depend upon nlookaheads, instead of the
736 `lookaheadsp' member of the following state (since lookaheads of
737 successive states are successive, the difference between state n + 1
738 and n served as the number of lookaheads for state n).
739 * src/lalr.c (add_lookback_edge): Likewise.
740 * src/print.c (print_core, print_actions, print_state)
741 (print_results): Likewise.
742 * src/print_graph.c (print_core, print_actions, print_state)
743 (print_graph): Likewise.
744 * src/conflicts.h: Adjust.
745
1b177bd7
AD
7462001-12-27 Akim Demaille <akim@epita.fr>
747
748 * src/bison.hairy: Formatting/comment changes.
749 ANSIfy.
750 Remove `register' indications.
751 Add plenty of `static'.
752
7742ddeb
AD
7532001-12-27 Akim Demaille <akim@epita.fr>
754
755 * src/output.c (prepare): Drop the muscle `ntbase' which
756 duplicates ntokens.
757 * src/bison.simple: Formatting/comment changes.
758 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
759 is an undocumented synonym.
760
1fa14068
AD
7612001-12-22 Akim Demaille <akim@epita.fr>
762
763 * src/output.c (output_table_data): Change the prototype to use
764 `int' for array ranges: some invocations do pass an int, not a
765 short.
766 Reported by Wayne Green.
767
b9752825
AD
7682001-12-22 Akim Demaille <akim@epita.fr>
769
770 Some actions of web2c.y are improperly triggered.
771 Reported by Mike Castle.
772
773 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
774 * tests/regression.at (Web2c): Rename as...
775 (Web2c Report): this.
776 (Web2c Actions): New.
777
776209d6
AD
7782001-12-22 Akim Demaille <akim@epita.fr>
779
780 Reductions in web2c.y are improperly reported.
781 Reported by Mike Castle.
782
783 * src/conflicts.c (print_reductions): Fix.
784 * tests/regression.at (Web2c): New.
785
275fc3ad
AD
7862001-12-18 Akim Demaille <akim@epita.fr>
787
788 Some host fail on `assert (!"foo")', which expands to
789 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
790 Reported by Nelson Beebee.
791
792 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
793 `#define it_succeeded 0' and `assert (it_succeeded)'.
794
897668ee
MA
7952001-12-17 Marc Autret <autret_m@epita.fr>
796
797 * src/bison.simple: Don't hard code the skeleton line and filename.
798 * src/output.c (output_parser): Rename 'line' as 'output_line'.
799 New line counter 'skeleton_line' (skeleton-line muscle).
800
ab3399e0
PE
8012001-12-17 Paul Eggert <eggert@twinsun.com>
802
803 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
804 YYDEBUG must be defined to a nonzero value.
805
806 * src/bison.simple (yytname): Do not assume that the user defines
807 YYDEBUG to a properly parenthesized expression.
808
3877f72b
AD
8092001-12-17 Akim Demaille <akim@epita.fr>
810
811 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
812 nlookaheads is a new member.
813 Adjust all users.
814 * src/lalr.h (nlookaheads): Remove this orphan declaration.
815 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
816 state.
776209d6 817
331dbc1b
AD
8182001-12-17 Akim Demaille <akim@epita.fr>
819
820 * src/files.h, src/files.c (open_files, close_files): Remove.
821 * src/main.c (main): Don't open/close files, nor invoke lex_free,
822 let...
823 * src/reader.c (reader): Do it.
776209d6 824
be750e4c
AD
8252001-12-17 Akim Demaille <akim@epita.fr>
826
827 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 828
709ae8c6
AD
8292001-12-17 Akim Demaille <akim@epita.fr>
830
831 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
832 (flush_reduce): New.
833 (resolve_sr_conflict): Adjust.
776209d6 834
f87685c3
AD
8352001-12-17 Akim Demaille <akim@epita.fr>
836
837 * src/output.c (output_obstack): Be static and rename as...
838 (format_obstack): this, to avoid any confusion with files.c's
839 output_obstack.
840 * src/reader.h (muscle_obstack): Move to...
841 * src/output.h: here, since it's defined in output.c.
842
837491d8
AD
8432001-12-17 Akim Demaille <akim@epita.fr>
844
845 * src/output.c (action_row, save_column, default_goto)
846 (sort_actions, matching_state, pack_vector): Better variable
847 locality.
848
796d61fb
AD
8492001-12-17 Akim Demaille <akim@epita.fr>
850
851 * src/output.c: Various formatting changes.
776209d6 852
64d15509
AD
8532001-12-17 Akim Demaille <akim@epita.fr>
854
855 * src/files.c (output_files): Free the output_obstack.
856 * src/main.c (main): Call print and print_graph conditionally.
857 * src/print.c (print): Work unconditionally.
858 * src/print_graph.c (print_graph): Work unconditionally.
859 * src/conflicts.c (log_resolution): Output only if verbose_flag.
860
fbc8ecb7
MA
8612001-12-16 Marc Autret <autret_m@epita.fr>
862
863 * src/output.c (actions_output): Fix. When we use %no-lines,
864 there is one less line per action.
865
f0440388
MA
8662001-12-16 Marc Autret <autret_m@epita.fr>
867
868 * src/bison.simple: Remove a useless #line directive.
869 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
870 * src/output.c (get_lines_number): New.
776209d6 871 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
872 output muscles.
873 Fix line numbering.
874 (actions_output): Computes the number of lines taken by actions.
875 (output_master_parser): Insert new skeleton which is the name of
876 the output parser file name.
877
a79986b8
MA
8782001-12-15 Marc Autret <autret_m@epita.fr>
879
880 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
881
4ec8e00f
MA
8822001-12-15 Marc Autret <autret_m@epita.fr>
883
884 * src/output.c (output_gram): Keep track of the hairy one.
885
1a4648ff
AD
8862001-12-15 Akim Demaille <akim@epita.fr>
887
888 Make `make distcheck' work.
889
890 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
891 system.h which uses libgettext.h.
892
9c2c67e6
AD
8932001-12-15 Akim Demaille <akim@epita.fr>
894
895 * src/nullable.c (set_nullable): Useless rules must be skipped,
896 otherwise, since we range over their symbols, we might look at a
897 nonterminal which no longer ``exists'', i.e., it is not counted in
898 `nvars', hence we overflow our arrays.
899
93ede233
AD
9002001-12-15 Akim Demaille <akim@epita.fr>
901
902 The header can also be produced directly, without any obstack!
903 Yahoo!
904
905 * src/files.c, src/files.h (defines_obstack): Remove.
906 (compute_header_macro): Global.
907 (defines_obstack_save): Remove.
908 * src/reader.c (parse_union_decl): No longer output to
909 defines_obstack: its content can be found in the `stype' muscle
910 anyway.
911 (output_token_translations): Merge into...
912 (symbols_output): this.
913 Rename as...
914 (symbols_save): this.
915 (reader): Adjust.
916 * src/output.c (header_output): New.
917 (output): Call it.
918
2666f928
AD
9192001-12-15 Akim Demaille <akim@epita.fr>
920
921 * src/reader.c (parse_union_decl): Instead of handling two obstack
922 simultaneously, use one to define the `stype' muscle, and use the
923 value of the latter to fill defines_obstack.
924 (copy_comment): Remove.
925 (copy_comment2): Work for a single obstack.
926 Rename as...
927 (copy_comment): this.
928
428046f8
AD
9292001-12-15 Akim Demaille <akim@epita.fr>
930
931 * src/lex.c, src/lex.h (xgetc): No longer static.
932 * src/reader.c (parse_union_decl): Revamp.
933
ea52d706
AD
9342001-12-15 Akim Demaille <akim@epita.fr>
935
936 Still making progress in separating Bison into (i) input, (ii)
937 process, (iii) output: now we can directly output the parser file
938 without using table_obstack at all.
939
940 * src/files.c, src/files.h (table_obstack): Bye bye.
941 (parser_file_name): New.
942 * src/files.c (compute_output_file_names): Compute it.
943 * src/output.c (actions_output, output_parser)
944 (output_master_parser): To a file instead of an obstack.
945
3f96f4dc
AD
9462001-12-15 Akim Demaille <akim@epita.fr>
947
948 Attach actions to rules, instead of pre-outputting them to
949 actions_obstack.
950
951 * src/gram.h (rule_t): action and action_line are new members.
952 * src/reader.c (symbol_list): Likewise.
953 (copy_action): Save the actions within the rule.
954 (packgram): Save them in rule_table.
955 * src/output.c (actions_output): New.
956 (output_parser): Use it on `%%actions'.
957 (output_rule_data): Don't free rule_table.
958 (output): Do it.
959 (prepare): Don't save the `action' muscle.
960 * src/bison.simple: s/%%action/%%actions/.
961
51576fb3
AD
9622001-12-15 Akim Demaille <akim@epita.fr>
963
964 * src/reader.c (copy_action): When --yacc, don't append a `;'
965 to the user action: let it fail if lacking.
dee049eb 966 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 967
2648a72d
AD
9682001-12-14 Akim Demaille <akim@epita.fr>
969
970 * src/lex.c (literalchar): Simply return the char you decoded, non
971 longer mess around with obstacks and int pointers.
972 Adjust all callers.
973
92790e5b
AD
9742001-12-14 Akim Demaille <akim@epita.fr>
975
976 * src/lex.c (literalchar): Don't escape the special characters,
977 just decode them, and keep them as char (before, eol was output as
978 the 2 char string `\n' etc.).
979 * src/output.c (output_rule_data): Use quotearg to output the
980 token strings.
981
927c1557
PE
9822001-12-13 Paul Eggert <eggert@twinsun.com>
983
984 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
985 Do not infringe on the global user namespace when using C++.
986 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
987 All uses of `fprintf' and `stderr' changed.
988
989 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
990
ed8e1f68
AD
9912001-12-13 Akim Demaille <akim@epita.fr>
992
993 The computation of nullable is broken: it doesn't handle empty
994 RHS's properly.
995
996 * tests/torture.at (GNU AWK Grammar): New.
997 * tests/sets.at (Nullable): New.
998 * src/nullable.c (set_nullable): Instead of blindly looping over
999 `ritems', loop over the rules, and then over their rhs's.
1000
1001 Work around Autotest bugs.
1002
1003 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
1004 frame, because Autotest understand lines starting with a `+' as
1005 traces from the shell. Then, they are not processed properly.
1006 Admittedly an Autotest bug, but we don't have time to wait for
1007 Autotest to catch up.
1008 * tests/regression.at (Broken Closure): Adjust to the new table
1009 frames.
1010 Move to...
1011 * tests/sets.at: here.
1012
cb581495
AD
10132001-12-13 Akim Demaille <akim@epita.fr>
1014
1015 * src/closure.c (closure): Use nrules instead of playing tricks
1016 with BITS_PER_WORD.
1017
2e729273
AD
10182001-12-13 Akim Demaille <akim@epita.fr>
1019
1020 * src/print.c (print_actions): Output the handling of `$' as the
1021 traces do: shifting the token EOF. Before EOF was treated as a
1022 nonterminal.
1023 * tests/regression.at: Adjust some tests.
1024 * src/print_graph.c (print_core): Complete the set of items via
1025 closure. The next-to-final and final states are still unsatisfying,
1026 but that's to be addressed elsewhere.
1027 No longer output the rule numbers, but do output the state number.
1028 A single loop for the shifts + gotos is enough, but picked a
1029 distinct color for each.
1030 (print_graph): Initialize and finalize closure.
1031
107f7dfb
AD
10322001-12-13 Akim Demaille <akim@epita.fr>
1033
1034 * src/reader.c (readgram): Remove dead code, an strip useless
1035 braces.
1036 (get_type): Remove, unused.
1037
9b53a24f
AD
10382001-12-12 Akim Demaille <akim@epita.fr>
1039
1040 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
1041 on that of lib/error.c.
1042
dbfb6dcd
AD
10432001-12-12 Akim Demaille <akim@epita.fr>
1044
1045 Some hosts don't like `/' in includes.
1046
1047 * src/system.h: Include libgettext.h without qualifying the path.
1048 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
1049 $(top_srcdir).
1050
c25fb648
MA
10512001-12-11 Marc Autret <autret_m@epita.fr>
1052
1053 * src/output.c (output_parser): Remove useless muscle.
1054
710ddc4f
MA
10552001-12-11 Marc Autret <autret_m@epita.fr>
1056
1057 * src/bison.simple: Remove #line just before %%epilogue. It
1058 is now handled in ...
1059 * src/reader.c (read_additionnal_code): Add the output of a
1060 #line for the epilogue.
1061
e83d80b8
MA
10622001-12-10 Marc Autret <autret_m@epita.fr>
1063
927c1557 1064 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
1065 replace precedent remove.
1066 * src/bison.simple: Remove #line before %%prologue because
1067 %%input-line is wrong at this time.
1068
971d5158
MA
10692001-12-10 Marc Autret <autret_m@epita.fr>
1070
1071 * src/reader.c (symbols_output): Clean up.
927c1557 1072 * src/output.c (output_gram, output): Clean up.
971d5158 1073
5edafffd
AD
10742001-12-10 Akim Demaille <akim@epita.fr>
1075
1076 * src/lalr.c (initialize_lookaheads): New. Extracted from...
1077 * src/LR0.c (set_state_table): here.
1078 * src/lalr.c (lalr): Call it.
1079
0279f8e9
AD
10802001-12-10 Akim Demaille <akim@epita.fr>
1081
1082 * src/state.h (shifts): Remove the `number' member: shifts are
1083 attached to state, hence no longer need to be labelled with a
1084 state number.
1085
190c4f5f
AD
10862001-12-10 Akim Demaille <akim@epita.fr>
1087
1088 Now that states have a complete set of members, the linked list of
1089 shifts is useless: just fill directly the state's shifts member.
1090
1091 * src/state.h (shifts): Remove the `next' member.
1092 * src/LR0.c (first_state, last_state): Remove.
1093 Adjust the callers.
1094 (augment_automaton): Don't look for the shifts that must be added
1095 a shift on EOF: it is those of the state we looked for! But now,
1096 since shifts are attached, it is no longer needed to looking
1097 merely by its id: its number.
1098
2a73b93d
AD
10992001-12-10 Akim Demaille <akim@epita.fr>
1100
1101 * src/LR0.c (augment_automaton): Better variable locality.
1102 Remove an impossible branch: if there is a state corresponding to
1103 the start symbol being shifted, then there is shift for the start
1104 symbol from the initial state.
1105
74392f6a
AD
11062001-12-10 Akim Demaille <akim@epita.fr>
1107
1108 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
1109 only when appropriate: when insert_start_shifting_state' is not
1110 invoked.
1111 * tests/regression.at (Rule Line Numbers): Adjust.
1112
37c82725
AD
11132001-12-10 Akim Demaille <akim@epita.fr>
1114
1115 * src/LR0.c (augment_automaton): Now that all states have shifts,
1116 merge the two cases addition shifts to the initial state.
1117
6a164e0c
AD
11182001-12-10 Akim Demaille <akim@epita.fr>
1119
1120 * src/lalr.c (set_state_table): Move to...
1121 * src/LR0.c: here.
1122 * src/lalr.c (lalr): Don't call it...
1123 * src/LR0.c (generate_states): do it.
1124 * src/LR0.h (first_state): Remove, only the table is used.
1125
7215de24
AD
11262001-12-10 Akim Demaille <akim@epita.fr>
1127
1128 * src/LR0.h (first_shift, first_reduction): Remove.
1129 * src/lalr.c: Don't use first_shift: find shifts through the
1130 states.
1131
80e25d4d
AD
11322001-12-10 Akim Demaille <akim@epita.fr>
1133
1134 * src/LR0.c: Attach shifts to states as soon as they are
1135 computed.
1136 * src/lalr.c (set_state_table): Instead of assigning shifts to
1137 state, just assert that the mapping was properly done.
1138
0ab3728b
AD
11392001-12-10 Akim Demaille <akim@epita.fr>
1140
1141 * src/LR0.c (insert_start_shift): Rename as...
1142 (insert_start_shifting_state): this.
1143 (insert_eof_shifting_state, insert_accepting_state): New.
1144 (augment_automaton): Adjust.
1145 Better locality of the variables.
1146 When looking if the start_symbol is shifted from the initial
1147 state, using `while (... symbol != start_symbol ...)' sounds
1148 better than `while (... symbol < start_symbol ...)': If fail
1149 to see how the order between symbols could be relevant!
1150
78af9bbc
AD
11512001-12-10 Akim Demaille <akim@epita.fr>
1152
1153 * src/getargs.h: Don't declare `spec_name_prefix' and
1154 `spec_file_prefix', declared by src/files.h.
1155 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
1156 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
1157 * src/output.c (prepare): Adjust.
1158 * src/reader.c (symbols_output): Likewise.
1159 * src/vmsgetargs.c: Vaguely adjust, but who cares?
1160
bdef2a41
AD
11612001-12-10 Akim Demaille <akim@epita.fr>
1162
1163 * src/muscle_tab.c (muscle_init): NULL is a better default than
1164 `"0"'.
1165
3735969c
AD
11662001-12-10 Akim Demaille <akim@epita.fr>
1167
1168 * src/reader.c (reader): Calling symbols_output once is enough.
1169
49701457
AD
11702001-12-10 Akim Demaille <akim@epita.fr>
1171
1172 Now that states have a complete set of members, the linked list of
1173 reductions is useless: just fill directly the state's reductions
1174 member.
1175
1176 * src/state.h (struct reductions): Remove member `number' and
1177 `next'.
1178 * src/LR0.c (first_reduction, last_reduction): Remove.
1179 (save_reductions): Don't link the new reductions, store them in
1180 this_state.
1181 * src/lalr.c (set_state_table): No need to attach reductions to
1182 states, it's already done.
1183 * src/output.c (output_actions): No longer free the shifts, then
1184 the reductions, then the states: free all the states and their
1185 members.
1186
0edad749
AD
11872001-12-10 Akim Demaille <akim@epita.fr>
1188
1189 * src/options.c (OPTN, DRTV, BOTH): New.
1190 (option_table): Use them.
1191
0edad749
AD
1192 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
1193 the job of system.h.
1194 * src/options.c: Don't include stdio.h and xalloc.h for the same
1195 reasons.
1196
5449dd0f
AD
11972001-12-10 Akim Demaille <akim@epita.fr>
1198
1199 * src/output.c (output, prepare): Make sure the values of the
1200 muscles `action' and `prologue' are 0-terminated.
1201
a870c567
AD
12022001-12-10 Akim Demaille <akim@epita.fr>
1203
1204 Clean up GCC warnings.
1205
1206 * src/reader.c (copy_action): `buf' is not used.
1207 (parse_skel_decl): Be static.
1208 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
1209 * src/options.h (create_long_option_table): Have a real prototype.
1210 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
1211 (hash_delete_at): Return const void *.
1212 Adjust casts to preserve the const.
1213
80df8768
AD
12142001-12-10 Akim Demaille <akim@epita.fr>
1215
1216 * configure.in: Require 2.52g.
1217 M4 is not needed, but AUTOM4TE is.
1218 * m4/m4.m4: Remove.
1219 * tests/Makefile.am: Adjust.
1220
f693ad14
AD
12212001-12-10 Akim Demaille <akim@epita.fr>
1222
1223 One structure for states is enough, even though theoretically
1224 there are LR(0) states and LALR(1) states.
1225
1226 * src/lalr.h (state_t): Remove.
1227 (state_table): Be state_t **, not state_t *.
1228 * src/state.h (core, CORE_ALLOC): Rename as...
1229 (state_t, STATE_ALLOC): this.
1230 Add the LALR(1) members: shifts, reductions, errs.
1231 * src/LR0.c (state_table): Rename as...
1232 (state_hash): this, to avoid name clashes with the global
1233 `state_table'.
1234 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
1235 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
1236
74ffbcb6
AD
12372001-12-10 Akim Demaille <akim@epita.fr>
1238
1239 Bison dumps core on bash.y.
1240 Reported by Pascal Bart.
1241
1242 * src/warshall.c (bitmatrix_print): New.
1243 (TC): Use it.
1244 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
1245 j must be the outer loop.
1246 * tests/regression.at (Broken Closure): New.
1247
07708e19
AD
12482001-12-05 Akim Demaille <akim@epita.fr>
1249
1250 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
1251 its argument.
1252