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