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