]> git.saurik.com Git - bison.git/blame - ChangeLog
Try to make the use of the eoftoken valid. Given that its value
[bison.git] / ChangeLog
CommitLineData
75142d45
AD
12001-12-27 Akim Demaille <akim@epita.fr>
2
3 Try to make the use of the eoftoken valid. Given that its value
4 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
5 is used instead of > 0 where appropriate, (ii), depend upon nritems
6 instead of the 0-sentinel.
7
8 * src/gram.h, src/gram.c (nritems): New.
9 Expected to be duplication of nitems, but for the time being...
10 * src/reader.c (packgram): Assert nritems and nitems are equal.
11 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
12 * src/closure.c (print_closure, print_fderives): Likewise.
13 * src/gram.c (ritem_print): Likewise.
14 * src/print.c (print_core, print_grammar): Likewise.
15 * src/print_graph.c: Likewise.
16
b7c49edf
AD
172001-12-27 Akim Demaille <akim@epita.fr>
18
19 * src/main.c (main): If there are complains after grammar
20 reductions, then output the report anyway if requested, then die.
21 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
22 * src/reader.c (eoftoken): New.
23 (parse_token_decl): If the token being defined has value `0', it
24 is the eoftoken.
25 (packsymbols): No longer hack `tags' to insert `$' by hand.
26 Be sure to preserve the value of the eoftoken.
27 (reader): Make sure eoftoken is defined.
28 Initialize nsyms to 0: now eoftoken is created just like the others.
29 * src/print.c (print_grammar): Don't special case the eof token.
30 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
31 lie anyway, albeit pleasant.
32 * tests/calc.at: Exercise error messages with eoftoken.
33 Change the grammar so that empty input is invalid.
34 Adjust expectations.
35 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
36
37
ec2da99f
AD
382001-12-27 Akim Demaille <akim@epita.fr>
39
40 * configure.in: Check the protos of strchr ans strspn.
41 Replace strchr if needed.
42 * src/system.h: Provide the protos of strchr, strspn and memchr if
43 missing.
44 * lib/strchr.c: New.
45 * src/reader.c (symbols_save): Use strchr.
46
47
8adfa272
AD
482001-12-27 Akim Demaille <akim@epita.fr>
49
50 * src/print.c, src/print_graph.c (escape): New.
51 Use it to quote the TAGS outputs.
52 * src/print_graph.c (print_state): Now errors are in red, and
53 reductions in green.
54 Prefer high to wide: output the state number on a line of its own.
55
56
80dac38c
AD
572001-12-27 Akim Demaille <akim@epita.fr>
58
59 * src/state.h, src/state.c (reductions_new): New.
60 * src/LR0.c (set_state_table): Let all the states have a
61 `reductions', even if reduced to 0.
62 (save_reductions): Adjust.
63 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
64 * src/print.c (print_reductions, print_actions): Adjust.
65 * src/output.c (action_row): Adjust.
66
67
2cec70b9
AD
682001-12-27 Akim Demaille <akim@epita.fr>
69
70 * src/state.h, src/state.c (errs_new, errs_dup): New.
71 * src/LR0.c (set_state_table): Let all the states have an errs,
72 even if reduced to 0.
73 * src/print.c (print_errs, print_reductions): Adjust.
74 * src/output.c (output_actions, action_row): Adjust.
75 * src/conflicts.c (resolve_sr_conflict): Adjust.
76
77
13ca549a
AD
782001-12-27 Akim Demaille <akim@epita.fr>
79
80 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
81
5092aba5
AD
822001-12-27 Akim Demaille <akim@epita.fr>
83
84 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
85 * src/print.c: here.
86 (lookaheadset, shiftset): New, used as additional storage by
87 print_reductions.
88 (print_results): Adjust.
89 (print_shifts, print_gotos, print_errs): New, extracted from...
90 (print_actions): here.
91 * src/print_graph.c (print_actions): Remove dead code.
92
93
11e2beca
AD
942001-12-27 Akim Demaille <akim@epita.fr>
95
96 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
97 `$n' and `@n'.
98
99
dac3c910
AD
1002001-12-27 Akim Demaille <akim@epita.fr>
101
102 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
103 (build_relations): Adjust.
104
105
d0b0fefa
AD
1062001-12-27 Akim Demaille <akim@epita.fr>
107
108 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
109 duplication.
110
111
adc8c848
AD
1122001-12-27 Akim Demaille <akim@epita.fr>
113
114 * src/reader.c (packgram): Catch nitems overflows.
115
116
14d293ac
AD
1172001-12-27 Akim Demaille <akim@epita.fr>
118
119 * src/files.c, src/files.h (guard_obstack): Remove.
120 * src/output.c (output): Adjust.
121 * src/reader.c (parse_braces): New, factoring...
122 (copy_action, copy_guard): these two which are renamed as...
123 (parse_action, parse_guard): these.
124 As a voluntary consequence, using braces around guards is now
125 mandatory.
126
127
f499b062
AD
1282001-12-27 Akim Demaille <akim@epita.fr>
129
130 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
131 * src/reader.c (symbol_list): `guard' and `guard_line' are new
132 members.
133 (symbol_list_new): Adjust.
134 (copy_action): action_line is the first line, not the last.
135 (copy_guard): Just as for actions, store the `action' only, not
136 the switch/case/break flesh.
137 Don't parse the user action that might follow the guard, let...
138 (readgram): do it, i.e., now, there can be an action after a
139 guard.
140 In other words the guard is just explicitly optional.
141 (packgram): Adjust.
142 * src/output.c (guards_output): New.
143 (output_parser): Call it when needed.
144 (output): Also free the guard and attrs obstacks.
145 * src/files.c, src/files.h (obstack_save): Remove.
146 (output_files): Remove.
147 As a result, if one needs the former `.act' file, using an
148 appropriate skeleton which requires actions and guards is now
149 required.
150 * src/main.c (main): Adjust.
151 * tests/semantic.at: New.
152 * tests/regression.at: Use `input.y' as input file name.
153 Avoid 8+3 problems by requiring input.c when the test needs the
154 parser.
155
d945f5cd
AD
1562001-12-27 Akim Demaille <akim@epita.fr>
157
158 * src/reader.c (symbol_list_new): Be sure to initialize all the
159 fields.
160
d200e455
AD
1612001-12-27 Akim Demaille <akim@epita.fr>
162
163 All the hacks using a final pseudo state are now useless.
164
165 * src/LR0.c (set_state_table): state_table holds exactly nstates.
166 * src/lalr.c (nLA): New.
167 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
168 instead of lookaheadsp from the pseudo state (nstate + 1).
169
f9507c28
AD
1702001-12-27 Akim Demaille <akim@epita.fr>
171
172 * src/output.c (action_row, token_actions): Use a state_t instead
173 of a integer, and nlookaheads instead of the following state's
174 lookaheadsp.
175
176
065fbd27
AD
1772001-12-27 Akim Demaille <akim@epita.fr>
178
179 * src/conflicts.c (log_resolution, flush_shift)
180 (resolve_sr_conflict, set_conflicts, solve_conflicts)
181 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
182 (conflicts_print, print_reductions): Use a state_t instead of an
183 integer when referring to a state.
184 As much as possible, depend upon nlookaheads, instead of the
185 `lookaheadsp' member of the following state (since lookaheads of
186 successive states are successive, the difference between state n + 1
187 and n served as the number of lookaheads for state n).
188 * src/lalr.c (add_lookback_edge): Likewise.
189 * src/print.c (print_core, print_actions, print_state)
190 (print_results): Likewise.
191 * src/print_graph.c (print_core, print_actions, print_state)
192 (print_graph): Likewise.
193 * src/conflicts.h: Adjust.
194
1b177bd7
AD
1952001-12-27 Akim Demaille <akim@epita.fr>
196
197 * src/bison.hairy: Formatting/comment changes.
198 ANSIfy.
199 Remove `register' indications.
200 Add plenty of `static'.
201
7742ddeb
AD
2022001-12-27 Akim Demaille <akim@epita.fr>
203
204 * src/output.c (prepare): Drop the muscle `ntbase' which
205 duplicates ntokens.
206 * src/bison.simple: Formatting/comment changes.
207 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
208 is an undocumented synonym.
209
210
1fa14068
AD
2112001-12-22 Akim Demaille <akim@epita.fr>
212
213 * src/output.c (output_table_data): Change the prototype to use
214 `int' for array ranges: some invocations do pass an int, not a
215 short.
216 Reported by Wayne Green.
217
b9752825
AD
2182001-12-22 Akim Demaille <akim@epita.fr>
219
220 Some actions of web2c.y are improperly triggered.
221 Reported by Mike Castle.
222
223 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
224 * tests/regression.at (Web2c): Rename as...
225 (Web2c Report): this.
226 (Web2c Actions): New.
227
776209d6
AD
2282001-12-22 Akim Demaille <akim@epita.fr>
229
230 Reductions in web2c.y are improperly reported.
231 Reported by Mike Castle.
232
233 * src/conflicts.c (print_reductions): Fix.
234 * tests/regression.at (Web2c): New.
235
275fc3ad
AD
2362001-12-18 Akim Demaille <akim@epita.fr>
237
238 Some host fail on `assert (!"foo")', which expands to
239 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
240 Reported by Nelson Beebee.
241
242 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
243 `#define it_succeeded 0' and `assert (it_succeeded)'.
244
897668ee
MA
2452001-12-17 Marc Autret <autret_m@epita.fr>
246
247 * src/bison.simple: Don't hard code the skeleton line and filename.
248 * src/output.c (output_parser): Rename 'line' as 'output_line'.
249 New line counter 'skeleton_line' (skeleton-line muscle).
250
ab3399e0
PE
2512001-12-17 Paul Eggert <eggert@twinsun.com>
252
253 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
254 YYDEBUG must be defined to a nonzero value.
255
256 * src/bison.simple (yytname): Do not assume that the user defines
257 YYDEBUG to a properly parenthesized expression.
258
3877f72b
AD
2592001-12-17 Akim Demaille <akim@epita.fr>
260
261 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
262 nlookaheads is a new member.
263 Adjust all users.
264 * src/lalr.h (nlookaheads): Remove this orphan declaration.
265 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
266 state.
776209d6 267
331dbc1b
AD
2682001-12-17 Akim Demaille <akim@epita.fr>
269
270 * src/files.h, src/files.c (open_files, close_files): Remove.
271 * src/main.c (main): Don't open/close files, nor invoke lex_free,
272 let...
273 * src/reader.c (reader): Do it.
776209d6 274
be750e4c
AD
2752001-12-17 Akim Demaille <akim@epita.fr>
276
277 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 278
709ae8c6
AD
2792001-12-17 Akim Demaille <akim@epita.fr>
280
281 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
282 (flush_reduce): New.
283 (resolve_sr_conflict): Adjust.
776209d6 284
f87685c3
AD
2852001-12-17 Akim Demaille <akim@epita.fr>
286
287 * src/output.c (output_obstack): Be static and rename as...
288 (format_obstack): this, to avoid any confusion with files.c's
289 output_obstack.
290 * src/reader.h (muscle_obstack): Move to...
291 * src/output.h: here, since it's defined in output.c.
292
837491d8
AD
2932001-12-17 Akim Demaille <akim@epita.fr>
294
295 * src/output.c (action_row, save_column, default_goto)
296 (sort_actions, matching_state, pack_vector): Better variable
297 locality.
298
796d61fb
AD
2992001-12-17 Akim Demaille <akim@epita.fr>
300
301 * src/output.c: Various formatting changes.
776209d6 302
64d15509
AD
3032001-12-17 Akim Demaille <akim@epita.fr>
304
305 * src/files.c (output_files): Free the output_obstack.
306 * src/main.c (main): Call print and print_graph conditionally.
307 * src/print.c (print): Work unconditionally.
308 * src/print_graph.c (print_graph): Work unconditionally.
309 * src/conflicts.c (log_resolution): Output only if verbose_flag.
310
fbc8ecb7
MA
3112001-12-16 Marc Autret <autret_m@epita.fr>
312
313 * src/output.c (actions_output): Fix. When we use %no-lines,
314 there is one less line per action.
315
f0440388
MA
3162001-12-16 Marc Autret <autret_m@epita.fr>
317
318 * src/bison.simple: Remove a useless #line directive.
319 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
320 * src/output.c (get_lines_number): New.
776209d6 321 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
322 output muscles.
323 Fix line numbering.
324 (actions_output): Computes the number of lines taken by actions.
325 (output_master_parser): Insert new skeleton which is the name of
326 the output parser file name.
327
a79986b8
MA
3282001-12-15 Marc Autret <autret_m@epita.fr>
329
330 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
331
4ec8e00f
MA
3322001-12-15 Marc Autret <autret_m@epita.fr>
333
334 * src/output.c (output_gram): Keep track of the hairy one.
335
1a4648ff
AD
3362001-12-15 Akim Demaille <akim@epita.fr>
337
338 Make `make distcheck' work.
339
340 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
341 system.h which uses libgettext.h.
342
9c2c67e6
AD
3432001-12-15 Akim Demaille <akim@epita.fr>
344
345 * src/nullable.c (set_nullable): Useless rules must be skipped,
346 otherwise, since we range over their symbols, we might look at a
347 nonterminal which no longer ``exists'', i.e., it is not counted in
348 `nvars', hence we overflow our arrays.
349
93ede233
AD
3502001-12-15 Akim Demaille <akim@epita.fr>
351
352 The header can also be produced directly, without any obstack!
353 Yahoo!
354
355 * src/files.c, src/files.h (defines_obstack): Remove.
356 (compute_header_macro): Global.
357 (defines_obstack_save): Remove.
358 * src/reader.c (parse_union_decl): No longer output to
359 defines_obstack: its content can be found in the `stype' muscle
360 anyway.
361 (output_token_translations): Merge into...
362 (symbols_output): this.
363 Rename as...
364 (symbols_save): this.
365 (reader): Adjust.
366 * src/output.c (header_output): New.
367 (output): Call it.
368
2666f928
AD
3692001-12-15 Akim Demaille <akim@epita.fr>
370
371 * src/reader.c (parse_union_decl): Instead of handling two obstack
372 simultaneously, use one to define the `stype' muscle, and use the
373 value of the latter to fill defines_obstack.
374 (copy_comment): Remove.
375 (copy_comment2): Work for a single obstack.
376 Rename as...
377 (copy_comment): this.
378
428046f8
AD
3792001-12-15 Akim Demaille <akim@epita.fr>
380
381 * src/lex.c, src/lex.h (xgetc): No longer static.
382 * src/reader.c (parse_union_decl): Revamp.
383
ea52d706
AD
3842001-12-15 Akim Demaille <akim@epita.fr>
385
386 Still making progress in separating Bison into (i) input, (ii)
387 process, (iii) output: now we can directly output the parser file
388 without using table_obstack at all.
389
390 * src/files.c, src/files.h (table_obstack): Bye bye.
391 (parser_file_name): New.
392 * src/files.c (compute_output_file_names): Compute it.
393 * src/output.c (actions_output, output_parser)
394 (output_master_parser): To a file instead of an obstack.
395
3f96f4dc
AD
3962001-12-15 Akim Demaille <akim@epita.fr>
397
398 Attach actions to rules, instead of pre-outputting them to
399 actions_obstack.
400
401 * src/gram.h (rule_t): action and action_line are new members.
402 * src/reader.c (symbol_list): Likewise.
403 (copy_action): Save the actions within the rule.
404 (packgram): Save them in rule_table.
405 * src/output.c (actions_output): New.
406 (output_parser): Use it on `%%actions'.
407 (output_rule_data): Don't free rule_table.
408 (output): Do it.
409 (prepare): Don't save the `action' muscle.
410 * src/bison.simple: s/%%action/%%actions/.
411
51576fb3
AD
4122001-12-15 Akim Demaille <akim@epita.fr>
413
414 * src/reader.c (copy_action): When --yacc, don't append a `;'
415 to the user action: let it fail if lacking.
dee049eb 416 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 417
2648a72d
AD
4182001-12-14 Akim Demaille <akim@epita.fr>
419
420 * src/lex.c (literalchar): Simply return the char you decoded, non
421 longer mess around with obstacks and int pointers.
422 Adjust all callers.
423
92790e5b
AD
4242001-12-14 Akim Demaille <akim@epita.fr>
425
426 * src/lex.c (literalchar): Don't escape the special characters,
427 just decode them, and keep them as char (before, eol was output as
428 the 2 char string `\n' etc.).
429 * src/output.c (output_rule_data): Use quotearg to output the
430 token strings.
431
927c1557
PE
4322001-12-13 Paul Eggert <eggert@twinsun.com>
433
434 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
435 Do not infringe on the global user namespace when using C++.
436 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
437 All uses of `fprintf' and `stderr' changed.
438
439 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
440
ed8e1f68
AD
4412001-12-13 Akim Demaille <akim@epita.fr>
442
443 The computation of nullable is broken: it doesn't handle empty
444 RHS's properly.
445
446 * tests/torture.at (GNU AWK Grammar): New.
447 * tests/sets.at (Nullable): New.
448 * src/nullable.c (set_nullable): Instead of blindly looping over
449 `ritems', loop over the rules, and then over their rhs's.
450
451 Work around Autotest bugs.
452
453 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
454 frame, because Autotest understand lines starting with a `+' as
455 traces from the shell. Then, they are not processed properly.
456 Admittedly an Autotest bug, but we don't have time to wait for
457 Autotest to catch up.
458 * tests/regression.at (Broken Closure): Adjust to the new table
459 frames.
460 Move to...
461 * tests/sets.at: here.
462
cb581495
AD
4632001-12-13 Akim Demaille <akim@epita.fr>
464
465 * src/closure.c (closure): Use nrules instead of playing tricks
466 with BITS_PER_WORD.
467
2e729273
AD
4682001-12-13 Akim Demaille <akim@epita.fr>
469
470 * src/print.c (print_actions): Output the handling of `$' as the
471 traces do: shifting the token EOF. Before EOF was treated as a
472 nonterminal.
473 * tests/regression.at: Adjust some tests.
474 * src/print_graph.c (print_core): Complete the set of items via
475 closure. The next-to-final and final states are still unsatisfying,
476 but that's to be addressed elsewhere.
477 No longer output the rule numbers, but do output the state number.
478 A single loop for the shifts + gotos is enough, but picked a
479 distinct color for each.
480 (print_graph): Initialize and finalize closure.
481
107f7dfb
AD
4822001-12-13 Akim Demaille <akim@epita.fr>
483
484 * src/reader.c (readgram): Remove dead code, an strip useless
485 braces.
486 (get_type): Remove, unused.
487
9b53a24f
AD
4882001-12-12 Akim Demaille <akim@epita.fr>
489
490 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
491 on that of lib/error.c.
492
dbfb6dcd
AD
4932001-12-12 Akim Demaille <akim@epita.fr>
494
495 Some hosts don't like `/' in includes.
496
497 * src/system.h: Include libgettext.h without qualifying the path.
498 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
499 $(top_srcdir).
500
c25fb648
MA
5012001-12-11 Marc Autret <autret_m@epita.fr>
502
503 * src/output.c (output_parser): Remove useless muscle.
504
710ddc4f
MA
5052001-12-11 Marc Autret <autret_m@epita.fr>
506
507 * src/bison.simple: Remove #line just before %%epilogue. It
508 is now handled in ...
509 * src/reader.c (read_additionnal_code): Add the output of a
510 #line for the epilogue.
511
e83d80b8
MA
5122001-12-10 Marc Autret <autret_m@epita.fr>
513
927c1557 514 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
515 replace precedent remove.
516 * src/bison.simple: Remove #line before %%prologue because
517 %%input-line is wrong at this time.
518
971d5158
MA
5192001-12-10 Marc Autret <autret_m@epita.fr>
520
521 * src/reader.c (symbols_output): Clean up.
927c1557 522 * src/output.c (output_gram, output): Clean up.
971d5158 523
5edafffd
AD
5242001-12-10 Akim Demaille <akim@epita.fr>
525
526 * src/lalr.c (initialize_lookaheads): New. Extracted from...
527 * src/LR0.c (set_state_table): here.
528 * src/lalr.c (lalr): Call it.
529
0279f8e9
AD
5302001-12-10 Akim Demaille <akim@epita.fr>
531
532 * src/state.h (shifts): Remove the `number' member: shifts are
533 attached to state, hence no longer need to be labelled with a
534 state number.
535
190c4f5f
AD
5362001-12-10 Akim Demaille <akim@epita.fr>
537
538 Now that states have a complete set of members, the linked list of
539 shifts is useless: just fill directly the state's shifts member.
540
541 * src/state.h (shifts): Remove the `next' member.
542 * src/LR0.c (first_state, last_state): Remove.
543 Adjust the callers.
544 (augment_automaton): Don't look for the shifts that must be added
545 a shift on EOF: it is those of the state we looked for! But now,
546 since shifts are attached, it is no longer needed to looking
547 merely by its id: its number.
548
2a73b93d
AD
5492001-12-10 Akim Demaille <akim@epita.fr>
550
551 * src/LR0.c (augment_automaton): Better variable locality.
552 Remove an impossible branch: if there is a state corresponding to
553 the start symbol being shifted, then there is shift for the start
554 symbol from the initial state.
555
74392f6a
AD
5562001-12-10 Akim Demaille <akim@epita.fr>
557
558 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
559 only when appropriate: when insert_start_shifting_state' is not
560 invoked.
561 * tests/regression.at (Rule Line Numbers): Adjust.
562
37c82725
AD
5632001-12-10 Akim Demaille <akim@epita.fr>
564
565 * src/LR0.c (augment_automaton): Now that all states have shifts,
566 merge the two cases addition shifts to the initial state.
567
6a164e0c
AD
5682001-12-10 Akim Demaille <akim@epita.fr>
569
570 * src/lalr.c (set_state_table): Move to...
571 * src/LR0.c: here.
572 * src/lalr.c (lalr): Don't call it...
573 * src/LR0.c (generate_states): do it.
574 * src/LR0.h (first_state): Remove, only the table is used.
575
7215de24
AD
5762001-12-10 Akim Demaille <akim@epita.fr>
577
578 * src/LR0.h (first_shift, first_reduction): Remove.
579 * src/lalr.c: Don't use first_shift: find shifts through the
580 states.
581
80e25d4d
AD
5822001-12-10 Akim Demaille <akim@epita.fr>
583
584 * src/LR0.c: Attach shifts to states as soon as they are
585 computed.
586 * src/lalr.c (set_state_table): Instead of assigning shifts to
587 state, just assert that the mapping was properly done.
588
0ab3728b
AD
5892001-12-10 Akim Demaille <akim@epita.fr>
590
591 * src/LR0.c (insert_start_shift): Rename as...
592 (insert_start_shifting_state): this.
593 (insert_eof_shifting_state, insert_accepting_state): New.
594 (augment_automaton): Adjust.
595 Better locality of the variables.
596 When looking if the start_symbol is shifted from the initial
597 state, using `while (... symbol != start_symbol ...)' sounds
598 better than `while (... symbol < start_symbol ...)': If fail
599 to see how the order between symbols could be relevant!
600
78af9bbc
AD
6012001-12-10 Akim Demaille <akim@epita.fr>
602
603 * src/getargs.h: Don't declare `spec_name_prefix' and
604 `spec_file_prefix', declared by src/files.h.
605 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
606 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
607 * src/output.c (prepare): Adjust.
608 * src/reader.c (symbols_output): Likewise.
609 * src/vmsgetargs.c: Vaguely adjust, but who cares?
610
bdef2a41
AD
6112001-12-10 Akim Demaille <akim@epita.fr>
612
613 * src/muscle_tab.c (muscle_init): NULL is a better default than
614 `"0"'.
615
3735969c
AD
6162001-12-10 Akim Demaille <akim@epita.fr>
617
618 * src/reader.c (reader): Calling symbols_output once is enough.
619
49701457
AD
6202001-12-10 Akim Demaille <akim@epita.fr>
621
622 Now that states have a complete set of members, the linked list of
623 reductions is useless: just fill directly the state's reductions
624 member.
625
626 * src/state.h (struct reductions): Remove member `number' and
627 `next'.
628 * src/LR0.c (first_reduction, last_reduction): Remove.
629 (save_reductions): Don't link the new reductions, store them in
630 this_state.
631 * src/lalr.c (set_state_table): No need to attach reductions to
632 states, it's already done.
633 * src/output.c (output_actions): No longer free the shifts, then
634 the reductions, then the states: free all the states and their
635 members.
636
0edad749
AD
6372001-12-10 Akim Demaille <akim@epita.fr>
638
639 * src/options.c (OPTN, DRTV, BOTH): New.
640 (option_table): Use them.
641
0edad749
AD
642 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
643 the job of system.h.
644 * src/options.c: Don't include stdio.h and xalloc.h for the same
645 reasons.
646
5449dd0f
AD
6472001-12-10 Akim Demaille <akim@epita.fr>
648
649 * src/output.c (output, prepare): Make sure the values of the
650 muscles `action' and `prologue' are 0-terminated.
651
a870c567
AD
6522001-12-10 Akim Demaille <akim@epita.fr>
653
654 Clean up GCC warnings.
655
656 * src/reader.c (copy_action): `buf' is not used.
657 (parse_skel_decl): Be static.
658 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
659 * src/options.h (create_long_option_table): Have a real prototype.
660 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
661 (hash_delete_at): Return const void *.
662 Adjust casts to preserve the const.
663
80df8768
AD
6642001-12-10 Akim Demaille <akim@epita.fr>
665
666 * configure.in: Require 2.52g.
667 M4 is not needed, but AUTOM4TE is.
668 * m4/m4.m4: Remove.
669 * tests/Makefile.am: Adjust.
670
f693ad14
AD
6712001-12-10 Akim Demaille <akim@epita.fr>
672
673 One structure for states is enough, even though theoretically
674 there are LR(0) states and LALR(1) states.
675
676 * src/lalr.h (state_t): Remove.
677 (state_table): Be state_t **, not state_t *.
678 * src/state.h (core, CORE_ALLOC): Rename as...
679 (state_t, STATE_ALLOC): this.
680 Add the LALR(1) members: shifts, reductions, errs.
681 * src/LR0.c (state_table): Rename as...
682 (state_hash): this, to avoid name clashes with the global
683 `state_table'.
684 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
685 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
686
74ffbcb6
AD
6872001-12-10 Akim Demaille <akim@epita.fr>
688
689 Bison dumps core on bash.y.
690 Reported by Pascal Bart.
691
692 * src/warshall.c (bitmatrix_print): New.
693 (TC): Use it.
694 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
695 j must be the outer loop.
696 * tests/regression.at (Broken Closure): New.
697
07708e19
AD
6982001-12-05 Akim Demaille <akim@epita.fr>
699
700 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
701 its argument.
702