]> git.saurik.com Git - bison.git/blame - ChangeLog
* tests/regression.at (Web2c Report): Catch up: the rule 0 is now
[bison.git] / ChangeLog
CommitLineData
78d5bae9
AD
12001-12-29 Akim Demaille <akim@epita.fr>
2
3 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
4 visible, and some states have now a different number.
5
6
ff442794
AD
72001-12-29 Akim Demaille <akim@epita.fr>
8
9 * src/reader.c (readgram): Bind the initial rule's lineno to that
10 of the first rule.
11 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
12 (Solved SR Conflicts): Adjust rule 0's line number.
13
14
610ab194
AD
152001-12-29 Akim Demaille <akim@epita.fr>
16
17 Fix the `GAWK Grammar' failure.
18
19 * src/LR0.c (final_state): Initialize to -1 so that we do compute
20 the reductions of the first state which was mistakenly confused
21 with the final state because precisely final_state was initialized
22 to 0.
23 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
24 now noticed by Bison.
25 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
26 have a reduction on $default.
27
28
29d29c8f
AD
292001-12-29 Akim Demaille <akim@epita.fr>
30
31 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
32 rule line numbers.
33 * src/closure.c (print_closure): Likewise.
34 * src/derives.c (print_derives): Likewise.
35 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
36 now.
37
7c6b64d0
AD
382001-12-29 Akim Demaille <akim@epita.fr>
39
40 * src/lalr.c (lookaheads_print): New.
41 (lalr): Call it when --trace-flag.
42 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
43 are dumped.
44
45
3d4daee3
AD
462001-12-29 Akim Demaille <akim@epita.fr>
47
48 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
49 when walking through ritem, even via rule->rhs.
50 * src/reduce.c (dump_grammar, useful_production, reduce_output)
51 (useful_production, useless_nonterminals): Likewise.
52 (reduce_grammar_tables): Likewise, plus update nritems.
53 * src/nullable.c (set_nullable): Likewise.
54 * src/lalr.c (build_relations): Likewise.
55 * tests/sets.at (Nullable): Adjust.
56 Fortunately, now, the $axiom is no longer nullable.
57
58
9e7f6bbd
AD
592001-12-29 Akim Demaille <akim@epita.fr>
60
61 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
62 the 0-sentinel.
63 * src/gram.c (ritem_longest_rhs): Likewise.
64 * src/reduce.c (nonterminals_reduce): Likewise.
65 * src/print_graph.c (print_graph): Likewise.
66 * src/output.c (output_rule_data): Likewise.
67 * src/nullable.c (set_nullable): Likewise.
68
255ef638
AD
692001-12-29 Akim Demaille <akim@epita.fr>
70
71 * src/output.c: Comment changes.
72
0d8a7363
AD
732001-12-27 Paul Eggert <eggert@twinsun.com>
74
75 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
76 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
77 Sparc, as they were causing more porting problems than the
78 (minor) performance improvement was worth.
79
80 Also, catch up with 1.31's YYSTD.
81
3db472b9
AD
822001-12-27 Akim Demaille <akim@epita.fr>
83
84 * src/output.c (output_gram): Rely on nritems, not the
85 0-sentinel. See below.
86 Use -1 as separator, not 0.
87 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
88 Rely on -1 as separator in yyrhs, instead of 0.
89 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
90 twice `Now at end of input', therefore there are two lines less to
91 expect.
92
b365aa05
AD
932001-12-27 Akim Demaille <akim@epita.fr>
94
95 * tests/regression.at (Unresolved SR Conflicts):
96 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
97 below.
98
30171f79
AD
992001-12-27 Akim Demaille <akim@epita.fr>
100
101 * src/LR0.c (new_state): Recognize the final state by the fact it
102 is reached by eoftoken.
103 (insert_start_shifting_state, insert_eof_shifting_state)
104 (insert_accepting_state, augment_automaton): Remove, since now
105 these states are automatically computed from the initial state.
106 (generate_states): Adjust.
107 * src/print.c: When reporting a rule number to the user, substract
108 1, so that the axiom rule is rule 0, and the first user rule is 1.
109 * src/reduce.c: Likewise.
110 * src/print_graph.c (print_core): For the time being, just as for
111 the report, depend upon --trace-flags to dump the full set of
112 items.
113 * src/reader.c (readgram): Once the grammar read, insert the rule
114 0: `$axiom: START-SYMBOL $'.
115 * tests/set.at: Adjust: rule 0 is now displayed, and since the
116 number of the states has changed (the final state is no longer
117 necessarily the last), catch up.
118
75142d45
AD
1192001-12-27 Akim Demaille <akim@epita.fr>
120
121 Try to make the use of the eoftoken valid. Given that its value
122 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
123 is used instead of > 0 where appropriate, (ii), depend upon nritems
124 instead of the 0-sentinel.
125
126 * src/gram.h, src/gram.c (nritems): New.
127 Expected to be duplication of nitems, but for the time being...
128 * src/reader.c (packgram): Assert nritems and nitems are equal.
129 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
130 * src/closure.c (print_closure, print_fderives): Likewise.
131 * src/gram.c (ritem_print): Likewise.
132 * src/print.c (print_core, print_grammar): Likewise.
133 * src/print_graph.c: Likewise.
134
b7c49edf
AD
1352001-12-27 Akim Demaille <akim@epita.fr>
136
137 * src/main.c (main): If there are complains after grammar
138 reductions, then output the report anyway if requested, then die.
139 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
140 * src/reader.c (eoftoken): New.
141 (parse_token_decl): If the token being defined has value `0', it
142 is the eoftoken.
143 (packsymbols): No longer hack `tags' to insert `$' by hand.
144 Be sure to preserve the value of the eoftoken.
145 (reader): Make sure eoftoken is defined.
146 Initialize nsyms to 0: now eoftoken is created just like the others.
147 * src/print.c (print_grammar): Don't special case the eof token.
148 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
149 lie anyway, albeit pleasant.
150 * tests/calc.at: Exercise error messages with eoftoken.
151 Change the grammar so that empty input is invalid.
152 Adjust expectations.
153 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
154
ec2da99f
AD
1552001-12-27 Akim Demaille <akim@epita.fr>
156
157 * configure.in: Check the protos of strchr ans strspn.
158 Replace strchr if needed.
159 * src/system.h: Provide the protos of strchr, strspn and memchr if
160 missing.
161 * lib/strchr.c: New.
162 * src/reader.c (symbols_save): Use strchr.
163
8adfa272
AD
1642001-12-27 Akim Demaille <akim@epita.fr>
165
166 * src/print.c, src/print_graph.c (escape): New.
167 Use it to quote the TAGS outputs.
168 * src/print_graph.c (print_state): Now errors are in red, and
169 reductions in green.
170 Prefer high to wide: output the state number on a line of its own.
171
80dac38c
AD
1722001-12-27 Akim Demaille <akim@epita.fr>
173
174 * src/state.h, src/state.c (reductions_new): New.
175 * src/LR0.c (set_state_table): Let all the states have a
176 `reductions', even if reduced to 0.
177 (save_reductions): Adjust.
178 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
179 * src/print.c (print_reductions, print_actions): Adjust.
180 * src/output.c (action_row): Adjust.
181
2cec70b9
AD
1822001-12-27 Akim Demaille <akim@epita.fr>
183
184 * src/state.h, src/state.c (errs_new, errs_dup): New.
185 * src/LR0.c (set_state_table): Let all the states have an errs,
186 even if reduced to 0.
187 * src/print.c (print_errs, print_reductions): Adjust.
188 * src/output.c (output_actions, action_row): Adjust.
189 * src/conflicts.c (resolve_sr_conflict): Adjust.
190
13ca549a
AD
1912001-12-27 Akim Demaille <akim@epita.fr>
192
193 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
194
5092aba5
AD
1952001-12-27 Akim Demaille <akim@epita.fr>
196
197 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
198 * src/print.c: here.
199 (lookaheadset, shiftset): New, used as additional storage by
200 print_reductions.
201 (print_results): Adjust.
202 (print_shifts, print_gotos, print_errs): New, extracted from...
203 (print_actions): here.
204 * src/print_graph.c (print_actions): Remove dead code.
205
11e2beca
AD
2062001-12-27 Akim Demaille <akim@epita.fr>
207
208 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
209 `$n' and `@n'.
210
dac3c910
AD
2112001-12-27 Akim Demaille <akim@epita.fr>
212
213 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
214 (build_relations): Adjust.
215
d0b0fefa
AD
2162001-12-27 Akim Demaille <akim@epita.fr>
217
218 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
219 duplication.
220
adc8c848
AD
2212001-12-27 Akim Demaille <akim@epita.fr>
222
223 * src/reader.c (packgram): Catch nitems overflows.
224
14d293ac
AD
2252001-12-27 Akim Demaille <akim@epita.fr>
226
227 * src/files.c, src/files.h (guard_obstack): Remove.
228 * src/output.c (output): Adjust.
229 * src/reader.c (parse_braces): New, factoring...
230 (copy_action, copy_guard): these two which are renamed as...
231 (parse_action, parse_guard): these.
232 As a voluntary consequence, using braces around guards is now
233 mandatory.
234
f499b062
AD
2352001-12-27 Akim Demaille <akim@epita.fr>
236
237 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
238 * src/reader.c (symbol_list): `guard' and `guard_line' are new
239 members.
240 (symbol_list_new): Adjust.
241 (copy_action): action_line is the first line, not the last.
242 (copy_guard): Just as for actions, store the `action' only, not
243 the switch/case/break flesh.
244 Don't parse the user action that might follow the guard, let...
245 (readgram): do it, i.e., now, there can be an action after a
246 guard.
247 In other words the guard is just explicitly optional.
248 (packgram): Adjust.
249 * src/output.c (guards_output): New.
250 (output_parser): Call it when needed.
251 (output): Also free the guard and attrs obstacks.
252 * src/files.c, src/files.h (obstack_save): Remove.
253 (output_files): Remove.
254 As a result, if one needs the former `.act' file, using an
255 appropriate skeleton which requires actions and guards is now
256 required.
257 * src/main.c (main): Adjust.
258 * tests/semantic.at: New.
259 * tests/regression.at: Use `input.y' as input file name.
260 Avoid 8+3 problems by requiring input.c when the test needs the
261 parser.
262
d945f5cd
AD
2632001-12-27 Akim Demaille <akim@epita.fr>
264
265 * src/reader.c (symbol_list_new): Be sure to initialize all the
266 fields.
267
d200e455
AD
2682001-12-27 Akim Demaille <akim@epita.fr>
269
270 All the hacks using a final pseudo state are now useless.
271
272 * src/LR0.c (set_state_table): state_table holds exactly nstates.
273 * src/lalr.c (nLA): New.
274 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
275 instead of lookaheadsp from the pseudo state (nstate + 1).
276
f9507c28
AD
2772001-12-27 Akim Demaille <akim@epita.fr>
278
279 * src/output.c (action_row, token_actions): Use a state_t instead
280 of a integer, and nlookaheads instead of the following state's
281 lookaheadsp.
282
065fbd27
AD
2832001-12-27 Akim Demaille <akim@epita.fr>
284
285 * src/conflicts.c (log_resolution, flush_shift)
286 (resolve_sr_conflict, set_conflicts, solve_conflicts)
287 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
288 (conflicts_print, print_reductions): Use a state_t instead of an
289 integer when referring to a state.
290 As much as possible, depend upon nlookaheads, instead of the
291 `lookaheadsp' member of the following state (since lookaheads of
292 successive states are successive, the difference between state n + 1
293 and n served as the number of lookaheads for state n).
294 * src/lalr.c (add_lookback_edge): Likewise.
295 * src/print.c (print_core, print_actions, print_state)
296 (print_results): Likewise.
297 * src/print_graph.c (print_core, print_actions, print_state)
298 (print_graph): Likewise.
299 * src/conflicts.h: Adjust.
300
1b177bd7
AD
3012001-12-27 Akim Demaille <akim@epita.fr>
302
303 * src/bison.hairy: Formatting/comment changes.
304 ANSIfy.
305 Remove `register' indications.
306 Add plenty of `static'.
307
7742ddeb
AD
3082001-12-27 Akim Demaille <akim@epita.fr>
309
310 * src/output.c (prepare): Drop the muscle `ntbase' which
311 duplicates ntokens.
312 * src/bison.simple: Formatting/comment changes.
313 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
314 is an undocumented synonym.
315
1fa14068
AD
3162001-12-22 Akim Demaille <akim@epita.fr>
317
318 * src/output.c (output_table_data): Change the prototype to use
319 `int' for array ranges: some invocations do pass an int, not a
320 short.
321 Reported by Wayne Green.
322
b9752825
AD
3232001-12-22 Akim Demaille <akim@epita.fr>
324
325 Some actions of web2c.y are improperly triggered.
326 Reported by Mike Castle.
327
328 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
329 * tests/regression.at (Web2c): Rename as...
330 (Web2c Report): this.
331 (Web2c Actions): New.
332
776209d6
AD
3332001-12-22 Akim Demaille <akim@epita.fr>
334
335 Reductions in web2c.y are improperly reported.
336 Reported by Mike Castle.
337
338 * src/conflicts.c (print_reductions): Fix.
339 * tests/regression.at (Web2c): New.
340
275fc3ad
AD
3412001-12-18 Akim Demaille <akim@epita.fr>
342
343 Some host fail on `assert (!"foo")', which expands to
344 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
345 Reported by Nelson Beebee.
346
347 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
348 `#define it_succeeded 0' and `assert (it_succeeded)'.
349
897668ee
MA
3502001-12-17 Marc Autret <autret_m@epita.fr>
351
352 * src/bison.simple: Don't hard code the skeleton line and filename.
353 * src/output.c (output_parser): Rename 'line' as 'output_line'.
354 New line counter 'skeleton_line' (skeleton-line muscle).
355
ab3399e0
PE
3562001-12-17 Paul Eggert <eggert@twinsun.com>
357
358 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
359 YYDEBUG must be defined to a nonzero value.
360
361 * src/bison.simple (yytname): Do not assume that the user defines
362 YYDEBUG to a properly parenthesized expression.
363
3877f72b
AD
3642001-12-17 Akim Demaille <akim@epita.fr>
365
366 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
367 nlookaheads is a new member.
368 Adjust all users.
369 * src/lalr.h (nlookaheads): Remove this orphan declaration.
370 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
371 state.
776209d6 372
331dbc1b
AD
3732001-12-17 Akim Demaille <akim@epita.fr>
374
375 * src/files.h, src/files.c (open_files, close_files): Remove.
376 * src/main.c (main): Don't open/close files, nor invoke lex_free,
377 let...
378 * src/reader.c (reader): Do it.
776209d6 379
be750e4c
AD
3802001-12-17 Akim Demaille <akim@epita.fr>
381
382 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 383
709ae8c6
AD
3842001-12-17 Akim Demaille <akim@epita.fr>
385
386 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
387 (flush_reduce): New.
388 (resolve_sr_conflict): Adjust.
776209d6 389
f87685c3
AD
3902001-12-17 Akim Demaille <akim@epita.fr>
391
392 * src/output.c (output_obstack): Be static and rename as...
393 (format_obstack): this, to avoid any confusion with files.c's
394 output_obstack.
395 * src/reader.h (muscle_obstack): Move to...
396 * src/output.h: here, since it's defined in output.c.
397
837491d8
AD
3982001-12-17 Akim Demaille <akim@epita.fr>
399
400 * src/output.c (action_row, save_column, default_goto)
401 (sort_actions, matching_state, pack_vector): Better variable
402 locality.
403
796d61fb
AD
4042001-12-17 Akim Demaille <akim@epita.fr>
405
406 * src/output.c: Various formatting changes.
776209d6 407
64d15509
AD
4082001-12-17 Akim Demaille <akim@epita.fr>
409
410 * src/files.c (output_files): Free the output_obstack.
411 * src/main.c (main): Call print and print_graph conditionally.
412 * src/print.c (print): Work unconditionally.
413 * src/print_graph.c (print_graph): Work unconditionally.
414 * src/conflicts.c (log_resolution): Output only if verbose_flag.
415
fbc8ecb7
MA
4162001-12-16 Marc Autret <autret_m@epita.fr>
417
418 * src/output.c (actions_output): Fix. When we use %no-lines,
419 there is one less line per action.
420
f0440388
MA
4212001-12-16 Marc Autret <autret_m@epita.fr>
422
423 * src/bison.simple: Remove a useless #line directive.
424 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
425 * src/output.c (get_lines_number): New.
776209d6 426 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
427 output muscles.
428 Fix line numbering.
429 (actions_output): Computes the number of lines taken by actions.
430 (output_master_parser): Insert new skeleton which is the name of
431 the output parser file name.
432
a79986b8
MA
4332001-12-15 Marc Autret <autret_m@epita.fr>
434
435 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
436
4ec8e00f
MA
4372001-12-15 Marc Autret <autret_m@epita.fr>
438
439 * src/output.c (output_gram): Keep track of the hairy one.
440
1a4648ff
AD
4412001-12-15 Akim Demaille <akim@epita.fr>
442
443 Make `make distcheck' work.
444
445 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
446 system.h which uses libgettext.h.
447
9c2c67e6
AD
4482001-12-15 Akim Demaille <akim@epita.fr>
449
450 * src/nullable.c (set_nullable): Useless rules must be skipped,
451 otherwise, since we range over their symbols, we might look at a
452 nonterminal which no longer ``exists'', i.e., it is not counted in
453 `nvars', hence we overflow our arrays.
454
93ede233
AD
4552001-12-15 Akim Demaille <akim@epita.fr>
456
457 The header can also be produced directly, without any obstack!
458 Yahoo!
459
460 * src/files.c, src/files.h (defines_obstack): Remove.
461 (compute_header_macro): Global.
462 (defines_obstack_save): Remove.
463 * src/reader.c (parse_union_decl): No longer output to
464 defines_obstack: its content can be found in the `stype' muscle
465 anyway.
466 (output_token_translations): Merge into...
467 (symbols_output): this.
468 Rename as...
469 (symbols_save): this.
470 (reader): Adjust.
471 * src/output.c (header_output): New.
472 (output): Call it.
473
2666f928
AD
4742001-12-15 Akim Demaille <akim@epita.fr>
475
476 * src/reader.c (parse_union_decl): Instead of handling two obstack
477 simultaneously, use one to define the `stype' muscle, and use the
478 value of the latter to fill defines_obstack.
479 (copy_comment): Remove.
480 (copy_comment2): Work for a single obstack.
481 Rename as...
482 (copy_comment): this.
483
428046f8
AD
4842001-12-15 Akim Demaille <akim@epita.fr>
485
486 * src/lex.c, src/lex.h (xgetc): No longer static.
487 * src/reader.c (parse_union_decl): Revamp.
488
ea52d706
AD
4892001-12-15 Akim Demaille <akim@epita.fr>
490
491 Still making progress in separating Bison into (i) input, (ii)
492 process, (iii) output: now we can directly output the parser file
493 without using table_obstack at all.
494
495 * src/files.c, src/files.h (table_obstack): Bye bye.
496 (parser_file_name): New.
497 * src/files.c (compute_output_file_names): Compute it.
498 * src/output.c (actions_output, output_parser)
499 (output_master_parser): To a file instead of an obstack.
500
3f96f4dc
AD
5012001-12-15 Akim Demaille <akim@epita.fr>
502
503 Attach actions to rules, instead of pre-outputting them to
504 actions_obstack.
505
506 * src/gram.h (rule_t): action and action_line are new members.
507 * src/reader.c (symbol_list): Likewise.
508 (copy_action): Save the actions within the rule.
509 (packgram): Save them in rule_table.
510 * src/output.c (actions_output): New.
511 (output_parser): Use it on `%%actions'.
512 (output_rule_data): Don't free rule_table.
513 (output): Do it.
514 (prepare): Don't save the `action' muscle.
515 * src/bison.simple: s/%%action/%%actions/.
516
51576fb3
AD
5172001-12-15 Akim Demaille <akim@epita.fr>
518
519 * src/reader.c (copy_action): When --yacc, don't append a `;'
520 to the user action: let it fail if lacking.
dee049eb 521 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 522
2648a72d
AD
5232001-12-14 Akim Demaille <akim@epita.fr>
524
525 * src/lex.c (literalchar): Simply return the char you decoded, non
526 longer mess around with obstacks and int pointers.
527 Adjust all callers.
528
92790e5b
AD
5292001-12-14 Akim Demaille <akim@epita.fr>
530
531 * src/lex.c (literalchar): Don't escape the special characters,
532 just decode them, and keep them as char (before, eol was output as
533 the 2 char string `\n' etc.).
534 * src/output.c (output_rule_data): Use quotearg to output the
535 token strings.
536
927c1557
PE
5372001-12-13 Paul Eggert <eggert@twinsun.com>
538
539 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
540 Do not infringe on the global user namespace when using C++.
541 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
542 All uses of `fprintf' and `stderr' changed.
543
544 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
545
ed8e1f68
AD
5462001-12-13 Akim Demaille <akim@epita.fr>
547
548 The computation of nullable is broken: it doesn't handle empty
549 RHS's properly.
550
551 * tests/torture.at (GNU AWK Grammar): New.
552 * tests/sets.at (Nullable): New.
553 * src/nullable.c (set_nullable): Instead of blindly looping over
554 `ritems', loop over the rules, and then over their rhs's.
555
556 Work around Autotest bugs.
557
558 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
559 frame, because Autotest understand lines starting with a `+' as
560 traces from the shell. Then, they are not processed properly.
561 Admittedly an Autotest bug, but we don't have time to wait for
562 Autotest to catch up.
563 * tests/regression.at (Broken Closure): Adjust to the new table
564 frames.
565 Move to...
566 * tests/sets.at: here.
567
cb581495
AD
5682001-12-13 Akim Demaille <akim@epita.fr>
569
570 * src/closure.c (closure): Use nrules instead of playing tricks
571 with BITS_PER_WORD.
572
2e729273
AD
5732001-12-13 Akim Demaille <akim@epita.fr>
574
575 * src/print.c (print_actions): Output the handling of `$' as the
576 traces do: shifting the token EOF. Before EOF was treated as a
577 nonterminal.
578 * tests/regression.at: Adjust some tests.
579 * src/print_graph.c (print_core): Complete the set of items via
580 closure. The next-to-final and final states are still unsatisfying,
581 but that's to be addressed elsewhere.
582 No longer output the rule numbers, but do output the state number.
583 A single loop for the shifts + gotos is enough, but picked a
584 distinct color for each.
585 (print_graph): Initialize and finalize closure.
586
107f7dfb
AD
5872001-12-13 Akim Demaille <akim@epita.fr>
588
589 * src/reader.c (readgram): Remove dead code, an strip useless
590 braces.
591 (get_type): Remove, unused.
592
9b53a24f
AD
5932001-12-12 Akim Demaille <akim@epita.fr>
594
595 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
596 on that of lib/error.c.
597
dbfb6dcd
AD
5982001-12-12 Akim Demaille <akim@epita.fr>
599
600 Some hosts don't like `/' in includes.
601
602 * src/system.h: Include libgettext.h without qualifying the path.
603 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
604 $(top_srcdir).
605
c25fb648
MA
6062001-12-11 Marc Autret <autret_m@epita.fr>
607
608 * src/output.c (output_parser): Remove useless muscle.
609
710ddc4f
MA
6102001-12-11 Marc Autret <autret_m@epita.fr>
611
612 * src/bison.simple: Remove #line just before %%epilogue. It
613 is now handled in ...
614 * src/reader.c (read_additionnal_code): Add the output of a
615 #line for the epilogue.
616
e83d80b8
MA
6172001-12-10 Marc Autret <autret_m@epita.fr>
618
927c1557 619 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
620 replace precedent remove.
621 * src/bison.simple: Remove #line before %%prologue because
622 %%input-line is wrong at this time.
623
971d5158
MA
6242001-12-10 Marc Autret <autret_m@epita.fr>
625
626 * src/reader.c (symbols_output): Clean up.
927c1557 627 * src/output.c (output_gram, output): Clean up.
971d5158 628
5edafffd
AD
6292001-12-10 Akim Demaille <akim@epita.fr>
630
631 * src/lalr.c (initialize_lookaheads): New. Extracted from...
632 * src/LR0.c (set_state_table): here.
633 * src/lalr.c (lalr): Call it.
634
0279f8e9
AD
6352001-12-10 Akim Demaille <akim@epita.fr>
636
637 * src/state.h (shifts): Remove the `number' member: shifts are
638 attached to state, hence no longer need to be labelled with a
639 state number.
640
190c4f5f
AD
6412001-12-10 Akim Demaille <akim@epita.fr>
642
643 Now that states have a complete set of members, the linked list of
644 shifts is useless: just fill directly the state's shifts member.
645
646 * src/state.h (shifts): Remove the `next' member.
647 * src/LR0.c (first_state, last_state): Remove.
648 Adjust the callers.
649 (augment_automaton): Don't look for the shifts that must be added
650 a shift on EOF: it is those of the state we looked for! But now,
651 since shifts are attached, it is no longer needed to looking
652 merely by its id: its number.
653
2a73b93d
AD
6542001-12-10 Akim Demaille <akim@epita.fr>
655
656 * src/LR0.c (augment_automaton): Better variable locality.
657 Remove an impossible branch: if there is a state corresponding to
658 the start symbol being shifted, then there is shift for the start
659 symbol from the initial state.
660
74392f6a
AD
6612001-12-10 Akim Demaille <akim@epita.fr>
662
663 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
664 only when appropriate: when insert_start_shifting_state' is not
665 invoked.
666 * tests/regression.at (Rule Line Numbers): Adjust.
667
37c82725
AD
6682001-12-10 Akim Demaille <akim@epita.fr>
669
670 * src/LR0.c (augment_automaton): Now that all states have shifts,
671 merge the two cases addition shifts to the initial state.
672
6a164e0c
AD
6732001-12-10 Akim Demaille <akim@epita.fr>
674
675 * src/lalr.c (set_state_table): Move to...
676 * src/LR0.c: here.
677 * src/lalr.c (lalr): Don't call it...
678 * src/LR0.c (generate_states): do it.
679 * src/LR0.h (first_state): Remove, only the table is used.
680
7215de24
AD
6812001-12-10 Akim Demaille <akim@epita.fr>
682
683 * src/LR0.h (first_shift, first_reduction): Remove.
684 * src/lalr.c: Don't use first_shift: find shifts through the
685 states.
686
80e25d4d
AD
6872001-12-10 Akim Demaille <akim@epita.fr>
688
689 * src/LR0.c: Attach shifts to states as soon as they are
690 computed.
691 * src/lalr.c (set_state_table): Instead of assigning shifts to
692 state, just assert that the mapping was properly done.
693
0ab3728b
AD
6942001-12-10 Akim Demaille <akim@epita.fr>
695
696 * src/LR0.c (insert_start_shift): Rename as...
697 (insert_start_shifting_state): this.
698 (insert_eof_shifting_state, insert_accepting_state): New.
699 (augment_automaton): Adjust.
700 Better locality of the variables.
701 When looking if the start_symbol is shifted from the initial
702 state, using `while (... symbol != start_symbol ...)' sounds
703 better than `while (... symbol < start_symbol ...)': If fail
704 to see how the order between symbols could be relevant!
705
78af9bbc
AD
7062001-12-10 Akim Demaille <akim@epita.fr>
707
708 * src/getargs.h: Don't declare `spec_name_prefix' and
709 `spec_file_prefix', declared by src/files.h.
710 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
711 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
712 * src/output.c (prepare): Adjust.
713 * src/reader.c (symbols_output): Likewise.
714 * src/vmsgetargs.c: Vaguely adjust, but who cares?
715
bdef2a41
AD
7162001-12-10 Akim Demaille <akim@epita.fr>
717
718 * src/muscle_tab.c (muscle_init): NULL is a better default than
719 `"0"'.
720
3735969c
AD
7212001-12-10 Akim Demaille <akim@epita.fr>
722
723 * src/reader.c (reader): Calling symbols_output once is enough.
724
49701457
AD
7252001-12-10 Akim Demaille <akim@epita.fr>
726
727 Now that states have a complete set of members, the linked list of
728 reductions is useless: just fill directly the state's reductions
729 member.
730
731 * src/state.h (struct reductions): Remove member `number' and
732 `next'.
733 * src/LR0.c (first_reduction, last_reduction): Remove.
734 (save_reductions): Don't link the new reductions, store them in
735 this_state.
736 * src/lalr.c (set_state_table): No need to attach reductions to
737 states, it's already done.
738 * src/output.c (output_actions): No longer free the shifts, then
739 the reductions, then the states: free all the states and their
740 members.
741
0edad749
AD
7422001-12-10 Akim Demaille <akim@epita.fr>
743
744 * src/options.c (OPTN, DRTV, BOTH): New.
745 (option_table): Use them.
746
0edad749
AD
747 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
748 the job of system.h.
749 * src/options.c: Don't include stdio.h and xalloc.h for the same
750 reasons.
751
5449dd0f
AD
7522001-12-10 Akim Demaille <akim@epita.fr>
753
754 * src/output.c (output, prepare): Make sure the values of the
755 muscles `action' and `prologue' are 0-terminated.
756
a870c567
AD
7572001-12-10 Akim Demaille <akim@epita.fr>
758
759 Clean up GCC warnings.
760
761 * src/reader.c (copy_action): `buf' is not used.
762 (parse_skel_decl): Be static.
763 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
764 * src/options.h (create_long_option_table): Have a real prototype.
765 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
766 (hash_delete_at): Return const void *.
767 Adjust casts to preserve the const.
768
80df8768
AD
7692001-12-10 Akim Demaille <akim@epita.fr>
770
771 * configure.in: Require 2.52g.
772 M4 is not needed, but AUTOM4TE is.
773 * m4/m4.m4: Remove.
774 * tests/Makefile.am: Adjust.
775
f693ad14
AD
7762001-12-10 Akim Demaille <akim@epita.fr>
777
778 One structure for states is enough, even though theoretically
779 there are LR(0) states and LALR(1) states.
780
781 * src/lalr.h (state_t): Remove.
782 (state_table): Be state_t **, not state_t *.
783 * src/state.h (core, CORE_ALLOC): Rename as...
784 (state_t, STATE_ALLOC): this.
785 Add the LALR(1) members: shifts, reductions, errs.
786 * src/LR0.c (state_table): Rename as...
787 (state_hash): this, to avoid name clashes with the global
788 `state_table'.
789 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
790 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
791
74ffbcb6
AD
7922001-12-10 Akim Demaille <akim@epita.fr>
793
794 Bison dumps core on bash.y.
795 Reported by Pascal Bart.
796
797 * src/warshall.c (bitmatrix_print): New.
798 (TC): Use it.
799 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
800 j must be the outer loop.
801 * tests/regression.at (Broken Closure): New.
802
07708e19
AD
8032001-12-05 Akim Demaille <akim@epita.fr>
804
805 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
806 its argument.
807